List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:June 28 2005 1:31am
Subject:bk commit into 5.0 tree (jimw:1.1981) BUG#11523
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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
  1.1981 05/06/27 16:31:08 jimw@stripped +3 -0
  Fix 'source' command in mysql client to handle delimiter command
  in sourced file properly. (Bug #11523)

  mysql-test/t/mysql_delimiter_source.sql
    1.1 05/06/27 16:31:05 jimw@stripped +4 -0
    New BitKeeper file ``mysql-test/t/mysql_delimiter_source.sql''

  mysql-test/t/mysql_delimiter_source.sql
    1.0 05/06/27 16:31:05 jimw@stripped +0 -0
    BitKeeper file /home/jimw/my/mysql-5.0-11523/mysql-test/t/mysql_delimiter_source.sql

  mysql-test/t/mysql_delimiter.sql
    1.2 05/06/27 16:31:05 jimw@stripped +4 -1
    Add new test

  client/mysql.cc
    1.175 05/06/27 16:31:05 jimw@stripped +6 -6
    Change name of execute_commands argument to read_lines() to
    batch_read to make its intent more clear, and remove it from
    one test so that commands in sourced files are handled properly.

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-11523

--- 1.174/client/mysql.cc	2005-06-20 15:02:41 -07:00
+++ 1.175/client/mysql.cc	2005-06-27 16:31:05 -07:00
@@ -203,7 +203,7 @@
            com_edit(String *str,char*), com_shell(String *str, char *);
 #endif
 
-static int read_lines(bool execute_commands);
+static int read_lines(bool batch_read);
 static int sql_connect(char *host,char *database,char *user,char *password,
 		       uint silent);
 static int put_info(const char *str,INFO_TYPE info,uint error=0,
@@ -949,7 +949,7 @@
   return(0);
 }
 
-static int read_lines(bool execute_commands)
+static int read_lines(bool batch_read)
 {
 #if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
   char linebuffer[254];
@@ -964,7 +964,7 @@
   
   for (;;)
   {
-    if (status.batch || !execute_commands)
+    if (status.batch || !batch_read)
     {
       line=batch_readline(status.line_buff);
       line_number++;
@@ -1042,7 +1042,7 @@
       Check if line is a mysql command line
       (We want to allow help, print and clear anywhere at line start
     */
-    if (execute_commands && (named_cmds || glob_buffer.is_empty()) 
+    if ((named_cmds || glob_buffer.is_empty())
 	&& !in_string && (com=find_command(line,0)))
     {
       if ((*com->func)(&glob_buffer,line) > 0)
@@ -1060,7 +1060,7 @@
   }
   /* if in batch mode, send last query even if it doesn't end with \g or go */
 
-  if ((status.batch || !execute_commands) && !status.exit_status)
+  if ((status.batch || !batch_read) && !status.exit_status)
   {
     remove_cntrl(glob_buffer);
     if (!glob_buffer.is_empty())
@@ -2071,7 +2071,7 @@
   return result;
 }
 
-static char *fieldtype2str(enum enum_field_types type) {
+static const char *fieldtype2str(enum enum_field_types type) {
   switch(type) {
     case FIELD_TYPE_BIT:         return "BIT";
     case FIELD_TYPE_BLOB:        return "BLOB";
--- New file ---
+++ mysql-test/t/mysql_delimiter_source.sql	05/06/27 16:31:05
delimiter //
create table t2 (a int) //
delimiter ;
drop table t2;


--- 1.1/mysql-test/t/mysql_delimiter.sql	2005-05-17 12:13:30 -07:00
+++ 1.2/mysql-test/t/mysql_delimiter.sql	2005-06-27 16:31:05 -07:00
@@ -45,4 +45,7 @@
 select * from t1 delimiter
 delimiter ; # Reset delimiter
 
-
+#
+# Bug #11523: \d works differently than delimiter
+#
+source t/mysql_delimiter_source.sql
Thread
bk commit into 5.0 tree (jimw:1.1981) BUG#11523Jim Winstead28 Jun