Skip to content

Commit 7382b84

Browse files
author
Guilhem Bichot
committed
Merge with latest next-mr-bugfixing
2 parents 9ffdd1c + 03d10b8 commit 7382b84

26 files changed

+340
-99
lines changed

libmysqld/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobj
155155
if DARWIN_MWCC
156156
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
157157
else
158-
-rm -f libmysqld.a
159-
if test "$(host_os)" = "netware" ; \
158+
-rm -f libmysqld.a
159+
if test "$(host_os)" = "netware" ; \
160160
then \
161161
$(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \
162162
else \

mysql-test/include/mysqld--help.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help
1111

1212
perl;
1313
@skipvars=qw/basedir open-files-limit general-log-file log
14-
log-slow-queries pid-file slow-query-log-file/;
14+
log-slow-queries pid-file slow-query-log-file
15+
datadir slave-load-tmpdir tmpdir/;
1516
@plugins=qw/innodb ndb ndbcluster safemalloc debug temp-pool ssl des-key-file
1617
thread-concurrency super-large-pages mutex-deadlock-detector/;
1718
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_SHAREDIR/;

mysql-test/r/index_merge_myisam.result

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,19 +1419,19 @@ drop table t1;
14191419
#
14201420
select @@optimizer_switch;
14211421
@@optimizer_switch
1422-
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1422+
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14231423
set optimizer_switch='index_merge=off,index_merge_union=off';
14241424
select @@optimizer_switch;
14251425
@@optimizer_switch
1426-
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on
1426+
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14271427
set optimizer_switch='index_merge_union=on';
14281428
select @@optimizer_switch;
14291429
@@optimizer_switch
1430-
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1430+
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14311431
set optimizer_switch='default,index_merge_sort_union=off';
14321432
select @@optimizer_switch;
14331433
@@optimizer_switch
1434-
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on
1434+
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on
14351435
set optimizer_switch=4;
14361436
set optimizer_switch=NULL;
14371437
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
@@ -1457,21 +1457,21 @@ set optimizer_switch=default;
14571457
set optimizer_switch='index_merge=off,index_merge_union=off,default';
14581458
select @@optimizer_switch;
14591459
@@optimizer_switch
1460-
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on
1460+
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14611461
set optimizer_switch=default;
14621462
select @@global.optimizer_switch;
14631463
@@global.optimizer_switch
1464-
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1464+
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14651465
set @@global.optimizer_switch=default;
14661466
select @@global.optimizer_switch;
14671467
@@global.optimizer_switch
1468-
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1468+
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14691469
#
14701470
# Check index_merge's @@optimizer_switch flags
14711471
#
14721472
select @@optimizer_switch;
14731473
@@optimizer_switch
1474-
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1474+
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
14751475
create table t0 (a int);
14761476
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
14771477
create table t1 (a int, b int, c int, filler char(100),
@@ -1581,5 +1581,5 @@ id select_type table type possible_keys key key_len ref rows Extra
15811581
set optimizer_switch=default;
15821582
show variables like 'optimizer_switch';
15831583
Variable_name Value
1584-
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
1584+
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
15851585
drop table t0, t1;

mysql-test/r/mysqld--help-notwin.result

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ The following options may be given as the first argument:
132132
on that value
133133
--enable-locking Deprecated option, use --external-locking instead.
134134
--engine-condition-pushdown
135-
Push supported query conditions to the storage engine
135+
Push supported query conditions to the storage engine.
136+
Deprecated, use --optimizer-switch instead.
136137
(Defaults to on; use --skip-engine-condition-pushdown to disable.)
137138
--event-scheduler[=name]
138139
Enable the event scheduler. Possible values are ON, OFF,
@@ -413,8 +414,9 @@ The following options may be given as the first argument:
413414
--optimizer-switch=name
414415
optimizer_switch=option=val[,option=val...], where option
415416
is one of {index_merge, index_merge_union,
416-
index_merge_sort_union, index_merge_intersection} and val
417-
is one of {on, off, default}
417+
index_merge_sort_union, index_merge_intersection,
418+
engine_condition_pushdown} and val is one of {on, off,
419+
default}
418420
--partition[=name] Enable or disable partition plugin. Possible values are
419421
ON, OFF, FORCE (don't start if the plugin fails to load).
420422
--pid-file=name Pid file used by safe_mysqld
@@ -742,7 +744,6 @@ completion-type NO_CHAIN
742744
concurrent-insert AUTO
743745
connect-timeout 10
744746
console FALSE
745-
datadir MYSQLTEST_VARDIR/install.db/
746747
date-format %Y-%m-%d
747748
datetime-format %Y-%m-%d %H:%i:%s
748749
default-character-set latin1
@@ -853,7 +854,7 @@ old-passwords FALSE
853854
old-style-user-limits FALSE
854855
optimizer-prune-level 1
855856
optimizer-search-depth 62
856-
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
857+
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
857858
partition ON
858859
plugin-dir MYSQL_LIBDIR/mysql/plugin
859860
plugin-load (No default value)
@@ -896,7 +897,6 @@ skip-show-database FALSE
896897
skip-slave-start FALSE
897898
slave-compressed-protocol FALSE
898899
slave-exec-mode STRICT
899-
slave-load-tmpdir MYSQLTEST_VARDIR/tmp/
900900
slave-net-timeout 3600
901901
slave-skip-errors (No default value)
902902
slave-transaction-retries 10
@@ -924,7 +924,6 @@ thread-stack 262144
924924
time-format %H:%i:%s
925925
timed-mutexes FALSE
926926
tmp-table-size 16777216
927-
tmpdir MYSQLTEST_VARDIR/tmp/
928927
transaction-alloc-block-size 8192
929928
transaction-isolation REPEATABLE-READ
930929
transaction-prealloc-size 4096

mysql-test/r/mysqld--help-win.result

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ The following options may be given as the first argument:
132132
on that value
133133
--enable-locking Deprecated option, use --external-locking instead.
134134
--engine-condition-pushdown
135-
Push supported query conditions to the storage engine
135+
Push supported query conditions to the storage engine.
136+
Deprecated, use --optimizer-switch instead.
136137
(Defaults to on; use --skip-engine-condition-pushdown to disable.)
137138
--event-scheduler[=name]
138139
Enable the event scheduler. Possible values are ON, OFF,
@@ -413,8 +414,9 @@ The following options may be given as the first argument:
413414
--optimizer-switch=name
414415
optimizer_switch=option=val[,option=val...], where option
415416
is one of {index_merge, index_merge_union,
416-
index_merge_sort_union, index_merge_intersection} and val
417-
is one of {on, off, default}
417+
index_merge_sort_union, index_merge_intersection,
418+
engine_condition_pushdown} and val is one of {on, off,
419+
default}
418420
--partition[=name] Enable or disable partition plugin. Possible values are
419421
ON, OFF, FORCE (don't start if the plugin fails to load).
420422
--pid-file=name Pid file used by safe_mysqld
@@ -746,7 +748,6 @@ completion-type NO_CHAIN
746748
concurrent-insert AUTO
747749
connect-timeout 10
748750
console FALSE
749-
datadir MYSQLTEST_VARDIR/install.db/
750751
date-format %Y-%m-%d
751752
datetime-format %Y-%m-%d %H:%i:%s
752753
default-character-set latin1
@@ -857,7 +858,7 @@ old-passwords FALSE
857858
old-style-user-limits FALSE
858859
optimizer-prune-level 1
859860
optimizer-search-depth 62
860-
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
861+
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
861862
partition ON
862863
plugin-dir MYSQL_LIBDIR/plugin
863864
plugin-load (No default value)
@@ -902,7 +903,6 @@ skip-show-database FALSE
902903
skip-slave-start FALSE
903904
slave-compressed-protocol FALSE
904905
slave-exec-mode STRICT
905-
slave-load-tmpdir MYSQLTEST_VARDIR/tmp/
906906
slave-net-timeout 3600
907907
slave-skip-errors (No default value)
908908
slave-transaction-retries 10
@@ -930,7 +930,6 @@ thread-stack 262144
930930
time-format %H:%i:%s
931931
timed-mutexes FALSE
932932
tmp-table-size 16777216
933-
tmpdir MYSQLTEST_VARDIR/tmp/
934933
transaction-alloc-block-size 8192
935934
transaction-isolation REPEATABLE-READ
936935
transaction-prealloc-size 4096
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
select @@session.engine_condition_pushdown,
2+
@@global.engine_condition_pushdown,
3+
@@session.optimizer_switch, @@global.optimizer_switch;
4+
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
5+
1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
select @@session.engine_condition_pushdown,
2+
@@global.engine_condition_pushdown,
3+
@@session.optimizer_switch, @@global.optimizer_switch;
4+
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
5+
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off

mysql-test/suite/ndb/r/ndb_condition_pushdown.result

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NO
5151
insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f");
5252
CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster;
5353
insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f");
54-
set @old_ecpd = @@session.engine_condition_pushdown;
55-
set engine_condition_pushdown = off;
54+
set @old_optimizer_switch = @@session.optimizer_switch;
55+
set optimizer_switch = "engine_condition_pushdown=off";
5656
select auto from t1 where
5757
string = "aaaa" and
5858
vstring = "aaaa" and
@@ -484,7 +484,7 @@ pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4
484484
2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c
485485
3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d
486486
4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e
487-
set engine_condition_pushdown = on;
487+
set optimizer_switch = "engine_condition_pushdown=on";
488488
explain
489489
select auto from t1 where
490490
string = "aaaa" and
@@ -1769,28 +1769,28 @@ id select_type table type possible_keys key key_len ref rows Extra
17691769
create table t5 (a int primary key auto_increment, b tinytext not null)
17701770
engine = ndb;
17711771
insert into t5 (b) values ('jonas'), ('jensing'), ('johan');
1772-
set engine_condition_pushdown = off;
1772+
set optimizer_switch = "engine_condition_pushdown=off";
17731773
select * from t5 where b like '%jo%' order by a;
17741774
a b
17751775
1 jonas
17761776
3 johan
1777-
set engine_condition_pushdown = on;
1777+
set optimizer_switch = "engine_condition_pushdown=on";
17781778
explain select * from t5 where b like '%jo%';
17791779
id select_type table type possible_keys key key_len ref rows Extra
17801780
1 SIMPLE t5 ALL NULL NULL NULL NULL # Using where
17811781
select * from t5 where b like '%jo%' order by a;
17821782
a b
17831783
1 jonas
17841784
3 johan
1785-
set engine_condition_pushdown = off;
1785+
set optimizer_switch = "engine_condition_pushdown=off";
17861786
select auto from t1 where date_time like '1902-02-02 %' order by auto;
17871787
auto
17881788
2
17891789
select auto from t1 where date_time not like '1902-02-02 %' order by auto;
17901790
auto
17911791
3
17921792
4
1793-
set engine_condition_pushdown = on;
1793+
set optimizer_switch = "engine_condition_pushdown=on";
17941794
explain select auto from t1 where date_time like '1902-02-02 %';
17951795
id select_type table type possible_keys key key_len ref rows Extra
17961796
1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where
@@ -1808,7 +1808,7 @@ drop table t1;
18081808
create table t1 (a int, b varchar(3), primary key using hash(a))
18091809
engine=ndb;
18101810
insert into t1 values (1,'a'), (2,'ab'), (3,'abc');
1811-
set engine_condition_pushdown = off;
1811+
set optimizer_switch = "engine_condition_pushdown=off";
18121812
select * from t1 where b like 'ab';
18131813
a b
18141814
2 ab
@@ -1821,7 +1821,7 @@ a b
18211821
select * from t1 where b like 'abc' or b like 'abc';
18221822
a b
18231823
3 abc
1824-
set engine_condition_pushdown = on;
1824+
set optimizer_switch = "engine_condition_pushdown=on";
18251825
select * from t1 where b like 'ab';
18261826
a b
18271827
2 ab
@@ -1838,7 +1838,7 @@ drop table t1;
18381838
create table t1 (a int, b char(3), primary key using hash(a))
18391839
engine=ndb;
18401840
insert into t1 values (1,'a'), (2,'ab'), (3,'abc');
1841-
set engine_condition_pushdown = off;
1841+
set optimizer_switch = "engine_condition_pushdown=off";
18421842
select * from t1 where b like 'ab';
18431843
a b
18441844
2 ab
@@ -1851,7 +1851,7 @@ a b
18511851
select * from t1 where b like 'abc' or b like 'abc';
18521852
a b
18531853
3 abc
1854-
set engine_condition_pushdown = on;
1854+
set optimizer_switch = "engine_condition_pushdown=on";
18551855
select * from t1 where b like 'ab';
18561856
a b
18571857
2 ab
@@ -1868,23 +1868,23 @@ drop table t1;
18681868
create table t1 ( fname varchar(255), lname varchar(255) )
18691869
engine=ndbcluster;
18701870
insert into t1 values ("Young","Foo");
1871-
set engine_condition_pushdown = 0;
1871+
set optimizer_switch = "engine_condition_pushdown=off";
18721872
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
18731873
fname lname
18741874
Young Foo
1875-
set engine_condition_pushdown = 1;
1875+
set optimizer_switch = "engine_condition_pushdown=on";
18761876
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
18771877
fname lname
18781878
Young Foo
18791879
insert into t1 values ("aaa", "aaa");
18801880
insert into t1 values ("bbb", "bbb");
18811881
insert into t1 values ("ccc", "ccc");
18821882
insert into t1 values ("ddd", "ddd");
1883-
set engine_condition_pushdown = 0;
1883+
set optimizer_switch = "engine_condition_pushdown=off";
18841884
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
18851885
fname lname
18861886
Young Foo
1887-
set engine_condition_pushdown = 1;
1887+
set optimizer_switch = "engine_condition_pushdown=on";
18881888
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
18891889
fname lname
18901890
Young Foo
@@ -1896,7 +1896,7 @@ insert into t1 values (20,2,200,0+0x2222);
18961896
insert into t1 values (30,3,300,0+0x3333);
18971897
insert into t1 values (40,4,400,0+0x4444);
18981898
insert into t1 values (50,5,500,0+0x5555);
1899-
set engine_condition_pushdown = on;
1899+
set optimizer_switch = "engine_condition_pushdown=on";
19001900
select a,b,d from t1
19011901
where b in (0,1,2,5)
19021902
order by b;
@@ -1916,5 +1916,5 @@ a b d
19161916
50 5 21845
19171917
Warnings:
19181918
Warning 4294 Scan filter is too large, discarded
1919-
set engine_condition_pushdown = @old_ecpd;
1919+
set optimizer_switch = @old_optimizer_switch;
19201920
DROP TABLE t1,t2,t3,t4,t5;

mysql-test/suite/ndb/r/ndb_gis.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ Overlaps(@horiz1, @point2)
548548
0
549549
DROP TABLE t1;
550550
End of 5.0 tests
551-
set engine_condition_pushdown = on;
551+
set optimizer_switch = "engine_condition_pushdown=on";
552552
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
553553
CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
554554
CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);

mysql-test/suite/ndb/r/ndb_index_unique.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ a b c
181181
5 5 NULL
182182
8 3 NULL
183183
9 3 NULL
184-
set @old_ecpd = @@session.engine_condition_pushdown;
185-
set engine_condition_pushdown = true;
184+
set @old_optimizer_switch = @@session.optimizer_switch;
185+
set optimizer_switch = "engine_condition_pushdown=on";
186186
explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
187187
id select_type table type possible_keys key key_len ref rows Extra
188188
1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition
@@ -191,7 +191,7 @@ a b c
191191
3 3 NULL
192192
5 5 NULL
193193
8 3 NULL
194-
set engine_condition_pushdown = @old_ecpd;
194+
set optimizer_switch = @old_optimizer_switch;
195195
drop table t2;
196196
CREATE TABLE t3 (
197197
a int unsigned NOT NULL,

0 commit comments

Comments
 (0)