List:Commits« Previous MessageNext Message »
From:Lars Thalmann Date:December 21 2005 5:29pm
Subject:bk commit into 5.1 tree (lars:1.1975)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of lthalmann. When lthalmann 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.1975 05/12/21 18:29:37 lars@stripped +33 -0
  Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new
  into  mysql.com:/users/lthalmann/bk/mysql-5.1-wl1012-v3-max-merge

  sql/sql_class.h
    1.280 05/12/21 18:29:28 lars@stripped +0 -0
    Merge

  sql/share/errmsg.txt
    1.59 05/12/21 18:29:28 lars@stripped +0 -1
    Merge

  mysql-test/t/disabled.def
    1.20 05/12/21 18:29:28 lars@stripped +8 -7
    Merge

  mysql-test/extra/rpl_tests/rpl_relayrotate.test
    1.25 05/12/21 18:29:28 lars@stripped +0 -2
    Merge

  mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test
    1.28 05/12/21 18:29:27 lars@stripped +0 -1
    Merge

  include/my_base.h
    1.76 05/12/21 18:29:27 lars@stripped +5 -4
    Merge

  client/client_priv.h
    1.47 05/12/21 18:29:27 lars@stripped +1 -2
    Merge

  storage/innobase/row/row0mysql.c
    1.115 05/12/21 18:10:24 lars@stripped +0 -0
    Auto merged

  storage/innobase/lock/lock0lock.c
    1.64 05/12/21 18:10:23 lars@stripped +0 -0
    Auto merged

  sql/table.cc
    1.191 05/12/21 18:10:22 lars@stripped +0 -0
    Auto merged

  sql/sql_table.cc
    1.287 05/12/21 18:10:21 lars@stripped +0 -0
    Auto merged

  sql/sql_class.cc
    1.233 05/12/21 18:10:21 lars@stripped +0 -0
    Auto merged

  sql/sp_head.cc
    1.198 05/12/21 18:10:20 lars@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.505 05/12/21 18:10:20 lars@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.349 05/12/21 18:10:19 lars@stripped +0 -0
    Auto merged

  sql/handler.h
    1.172 05/12/21 18:10:18 lars@stripped +0 -0
    Auto merged

  sql/handler.cc
    1.195 05/12/21 18:10:18 lars@stripped +0 -0
    Auto merged

  sql/ha_innodb.h
    1.113 05/12/21 18:10:17 lars@stripped +0 -0
    Auto merged

  sql/ha_innodb.cc
    1.241 05/12/21 18:10:17 lars@stripped +0 -0
    Auto merged

  sql/Makefile.am
    1.126 05/12/21 18:10:16 lars@stripped +0 -0
    Auto merged

  mysql-test/t/innodb.test
    1.107 05/12/21 18:10:16 lars@stripped +0 -0
    Auto merged

  mysql-test/r/rpl_stm_000001.result
    1.33 05/12/21 18:10:16 lars@stripped +0 -0
    Auto merged

  mysql-test/r/rpl_relayrotate.result
    1.24 05/12/21 18:10:16 lars@stripped +0 -0
    Auto merged

  mysql-test/r/innodb.result
    1.137 05/12/21 18:10:16 lars@stripped +0 -0
    Auto merged

  mysql-test/mysql-test-run.sh
    1.285 05/12/21 18:10:15 lars@stripped +0 -0
    Auto merged

  mysql-test/mysql-test-run.pl
    1.46 05/12/21 18:10:15 lars@stripped +0 -0
    Auto merged

  mysql-test/extra/rpl_tests/rpl_stm_000001.test
    1.45 05/12/21 18:10:15 lars@stripped +0 -0
    Auto merged

  mysql-test/extra/rpl_tests/rpl_deadlock.test
    1.14 05/12/21 18:10:15 lars@stripped +0 -0
    Auto merged

  libmysqld/Makefile.am
    1.76 05/12/21 18:10:14 lars@stripped +0 -0
    Auto merged

  include/my_global.h
    1.118 05/12/21 18:10:14 lars@stripped +0 -0
    Auto merged

  include/config-win.h
    1.73 05/12/21 18:10:14 lars@stripped +0 -0
    Auto merged

  client/mysqlbinlog.cc
    1.125 05/12/21 18:10:13 lars@stripped +0 -0
    Auto merged

  mysql-test/extra/rpl_tests/rpl_relayrotate.test
    1.13.1.4 05/12/21 18:10:12 lars@stripped +0 -0
    Merge rename: mysql-test/t/rpl_relayrotate.test -> mysql-test/extra/rpl_tests/rpl_relayrotate.test

  mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test
    1.13.6.2 05/12/21 18:10:12 lars@stripped +0 -0
    Merge rename: mysql-test/t/rpl_error_ignored_table.test -> mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test

  mysql-test/extra/rpl_tests/rpl_deadlock.test
    1.6.1.6 05/12/21 18:10:12 lars@stripped +0 -0
    Merge rename: mysql-test/t/rpl_deadlock.test -> mysql-test/extra/rpl_tests/rpl_deadlock.test

  configure.in
    1.313 05/12/21 18:10:12 lars@stripped +0 -0
    Auto merged

  mysql-test/r/rpl_stm_000001.result
    1.29.1.2 05/12/21 18:10:11 lars@stripped +0 -0
    Merge rename: mysql-test/r/rpl000001.result -> mysql-test/r/rpl_stm_000001.result

  mysql-test/extra/rpl_tests/rpl_stm_000001.test
    1.38.3.2 05/12/21 18:10:11 lars@stripped +0 -0
    Merge rename: mysql-test/t/rpl000001.test -> mysql-test/extra/rpl_tests/rpl_stm_000001.test

# 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:	lars
# Host:	dl145k.mysql.com
# Root:	/users/lthalmann/bk/mysql-5.1-wl1012-v3-max-merge/RESYNC

--- 1.312/configure.in	2005-12-13 16:10:47 +01:00
+++ 1.313/configure.in	2005-12-21 18:10:12 +01:00
@@ -6,7 +6,7 @@
 AC_INIT(sql/mysqld.cc)
 AC_CANONICAL_SYSTEM
 # The Docs Makefile.am parses this line!
-AM_INIT_AUTOMAKE(mysql, 5.1.4-alpha)
+AM_INIT_AUTOMAKE(mysql, 5.1.5-alpha)
 AM_CONFIG_HEADER(config.h)
 
 PROTOCOL_VERSION=10
@@ -14,6 +14,12 @@
 # See the libtool docs for information on how to do shared lib versions.
 SHARED_LIB_VERSION=15:0:0
 
+# ndb version
+NDB_VERSION_MAJOR=5
+NDB_VERSION_MINOR=0
+NDB_VERSION_BUILD=18
+NDB_VERSION_STATUS=""
+
 # Set all version vars based on $VERSION. How do we do this more elegant ?
 # Remember that regexps needs to quote [ and ] since this is run through m4
 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
@@ -1567,6 +1573,20 @@
   # Optimized version. No debug
   CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
   CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
+fi
+
+if test "$with_debug" = "no"
+then
+  AC_ARG_WITH([fast-mutexes],
+              AC_HELP_STRING([--with-fast-mutexes], 
+              [compile with fast mutexes (default is enabled)]),
+              [with_fast_mutexes=$withval], [with_fast_mutexes=yes])
+fi
+
+if test "$with_fast_mutexes" = "yes"
+then
+  AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
+            [Define to 1 if you want to use fast mutexes])
 fi
 
 # Force static compilation to avoid linking problems/get more speed

--- 1.72/include/config-win.h	2005-12-19 23:17:52 +01:00
+++ 1.73/include/config-win.h	2005-12-21 18:10:14 +01:00
@@ -269,6 +269,12 @@
 				    (((uint32) ((uchar) (A)[2])) << 16) +\
 				    (((uint32) ((uchar) (A)[3])) << 24)) +\
 				    (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A)	((ulonglong)(((uint32)    ((uchar) (A)[0]))          + \
+                                     (((uint32)    ((uchar) (A)[1])) << 8)   + \
+                                     (((uint32)    ((uchar) (A)[2])) << 16)  + \
+                                     (((uint32)    ((uchar) (A)[3])) << 24)) + \
+                         (((ulonglong) ((uchar) (A)[4])) << 32) +       \
+                         (((ulonglong) ((uchar) (A)[5])) << 40))
 #define uint8korr(A)	(*((ulonglong *) (A)))
 #define sint8korr(A)	(*((longlong *) (A)))
 #define int2store(T,A)	*((uint16*) (T))= (uint16) (A)
@@ -281,6 +287,12 @@
 			  *((T)+2)=(uchar) (((A) >> 16));\
 			  *((T)+3)=(uchar) (((A) >> 24)); \
 			  *((T)+4)=(uchar) (((A) >> 32)); }
+#define int6store(T,A)	{ *(T)    =(uchar)((A));          \
+			  *((T)+1)=(uchar) (((A) >> 8));  \
+			  *((T)+2)=(uchar) (((A) >> 16)); \
+			  *((T)+3)=(uchar) (((A) >> 24)); \
+			  *((T)+4)=(uchar) (((A) >> 32)); \
+			  *((T)+5)=(uchar) (((A) >> 40)); }
 #define int8store(T,A)	*((ulonglong *) (T))= (ulonglong) (A)
 
 #define doubleget(V,M)	do { *((long *) &V) = *((long*) M); \

--- 1.75/include/my_base.h	2005-12-13 16:10:47 +01:00
+++ 1.76/include/my_base.h	2005-12-21 18:29:27 +01:00
@@ -343,9 +343,12 @@
 #define HA_ERR_NO_CONNECTION     157  /* Could not connect to storage engine */
 #define HA_ERR_NULL_IN_SPATIAL   158  /* NULLs are not supported in spatial index */
 #define HA_ERR_TABLE_DEF_CHANGED 159  /* The table changed in storage engine */
-#define HA_ERR_RBR_LOGGING_FAILED 160  /* row-based binlogging of row failed */
+#define HA_ERR_NO_PARTITION_FOUND 160  /* There's no partition in table for
+                                          given value */
+#define HA_ERR_RBR_LOGGING_FAILED 161  /* Row-based binlogging of row failed */
+
+#define HA_ERR_LAST               161  /* Copy last error no */
 
-#define HA_ERR_LAST              160  /*Copy last error nr.*/
 /* Add error numbers before HA_ERR_LAST and change it accordingly. */
 #define HA_ERR_ERRORS            (HA_ERR_LAST - HA_ERR_FIRST + 1)
 

--- 1.284/mysql-test/mysql-test-run.sh	2005-12-20 23:04:52 +01:00
+++ 1.285/mysql-test/mysql-test-run.sh	2005-12-21 18:10:15 +01:00
@@ -280,7 +280,7 @@
 STRESS_SUITE="main"
 STRESS_MODE="random"
 STRESS_THREADS=5
-STRESS_TEST_COUNT=20
+STRESS_TEST_COUNT=""
 STRESS_LOOP_COUNT=""
 STRESS_TEST_DURATION=""
 STRESS_INIT_FILE=""
@@ -1921,7 +1921,7 @@
                     --stress-basedir=$STRESS_BASEDIR \
                     --server-logs-dir=$STRESS_BASEDIR \
                     --stress-mode=$STRESS_MODE \
-                    --mysqltest=$BASEDIR/client/mysqltest \
+                    --mysqltest=$CLIENT_BINDIR/mysqltest \
                     --threads=$STRESS_THREADS \
                     --verbose \
                     --cleanup \
@@ -1930,6 +1930,14 @@
   
   if [ -n "$STRESS_INIT_FILE" ] ; then 
     STRESS_TEST_ARGS="$STRESS_TEST_ARGS --stress-init-file=$STRESS_INIT_FILE"
+  fi
+
+  if [ -z "$STRESS_LOOP_COUNT" -a -z  "$STRESS_TEST_COUNT" -a 
+       -z "$STRESS_TEST_DURATION" ] ; then 
+
+    #Limit stress testing with 20 loops in case when any limit parameter
+    #was specified
+    STRESS_TEST_COUNT=20
   fi
 
   if [ -n "$STRESS_LOOP_COUNT" ] ; then 

--- 1.125/sql/Makefile.am	2005-12-14 19:58:01 +01:00
+++ 1.126/sql/Makefile.am	2005-12-21 18:10:16 +01:00
@@ -46,6 +46,7 @@
                         @yassl_libs@ @openssl_libs@
 noinst_HEADERS =	item.h item_func.h item_sum.h item_cmpfunc.h \
 			item_strfunc.h item_timefunc.h item_uniq.h \
+			item_xmlfunc.h \
 			item_create.h item_subselect.h item_row.h \
 			mysql_priv.h item_geofunc.h sql_bitmap.h \
 			procedure.h sql_class.h sql_lex.h sql_list.h \
@@ -67,7 +68,7 @@
 			item.cc item_sum.cc item_buff.cc item_func.cc \
 			item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
 			thr_malloc.cc item_create.cc item_subselect.cc \
-			item_row.cc item_geofunc.cc \
+			item_row.cc item_geofunc.cc item_xmlfunc.cc \
 			field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
 			net_serv.cc protocol.cc sql_state.c \
 			lock.cc my_lock.c \

--- 1.171/sql/handler.h	2005-12-13 16:10:48 +01:00
+++ 1.172/sql/handler.h	2005-12-21 18:10:18 +01:00
@@ -724,6 +724,9 @@
 bool is_partition_in_list(char *part_name, List<char> list_part_names);
 bool is_partitions_in_table(partition_info *new_part_info,
                             partition_info *old_part_info);
+bool check_reorganise_list(partition_info *new_part_info,
+                           partition_info *old_part_info,
+                           List<char> list_part_names);
 bool set_up_defaults_for_partitioning(partition_info *part_info,
                                       handler *file,
                                       ulonglong max_rows,

--- 1.124/client/mysqlbinlog.cc	2005-12-06 14:19:02 +01:00
+++ 1.125/client/mysqlbinlog.cc	2005-12-21 18:10:13 +01:00
@@ -63,6 +63,7 @@
 
 static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
 static bool opt_hexdump= 0;
+static bool opt_base64_output= 0;
 static const char* database= 0;
 static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
 static ulonglong offset = 0;
@@ -533,11 +534,19 @@
     else
       print_event_info->hexdump_from= pos;
 
+    print_event_info->base64_output= opt_base64_output;
+
     switch (ev_type) {
     case QUERY_EVENT:
       if (check_database(((Query_log_event*)ev)->db))
         goto end;
-      ev->print(result_file, print_event_info);
+      if (opt_base64_output)
+      {
+        ev->print_header(result_file, print_event_info);
+        ev->print_base64(result_file, print_event_info);
+      }
+      else
+        ev->print(result_file, print_event_info);
       break;
     case CREATE_FILE_EVENT:
     {
@@ -557,7 +566,13 @@
 	filename and use LOCAL), prepared in the 'case EXEC_LOAD_EVENT' 
 	below.
       */
-      ce->print(result_file, print_event_info, TRUE);
+      if (opt_base64_output)
+      {
+        ce->print_header(result_file, print_event_info);
+        ce->print_base64(result_file, print_event_info);
+      }
+      else
+        ce->print(result_file, print_event_info, TRUE);
 
       // If this binlog is not 3.23 ; why this test??
       if (description_event->binlog_version >= 3)
@@ -653,6 +668,12 @@
   {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 #endif
+  {"base64-output", OPT_BASE64_OUTPUT,
+   "Print all binlog entries using base64 encoding. "
+   "This is for debugging only. Logs produced using this option "
+   "should not be applied on production systems.",
+   (gptr*) &opt_base64_output, (gptr*) &opt_base64_output, 0, GET_BOOL,
+   NO_ARG, 0, 0, 0, 0, 0, 0},
   /*
     mysqlbinlog needs charsets knowledge, to be able to convert a charset
     number found in binlog to a charset name (to be able to print things

--- 1.232/sql/sql_class.cc	2005-12-20 15:22:18 +01:00
+++ 1.233/sql/sql_class.cc	2005-12-21 18:10:21 +01:00
@@ -483,10 +483,12 @@
 
   killed= state_to_set;
   if (state_to_set != THD::KILL_QUERY)
+  {
     thr_alarm_kill(real_id);
 #ifdef SIGNAL_WITH_VIO_CLOSE
-  close_active_vio();
+    close_active_vio();
 #endif    
+  }
   if (mysys_var)
   {
     pthread_mutex_lock(&mysys_var->mutex);

--- 1.286/sql/sql_table.cc	2005-12-20 04:34:03 +01:00
+++ 1.287/sql/sql_table.cc	2005-12-21 18:10:21 +01:00
@@ -3963,7 +3963,8 @@
         my_error(ER_ONLY_ON_RANGE_LIST_PARTITION, MYF(0), "REORGANISE");
         DBUG_RETURN(TRUE);
       }
-      if (is_partitions_in_table(alt_part_info, tab_part_info))
+      if (check_reorganise_list(alt_part_info, tab_part_info,
+                                alter_info->partition_names))
       {
         my_error(ER_SAME_NAME_PARTITION, MYF(0));
         DBUG_RETURN(TRUE);
@@ -4032,6 +4033,7 @@
       }
     }
     partition_changed= TRUE;
+    tab_part_info->no_parts= tab_part_info->partitions.elements;
     create_info->db_type= DB_TYPE_PARTITION_DB;
     thd->lex->part_info= tab_part_info;
     if (alter_info->flags == ALTER_ADD_PARTITION ||

--- 1.190/sql/table.cc	2005-12-14 16:45:02 +01:00
+++ 1.191/sql/table.cc	2005-12-21 18:10:22 +01:00
@@ -1897,13 +1897,12 @@
   if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
     create_flags|= O_EXCL | O_NOFOLLOW;
 
-#if SIZEOF_OFF_T > 4
   /* Fix this when we have new .frm files;  Current limit is 4G rows (QQ) */
   if (create_info->max_rows > UINT_MAX32)
     create_info->max_rows= UINT_MAX32;
   if (create_info->min_rows > UINT_MAX32)
     create_info->min_rows= UINT_MAX32;
-#endif
+
   /*
     Ensure that raid_chunks can't be larger than 255, as this would cause
     problems with drop database

--- 1.58/sql/share/errmsg.txt	2005-12-14 16:45:01 +01:00
+++ 1.59/sql/share/errmsg.txt	2005-12-21 18:29:28 +01:00
@@ -5725,10 +5725,11 @@
 	eng "Plugin '%-.64s' is not loaded"
 ER_WRONG_VALUE
 	eng "Incorrect %-.32s value: '%-.128s'"
+ER_NO_PARTITION_FOR_GIVEN_VALUE
+	eng "Table has no partition for value %ld"
 ER_BINLOG_ROW_LOGGING_FAILED
 	eng "Writing one row to the row-based binary log failed"
 ER_BINLOG_ROW_WRONG_TABLE_DEF
 	eng "Table definition on master and slave does not match"
 ER_BINLOG_ROW_RBR_TO_SBR
 	eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
-

--- 1.6.1.5/mysql-test/t/rpl_deadlock.test	2005-12-13 11:41:11 +01:00
+++ 1.14/mysql-test/extra/rpl_tests/rpl_deadlock.test	2005-12-21 18:10:15 +01:00
@@ -10,14 +10,13 @@
 # We don't 'show status like 'slave_retried_transactions'' because this
 # is not repeatable (depends on sleeps).
 
-source include/have_innodb.inc;
-source include/master-slave.inc;
+-- source include/master-slave.inc
 
 connection master;
-create table t1 (a int not null, key(a)) engine=innodb;
-create table t2 (a int not null, key(a)) engine=innodb;
-create table t3 (a int) engine=innodb;
-create table t4 (a int) engine=innodb;
+eval CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=$engine_type;
+eval CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=$engine_type;
+eval CREATE TABLE t3 (a INT) ENGINE=$engine_type;
+eval CREATE TABLE t4 (a INT) ENGINE=$engine_type;
 show variables like 'slave_transaction_retries';
 sync_slave_with_master;
 
@@ -65,14 +64,14 @@
 select * from t1; # check that slave succeeded finally
 select * from t2;
 # check that no error is reported
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 #
 --replace_result $MASTER_MYPORT MASTER_MYPORT
 show slave status;
 
 # 2) Test lock wait timeout
 
 stop slave;
-change master to master_log_pos=532; # the BEGIN log event
+change master to master_log_pos=536; # the BEGIN log event
 begin;
 select * from t2 for update; # hold lock
 start slave;
@@ -82,7 +81,7 @@
 select * from t1; # check that slave succeeded finally
 select * from t2;
 # check that no error is reported
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 #
 --replace_result $MASTER_MYPORT MASTER_MYPORT
 show slave status;
 
@@ -93,7 +92,7 @@
 
 # This is really copy-paste of 2) of above
 stop slave;
-change master to master_log_pos=532;
+change master to master_log_pos=536;
 begin;
 select * from t2 for update;
 start slave;
@@ -102,7 +101,7 @@
 sync_with_master;
 select * from t1;
 select * from t2;
---replace_column 1 # 8 # 9 # 11 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 11 # 16 # 22 # 23 # 33 #
 --replace_result $MASTER_MYPORT MASTER_MYPORT
 show slave status;
 

--- 1.13.6.1/mysql-test/t/rpl_error_ignored_table.test	2005-12-14 18:42:01 +01:00
+++ 1.28/mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test	2005-12-21 18:29:27 +01:00
@@ -2,7 +2,9 @@
 # Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave
 # still checks that it has the same error as on the master.
 
-source include/master-slave.inc;
+# Requires statement logging
+-- source include/master-slave.inc
+
 connection master;
 create table t1 (a int primary key);
 # generate an error that goes to the binlog
@@ -45,11 +47,11 @@
 kill @id;
 drop table t2,t3;
 connection master;
---error 0,1053,2013
+--error 0,1053
 reap;
 connection master1;
 --replace_column 2 # 5 #
-show binlog events from 98;
+show binlog events from 102;
 save_master_pos;
 connection slave;
 # SQL slave thread should not have stopped (because table of the killed

--- 1.13.1.3/mysql-test/t/rpl_relayrotate.test	2005-12-09 14:38:07 +01:00
+++ 1.25/mysql-test/extra/rpl_tests/rpl_relayrotate.test	2005-12-21 18:29:28 +01:00
@@ -8,13 +8,13 @@
 # The slave is started with max_binlog_size=16384 bytes,
 # to force many rotations (approximately 30 rotations)
 
-source include/have_innodb.inc;
-source include/master-slave.inc;
+-- source include/master-slave.inc
+
 connection slave;
 stop slave;
 connection master;
 --disable_warnings
-create table t1 (a int) engine=innodb;
+eval create table t1 (a int) engine=$engine_type;
 --enable_warnings
 let $1=8000;
 disable_query_log;
@@ -52,7 +52,7 @@
 # which proves that the transaction restarted at
 # the right place.
 # We must wait for the transaction to commit before
-# reading:
+# reading, with a sync_with_master.
 sync_with_master;
 select max(a) from t1;
 connection master;

--- 1.45/mysql-test/mysql-test-run.pl	2005-12-14 22:13:50 +01:00
+++ 1.46/mysql-test/mysql-test-run.pl	2005-12-21 18:10:15 +01:00
@@ -277,9 +277,9 @@
 our $opt_stress_suite=     "main";
 our $opt_stress_mode=    "random";
 our $opt_stress_threads=        5;
-our $opt_stress_test_count=    20;
-our $opt_stress_loop_count=    "";
-our $opt_stress_test_duration= "";
+our $opt_stress_test_count=     0;
+our $opt_stress_loop_count=     0;
+our $opt_stress_test_duration=  0;
 our $opt_stress_init_file=     "";
 our $opt_stress_test_file=     "";
 
@@ -936,6 +936,7 @@
     {
       $path_client_bindir= mtr_path_exists("$glob_basedir/client");
       $exe_mysqld=         mtr_exe_exists ("$glob_basedir/sql/mysqld");
+      $exe_mysqlslap=      mtr_exe_exists ("$path_client_bindir/mysqlslap");
       $path_language=      mtr_path_exists("$glob_basedir/sql/share/english/");
       $path_charsetsdir=   mtr_path_exists("$glob_basedir/sql/share/charsets");
 
@@ -962,8 +963,7 @@
     }
     $exe_mysqlcheck=     mtr_exe_exists("$path_client_bindir/mysqlcheck");
     $exe_mysqldump=      mtr_exe_exists("$path_client_bindir/mysqldump");
-    $exe_mysqlslap=      mtr_exe_exists("$path_client_bindir/mysqlslap");
-    $exe_mysqlimport=      mtr_exe_exists("$path_client_bindir/mysqlimport");
+    $exe_mysqlimport=    mtr_exe_exists("$path_client_bindir/mysqlimport");
     $exe_mysqlshow=      mtr_exe_exists("$path_client_bindir/mysqlshow");
     $exe_mysqlbinlog=    mtr_exe_exists("$path_client_bindir/mysqlbinlog");
     $exe_mysqladmin=     mtr_exe_exists("$path_client_bindir/mysqladmin");
@@ -978,7 +978,7 @@
     $path_client_bindir= mtr_path_exists("$glob_basedir/bin");
     $exe_mysqlcheck=     mtr_exe_exists("$path_client_bindir/mysqlcheck");
     $exe_mysqldump=      mtr_exe_exists("$path_client_bindir/mysqldump");
-    $exe_mysqlslap=      mtr_exe_exists("$path_client_bindir/mysqlslap");
+    $exe_mysqlimport=    mtr_exe_exists("$path_client_bindir/mysqlimport");
     $exe_mysqlshow=      mtr_exe_exists("$path_client_bindir/mysqlshow");
     $exe_mysqlbinlog=    mtr_exe_exists("$path_client_bindir/mysqlbinlog");
     $exe_mysqladmin=     mtr_exe_exists("$path_client_bindir/mysqladmin");
@@ -1004,6 +1004,7 @@
     {
       $exe_mysqld=         mtr_exe_exists ("$glob_basedir/libexec/mysqld",
                                            "$glob_basedir/bin/mysqld");
+      $exe_mysqlslap=      mtr_exe_exists("$path_client_bindir/mysqlslap");
     }
     $exe_im= mtr_exe_exists("$glob_basedir/libexec/mysqlmanager",
                             "$glob_basedir/bin/mysqlmanager");
@@ -2495,14 +2496,21 @@
     $cmdline_mysqldump .=
       " --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
   }
-  my $cmdline_mysqlslap= "$exe_mysqlslap -uroot " .
+
+  my $cmdline_mysqlslap;
+
+  unless ( $glob_win32 )
+  {
+    $cmdline_mysqlslap= "$exe_mysqlslap -uroot " .
                          "--port=$master->[0]->{'path_myport'} " .
                          "--socket=$master->[0]->{'path_mysock'} --password=";
-  if ( $opt_debug )
-  {
-    $cmdline_mysqlslap .=
-      " --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
+    if ( $opt_debug )
+    {
+      $cmdline_mysqlslap .=
+        " --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
+    }
   }
+
   my $cmdline_mysqlimport= "$exe_mysqlimport -uroot " .
                          "--port=$master->[0]->{'path_myport'} " .
                          "--socket=$master->[0]->{'path_mysock'} --password=";
@@ -2564,7 +2572,7 @@
   $ENV{'MYSQL'}=                    $cmdline_mysql;
   $ENV{'MYSQL_CHECK'}=              $cmdline_mysqlcheck;
   $ENV{'MYSQL_DUMP'}=               $cmdline_mysqldump;
-  $ENV{'MYSQL_SLAP'}=               $cmdline_mysqlslap;
+  $ENV{'MYSQL_SLAP'}=               $cmdline_mysqlslap unless $glob_win32;
   $ENV{'MYSQL_IMPORT'}=             $cmdline_mysqlimport;
   $ENV{'MYSQL_DUMP_SLAVE'}=         $cmdline_mysqldumpslave;
   $ENV{'MYSQL_SHOW'}=               $cmdline_mysqlshow;

--- 1.19/mysql-test/t/disabled.def	2005-12-14 16:45:01 +01:00
+++ 1.20/mysql-test/t/disabled.def	2005-12-21 18:29:28 +01:00
@@ -12,11 +12,13 @@
 
 sp-goto         : GOTO is currently is disabled - will be fixed in the future
 kill            : Unstable test case, bug#9712
-rpl_bit_npk:Bug 13418
+rpl_bit_npk     : Bug #13418
 ndb_cache2      : Bug #15004
 ndb_cache_multi2: Bug #15004
 func_group      : Bug #15448
 func_math       : Bug #15448
 group_min_max   : Bug #15448 
-mysqlslap       : Bug #15483
-innodb_concurrent: Results are not deterministic, Elliot will fix (BUG#3300)
+#mysqlslap       : Bug #15483
+innodb_concurrent : Results are not deterministic, Elliot will fix (BUG#3300)
+subselect       : Bug#15706
+type_time       : Bug#15805

--- 1.63/storage/innobase/lock/lock0lock.c	2005-11-30 08:21:36 +01:00
+++ 1.64/storage/innobase/lock/lock0lock.c	2005-12-21 18:10:23 +01:00
@@ -1705,7 +1705,7 @@
 lock_t*
 lock_rec_create(
 /*============*/
-				/* out: created lock, NULL if out of memory */
+				/* out: created lock */
 	ulint		type_mode,/* in: lock mode and wait flag, type is
 				ignored and replaced by LOCK_REC */
 	rec_t*		rec,	/* in: record on page */
@@ -1746,11 +1746,6 @@
 	n_bytes = 1 + n_bits / 8;
 
 	lock = mem_heap_alloc(trx->lock_heap, sizeof(lock_t) + n_bytes);
-	
-	if (UNIV_UNLIKELY(lock == NULL)) {
-
-		return(NULL);
-	}
 
 	UT_LIST_ADD_LAST(trx_locks, trx->trx_locks, lock);
 
@@ -1886,8 +1881,7 @@
 lock_t*
 lock_rec_add_to_queue(
 /*==================*/
-				/* out: lock where the bit was set, NULL if out
-				of memory */
+				/* out: lock where the bit was set */
 	ulint		type_mode,/* in: lock mode, wait, gap etc. flags;
 				type is ignored and replaced by LOCK_REC */
 	rec_t*		rec,	/* in: record on page */
@@ -3405,8 +3399,7 @@
 lock_t*
 lock_table_create(
 /*==============*/
-				/* out, own: new lock object, or NULL if
-				out of memory */
+				/* out, own: new lock object */
 	dict_table_t*	table,	/* in: database table in dictionary cache */
 	ulint		type_mode,/* in: lock mode possibly ORed with
 				LOCK_WAIT */
@@ -3430,11 +3423,6 @@
 		trx->auto_inc_lock = lock;
 	} else {
 		lock = mem_heap_alloc(trx->lock_heap, sizeof(lock_t));
-	}
-
-	if (lock == NULL) {
-
-		return(NULL);
 	}
 
 	UT_LIST_ADD_LAST(trx_locks, trx->trx_locks, lock);

--- 1.136/mysql-test/r/innodb.result	2005-12-13 16:10:47 +01:00
+++ 1.137/mysql-test/r/innodb.result	2005-12-21 18:10:16 +01:00
@@ -2399,7 +2399,9 @@
 20	NULL
 drop table t1;
 create table t1 (v varchar(65530), key(v));
-ERROR HY000: Can't create table 'test.t1' (errno: 139)
+Warnings:
+Warning	1071	Specified key was too long; max key length is 767 bytes
+drop table t1;
 create table t1 (v varchar(65536));
 Warnings:
 Note	1246	Converting column 'v' from VARCHAR to TEXT
@@ -2539,22 +2541,49 @@
 character set = latin1 engine = innodb;
 create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
 character set = latin1 engine = innodb;
+show create table t9;
+Table	Create Table
+t9	CREATE TABLE `t9` (
+  `col1` varchar(512) default NULL,
+  `col2` varchar(512) default NULL,
+  KEY `col1` (`col1`,`col2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
 drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
-create table t1 (col1 varchar(768), index (col1))
+create table t1 (col1 varchar(768), index(col1))
+character set = latin1 engine = innodb;
+Warnings:
+Warning	1071	Specified key was too long; max key length is 767 bytes
+create table t2 (col1 varbinary(768), index(col1))
+character set = latin1 engine = innodb;
+Warnings:
+Warning	1071	Specified key was too long; max key length is 767 bytes
+create table t3 (col1 text, index(col1(768)))
 character set = latin1 engine = innodb;
-ERROR HY000: Can't create table 'test.t1' (errno: 139)
-create table t2 (col1 varchar(768) primary key)
+Warnings:
+Warning	1071	Specified key was too long; max key length is 767 bytes
+create table t4 (col1 blob, index(col1(768)))
+character set = latin1 engine = innodb;
+Warnings:
+Warning	1071	Specified key was too long; max key length is 767 bytes
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `col1` varchar(768) default NULL,
+  KEY `col1` (`col1`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1, t2, t3, t4;
+create table t1 (col1 varchar(768) primary key)
 character set = latin1 engine = innodb;
-ERROR HY000: Can't create table 'test.t2' (errno: 139)
-create table t3 (col1 varbinary(768) primary key)
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+create table t2 (col1 varbinary(768) primary key)
 character set = latin1 engine = innodb;
-ERROR HY000: Can't create table 'test.t3' (errno: 139)
-create table t4 (col1 text, index(col1(768)))
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+create table t3 (col1 text, primary key(col1(768)))
 character set = latin1 engine = innodb;
-ERROR HY000: Can't create table 'test.t4' (errno: 139)
-create table t5 (col1 blob, index(col1(768)))
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+create table t4 (col1 blob, primary key(col1(768)))
 character set = latin1 engine = innodb;
-ERROR HY000: Can't create table 'test.t5' (errno: 139)
+ERROR 42000: Specified key was too long; max key length is 767 bytes
 CREATE TABLE t1
 (
 id INT PRIMARY KEY

--- 1.106/mysql-test/t/innodb.test	2005-12-13 16:10:48 +01:00
+++ 1.107/mysql-test/t/innodb.test	2005-12-21 18:10:16 +01:00
@@ -1313,8 +1313,8 @@
 # Clean up filename -- embedded server reports whole path without .frm,
 # regular server reports relative path with .frm (argh!)
 --replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t1.frm t1
---error 1005
 create table t1 (v varchar(65530), key(v));
+drop table t1;
 create table t1 (v varchar(65536));
 show create table t1;
 drop table t1;
@@ -1442,7 +1442,7 @@
 DROP TABLE t1;
 
 #
-# Test that index column max sizes are checked (bug #13315)
+# Test that index column max sizes are honored (bug #13315)
 #
 
 # prefix index
@@ -1469,22 +1469,36 @@
 create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
  character set = latin1 engine = innodb;
 
+show create table t9;
+
 drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
 
---error 1005
-create table t1 (col1 varchar(768), index (col1))
+# these should have their index length trimmed
+create table t1 (col1 varchar(768), index(col1))
+ character set = latin1 engine = innodb;
+create table t2 (col1 varbinary(768), index(col1))
+ character set = latin1 engine = innodb;
+create table t3 (col1 text, index(col1(768)))
+ character set = latin1 engine = innodb;
+create table t4 (col1 blob, index(col1(768)))
  character set = latin1 engine = innodb;
---error 1005
-create table t2 (col1 varchar(768) primary key)
+
+show create table t1;
+
+drop table t1, t2, t3, t4;
+
+# these should be refused
+--error 1071
+create table t1 (col1 varchar(768) primary key)
  character set = latin1 engine = innodb;
---error 1005
-create table t3 (col1 varbinary(768) primary key)
+--error 1071
+create table t2 (col1 varbinary(768) primary key)
  character set = latin1 engine = innodb;
---error 1005
-create table t4 (col1 text, index(col1(768)))
+--error 1071
+create table t3 (col1 text, primary key(col1(768)))
  character set = latin1 engine = innodb;
---error 1005
-create table t5 (col1 blob, index(col1(768)))
+--error 1071
+create table t4 (col1 blob, primary key(col1(768)))
  character set = latin1 engine = innodb;
 
 #

--- 1.240/sql/ha_innodb.cc	2005-12-13 16:10:48 +01:00
+++ 1.241/sql/ha_innodb.cc	2005-12-21 18:10:17 +01:00
@@ -2541,6 +2541,12 @@
   	DBUG_RETURN(0);
 }
 
+uint
+ha_innobase::max_supported_key_part_length() const
+{
+	return(DICT_MAX_INDEX_COL_LEN - 1);
+}
+
 /**********************************************************************
 Closes a handle to an InnoDB table. */
 
@@ -4749,6 +4755,9 @@
 				0, prefix_len);
 	}
 
+	/* Even though we've defined max_supported_key_part_length, we
+	still do our own checking using field_lengths to be absolutely
+	sure we don't create too long indexes. */
 	error = row_create_index_for_mysql(index, trx, field_lengths);
 
 	error = convert_error_code_to_mysql(error, NULL);

--- 1.112/sql/ha_innodb.h	2005-12-13 14:48:59 +01:00
+++ 1.113/sql/ha_innodb.h	2005-12-21 18:10:17 +01:00
@@ -122,6 +122,8 @@
   	int write_row(byte * buf);
   	int update_row(const byte * old_data, byte * new_data);
   	int delete_row(const byte * buf);
+	bool was_semi_consistent_read();
+	void try_semi_consistent_read(bool yes);
 	void unlock_row();
 
   	int index_init(uint index, bool sorted);

--- 1.46/client/client_priv.h	2005-12-05 11:32:41 +01:00
+++ 1.47/client/client_priv.h	2005-12-21 18:29:27 +01:00
@@ -52,5 +52,5 @@
   OPT_TRIGGERS,
   OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
   OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
-  OPT_MYSQL_REPLACE_INTO, OPT_SERVER_ID
+  OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID
 };

--- 1.117/include/my_global.h	2005-12-20 23:04:52 +01:00
+++ 1.118/include/my_global.h	2005-12-21 18:10:14 +01:00
@@ -415,6 +415,9 @@
 #include <assert.h>
 
 /* Go around some bugs in different OS and compilers */
+#if defined (HPUX11) && defined(_LARGEFILE_SOURCE)
+#define _LARGEFILE64_SOURCE
+#endif
 #if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
 #include <sys/stream.h>		/* HPUX 10.20 defines ulong here. UGLY !!! */
 #define HAVE_ULONG

--- 1.75/libmysqld/Makefile.am	2005-12-20 01:12:02 +01:00
+++ 1.76/libmysqld/Makefile.am	2005-12-21 18:10:14 +01:00
@@ -48,6 +48,7 @@
 	item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
 	item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
 	item_geofunc.cc item_uniq.cc item_subselect.cc item_row.cc\
+	item_xmlfunc.cc \
 	key.cc lock.cc log.cc log_event.cc sql_state.c \
 	protocol.cc net_serv.cc opt_range.cc \
 	opt_sum.cc procedure.cc records.cc sql_acl.cc \

--- 1.197/sql/sp_head.cc	2005-12-13 16:10:48 +01:00
+++ 1.198/sql/sp_head.cc	2005-12-21 18:10:20 +01:00
@@ -889,7 +889,7 @@
     THD *thd= current_thd;
     my_error(ER_SP_RECURSION_LIMIT, MYF(0),
              thd->variables.max_sp_recursion_depth,
-             m_name);
+             m_name.str);
   }
   else
     my_error(ER_SP_NO_RECURSION, MYF(0));

--- 1.38.3.1/mysql-test/t/rpl000001.test	2005-12-14 18:42:01 +01:00
+++ 1.45/mysql-test/extra/rpl_tests/rpl_stm_000001.test	2005-12-21 18:10:15 +01:00
@@ -1,4 +1,5 @@
-source include/master-slave.inc;
+-- source include/have_binlog_format_statement.inc
+-- source include/master-slave.inc
 
 create table t1 (word char(20) not null);
 load data infile '../../std_data/words.dat' into table t1;
@@ -44,7 +45,7 @@
 
 connection master;
 # we'll use table-level locking to delay slave SQL thread
-create table t1 (n int) engine=myisam;
+eval create table t1 (n int) engine=$engine_type;
 sync_slave_with_master;
 connection master;
 reset master;
Thread
bk commit into 5.1 tree (lars:1.1975)Lars Thalmann21 Dec