#At file:///home/thek/Development/cpp/mysqlbzr/mysql-5.0-bugteam/
2645 Kristofer Pettersson 2008-07-21 [merge]
Auto merge
modified:
client/mysql.cc
mysql-test/r/client_xml.result
mysql-test/r/mysql.result
mysql-test/t/client_xml.test
mysql-test/t/mysql_delimiter.sql
mysys/default.c
sql/ha_federated.cc
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2008-06-24 16:05:56 +0000
+++ b/client/mysql.cc 2008-07-18 10:24:59 +0000
@@ -2081,6 +2081,37 @@ static bool add_line(String &buffer,char
continue;
}
}
+ else if (!*ml_comment && !*in_string &&
+ (end_of_line - pos) >= 10 &&
+ !my_strnncoll(charset_info, (uchar*) pos, 10,
+ (const uchar*) "delimiter ", 10))
+ {
+ // Flush previously accepted characters
+ if (out != line)
+ {
+ buffer.append(line, (uint32) (out - line));
+ out= line;
+ }
+
+ // Flush possible comments in the buffer
+ if (!buffer.is_empty())
+ {
+ if (com_go(&buffer, 0) > 0) // < 0 is not fatal
+ DBUG_RETURN(1);
+ buffer.length(0);
+ }
+
+ /*
+ Delimiter wants the get rest of the given line as argument to
+ allow one to change ';' to ';;' and back
+ */
+ buffer.append(pos);
+ if (com_delimiter(&buffer, pos) > 0)
+ DBUG_RETURN(1);
+
+ buffer.length(0);
+ break;
+ }
else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
{
// Found a statement. Continue parsing after the delimiter
=== modified file 'mysql-test/r/client_xml.result'
--- a/mysql-test/r/client_xml.result 2007-04-09 12:53:10 +0000
+++ b/mysql-test/r/client_xml.result 2008-07-18 09:07:16 +0000
@@ -1,3 +1,4 @@
+drop table if exists t1;
create table t1 (
`a&b` int,
`a<b` int,
=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result 2008-06-24 16:03:17 +0000
+++ b/mysql-test/r/mysql.result 2008-07-18 10:24:59 +0000
@@ -38,8 +38,6 @@ t2
t3
Tables_in_test
t1
-delimiter
-1
_
Test delimiter : from command line
a
=== modified file 'mysql-test/t/client_xml.test'
--- a/mysql-test/t/client_xml.test 2007-04-09 12:53:10 +0000
+++ b/mysql-test/t/client_xml.test 2008-07-18 09:07:16 +0000
@@ -1,6 +1,10 @@
# Can't run with embedded server
-- source include/not_embedded.inc
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly
create table t1 (
=== modified file 'mysql-test/t/mysql_delimiter.sql'
--- a/mysql-test/t/mysql_delimiter.sql 2008-06-24 16:03:17 +0000
+++ b/mysql-test/t/mysql_delimiter.sql 2008-07-18 10:24:59 +0000
@@ -61,12 +61,6 @@ show tables//
delimiter ; # Reset delimiter
#
-# Bug #33812: mysql client incorrectly parsing DELIMITER
-#
-select a as delimiter from t1
-delimiter ; # Reset delimiter
-
-#
# Bug #36244: MySQL CLI doesn't recognize standalone -- as comment
# before DELIMITER statement
#
=== modified file 'mysys/default.c'
--- a/mysys/default.c 2008-07-02 14:37:29 +0000
+++ b/mysys/default.c 2008-07-18 10:24:59 +0000
@@ -1017,7 +1017,7 @@ static const char *my_get_module_parent(
{
char *last= NULL;
char *end;
- if (!GetModuleFileName(NULL, buf, size))
+ if (!GetModuleFileName(NULL, buf, (DWORD) size))
return NULL;
end= strend(buf);
=== modified file 'sql/ha_federated.cc'
--- a/sql/ha_federated.cc 2008-03-29 07:52:16 +0000
+++ b/sql/ha_federated.cc 2008-07-17 14:33:41 +0000
@@ -405,6 +405,9 @@ static byte *federated_get_key(FEDERATED
bool federated_db_init()
{
DBUG_ENTER("federated_db_init");
+ /* the federated engine can be disabled by a command line option */
+ if (have_federated_db == SHOW_OPTION_DISABLED)
+ DBUG_RETURN(TRUE);
if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST))
goto error;
if (hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0,
| Thread |
|---|
| • bzr commit into mysql-5.0 branch (kpettersson:2645) | Kristofer Pettersson | 21 Jul |