maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #00830
Re: [DBD-mysql] mysql_server_prepare causes segmentation fault on execute (#44)
Hi Jan,
I suspect it's a server issue vs. client, since as you say mysql crashes. No client should be able to do that :) The real test, is to write a program in C against libmysql that uses the server-side prepared statement API and see if you can reproduce it there. Monty and his team definitely would want to know about the crash.
Any chance you could run that with mysql running debug and capture a trace? I would want to get that to Monty and team ASAP.
Regards,
Patrick
On May 25, 2013, at 6:02 AM, Jan Pingel <notifications@xxxxxxxxxx> wrote:
> 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=83497
>
> Is 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.
>