List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:August 10 2006 4:23am
Subject:bk commit into 5.0 tree (cmiller:1.2246)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller 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-08-09 22:23:41-04:00, cmiller@stripped +13 -0
  Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1
  into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0
  MERGE: 1.1616.2144.185

  client/mysql.cc@stripped, 2006-08-09 22:11:38-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.121.1.100

  heap/hp_delete.c@stripped, 2006-08-09 22:11:38-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.12.1.2

  mysql-test/r/grant2.result@stripped, 2006-08-09 22:23:40-04:00, cmiller@stripped
+0 -0
    Manual merge
    MERGE: 1.8.8.2

  mysql-test/r/heap_btree.result@stripped, 2006-08-09 22:23:40-04:00,
cmiller@stripped +0 -0
    Manual merge
    MERGE: 1.13.2.1

  mysql-test/r/mysql_client.result@stripped, 2006-08-09 22:23:40-04:00,
cmiller@stripped +4 -4
    Manual merge
    MERGE: 1.1.1.1

  mysql-test/t/grant2.test@stripped, 2006-08-09 22:23:40-04:00, cmiller@stripped +2
-1
    Manual merge
    MERGE: 1.7.1.10

  mysql-test/t/heap_btree.test@stripped, 2006-08-09 22:23:40-04:00, cmiller@stripped
+20 -19
    Manual merge
    MERGE: 1.12.1.2

  mysql-test/t/mysql_client.test@stripped, 2006-08-09 22:23:40-04:00,
cmiller@stripped +6 -6
    Manual merge
    MERGE: 1.1.1.1

  mysql-test/t/mysqlbinlog.test@stripped, 2006-08-09 22:11:38-04:00,
cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.8.1.15

  scripts/fill_func_tables.sh@stripped, 2006-08-09 22:11:38-04:00, cmiller@stripped
+0 -0
    Auto merged
    MERGE: 1.2.2.1

  scripts/mysql_install_db.sh@stripped, 2006-08-09 22:11:38-04:00, cmiller@stripped
+0 -0
    Auto merged
    MERGE: 1.37.1.37

  sql/mysqld.cc@stripped, 2006-08-09 22:11:39-04:00, cmiller@stripped +0 -5
    Auto merged
    MERGE: 1.356.98.27

  sql/set_var.cc@stripped, 2006-08-09 22:11:39-04:00, cmiller@stripped +0 -1
    Auto merged
    MERGE: 1.34.52.40

# 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:	cmiller
# Host:	zippy.cornsilk.net
# Root:	/home/cmiller/work/mysql/mysql-5.0/RESYNC

--- 1.213/client/mysql.cc	2006-08-09 22:23:45 -04:00
+++ 1.214/client/mysql.cc	2006-08-09 22:23:45 -04:00
@@ -577,13 +577,13 @@
   {"force", 'f', "Continue even if we get an sql error.",
    (gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
    0, 0, 0, 0},
-  {"no-named-commands", 'g',
-   "Named commands are disabled. Use \\* form only, or use named commands only in the
beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts
with this option ENABLED by default! Disable with '-G'. Long format commands still work
from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
-   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"named-commands", 'G',
    "Enable named commands. Named commands mean this program's internal commands; see
mysql> help . When enabled, the named commands can be used from any line of the query,
otherwise only from the first line, before an enter. Disable with
--disable-named-commands. This option is disabled by default.",
    (gptr*) &named_cmds, (gptr*) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
    0, 0},
+  {"no-named-commands", 'g',
+   "Named commands are disabled. Use \\* form only, or use named commands only in the
beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts
with this option ENABLED by default! Disable with '-G'. Long format commands still work
from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
+   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"ignore-spaces", 'i', "Ignore space after function names.", 0, 0, 0,
    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
@@ -602,13 +602,6 @@
    NO_ARG, 1, 0, 0, 0, 0, 0},  
   {"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is
deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
    NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef USE_POPEN
-  {"no-pager", OPT_NOPAGER,
-   "Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option
deprecated; use --disable-pager instead.",
-   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
-  {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING:
option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
-   NO_ARG, 0, 0, 0, 0, 0, 0},
   {"unbuffered", 'n', "Flush buffer after each query.", (gptr*) &unbuffered,
    (gptr*) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
@@ -628,8 +621,11 @@
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 #ifdef USE_POPEN
   {"pager", OPT_PAGER,
-   "Pager to use to display results. If you don't supply an option the default pager is
taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename],
etc. See interactive help (\\h) also. This option does not work in batch mode.",
+   "Pager to use to display results. If you don't supply an option the default pager is
taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename],
etc. See interactive help (\\h) also. This option does not work in batch mode. Disable
with --disable-pager. This option is disabled by default.",
    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+  {"no-pager", OPT_NOPAGER,
+   "Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option
deprecated; use --disable-pager instead.",
+   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 #endif
   {"password", 'p',
    "Password to use when connecting to server. If password is not given it's asked from
the tty.",
@@ -670,8 +666,10 @@
   {"debug-info", 'T', "Print some debug info at exit.", (gptr*) &info_flag,
    (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"tee", OPT_TEE,
-   "Append everything into outfile. See interactive help (\\h) also. Does not work in
batch mode.",
+   "Append everything into outfile. See interactive help (\\h) also. Does not work in
batch mode. Disable with --disable-tee. This option is disabled by default.",
    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING:
option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
+   NO_ARG, 0, 0, 0, 0, 0, 0},
 #ifndef DONT_ALLOW_USER_CHANGE
   {"user", 'u', "User for login if not current user.", (gptr*) &current_user,
    (gptr*) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1795,7 +1793,14 @@
   
   if (help_arg[0] != '\'')
   {
-    (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
+	char *end_arg= strend(help_arg);
+	if(--end_arg)
+	{
+		while (my_isspace(charset_info,*end_arg))
+          end_arg--;
+		*++end_arg= '\0';
+	}
+	(void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
     server_cmd= cmd_buf;
   }
   
@@ -1881,9 +1886,13 @@
 {
   reg1 int i, j;
   char * help_arg= strchr(line,' '), buff[32], *end;
-
   if (help_arg)
-    return com_server_help(buffer,line,help_arg+1);
+  {
+    while (my_isspace(charset_info,*help_arg))
+      help_arg++;
+	if (*help_arg)	  
+	  return com_server_help(buffer,line,help_arg);
+  }
 
   put_info("\nFor information about MySQL products and services, visit:\n"
            "   http://www.mysql.com/\n"

--- 1.16/heap/hp_delete.c	2006-08-09 22:23:45 -04:00
+++ 1.17/heap/hp_delete.c	2006-08-09 22:23:45 -04:00
@@ -73,7 +73,10 @@
   int res;
 
   if (flag) 
+  {
     info->last_pos= NULL; /* For heap_rnext/heap_rprev */
+    info->lastkey_len= 0;
+  }
 
   custom_arg.keyseg= keyinfo->seg;
   custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);

--- 1.64/scripts/mysql_install_db.sh	2006-08-09 22:23:45 -04:00
+++ 1.65/scripts/mysql_install_db.sh	2006-08-09 22:23:45 -04:00
@@ -1,4 +1,3 @@
-
 #!/bin/sh
 # Copyright (C) 2002-2003 MySQL AB
 # For a more info consult the file COPYRIGHT distributed with this file.

--- 1.4/scripts/fill_func_tables.sh	2006-08-09 22:23:45 -04:00
+++ 1.5/scripts/fill_func_tables.sh	2006-08-09 22:23:45 -04:00
@@ -1,7 +1,12 @@
-#!/usr/bin/perl
+#!@PERL@
+#
+# Copyright (C) 2003 MySQL AB
+# For a more info consult the file COPYRIGHT distributed with this file.
+#
 # fill_func_tables - parse ../Docs/manual.texi 
-
-# Original version by vva 
+#
+# Original version by Victor Vagin <vva@stripped>
+#
 
 my $cat_name= "";
 my $func_name= "";

--- 1.20/mysql-test/r/heap_btree.result	2006-08-09 22:23:45 -04:00
+++ 1.21/mysql-test/r/heap_btree.result	2006-08-09 22:23:45 -04:00
@@ -246,6 +246,41 @@
 SELECT * from t1;
 a
 DROP TABLE t1;
+create table t1(a int not null, key using btree(a)) engine=heap;
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 2;
+a
+3
+3
+3
+3
+delete from t1 where a < 4;
+select a from t1;
+a
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 4;
+a
+delete from t1 where a > 4;
+select a from t1;
+a
+3
+3
+1
+3
+3
+1
+2
+2
+2
+select a from t1 where a > 3;
+a
+delete from t1 where a >= 2;
+select a from t1;
+a
+1
+1
+drop table t1;
+End of 4.1 tests
 CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
 INSERT INTO t1 VALUES(0);
 SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND
TABLE_NAME='t1';

--- 1.17/mysql-test/t/heap_btree.test	2006-08-09 22:23:45 -04:00
+++ 1.18/mysql-test/t/heap_btree.test	2006-08-09 22:23:45 -04:00
@@ -165,6 +165,26 @@
 DROP TABLE t1;
 
 #
+# Bug #9719: problem with delete
+#
+
+create table t1(a int not null, key using btree(a)) engine=heap;
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 2;
+delete from t1 where a < 4;
+select a from t1;
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 4;
+delete from t1 where a > 4;
+select a from t1;
+select a from t1 where a > 3;
+delete from t1 where a >= 2;
+select a from t1;
+drop table t1;
+
+--echo End of 4.1 tests
+
+#
 # BUG#18160 - Memory-/HEAP Table endless growing indexes
 #
 CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
@@ -184,4 +204,3 @@
 INSERT INTO t1 VALUES(NULL),(NULL);
 DROP TABLE t1;
 
-# End of 4.1 tests

--- 1.160/sql/set_var.cc	2006-08-09 22:23:45 -04:00
+++ 1.161/sql/set_var.cc	2006-08-09 22:23:45 -04:00
@@ -509,7 +509,8 @@
 static sys_var_thd_bit	sys_big_selects("sql_big_selects", 0,
 					set_option_bit,
 					OPTION_BIG_SELECTS);
-static sys_var_thd_bit	sys_log_off("sql_log_off", 0,
+static sys_var_thd_bit	sys_log_off("sql_log_off",
+				    check_log_update,
 				    set_option_bit,
 				    OPTION_LOG_OFF);
 static sys_var_thd_bit	sys_log_update("sql_log_update",

--- 1.29/mysql-test/r/grant2.result	2006-08-09 22:23:45 -04:00
+++ 1.30/mysql-test/r/grant2.result	2006-08-09 22:23:45 -04:00
@@ -118,6 +118,16 @@
 drop user mysqltest_3@host3;
 drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
 mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
+create database mysqltest_1;
+grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
+set sql_log_off = 1;
+ERROR HY000: Access denied; you need the SUPER privilege for this operation
+set sql_log_bin = 0;
+ERROR HY000: Access denied; you need the SUPER privilege for this operation
+delete from mysql.user where user like 'mysqltest\_1';
+delete from mysql.db where user like 'mysqltest\_1';
+drop database mysqltest_1;
+flush privileges;
 set sql_mode='maxdb';
 drop table if exists t1, t2;
 create table t1(c1 int);

--- 1.36/mysql-test/t/grant2.test	2006-08-09 22:23:45 -04:00
+++ 1.37/mysql-test/t/grant2.test	2006-08-09 22:23:45 -04:00
@@ -188,6 +188,24 @@
 connection default;
 
 #
+# Bug# 16180 - Setting SQL_LOG_OFF without SUPER privilege is silently ignored
+#
+create database mysqltest_1;
+grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
+connect (con10,localhost,mysqltest_1,,);
+connection con10;
+--error 1227
+set sql_log_off = 1;
+--error 1227
+set sql_log_bin = 0;
+disconnect con10;
+connection default;
+delete from mysql.user where user like 'mysqltest\_1';
+delete from mysql.db where user like 'mysqltest\_1';
+drop database mysqltest_1;
+flush privileges;
+
+# End of 4.1 tests
 # Create and drop user
 #
 set sql_mode='maxdb';

--- 1.2/mysql-test/r/mysql_client.result	2006-08-09 22:23:45 -04:00
+++ 1.3/mysql-test/r/mysql_client.result	2006-08-09 22:23:45 -04:00
@@ -46,3 +46,7 @@
 tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
 use       (\u) Use another database. Takes database name as argument.
 charset_name(\C) Switch to another charset. Might be needed for processing binlog.
+\
+\\
+';
+';

--- 1.2/mysql-test/t/mysql_client.test	2006-08-09 22:23:45 -04:00
+++ 1.3/mysql-test/t/mysql_client.test	2006-08-09 22:23:45 -04:00
@@ -33,3 +33,14 @@
 #
 --exec echo 'help' | $MYSQL
 --exec echo 'help ' | $MYSQL
+
+#
+# Bug #20103: Escaping with backslash does not work
+#
+--exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';"  >
$MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
+
+--exec echo "SET SQL_MODE = '';"  > $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
Thread
bk commit into 5.0 tree (cmiller:1.2246)Chad MILLER10 Aug