I've been debugging an issue with prepared queries crashing on the 2nd execute() on my FreeBSD box with the following:
- perl-5.16.2_1
- p5-DBD-mysql-4.021
- p5-DBI-1.625
- mariadb-server-5.5.30
After connect if I set
$DB->{'mysql_server_prepare'} = 1
the first execute() works but on the 2nd one the connection is lost as mariadb/mysql crashes. If I set$DB->{'mysql_server_prepare'} = 0
after connect it works as expected.The prepared query is:
our $shop::test_query = $DB->prepare("SELECT id, merchant_id, name, price, image FROM lbn_shop_products WHERE category_id = ? ORDER BY purchase_count DESC, ctime DESC LIMIT ?, ?");
Executing the queries:
#>print $shop::test_query->execute(11, 0, 15) 3 $VAR1 = 1; #>print $shop::test_query->execute(11, 0, 15) Database Error: Lost connection to MySQL server during query File Line Subroutine ...k/shared/lib/exceptions.pm 93 (eval) oyster::console::__ANON__ ...ork/shared/lib/database.pm 17 exceptions::throw ...ared/lib/oyster/console.pm 73 (eval) database::handle_error ...ared/lib/oyster/console.pm 31 oyster::_console_execute ...k/shared/lib/exceptions.pm 178 (eval) oyster::console::__ANON__ ...ared/lib/oyster/console.pm 64 exceptions::try script/console.pl 38 oyster::console::start ! HASH(0x7fdcf8abd5b8)
The mysql/mariadb log isn't very useful:
130525 08:45:41 mysqld_safe mysqld restarted
I believe this is the same issue mentioned on both of these:
http://bugs.mysql.com/bug.php?id=27421
https://rt.cpan.org/Public/Bug/Display.html?id=83497Is there any additional information that would be useful such as setting the trace level and reporting the output?
—
Reply to this email directly or view it on GitHub.