Bug #33827 | COMMIT AND CHAIN causes serious Valgrind error | ||
---|---|---|---|
Submitted: | 11 Jan 2008 20:54 | Modified: | 1 Dec 2008 8:39 |
Reporter: | Guilhem Bichot | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: General | Severity: | S2 (Serious) |
Version: | 5.1-bk, 5.0-bk | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[11 Jan 2008 20:54]
Guilhem Bichot
[26 May 2008 15:59]
Georgi Kodinov
Verified as described in 5.0-bk. I propose the following fix (consistent with how start_transaction_opt is handled now) : === modified file 'sql/sql_yacc.yy' --- sql/sql_yacc.yy 2008-04-10 00:34:38 +0000 +++ sql/sql_yacc.yy 2008-05-26 15:51:22 +0000 @@ -9438,7 +9438,11 @@ opt_chain: /* empty */ { $$= (YYTHD->variables.completion_type == 1); } | AND_SYM NO_SYM CHAIN_SYM { $$=0; } - | AND_SYM CHAIN_SYM { $$=1; } + | AND_SYM CHAIN_SYM + { + $$=1; + Lex->start_transaction_opt= 0; + } ;
[26 May 2008 16:00]
Georgi Kodinov
The workaround is to use COMMIT/START TRANSACTION instead of COMMIT AND CHAIN
[26 May 2008 16:36]
Guilhem Bichot
Hello Georgi, your fix fixes COMMIT AND CHAIN. But not all other callers of begin_trans() (like rpl_injector.cc and maybe other, a grep would tell), I had put an analysis in this bug report.
[1 Dec 2008 8:39]
Sergei Golubchik
Guilhem said he cannot repeat it anymore
[8 May 2009 16:56]
MySQL Verification Team
I opened bug #44664 with testcases for both these.