Bug #19207 Final parenthesis omitted for CREATE INDEX in Stored Procedure
Submitted: 20 Apr 2006 1:44 Modified: 15 Aug 2006 14:47
Reporter: Kolbe Kegel
Status: Closed
Category:Server: Replication Severity:S2 (Serious)
Version:5.0.20 OS:Linux (Linux)
Assigned to: Bugs System Target Version:

[20 Apr 2006 1:44] Kolbe Kegel
Description:
The final parenthesis of a CREATE INDEX statment in a Stored Procedure is omitted from
the binary log when the SP is called.

How to repeat:
create table t1 (id int);
create procedure sp1 () create index idx_uniq on t1 (id);
call sp1();

Binary log contains this:

# at 1398
#060419 12:25:54 server id 1  end_log_pos 1485  Query   thread_id=5
exec_time=0     error_code=0
SET TIMESTAMP=1145474754;
create table t1 (id int);
# at 1566
#060419 12:26:34 server id 1  end_log_pos 1712  Query   thread_id=5
exec_time=0     error_code=0
SET TIMESTAMP=1145474794;
CREATE DEFINER=`root`@`localhost` procedure sp1 () create index idx_uniq on t1
(id);
# at 1712
#060419 12:26:34 server id 1  end_log_pos 1814  Query   thread_id=5
exec_time=0     error_code=0
SET TIMESTAMP=1145474794;
create index idx_uniq on t1 (id;

Suggested fix:
Obvious.
[7 Jul 2006 19:24] 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/8923
[2 Aug 2006 17:54] Konstantin Osipov
Pushed into 5.0.25
[9 Aug 2006 13:04] Tomash Brechko
Bug#17990 is a duplicate of this bug.
[9 Aug 2006 13:05] Andrey Hristov
Seems related to bug#17990: Missing right parenthesis in general log

Please when closing try to reproduce #17990 and if not reproducable any more close as
dupe to this one.
[14 Aug 2006 23:22] Konstantin Osipov
Merged into 5.1.12
[15 Aug 2006 14:47] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.25 and 5.1.12 changelogs.
[18 Oct 2006 15:10] Andrey Hristov
Bug#22128 "SHOW PROCESSLIST truncates last value of query", as marked as duplicate of this
one.