Bug #44495 | Prepared Statement: CALL p(<x>) - `thd->protocol == &thd->protocol_text' failed | ||
---|---|---|---|
Submitted: | 27 Apr 2009 16:30 | Modified: | 18 Dec 2009 13:13 |
Reporter: | Ulf Wendel | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.34 | OS: | Linux |
Assigned to: | Davi Arnaut | CPU Architecture: | Any |
[27 Apr 2009 16:30]
Ulf Wendel
[27 Apr 2009 16:44]
MySQL Verification Team
Thank you for the bug report. Could you please try the latest source server I couldn't repeat on Windows: c:\build>bugtest.exe Server: 5.1.35-Win X64 revno: 2853-log Protocol: 10 Client: 5.1.35 CALL using stmt_prepare()/stmt_execute... c:\build>
[27 Apr 2009 16:57]
MySQL Verification Team
Sorry disregard my last comment I was using a release server. c:\dbs>c:\dbs\5.1\bin\mysqld-debug --defaults-file=c:\dbs\5.1\my.ini --standalone --console 090427 13:55:25 InnoDB: Started; log sequence number 0 48003 090427 13:55:41 [Note] Event Scheduler: Loaded 0 events 090427 13:55:41 [Note] c:\dbs\5.1\bin\mysqld-debug: ready for connections. Version: '5.1.35-Win X64 revno: 2853-debug-log' socket: '' port: 3510 Source distribution Assertion failed: thd->protocol == &thd->protocol_text, file .\sql_prepare.cc, line 2233 090427 13:56:27 - mysqld got exception 0x80000003 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8384512 read_buffer_size=131072 max_used_connections=1 max_threads=151 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338114 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd: 0x82aabf8 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... 00000001401E11A5 mysqld-debug.exe!my_sigabrt_handler()[mysqld.cc:2013] 0000000140745921 mysqld-debug.exe!raise()[winsig.c:597] 000000014076D743 mysqld-debug.exe!__crtMessageWindowA()[dbgrpt.c:434] 000000014074688C mysqld-debug.exe!_VCrtDbgReportA()[dbgrptt.c:420] 000000014076D183 mysqld-debug.exe!_CrtDbgReportV()[dbgrpt.c:301] 000000014076D11D mysqld-debug.exe!_CrtDbgReport()[dbgrpt.c:317] 000000014075BE7B mysqld-debug.exe!_NMSG_WRITE()[crt0msg.c:197] 0000000140738A97 mysqld-debug.exe!abort()[abort.c:68] 0000000140731434 mysqld-debug.exe!_wassert()[assert.c:212] 00000001403786E2 mysqld-debug.exe!mysql_sql_stmt_prepare()[sql_prepare.cc:2233] 000000014033D915 mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:2209] 000000014027B9E7 mysqld-debug.exe!sp_instr_stmt::exec_core()[sp_head.cc:2904] 000000014027AA7C mysqld-debug.exe!sp_lex_keeper::reset_lex_and_exec_core()[sp_head.cc:2732] 000000014027AF85 mysqld-debug.exe!sp_instr_stmt::execute()[sp_head.cc:2846] 0000000140275BF7 mysqld-debug.exe!sp_head::execute()[sp_head.cc:1252] 0000000140277E81 mysqld-debug.exe!sp_head::execute_procedure()[sp_head.cc:1981] 00000001403443A6 mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:4323] 0000000140380FAB mysqld-debug.exe!Prepared_statement::execute()[sql_prepare.cc:3568] 000000014037FF5C mysqld-debug.exe!Prepared_statement::execute_loop()[sql_prepare.cc:3241] 0000000140379493 mysqld-debug.exe!mysql_stmt_execute()[sql_prepare.cc:2464] 000000014033B0D3 mysqld-debug.exe!dispatch_command()[sql_parse.cc:1172] 000000014033A5F7 mysqld-debug.exe!do_command()[sql_parse.cc:857] 00000001402FE8B6 mysqld-debug.exe!handle_one_connection()[sql_connect.cc:1115] 000000014053CAA5 mysqld-debug.exe!pthread_start()[my_winthread.c:85] 0000000140747935 mysqld-debug.exe!_callthreadstart()[thread.c:295] 0000000140747907 mysqld-debug.exe!_threadstart()[thread.c:277] 0000000076FEC3BD kernel32.dll!BaseThreadInitThunk() 0000000077134581 ntdll.dll!RtlUserThreadStart() Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 000000000833E268=PREPARE stmt FROM @sql thd->thread_id=1 thd->killed=NOT_KILLED The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
[4 May 2009 8:58]
Konstantin Osipov
This is fixed in 6.0.
[15 Jul 2009 17:03]
Konstantin Osipov
Davi, please use the committed patch, but add a test case.
[15 Jul 2009 17:18]
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/78756 3017 Konstantin Osipov 2009-07-15 A fix for Bug#44495 "Prepared Statement: CALL p(<x>) - `thd->protocol == &thd->protocol_text' failed" Do not assume that SQL prepared statements always run in text protocol. When invoked from a stored procedure, which is itself invoked by means of prepared CALL statement, the protocol may be binary. Juggle with the protocol only when we want to change it to binary in COM_STMT_EXECUTE, COM_STMT_PREPARE. This is a backport from 5.4/6.0, where the bug was fixed as part of WL#4264 "Backup: Stabilize Service Interface"
[15 Jul 2009 18:27]
Davi Arnaut
Queued to 5.1-bugteam
[15 Jul 2009 18:28]
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/78772 3028 Davi Arnaut 2009-07-15 [merge] Bug#44495: Prepared Statement: CALL p(<x>) - `thd->protocol == &thd->protocol_text' failed Merge Konstantin's patch and add a test case. @ tests/mysql_client_test.c Add test case for Bug#44495
[3 Aug 2009 17:26]
Konstantin Osipov
Bug#38206 was marked a duplicate of this bug.
[4 Aug 2009 19:52]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:davi.arnaut@sun.com-20090715183127-sdsodoe5w8jvtijt) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45]
Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[1 Sep 2009 18:21]
Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs. Using mysql_stmt_execute() to call a stored procedure could cause a server crash.
[1 Oct 2009 5:58]
Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25]
Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25]
Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50]
Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[7 Oct 2009 20:24]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.
[13 Oct 2009 18:30]
Bugs System
Pushed into 5.1.41 (revid:build@mysql.com-20091013182142-vgsjky3t1v4btufv) (version source revid:build@mysql.com-20091013182142-vgsjky3t1v4btufv) (merge vers: 5.1.41) (pib:13)
[13 Oct 2009 23:29]
Paul DuBois
Already fixed in 5.1.38.
[22 Oct 2009 6:36]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091022063126-l0qzirh9xyhp0bpc) (version source revid:alik@sun.com-20091019135554-s1pvptt6i750lfhv) (merge vers: 6.0.14-alpha) (pib:13)
[22 Oct 2009 7:08]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091022060553-znkmxm0g0gm6ckvw) (version source revid:alik@sun.com-20091019131937-nchb8tjk88jpfjav) (merge vers: 5.5.0-beta) (pib:13)
[22 Oct 2009 19:15]
Paul DuBois
Noted in 5.5.0, 6.0.14 changelogs.
[18 Dec 2009 10:36]
Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:52]
Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:07]
Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:21]
Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)
[18 Dec 2009 13:13]
MC Brown
Already documented in 5.1.41