Bug #11688 Client outputs garbage between resultsets when running multi-statement query
Submitted: 1 Jul 2005 12:32 Modified: 17 Aug 2005 18:05
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Any (*)
Assigned to: Jim Winstead CPU Architecture:Any

[1 Jul 2005 12:32] Sergey Petrunya
Description:
5.0-bk, last changeset:
ChangeSet@1.1855.1.1, 2005-07-01 07:05:42+03:00, bell@sanja.is.com.ua
  Name resolution context added (BUG#6443)
"mysql" command line client prints strange characters when running a multi-statement query.

How to repeat:
Run the below queries and note the extra "tt1t1ii" characters printed between resultsets:

mysql> delimiter //
mysql> create table t1 (i int); insert into t1 values (1); select * from t1 where i = 1; insert into t1 values  (2),(3),(4); select * from t1 where i = 2; select * from t1 where i = 3//
Query OK, 0 rows affected (0.01 sec)

Query OK, 1 row affected (0.01 sec)

+------+
| i    |
+------+
|    1 |
+------+
1 row in set (0.01 sec)

Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

+------+
| i    |
+------+
|    2 |
+------+
1 row in set (0.01 sec)
tt1t1ii
       ?

+------+
| i    |
+------+
|    3 |
+------+
1 row in set (0.01 sec)
tt1t1ii
       ?
mysql>
[1 Jul 2005 12:57] Aleksey Kishkin
tested on windows, mysql 5.0.7, got the garbage as well

+------+
| i    |
+------+
|    2 |
+------+
1 row in set (0.06 sec)
t☻t1☻t1☺i☺i♀?

+------+
| i    |
+------+
|    3 |
+------+
1 row in set (0.06 sec)
t☻t1☻t1☺i☺i♀?
[4 Jul 2005 8:41] Sergey Petrunya
There are chances that fix for this bug will have some intersection with BUG#9814
[4 Jul 2005 19:41] Sergey Petrunya
Please disregard the previous comment, that bug turned out to be unrelated.
[6 Aug 2005 0:58] Jim Winstead
Happens in 4.1, too. The data returned by mysql_info() appears to be getting handled incorrectly.
[11 Aug 2005 1:31] 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/internals/28139
[15 Aug 2005 22:23] Jim Winstead
Fixed in 4.1.14 and 5.0.12.
[17 Aug 2005 18:05] Paul Dubois
Noted in 4.1.14, 5.0.12 changelogs.