Bug #4912 | mysqld crashs in case a statement is executed a second time | ||
---|---|---|---|
Submitted: | 5 Aug 2004 16:07 | Modified: | 21 Aug 2004 0:05 |
Reporter: | Joerg Rueschenschmidt | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.3.beta | OS: | Linux (LINUX and others) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[5 Aug 2004 16:07]
Joerg Rueschenschmidt
[6 Aug 2004 9:07]
Joerg Rueschenschmidt
Hi, the given query is an example only. It looks like the problem appears in general when a filter methode is used in a query. e.g. where ( not ( <expr with more then 2 conditions >) Regards ... Joerg
[8 Aug 2004 16:31]
Guilhem Bichot
Joerg, thank you very much for this detailed bug report and program, which made it easy to reproduce. Konstantin: I am assigning it to you as it pops during prepared statements. It first aborts on your assertion DBUG_ASSERT("Pure virtual method called." == "Aborted"); and then after removing this assertion it segfaults here: longlong Item_func_not::val_int() { DBUG_ASSERT(fixed == 1); double value=args[0]->val(); // <-- here Here's how I compiled the testcase provided by our user: client]$ gcc -g3 -I ../include -c -o test.o test.c ;gcc -o test test.o ../libmysql/.libs/libmysqlclient.a -L/usr/lib -lcrypt -lz -lssl ; ./test INF : First execute (end of data found) - okay ! and then it hangs because server crashed.
[11 Aug 2004 23:48]
Konstantin Osipov
Very good to see that my assertions work!-) - it means I'm on the right track. Thanks, Guilhem.
[12 Aug 2004 7:10]
Konstantin Osipov
I was able to repeat the bug using SQL syntax for prepared statements: DROP TABLE IF EXISTS t1; CREATE TABLE t1 (col1 VARCHAR(2), col2 VARCHAR(3)) PREPARE stmt1 FROM "SELECT col1, col2 FROM t1 WHERE (NOT (col1 = 'aa' AND col2 < 'zzz'))" EXECUTE stmt1; EXECUTE stmt1;
[21 Aug 2004 0:05]
Konstantin Osipov
Fixed in 4.1.4: bk commit - 4.1 tree (konstantin:1.1979) BUG#4912