diff options
-rw-r--r-- | .bzrignore | 2 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 4 | ||||
-rw-r--r-- | mysql-test/r/ctype_cp932_notembedded.result | 8 | ||||
-rw-r--r-- | mysql-test/r/func_system.result | 4 | ||||
-rw-r--r-- | mysql-test/r/partition_mgm_err.result | 2 | ||||
-rw-r--r-- | mysql-test/r/partition_mgm_err2.result | 2 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 2 | ||||
-rw-r--r-- | mysql-test/t/ctype_cp932_notembedded.test | 2 | ||||
-rw-r--r-- | mysql-test/t/func_system.test | 2 | ||||
-rw-r--r-- | mysql-test/t/partition_mgm_err.test | 18 | ||||
-rw-r--r-- | mysql-test/t/partition_mgm_err2.test | 25 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 2 | ||||
-rw-r--r-- | mysys/my_symlink2.c | 2 | ||||
-rw-r--r-- | sql/event.cc | 1 | ||||
-rw-r--r-- | sql/event_executor.cc | 20 | ||||
-rw-r--r-- | sql/mysqld.cc | 4 |
16 files changed, 56 insertions, 44 deletions
diff --git a/.bzrignore b/.bzrignore index 21383779fa7..4a0bf4ccb6b 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1614,3 +1614,5 @@ vio/viotest-sslconnect.cpp vio/viotest.cpp zlib/*.ds? zlib/*.vcproj +libmysqld/partition_info.cc +storage/ndb/src/common/util/testBitmask.cpp diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 212f0b9beb4..ce62964a3c0 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -217,8 +217,8 @@ MY_LOG_DIR="$MYSQL_TEST_DIR/var/log" # # Set LD_LIBRARY_PATH if we are using shared libraries # -LD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/zlib/.libs:$LD_LIBRARY_PATH" -DYLD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/zlib/.libs:$DYLD_LIBRARY_PATH" +LD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/libmysql_r/.libs:$BASEDIR/zlib/.libs:$LD_LIBRARY_PATH" +DYLD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$BASEDIR/libmysql_r/.libs:$BASEDIR/zlib/.libs:$DYLD_LIBRARY_PATH" export LD_LIBRARY_PATH DYLD_LIBRARY_PATH # diff --git a/mysql-test/r/ctype_cp932_notembedded.result b/mysql-test/r/ctype_cp932_notembedded.result index d04fce7738c..7ad8545299f 100644 --- a/mysql-test/r/ctype_cp932_notembedded.result +++ b/mysql-test/r/ctype_cp932_notembedded.result @@ -6,11 +6,11 @@ CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -SHOW BINLOG EVENTS FROM 98; +SHOW BINLOG EVENTS FROM 102; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 185 use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 185 User var 1 224 @`var1`=_binary 0x8300 COLLATE binary -master-bin.000001 224 Query 1 317 use `test`; INSERT INTO t1 VALUES(@'var1') +master-bin.000001 102 Query 1 189 use `test`; CREATE TABLE t1(f1 blob) +master-bin.000001 189 User var 1 228 @`var1`=_binary 0x8300 COLLATE binary +master-bin.000001 228 Query 1 321 use `test`; INSERT INTO t1 VALUES(@'var1') SELECT HEX(f1) FROM t1; HEX(f1) 8300 diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 1c1c6dff21e..4b6563eb97c 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -42,13 +42,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select sql_no_cache database() AS `database()`,user() AS `user()` -create table t1 (version char(40)) select database(), user(), version() as 'version'; +create table t1 (version char(60)) select database(), user(), version() as 'version'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `database()` varchar(34) character set utf8 default NULL, `user()` varchar(77) character set utf8 NOT NULL default '', - `version` char(40) default NULL + `version` char(60) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select charset(charset(_utf8'a')), charset(collation(_utf8'a')); diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index 1b73bfb9f16..32b28ae15c6 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -112,8 +112,6 @@ ALTER TABLE t1 DROP PARTITION x1; ALTER TABLE t1 DROP PARTITION x0; ERROR HY000: Cannot remove all partitions, use DROP TABLE instead DROP TABLE t1; -INSERT INTO t1 VALUES (15); -DROP TABLE t1; CREATE TABLE t1 ( id INT NOT NULL, fname VARCHAR(50) NOT NULL, lname VARCHAR(50) NOT NULL, diff --git a/mysql-test/r/partition_mgm_err2.result b/mysql-test/r/partition_mgm_err2.result new file mode 100644 index 00000000000..7e5763b8f1b --- /dev/null +++ b/mysql-test/r/partition_mgm_err2.result @@ -0,0 +1,2 @@ +INSERT INTO t1 VALUES (15); +DROP TABLE t1; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 942eca42c93..40aa88439b9 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -3,7 +3,7 @@ flush query cache; flush query cache; reset query cache; flush status; -drop table if exists t1,t2,t3,t4,t11,t21; +drop table if exists t1,t2,t3,t4,t11,t21,t1_1,t1_2,t9,t9_1,t9_2; drop database if exists mysqltest; drop table if exists ```a`; drop view if exists v1; diff --git a/mysql-test/t/ctype_cp932_notembedded.test b/mysql-test/t/ctype_cp932_notembedded.test index 52e7acc3f01..9cad7a136a7 100644 --- a/mysql-test/t/ctype_cp932_notembedded.test +++ b/mysql-test/t/ctype_cp932_notembedded.test @@ -26,7 +26,7 @@ SET @var1= x'8300'; # code (and I have used it to test the fix) until there is some way to # exercise this code from mysql-test-run. EXECUTE stmt1 USING @var1; -SHOW BINLOG EVENTS FROM 98; +SHOW BINLOG EVENTS FROM 102; SELECT HEX(f1) FROM t1; DROP table t1; # end test for bug#11338 diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test index 4a526935491..a5041a83623 100644 --- a/mysql-test/t/func_system.test +++ b/mysql-test/t/func_system.test @@ -19,7 +19,7 @@ select version()>=_latin1"3.23.29"; select charset(version()); explain extended select database(), user(); -create table t1 (version char(40)) select database(), user(), version() as 'version'; +create table t1 (version char(60)) select database(), user(), version() as 'version'; show create table t1; drop table t1; diff --git a/mysql-test/t/partition_mgm_err.test b/mysql-test/t/partition_mgm_err.test index 47fc8cb84e5..f72222feadd 100644 --- a/mysql-test/t/partition_mgm_err.test +++ b/mysql-test/t/partition_mgm_err.test @@ -169,24 +169,6 @@ ALTER TABLE t1 DROP PARTITION x0; DROP TABLE t1; # -# BUG: 14354 Partitions: data directory clause fails -# ---system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354 ---system mkdir $MYSQLTEST_VARDIR/tmp/bug14354 -disable_query_log; -eval CREATE TABLE t1 (id int) PARTITION BY RANGE(id) ( -PARTITION p1 VALUES LESS THAN (20) ENGINE=myiasm -DATA DIRECTORY="$MYSQLTEST_VARDIR/tmp/bug14354" -INDEX DIRECTORY="$MYSQLTEST_VARDIR/tmp/bug14354"); -enable_query_log; -INSERT INTO t1 VALUES (15); ---system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYD ---system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYI -DROP TABLE t1; ---system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354 - - -# # Bug# 16534 - Trying to add multiple partitions crashes server # CREATE TABLE t1 ( id INT NOT NULL, diff --git a/mysql-test/t/partition_mgm_err2.test b/mysql-test/t/partition_mgm_err2.test new file mode 100644 index 00000000000..157ba4d70d2 --- /dev/null +++ b/mysql-test/t/partition_mgm_err2.test @@ -0,0 +1,25 @@ +# +# Test of partitions that require symlinks +# + +-- require r/have_symlink.require +disable_query_log; +show variables like "have_symlink"; +enable_query_log; + +# +# BUG: 14354 Partitions: data directory clause fails +# +--system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354 +--system mkdir $MYSQLTEST_VARDIR/tmp/bug14354 +disable_query_log; +eval CREATE TABLE t1 (id int) PARTITION BY RANGE(id) ( +PARTITION p1 VALUES LESS THAN (20) ENGINE=myiasm +DATA DIRECTORY="$MYSQLTEST_VARDIR/tmp/bug14354" +INDEX DIRECTORY="$MYSQLTEST_VARDIR/tmp/bug14354"); +enable_query_log; +INSERT INTO t1 VALUES (15); +--system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYD +--system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYI +DROP TABLE t1; +--system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354 diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 15559d75d6c..7596a7ba708 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -12,7 +12,7 @@ flush query cache; # This crashed in some versions reset query cache; flush status; --disable_warnings -drop table if exists t1,t2,t3,t4,t11,t21; +drop table if exists t1,t2,t3,t4,t11,t21,t1_1,t1_2,t9,t9_1,t9_2; drop database if exists mysqltest; # Fix possible left overs from other tests diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c index 603248e186b..84be3a7a34a 100644 --- a/mysys/my_symlink2.c +++ b/mysys/my_symlink2.c @@ -34,9 +34,11 @@ File my_create_with_symlink(const char *linkname, const char *filename, int create_link; char abs_linkname[FN_REFLEN]; DBUG_ENTER("my_create_with_symlink"); + DBUG_PRINT("enter", ("linkname: %s filename: %s", linkname, filename)); if (my_disable_symlinks) { + DBUG_PRINT("info", ("Symlinks disabled")); /* Create only the file, not the link and file */ create_link= 0; if (linkname) diff --git a/sql/event.cc b/sql/event.cc index 6afdb9d98b9..3ee7dda09d6 100644 --- a/sql/event.cc +++ b/sql/event.cc @@ -1465,7 +1465,6 @@ evex_drop_db_events(THD *thd, char *db) DBUG_ENTER("evex_drop_db_events"); DBUG_PRINT("info",("dropping events from %s", db)); - VOID(pthread_mutex_lock(&LOCK_event_arrays)); if ((ret= evex_open_event_table(thd, TL_WRITE, &table))) diff --git a/sql/event_executor.cc b/sql/event_executor.cc index e7b4914b993..de6e5639172 100644 --- a/sql/event_executor.cc +++ b/sql/event_executor.cc @@ -48,7 +48,7 @@ bool evex_is_running= false; ulonglong evex_main_thread_id= 0; ulong opt_event_executor; my_bool event_executor_running_global_var; -static my_bool evex_mutexes_initted= false; +static my_bool evex_mutexes_initted= FALSE; static uint workers_count; static int @@ -107,7 +107,7 @@ evex_init_mutexes() if (evex_mutexes_initted) return; - evex_mutexes_initted= true; + evex_mutexes_initted= TRUE; pthread_mutex_init(&LOCK_event_arrays, MY_MUTEX_INIT_FAST); pthread_mutex_init(&LOCK_workers_count, MY_MUTEX_INIT_FAST); pthread_mutex_init(&LOCK_evex_running, MY_MUTEX_INIT_FAST); @@ -191,7 +191,6 @@ int init_events() { pthread_t th; - DBUG_ENTER("init_events"); DBUG_PRINT("info",("Starting events main thread")); @@ -234,13 +233,16 @@ shutdown_events() { DBUG_ENTER("shutdown_events"); - VOID(pthread_mutex_lock(&LOCK_evex_running)); - VOID(pthread_mutex_unlock(&LOCK_evex_running)); + if (evex_mutexes_initted) + { + evex_mutexes_initted= FALSE; + VOID(pthread_mutex_lock(&LOCK_evex_running)); + VOID(pthread_mutex_unlock(&LOCK_evex_running)); - pthread_mutex_destroy(&LOCK_event_arrays); - pthread_mutex_destroy(&LOCK_workers_count); - pthread_mutex_destroy(&LOCK_evex_running); - + pthread_mutex_destroy(&LOCK_event_arrays); + pthread_mutex_destroy(&LOCK_workers_count); + pthread_mutex_destroy(&LOCK_evex_running); + } DBUG_VOID_RETURN; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e56564b782a..dd3b6f9e634 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3070,6 +3070,8 @@ static int init_server_components() #ifdef HAVE_REPLICATION init_slave_list(); #endif + init_events(); + /* Setup logs */ /* enable old-fashioned error log */ @@ -3698,8 +3700,6 @@ we force server id to 2, but this MySQL server will not act as a slave."); } } - init_events(); - create_shutdown_thread(); create_maintenance_thread(); |