List:Commits« Previous MessageNext Message »
From:<jpipes Date:November 27 2006 8:46pm
Subject:bk commit into 5.1 tree (jpipes:1.2395)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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 14:46:48-05:00, jpipes@shakedown.(none) +6 -0
  Merge shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
  into  shakedown.(none):/home/jpipes/dev/mysql-5.1-new-maint2
  MERGE: 1.1810.2168.2

  BitKeeper/etc/ignore@stripped, 2006-11-27 14:34:56-05:00, jpipes@shakedown.(none) +3 -3
    auto-union
    MERGE: 1.210.8.1

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

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

  mysql-test/r/mysql.result@stripped, 2006-11-27 14:46:46-05:00, jpipes@shakedown.(none) +7 -7
    Manually merged
    MERGE: 1.15.3.1

  mysql-test/t/mysql.test@stripped, 2006-11-27 14:46:46-05:00, jpipes@shakedown.(none) +5 -4
    Manually merged
    MERGE: 1.4.5.2

  sql/item_func.h@stripped, 2006-11-27 14:46:46-05:00, jpipes@shakedown.(none) +4 -4
    Manually merged
    MERGE: 1.136.2.17

# 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.1-new-maint2/RESYNC

--- 1.243/client/mysql.cc	2006-11-27 14:46:56 -05:00
+++ 1.244/client/mysql.cc	2006-11-27 14:46:56 -05:00
@@ -824,10 +824,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;
@@ -3026,6 +3039,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.152/sql/item_func.h	2006-11-27 14:46:56 -05:00
+++ 1.153/sql/item_func.h	2006-11-27 14:46:56 -05:00
@@ -1315,10 +1315,10 @@
 class Item_func_inet_aton : public Item_int_func
 {
 public:
-   Item_func_inet_aton(Item *a) :Item_int_func(a) {}
-   longlong val_int();
-   const char *func_name() const { return "inet_aton"; }
-   void fix_length_and_dec() { decimals = 0; max_length = 21; maybe_null=1;}
+  Item_func_inet_aton(Item *a) :Item_int_func(a) {}
+  longlong val_int();
+  const char *func_name() const { return "inet_aton"; }
+  void fix_length_and_dec() { decimals= 0; max_length= 21; maybe_null= 1; unsigned_flag=
1;}
   bool check_partition_func_processor(byte *int_arg) {return FALSE;}
 };
 

--- 1.26/mysql-test/r/func_misc.result	2006-11-27 14:46:56 -05:00
+++ 1.27/mysql-test/r/func_misc.result	2006-11-27 14:46:56 -05:00
@@ -134,4 +134,11 @@
 drop table t2;
 drop table t1;
 set global query_cache_size=default;
+create table t1 select INET_ATON('255.255.0.1') as `a`;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` bigint(21) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
 End of 5.0 tests

--- 1.27/mysql-test/r/mysql.result	2006-11-27 14:46:56 -05:00
+++ 1.28/mysql-test/r/mysql.result	2006-11-27 14:46:56 -05:00
@@ -61,16 +61,16 @@
 test
 unlock tables;
 drop table t1;
-ソ
-ソ
+ツソ
+ツソ
 c_cp932
-ソ
-ソ
-ソ
+ツソ
+ツソ
+ツソ
 繧ス
 繧ス
-ソ
-ソ
+ツソ
+ツソ
 +----------------------+------------+--------+
 | concat('>',col1,'<') | col2       | col3   |
 +----------------------+------------+--------+
@@ -180,4 +180,8 @@
 ERROR 1049 (42000) at line 1: Unknown database
'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 Too long hostname
 ERROR 2005 (HY000) at line 1: Unknown MySQL server host
'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
(errno)
+1
+1
+ERROR at line 1: DELIMITER cannot contain a backslash character
+ERROR at line 1: DELIMITER cannot contain a backslash character
 End of 5.0 tests

--- 1.27/mysql-test/t/mysql.test	2006-11-27 14:46:56 -05:00
+++ 1.28/mysql-test/t/mysql.test	2006-11-27 14:46:56 -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,24 @@
 --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.262/BitKeeper/etc/ignore	2006-11-27 14:46:56 -05:00
+++ 1.263/BitKeeper/etc/ignore	2006-11-27 14:46:56 -05:00
@@ -379,6 +379,7 @@
 client/ssl_test
 client/thimble
 client/thread_test
+client/tmp.diff
 client_debug/*
 client_release/*
 client_test
@@ -1324,10 +1325,12 @@
 mysql-test/r/slave-stopped.eval
 mysql-test/r/symlink.log
 mysql-test/r/system_mysql_db.log
+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.1 tree (jpipes:1.2395)jpipes27 Nov