Below is the list of changes that have just been committed into a local
4.1 repository of tnurnberg. When tnurnberg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-07-13 09:04:06+02:00, tnurnberg@stripped +3 -0
Bug#20432: mysql client interprets commands in comments
do not look for client-specific commands while inside a multi-line comment.
we will allow multi-comments pretty much anywhere within SQL-statements,
but client-specific commands (help, use, print, ...) must be the first token
in the input.
client/mysql.cc@stripped, 2006-07-13 09:04:04+02:00, tnurnberg@stripped +1 -1
Bug#20432: mysql client interprets commands in comments
mysql-test/r/mysql_client.result@stripped, 2006-07-13 09:04:04+02:00, tnurnberg@stripped +4 -0
Bug#20432: mysql client interprets commands in comments
test client-side parsing of comments and client-specific commands
mysql-test/r/mysql_client.result@stripped, 2006-07-13 09:04:04+02:00, tnurnberg@stripped +0 -0
mysql-test/t/mysql_client.test@stripped, 2006-07-13 09:04:04+02:00, tnurnberg@stripped +29 -0
Bug#20432: mysql client interprets commands in comments
test client-side parsing of comments and client-specific commands
mysql-test/t/mysql_client.test@stripped, 2006-07-13 09:04:04+02:00, tnurnberg@stripped +0 -0
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tnurnberg
# Host: salvation.intern.azundris.com
# Root: /home/tnurnberg/work/mysql-4.1-maint-20432
--- 1.218/client/mysql.cc 2006-07-13 09:04:11 +02:00
+++ 1.219/client/mysql.cc 2006-07-13 09:04:11 +02:00
@@ -1052,7 +1052,7 @@
(We want to allow help, print and clear anywhere at line start
*/
if (execute_commands && (named_cmds || glob_buffer.is_empty())
- && !in_string && (com=find_command(line,0)))
+ && !ml_comment && !in_string && (com=find_command(line,0)))
{
if ((*com->func)(&glob_buffer,line) > 0)
break;
--- New file ---
+++ mysql-test/r/mysql_client.result 06/07/13 09:04:04
1
1
ERROR 1064 (42000) at line 3: 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 '' at line 1
ERROR at line 1: USE must be followed by a database name
--- New file ---
+++ mysql-test/t/mysql_client.test 06/07/13 09:04:04
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
#
# Bug #20432: mysql client interprets commands in comments
#
# if the client sees the 'use' within the comment, we haven't fixed
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# SQL can have embedded comments => workie
--exec echo "select /*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ 1" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# client commands on the other hand must be at BOL => error
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "xxx" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--error 1
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# client comment recognized, but parameter missing => error
--exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
| Thread |
|---|
| • bk commit into 4.1 tree (tnurnberg:1.2528) BUG#20432 | Tatjana A Nuernberg | 13 Jul |