Bug #32624 | Error with multi queries in MySQL Embedded Server 5.1.22 | ||
---|---|---|---|
Submitted: | 22 Nov 2007 14:36 | Modified: | 11 Jan 2008 16:15 |
Reporter: | Oleg Yaroshevych | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Embedded Library ( libmysqld ) | Severity: | S2 (Serious) |
Version: | 5.0, 5.1.22-rc-community | OS: | Any (WinXP SP2, Linux, probably all) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
Tags: | embedded |
[22 Nov 2007 14:36]
Oleg Yaroshevych
[23 Nov 2007 16:30]
Hartmut Holzgraefe
Verified with a slightly modified test program on linux, works fine non-embedded and with 4.1 embedded but crashes on 5.0 and 5.1 Will attach test project in the bugs "Files" section, to compile embedded just do ./configure --with-mysql=... make ./bug32624 To build non-embedded replace MYSQL_USE_EMBEDDED_API() with MYSQL_USE_CLIENT_API() and run autgen.sh, then re-build as shown above 4.1 output looks like this: 4.1.22-embedded-debug -1 1 1 Table 'mysql.no_such_table' doesn't exist 5.1.22 output looks like this: 5.1.22-rc-embedded-debug -1 1 1 Table 'mysql.no_such_table' doesn't exist Segmentation fault (core dumped) The gdb backtrace for a build against 5.1.22 looks like this: (gdb) bt #0 0x080a6228 in emb_read_query_result (mysql=0x87eabe0) at lib_sql.cc:234 #1 0x080a0add in mysql_next_result (mysql=0x87eabe0) at libmysql.c:5199 #2 0x0804df49 in main () at bug32624.c:53 Current language: auto; currently c++ (gdb) bt full #0 0x080a6228 in emb_read_query_result (mysql=0x87eabe0) at lib_sql.cc:234 thd = (class THD *) 0x8df0348 res = (MYSQL_DATA *) 0x0 __PRETTY_FUNCTION__ = "my_bool emb_read_query_result(MYSQL*)" #1 0x080a0add in mysql_next_result (mysql=0x87eabe0) at libmysql.c:5199 _db_func_ = 0x856c244 "?func" _db_file_ = 0x856c24a "?file" _db_level_ = 1 _db_framep_ = (char **) 0x1 #2 0x0804df49 in main () at bug32624.c:53 res = <value optimized out> mysql = (MYSQL *) 0x87eabe0
[23 Nov 2007 16:33]
Hartmut Holzgraefe
test project
Attachment: bug32624-0.1.tar.gz (application/x-gunzip, text), 294.97 KiB.
[29 Nov 2007 6:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/38786 ChangeSet@1.2581, 2007-11-29 10:37:07+04:00, holyfoot@mysql.com +3 -0 Bug #32624 Error with multi queries in MySQL embedded server 5.1.22. server status wasn't properly sent to the client after the error by the embedded server. Wasn't noticed before as one usually stopped retrieving results after he gets an error.
[14 Dec 2007 8:14]
Bugs System
Pushed into 5.0.54
[14 Dec 2007 8:16]
Bugs System
Pushed into 5.1.23-rc
[14 Dec 2007 8:19]
Bugs System
Pushed into 6.0.5-alpha
[11 Jan 2008 16:15]
Paul DuBois
Noted in 5.0.54, 5.1.23, 6.0.5 changelogs. Use of CLIENT_MULTI_QUERIES caused libmysqld to crash.