Bug #16759 Logging of PS, prepared using C API is broken
Submitted: 24 Jan 2006 22:56 Modified: 25 Jan 2006 13:20
Reporter: Petr Chardin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:mysql-5.0.19 OS:Linux (Suse linux 10.0)
Assigned to: Assigned Account CPU Architecture:Any

[24 Jan 2006 22:56] Petr Chardin
Description:
PSs, prepared from C API aren't logged. Here is a sample of the logfile:

                      1 Prepare     [1]
                      1 Execute     [1] CREATE TABLE t1 (a INT, b INT, c INT, UNIQUE (A), UNIQUE(B))
                      1 Prepare     [2]
                      1 Execute     [2] INSERT t1 VALUES (1,2,10), (3,4,20)
                      1 Prepare     [3]
                      1 Execute     [3] INSERT t1 VALUES (5,6,30), (7,4,40), (8,9,60) ON DUPLICATE KEY UPDATE c=c+100

As it is easy to see, prepare command lacks the text of the command being prepared.

How to repeat:
Start mysqld, and prepare a statement from using C api.
An easy way to repeat it from development tree is to use mysql_client_test:
./sql/mysqld --log
./tests/mysql_client_test  -uroot
then examine the log file
[25 Jan 2006 13:20] Axel Schwenke
This is a duplicate of bug #15557 which in turn is a duplicate of bug #14346.