List:Commits« Previous MessageNext Message »
From:<jpipes Date:November 27 2006 7:29pm
Subject:bk commit into 5.0 tree (jpipes:1.2341)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jpipes. When jpipes 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-27 13:29:11-05:00, jpipes@shakedown.(none) +5 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
  into  shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
  MERGE: 1.2248.59.2

  BitKeeper/etc/ignore@stripped, 2006-11-27 12:35:43-05:00, jpipes@shakedown.(none) +3 -3
    auto-union
    MERGE: 1.233.2.1

  client/mysql.cc@stripped, 2006-11-27 12:35:48-05:00, jpipes@shakedown.(none) +0 -0
    Auto merged
    MERGE: 1.218.2.1

  mysql-test/r/func_misc.result@stripped, 2006-11-27 12:35:48-05:00, jpipes@shakedown.(none)
+0 -0
    Auto merged
    MERGE: 1.24.1.1

  mysql-test/t/mysql.test@stripped, 2006-11-27 13:29:10-05:00, jpipes@shakedown.(none) +4 -4
    Manually merged
    MERGE: 1.15.1.2

  sql/item_func.h@stripped, 2006-11-27 12:35:48-05:00, jpipes@shakedown.(none) +0 -0
    Auto merged
    MERGE: 1.153.1.5

# 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:	jpipes
# Host:	shakedown.(none)
# Root:	/home/jpipes/dev/mysql-5.0-maint/RESYNC

--- 1.227/client/mysql.cc	2006-11-27 13:29:18 -05:00
+++ 1.228/client/mysql.cc	2006-11-27 13:29:18 -05:00
@@ -819,10 +819,23 @@
     default_charset_used= 1;
     break;
   case OPT_DELIMITER:
-    if (argument == disabled_my_option)
+    if (argument == disabled_my_option) 
+    {
       strmov(delimiter, DEFAULT_DELIMITER);
-    else
-      strmake(delimiter, argument, sizeof(delimiter) - 1);
+    }
+    else 
+    {
+      /* Check that delimiter does not contain a backslash */
+      if (!strstr(argument, "\\")) 
+      {
+        strmake(delimiter, argument, sizeof(delimiter) - 1);
+      }
+      else 
+      {
+        put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+        return 0;
+      } 
+    }
     delimiter_length= (uint)strlen(delimiter);
     delimiter_str= delimiter;
     break;
@@ -3040,6 +3053,14 @@
     put_info("DELIMITER must be followed by a 'delimiter' character or string",
 	     INFO_ERROR);
     return 0;
+  }
+  else
+  {
+    if (strstr(tmp, "\\")) 
+    {
+      put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+      return 0;
+    }
   }
   strmake(delimiter, tmp, sizeof(delimiter) - 1);
   delimiter_length= (int)strlen(delimiter);

--- 1.154/sql/item_func.h	2006-11-27 13:29:18 -05:00
+++ 1.155/sql/item_func.h	2006-11-27 13:29:18 -05:00
@@ -430,6 +430,7 @@
   my_decimal *decimal_op(my_decimal *);
   const char *func_name() const { return "%"; }
   void result_precision();
+  void fix_length_and_dec();
 };
 
 
@@ -891,6 +892,7 @@
     if (arg_count)
       max_length= args[0]->max_length;
   }
+  bool fix_fields(THD *thd, Item **ref);
 };
 
 

--- 1.25/mysql-test/r/func_misc.result	2006-11-27 13:29:18 -05:00
+++ 1.26/mysql-test/r/func_misc.result	2006-11-27 13:29:18 -05:00
@@ -63,7 +63,7 @@
 WHERE conn = 'default';
 IS_USED_LOCK('bug16501') = connection_id
 1
- SELECT GET_LOCK('bug16501',600);
+SELECT GET_LOCK('bug16501',600);
 SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
 IS_USED_LOCK('bug16501') = CONNECTION_ID()
 1

--- 1.21/mysql-test/t/mysql.test	2006-11-27 13:29:18 -05:00
+++ 1.22/mysql-test/t/mysql.test	2006-11-27 13:29:18 -05:00
@@ -52,10 +52,10 @@
 --exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
 
 # its usage to switch internally in mysql to requested charset
---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ソ'; create
table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('ソ'); select * from
t1;  drop table t1;"
---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ソ'"
---exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set
character_set_client= cp932; select 'ソ'"
---exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set
character_set_client= cp932; select 'ソ'"
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ツソ'; create
table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('ツソ'); select * from
t1;  drop table t1;"
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ツソ'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set
character_set_client= cp932; select 'ツソ'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set
character_set_client= cp932; select 'ツソ'"
 
 #
 # Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
@@ -222,5 +222,23 @@
 --replace_regex /\([0-9]*\)/(errno)/
 --error 1
 --exec $MYSQL test -e "\r  test
cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
2>&1
+
+#
+# Bug #21412: mysql cmdline client allows backslash(es) 
+# as delimiter but can't recognize them
+#
+
+# This should work just fine...
+--exec echo "DELIMITER /" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec echo "SELECT 1/"   >> $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+
+# This should give an error...
+--exec echo "DELIMITER \\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+
+# As should this...
+--exec echo "DELIMITER \\\\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
 
 --echo End of 5.0 tests

--- 1.236/BitKeeper/etc/ignore	2006-11-27 13:29:18 -05:00
+++ 1.237/BitKeeper/etc/ignore	2006-11-27 13:29:18 -05:00
@@ -334,6 +334,7 @@
 client/ssl_test
 client/thimble
 client/thread_test
+client/tmp.diff
 client_debug/*
 client_release/*
 client_test
@@ -762,10 +763,12 @@
 mysql-test/r/rpl_log.eval
 mysql-test/r/slave-running.eval
 mysql-test/r/slave-stopped.eval
+mysql-test/r/tmp.result
 mysql-test/r/udf.log
 mysql-test/share/mysql
 mysql-test/std_data/*.pem
 mysql-test/t/index_merge.load
+mysql-test/t/tmp.test
 mysql-test/var
 mysql-test/var/*
 mysql.kdevprj
Thread
bk commit into 5.0 tree (jpipes:1.2341)jpipes27 Nov