Loading include/my_pthread.h +0 −9 Original line number Diff line number Diff line Loading @@ -690,15 +690,6 @@ extern uint my_thread_end_wait_time; Keep track of shutdown,signal, and main threads so that my_end() will not report errors with them */ /* Which kind of thread library is in use */ #define THD_LIB_OTHER 1 #define THD_LIB_NPTL 2 #define THD_LIB_LT 4 extern uint thd_lib_detected; /* statistics_xxx functions are for not essential statistic */ #ifndef thread_safe_increment Loading include/thr_alarm.h +5 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,11 @@ extern "C" { #ifndef USE_ALARM_THREAD #define USE_ONE_SIGNAL_HAND /* One must call process_alarm */ #endif #ifdef HAVE_LINUXTHREADS #define THR_CLIENT_ALARM SIGALRM #else #define THR_CLIENT_ALARM SIGUSR1 #endif #ifdef HAVE_rts_threads #undef USE_ONE_SIGNAL_HAND #define USE_ALARM_THREAD Loading Loading @@ -84,9 +89,6 @@ typedef struct st_alarm { my_bool malloced; } ALARM; extern uint thr_client_alarm; extern pthread_t alarm_thread; #define thr_alarm_init(A) (*(A))=0 #define thr_alarm_in_use(A) (*(A)!= 0) void init_thr_alarm(uint max_alarm); Loading mysql-test/r/ndb_read_multi_range.result +31 −0 Original line number Diff line number Diff line Loading @@ -442,3 +442,34 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); id tag doc type sakila 1 Some text goes here text DROP TABLE t1; CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; insert into t1 values (1,1), (10,10); select * from t1 use index (ab) where a in(1,10) order by a; a b 1 1 10 10 create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster partition by key(a); insert into t2 values (1,1), (10,10); select * from t2 where a in (1,10) order by a; a b 1 1 10 10 drop table t1, t2; mysql-test/t/ndb_read_multi_range.test +45 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,48 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); DROP TABLE t1; #bug#25522 CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; DELIMITER |; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| DELIMITER ;| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; #bug#25821 create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; insert into t1 values (1,1), (10,10); select * from t1 use index (ab) where a in(1,10) order by a; create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster partition by key(a); insert into t2 values (1,1), (10,10); select * from t2 where a in (1,10) order by a; drop table t1, t2; mysys/my_pthread.c +3 −5 Original line number Diff line number Diff line Loading @@ -29,8 +29,6 @@ #define SCHED_POLICY SCHED_OTHER #endif uint thd_lib_detected; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) { Loading Loading @@ -314,6 +312,8 @@ void sigwait_handle_sig(int sig) pthread_mutex_unlock(&LOCK_sigwait); } extern pthread_t alarm_thread; void *sigwait_thread(void *set_arg) { sigset_t *set=(sigset_t*) set_arg; Loading @@ -332,9 +332,7 @@ void *sigwait_thread(void *set_arg) sigaction(i, &sact, (struct sigaction*) 0); } } /* Ensure that init_thr_alarm() is called */ DBUG_ASSERT(thr_client_alarm); sigaddset(set, thr_client_alarm); sigaddset(set,THR_CLIENT_ALARM); pthread_sigmask(SIG_UNBLOCK,(sigset_t*) set,(sigset_t*) 0); alarm_thread=pthread_self(); /* For thr_alarm */ Loading Loading
include/my_pthread.h +0 −9 Original line number Diff line number Diff line Loading @@ -690,15 +690,6 @@ extern uint my_thread_end_wait_time; Keep track of shutdown,signal, and main threads so that my_end() will not report errors with them */ /* Which kind of thread library is in use */ #define THD_LIB_OTHER 1 #define THD_LIB_NPTL 2 #define THD_LIB_LT 4 extern uint thd_lib_detected; /* statistics_xxx functions are for not essential statistic */ #ifndef thread_safe_increment Loading
include/thr_alarm.h +5 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,11 @@ extern "C" { #ifndef USE_ALARM_THREAD #define USE_ONE_SIGNAL_HAND /* One must call process_alarm */ #endif #ifdef HAVE_LINUXTHREADS #define THR_CLIENT_ALARM SIGALRM #else #define THR_CLIENT_ALARM SIGUSR1 #endif #ifdef HAVE_rts_threads #undef USE_ONE_SIGNAL_HAND #define USE_ALARM_THREAD Loading Loading @@ -84,9 +89,6 @@ typedef struct st_alarm { my_bool malloced; } ALARM; extern uint thr_client_alarm; extern pthread_t alarm_thread; #define thr_alarm_init(A) (*(A))=0 #define thr_alarm_in_use(A) (*(A)!= 0) void init_thr_alarm(uint max_alarm); Loading
mysql-test/r/ndb_read_multi_range.result +31 −0 Original line number Diff line number Diff line Loading @@ -442,3 +442,34 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); id tag doc type sakila 1 Some text goes here text DROP TABLE t1; CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; insert into t1 values (1,1), (10,10); select * from t1 use index (ab) where a in(1,10) order by a; a b 1 1 10 10 create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster partition by key(a); insert into t2 values (1,1), (10,10); select * from t2 where a in (1,10) order by a; a b 1 1 10 10 drop table t1, t2;
mysql-test/t/ndb_read_multi_range.test +45 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,48 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); DROP TABLE t1; #bug#25522 CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; DELIMITER |; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| DELIMITER ;| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; #bug#25821 create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; insert into t1 values (1,1), (10,10); select * from t1 use index (ab) where a in(1,10) order by a; create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster partition by key(a); insert into t2 values (1,1), (10,10); select * from t2 where a in (1,10) order by a; drop table t1, t2;
mysys/my_pthread.c +3 −5 Original line number Diff line number Diff line Loading @@ -29,8 +29,6 @@ #define SCHED_POLICY SCHED_OTHER #endif uint thd_lib_detected; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) { Loading Loading @@ -314,6 +312,8 @@ void sigwait_handle_sig(int sig) pthread_mutex_unlock(&LOCK_sigwait); } extern pthread_t alarm_thread; void *sigwait_thread(void *set_arg) { sigset_t *set=(sigset_t*) set_arg; Loading @@ -332,9 +332,7 @@ void *sigwait_thread(void *set_arg) sigaction(i, &sact, (struct sigaction*) 0); } } /* Ensure that init_thr_alarm() is called */ DBUG_ASSERT(thr_client_alarm); sigaddset(set, thr_client_alarm); sigaddset(set,THR_CLIENT_ALARM); pthread_sigmask(SIG_UNBLOCK,(sigset_t*) set,(sigset_t*) 0); alarm_thread=pthread_self(); /* For thr_alarm */ Loading