From: Date: November 22 2006 3:10am Subject: bk commit into 5.0 tree (iggy:1.2328) BUG#19799 List-Archive: http://lists.mysql.com/commits/15670 X-Bug: 19799 Message-Id: <20061122021007.E6F9717750D@ignatz42.dyndns.org> 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-21 21:10:02-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-21 21:10:00-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-21 21:10:00-05:00, iggy@stripped +4 -0 Bug#19799 delimiter command not working correctly when sourcing a sql file - Added Results. mysql-test/t/mysql_delimiter.sql@stripped, 2006-11-21 21:10:00-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-21 21:10:00-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-21 21:10:00-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-21 21:10:07 -05:00 +++ 1.12/client/readline.cc 2006-11-21 21:10:07 -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/21 21:10:00 delimiter // --- 1.21/mysql-test/r/mysql.result 2006-11-21 21:10:07 -05:00 +++ 1.22/mysql-test/r/mysql.result 2006-11-21 21:10:07 -05:00 @@ -36,6 +36,10 @@ Tables_in_test t1 t2 t3 +Database +information_schema +mysql +test _ Test delimiter : from command line a --- 1.2/mysql-test/t/mysql_delimiter.sql 2006-11-21 21:10:07 -05:00 +++ 1.3/mysql-test/t/mysql_delimiter.sql 2006-11-21 21:10:07 -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