mysql help sends unchecked contents to mysqld
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Confirmed
|
Medium
|
Unassigned | ||
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Unassigned | ||
5.1 |
Fix Released
|
Medium
|
Unassigned | ||
5.5 |
Fix Released
|
Medium
|
Unassigned | ||
5.6 |
Fix Released
|
Medium
|
Unassigned | ||
Fedora |
Unknown
|
Unknown
|
|||
mysql-5.1 (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Oracle Bug: #12615411
MySQL Bug: #61352
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1
Server version: 5.2.7-MariaDB (MariaDB - http://
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table t1 (`id` int(11) auto_increment, `name` varchar(255), primary key (`id`));
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1(`name`) VALUES ('test1'
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> SELECT * FORM t1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FORM t1' at line 1
mysql> SELECT * FROM t1;
+----+-------+
| id | name |
+----+-------+
| 1 | test1 |
| 2 | test2 |
| 3 | test3 |
| 4 | test4 |
+----+-------+
4 rows in set (0.00 sec)
mysql> DELETE FROM t1 LIMIT 1;
Query OK, 1 row affected (0.00 sec)
mysql> help 'contents'
mysql> SELECT * FROM t1;
+----+-------+
| id | name |
+----+-------+
| 3 | test3 |
| 4 | test4 |
+----+-------+
2 rows in set (0.00 sec)
mysql> \q
Bye
=======
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.2.7-MariaDB (MariaDB - http://
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> help 'contents'
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Your MariaDB connection id is 2
Server version: 5.2.7-MariaDB (MariaDB - http://
Changed in maria: | |
milestone: | none → 5.1 |
status: | New → Confirmed |
importance: | Undecided → Medium |
security vulnerability: | yes → no |
visibility: | private → public |
Changed in mysql-5.1 (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in percona-server: | |
importance: | Undecided → Medium |
Changed in percona-server: | |
assignee: | nobody → Patrick Crews (patrick-crews) |
Changed in percona-server: | |
assignee: | Patrick Crews (patrick-crews) → nobody |
Changed in percona-server: | |
status: | New → Confirmed |
Changed in percona-server: | |
status: | Confirmed → Triaged |
tags: | added: upstream |
From the MySQL Bug Report:
[15 Jun 14:28] Shane Bester
the problem seems to be that glob_buffer contains this incorrectly sprintf'd into the
pointer:
sprintf((char*) glob_buffer.ptr(), thread_ id(&mysql) , server_ version_ string( &mysql) );
"Your MySQL connection id is %lu\nServer version: %s\n",
mysql_
Now further down in the code, the is_empty() method still believes the String
to be empty, but it's not.