List:Commits« Previous MessageNext Message »
From:tim Date:January 18 2007 6:06pm
Subject:bk commit into 5.0 tree (tsmith:1.2373)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tsmith. When tsmith 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, 2007-01-18 10:06:36-07:00, tsmith@stripped +9 -0
  Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/50
  into  siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/50
  MERGE: 1.2341.4.48

  client/mysqlbinlog.cc@stripped, 2007-01-18 10:05:03-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.130.1.2

  include/my_pthread.h@stripped, 2007-01-18 10:05:03-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.92.1.3

  mysql-test/r/sp.result@stripped, 2007-01-18 10:05:03-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.216.1.1

  mysql-test/t/mix_innodb_myisam_binlog.test@stripped, 2007-01-18 10:05:03-07:00,
tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.23.1.1

  mysql-test/t/sp.test@stripped, 2007-01-18 10:05:03-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.206.1.1

  sql/mysqld.cc@stripped, 2007-01-18 10:05:03-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.586.1.3

  sql/sql_class.h@stripped, 2007-01-18 10:05:04-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.314.1.1

  sql/sql_parse.cc@stripped, 2007-01-18 10:06:34-07:00, tsmith@stripped +2 -2
    Manual merge
    MERGE: 1.593.1.2

  sql/sql_show.cc@stripped, 2007-01-18 10:05:04-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.333.1.2

# 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:	tsmith
# Host:	siva.hindu.god
# Root:	/home/tsmith/m/bk/mrg-jan17/maint/50/RESYNC

--- 1.94/include/my_pthread.h	2007-01-12 04:22:48 -07:00
+++ 1.95/include/my_pthread.h	2007-01-18 10:05:03 -07:00
@@ -88,14 +88,6 @@
 #endif
 } pthread_cond_t;
 
-
-#ifndef OS2
-struct timespec {		/* For pthread_cond_timedwait() */
-    time_t tv_sec;
-    long tv_nsec;
-};
-#endif
-
 typedef int pthread_mutexattr_t;
 #define win_pthread_self my_thread_var->pthread_self
 #ifdef OS2
@@ -106,6 +98,36 @@
 typedef void * (__cdecl *pthread_handler)(void *);
 #endif
 
+/*
+  Struct and macros to be used in combination with the
+  windows implementation of pthread_cond_timedwait
+*/
+
+/*
+   Declare a union to make sure FILETIME is properly aligned
+   so it can be used directly as a 64 bit value. The value
+   stored is in 100ns units.
+ */
+ union ft64 {
+  FILETIME ft;
+  __int64 i64;
+ };
+struct timespec {
+  union ft64 tv;
+  /* The max timeout value in millisecond for pthread_cond_timedwait */
+  long max_timeout_msec;
+};
+#define set_timespec(ABSTIME,SEC) { \
+  GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+  (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \
+  (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \
+}
+#define set_timespec_nsec(ABSTIME,NSEC) { \
+  GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+  (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
+  (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
+}
+
 void win_pthread_init(void);
 int win_pthread_setspecific(void *A,void *B,uint length);
 int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
@@ -183,8 +205,6 @@
 #define pthread_condattr_init(A)
 #define pthread_condattr_destroy(A)
 
-/*Irena: compiler does not like this: */
-/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
 #define my_pthread_getprio(thread_id) pthread_dummy(0)
 
 #elif defined(HAVE_UNIXWARE7_THREADS)
@@ -491,6 +511,47 @@
 #define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
 int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
 #endif
+
+/*
+  The defines set_timespec and set_timespec_nsec should be used
+  for calculating an absolute time at which
+  pthread_cond_timedwait should timeout
+*/
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{ \
+  (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
+  (ABSTIME).ts_nsec=0; \
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{ \
+  ulonglong now= my_getsystime() + (NSEC/100); \
+  (ABSTIME).ts_sec=  (now / ULL(10000000)); \
+  (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#else
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{\
+  struct timeval tv;\
+  gettimeofday(&tv,0);\
+  (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
+  (ABSTIME).tv_nsec=tv.tv_usec*1000;\
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{\
+  ulonglong now= my_getsystime() + (NSEC/100); \
+  (ABSTIME).tv_sec=  (time_t) (now / ULL(10000000));                  \
+  (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
 
 	/* safe_mutex adds checking to mutex for easier debugging */
 

--- 1.132/client/mysqlbinlog.cc	2007-01-12 04:22:48 -07:00
+++ 1.133/client/mysqlbinlog.cc	2007-01-18 10:05:03 -07:00
@@ -1325,6 +1325,25 @@
   }
   else // reading from stdin;
   {
+    /*
+      Bug fix: #23735
+      Author: Chuck Bell
+      Description:
+        Windows opens stdin in text mode by default. Certain characters
+        such as CTRL-Z are interpeted as events and the read() method
+        will stop. CTRL-Z is the EOF marker in Windows. to get past this
+        you have to open stdin in binary mode. Setmode() is used to set
+        stdin in binary mode. Errors on setting this mode result in
+        halting the function and printing an error message to stderr.
+    */
+#if defined (__WIN__) || (_WIN64)
+    if (_setmode(fileno(stdin), O_BINARY) == -1)
+    {
+       fprintf(stderr, "Could not set binary mode on stdin.\n");
+       return 1;
+    }
+#endif
+
     if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
 		      0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
       return 1;

--- 1.588/sql/mysqld.cc	2007-01-17 03:52:57 -07:00
+++ 1.589/sql/mysqld.cc	2007-01-18 10:05:03 -07:00
@@ -5468,6 +5468,11 @@
    0, 0, 0, 0, 0},
   {"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use
--symbolic-links instead.",
    (gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG,
+   /*
+     The system call realpath() produces warnings under valgrind and
+     purify. These are not suppressed: instead we disable symlinks
+     option if compiled with valgrind support. 
+   */
    IF_PURIFY(0,1), 0, 0, 0, 0, 0},
   {"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG,
    0, 0, 0, 0, 0, 0},

--- 1.599/sql/sql_parse.cc	2007-01-17 11:43:42 -07:00
+++ 1.600/sql/sql_parse.cc	2007-01-18 10:06:34 -07:00
@@ -2918,6 +2918,12 @@
     create_info.alias= create_table->alias;
 
 #ifndef HAVE_READLINK
+    if (create_info.data_file_name)
+      push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+                   "DATA DIRECTORY option ignored");
+    if (create_info.index_file_name)
+      push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+                   "INDEX DIRECTORY option ignored");
     create_info.data_file_name= create_info.index_file_name= NULL;
 #else
     /* Fix names if symlinked tables */

--- 1.335/sql/sql_show.cc	2006-12-26 22:28:21 -07:00
+++ 1.336/sql/sql_show.cc	2007-01-18 10:05:04 -07:00
@@ -460,7 +460,7 @@
 }
 
 bool mysqld_show_create_db(THD *thd, char *dbname,
-                           HA_CREATE_INFO *create_info)
+                           const HA_CREATE_INFO *create_info)
 {
   Security_context *sctx= thd->security_ctx;
   char buff[2048];

--- 1.24/mysql-test/t/mix_innodb_myisam_binlog.test	2006-11-28 05:26:08 -07:00
+++ 1.25/mysql-test/t/mix_innodb_myisam_binlog.test	2007-01-18 10:05:03 -07:00
@@ -29,7 +29,7 @@
 commit;
 
 --replace_column 5 #
---replace_result "xid=15" "xid=8"
+--replace_result "xid=14" "xid=8"
 show binlog events from 98;
 
 delete from t1;
@@ -58,7 +58,7 @@
 commit;
 
 --replace_column 5 #
---replace_result "xid=48" "xid=25"
+--replace_result "xid=47" "xid=25"
 show binlog events from 98;
 
 delete from t1;
@@ -76,7 +76,7 @@
 select a from t1 order by a; # check that savepoints work :)
 
 --replace_column 5 #
---replace_result "xid=70" "xid=37"
+--replace_result "xid=69" "xid=37"
 show binlog events from 98;
 
 # and when ROLLBACK is not explicit?
@@ -109,7 +109,7 @@
 insert into t2 select * from t1;
 
 --replace_column 5 #
---replace_result "xid=119" "xid=60"
+--replace_result "xid=117" "xid=60"
 show binlog events from 98;
 
 # Check that when the query updat1ng the MyISAM table is the first in the
@@ -122,13 +122,13 @@
 begin;
 insert into t2 select * from t1;
 --replace_column 5 #
---replace_result "xid=133" "xid=66"
+--replace_result "xid=131" "xid=66"
 show binlog events from 98;
 insert into t1 values(11);
 commit;
 
 --replace_column 5 #
---replace_result "xid=133" "xid=66" "xid=136" "xid=68"
+--replace_result "xid=131" "xid=66" "xid=134" "xid=68"
 show binlog events from 98;
 
 
@@ -147,7 +147,7 @@
 commit;
 
 --replace_column 5 #
---replace_result "xid=155" "xid=78"
+--replace_result "xid=153" "xid=78"
 show binlog events from 98;
 
 delete from t1;
@@ -175,7 +175,7 @@
 commit;
 
 --replace_column 5 #
---replace_result "xid=187" "xid=94"
+--replace_result "xid=185" "xid=94"
 show binlog events from 98;
 
 delete from t1;
@@ -193,7 +193,7 @@
 select a from t1 order by a; # check that savepoints work :)
 
 --replace_column 5 #
---replace_result "xid=208" "xid=105"
+--replace_result "xid=206" "xid=105"
 show binlog events from 98;
 
 # Test for BUG#5714, where a MyISAM update in the transaction used to
@@ -254,7 +254,7 @@
 connection con3;
 select get_lock("lock1",60);
 --replace_column 5 #
---replace_result "xid=208" "xid=105" "xid=227" "xid=114" "xid=230" "xid=115" "xid=234"
"xid=117" "xid=261" "xid=132"
+--replace_result "xid=206" "xid=105" "xid=224" "xid=114" "xid=227" "xid=115" "xid=231"
"xid=117" "xid=258" "xid=132"
 show binlog events from 98;
 do release_lock("lock1");
 drop table t0,t2;

--- 1.217/mysql-test/r/sp.result	2006-12-14 10:58:03 -07:00
+++ 1.218/mysql-test/r/sp.result	2007-01-18 10:05:03 -07:00
@@ -5626,6 +5626,23 @@
 Called B
 drop procedure proc_21462_a|
 drop procedure proc_21462_b|
+drop table if exists t3|
+drop procedure if exists proc_bug19733|
+create table t3 (s1 int)|
+create procedure proc_bug19733()
+begin
+declare v int default 0;
+while v < 100 do
+create index i on t3 (s1);
+drop index i on t3;
+set v = v + 1;
+end while;
+end|
+call proc_bug19733()|
+call proc_bug19733()|
+call proc_bug19733()|
+drop procedure proc_bug19733|
+drop table t3|
 End of 5.0 tests
 DROP TABLE IF EXISTS bug23760|
 DROP TABLE IF EXISTS bug23760_log|

--- 1.207/mysql-test/t/sp.test	2006-12-14 10:58:04 -07:00
+++ 1.208/mysql-test/t/sp.test	2007-01-18 10:05:03 -07:00
@@ -6587,6 +6587,34 @@
 drop procedure proc_21462_a|
 drop procedure proc_21462_b|
 
+
+#
+# Bug#19733 "Repeated alter, or repeated create/drop, fails"
+# Check that CREATE/DROP INDEX is re-execution friendly.
+# 
+--disable_warnings
+drop table if exists t3|
+drop procedure if exists proc_bug19733|
+--enable_warnings
+create table t3 (s1 int)|
+
+create procedure proc_bug19733()
+begin
+  declare v int default 0;
+  while v < 100 do
+    create index i on t3 (s1);
+    drop index i on t3;
+    set v = v + 1;
+  end while;
+end|
+
+call proc_bug19733()|
+call proc_bug19733()|
+call proc_bug19733()|
+
+drop procedure proc_bug19733|
+drop table t3|
+
 --echo End of 5.0 tests
 
 
Thread
bk commit into 5.0 tree (tsmith:1.2373)tim18 Jan