List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:November 16 2006 10:29pm
Subject:bk commit into 5.0 tree (iggy:1.2297) BUG#19799
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of iggy. When iggy 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-11-16 17:29:46-05:00, iggy@stripped +4 -0
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - Client side readline functions unconditionally search for Unix '\n' line
  endings. In this case, the delimiter statement was set to '//\r' instead 
  of the intended '//'. When removing the '\n' check for and remove 
  preceeding '\r' character as well.

  client/readline.cc@stripped, 2006-11-16 17:29:42-05:00, iggy@stripped +2 -1
    Bug#19799 delimiter command not working correctly when sourcing a sql file
    - When removing the '\n' character, check for and remove preceeding '\r' 
    character as well.

  mysql-test/r/mysql.result@stripped, 2006-11-16 17:29:43-05:00, iggy@stripped +6 -2
    Bug#19799 delimiter command not working correctly when sourcing a sql file
    - Added Results.

  mysql-test/t/mysql_delimiter.sql@stripped, 2006-11-16 17:29:43-05:00, iggy@stripped +9 -0
    Bug#19799 delimiter command not working correctly when sourcing a sql file
    - Added Tests.

  mysql-test/t/mysql_delimiter_19799.sql@stripped, 2006-11-16 17:29:43-05:00, iggy@stripped +1 -0
    Bug#19799 delimiter command not working correctly when sourcing a sql file
    - File containing delimiter statement followed by '\r\n' line ending.

  mysql-test/t/mysql_delimiter_19799.sql@stripped, 2006-11-16 17:29:43-05:00, iggy@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:	iggy
# Host:	rolltop.ignatz42.dyndns.org
# Root:	/mnt/storeage/bug19799/my50-bug19799

--- 1.11/client/readline.cc	2006-11-16 17:29:55 -05:00
+++ 1.12/client/readline.cc	2006-11-16 17:29:55 -05:00
@@ -51,7 +51,8 @@ char *batch_readline(LINE_BUFFER *line_b
   if (!(pos=intern_read_line(line_buff,&out_length)))
     return 0;
   if (out_length && pos[out_length-1] == '\n')
-    out_length--;				/* Remove '\n' */
+    if (--out_length && pos[out_length-1] == '\r')  /* Remove '\n' */
+      out_length--;                                 /* Remove '\r' */
   line_buff->read_length=out_length;
   pos[out_length]=0;
   return pos;
--- New file ---
+++ mysql-test/t/mysql_delimiter_19799.sql	06/11/16 17:29:43
delimiter //


--- 1.21/mysql-test/r/mysql.result	2006-11-16 17:29:55 -05:00
+++ 1.22/mysql-test/r/mysql.result	2006-11-16 17:29:55 -05:00
@@ -36,6 +36,10 @@ Tables_in_test
 t1
 t2
 t3
+Database
+information_schema
+mysql
+test
 _
 Test delimiter : from command line
 a
@@ -170,8 +174,8 @@ ERROR 1049 (42000) at line 1: Unknown da
 ERROR 1049 (42000) at line 1: Unknown database 'invalid'
 Test connect with dbname + hostname
 Test connect with dbname + _invalid_ hostname
-ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
-ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
+ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
+ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
 The commands reported in the bug report
 ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
 Too long dbname

--- 1.2/mysql-test/t/mysql_delimiter.sql	2006-11-16 17:29:55 -05:00
+++ 1.3/mysql-test/t/mysql_delimiter.sql	2006-11-16 17:29:55 -05:00
@@ -49,3 +49,12 @@ delimiter ; # Reset delimiter
 # Bug #11523: \d works differently than delimiter
 #
 source t/mysql_delimiter_source.sql
+delimiter ; # Reset delimiter
+
+#
+# Bug #19799: delimiter command not working correctly when sourcing a sql file
+#             with Windows style line endings.
+#
+source t/mysql_delimiter_19799.sql
+show databases//
+delimiter ; # Reset delimiter
Thread
bk commit into 5.0 tree (iggy:1.2297) BUG#19799Ignacio Galarza16 Nov