Commit 9a7ec951 authored by unknown's avatar unknown
Browse files

ndb - wl#2624 re-commit due to bk problem


mysql-test/r/ndb_basic.result:
  wl#2624 re-commit due to bk problem
mysql-test/r/ndb_blob.result:
  wl#2624 re-commit due to bk problem
mysql-test/r/ndb_charset.result:
  wl#2624 re-commit due to bk problem
mysql-test/r/ndb_condition_pushdown.result:
  wl#2624 re-commit due to bk problem
mysql-test/r/ndb_index_ordered.result:
  wl#2624 re-commit due to bk problem
mysql-test/t/ndb_index_ordered.test:
  wl#2624 re-commit due to bk problem
sql/ha_ndbcluster.cc:
  wl#2624 re-commit due to bk problem
sql/ha_ndbcluster.h:
  wl#2624 re-commit due to bk problem
sql/mysqld.cc:
  wl#2624 re-commit due to bk problem
sql/set_var.cc:
  wl#2624 re-commit due to bk problem
sql/sql_class.h:
  wl#2624 re-commit due to bk problem
storage/ndb/include/kernel/AttributeHeader.hpp:
  wl#2624 re-commit due to bk problem
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  wl#2624 re-commit due to bk problem
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/kernel/blocks/dbtux/Makefile.am:
  wl#2624 re-commit due to bk problem
storage/ndb/src/ndbapi/Makefile.am:
  wl#2624 re-commit due to bk problem
storage/ndb/src/ndbapi/NdbDictionary.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  wl#2624 re-commit due to bk problem
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  wl#2624 re-commit due to bk problem
parent e89acaa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ t1
insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1);
explain select * from t1 where a12345678901234567890123456789a1234567890=2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	a12345678901234567890123456789a1234567890	a12345678901234567890123456789a1234567890	5	const	10	Using where
1	SIMPLE	t1	ref	a12345678901234567890123456789a1234567890	a12345678901234567890123456789a1234567890	5	const	1	Using where
select * from t1 where a12345678901234567890123456789a1234567890=2;
a1234567890123456789012345678901234567890	a12345678901234567890123456789a1234567890
5	2
+3 −3
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ insert into t1 values(2,@b2,222,@d2);
commit;
explain select * from t1 where c = 111;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	c	c	4	const	10	
1	SIMPLE	t1	ref	c	c	4	const	1	
select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
from t1 where c=111;
a	length(b)	substr(b,1+2*900,2)	length(d)	substr(d,1+3*900,3)
@@ -242,7 +242,7 @@ insert into t1 values(9,'b9',999,'dd9');
commit;
explain select * from t1 where c >= 100 order by a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	c	c	4	NULL	10	Using where; Using filesort
1	SIMPLE	t1	range	c	c	4	NULL	9	Using where; Using filesort
select * from t1 where c >= 100 order by a;
a	b	c	d
1	b1	111	dd1
@@ -278,7 +278,7 @@ insert into t1 values(2,@b2,222,@d2);
commit;
explain select * from t1 where c >= 100 order by a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	c	c	4	NULL	10	Using where; Using filesort
1	SIMPLE	t1	range	c	c	4	NULL	2	Using where; Using filesort
select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
from t1 where c >= 100 order by a;
a	length(b)	substr(b,1+2*900,2)	length(d)	substr(d,1+3*900,3)
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ p a
6	AAA
explain select * from t1 where a = 'zZz' order by p;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	a	a	3	const	10	Using where; Using filesort
1	SIMPLE	t1	const	a	NULL	NULL	NULL	1	
select * from t1 where a = 'aAa' order by p;
p	a
1	aAa
@@ -225,7 +225,7 @@ p a
6	AAA
explain select * from t1 where a = 'zZz' order by p;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	a	a	3	const	10	Using where; Using filesort
1	SIMPLE	t1	const	a	NULL	NULL	NULL	1	
select * from t1 where a = 'aAa' order by p;
p	a
1	aAa
+13 −13
Original line number Diff line number Diff line
@@ -868,7 +868,7 @@ time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01' 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	medium_index	medium_index	3	const	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	ref	medium_index	medium_index	3	const	1	Using where with pushed condition; Using filesort
select auto from t1 where 
string = "aaaa" and 
vstring = "aaaa" and 
@@ -925,7 +925,7 @@ time_field != '01:01:01' and
date_time != '1901-01-01 01:01:01' 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	20	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	3	Using where with pushed condition; Using filesort
select auto from t1 where 
string != "aaaa" and 
vstring != "aaaa" and 
@@ -984,7 +984,7 @@ time_field > '01:01:01' and
date_time > '1901-01-01 01:01:01'
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	3	Using where with pushed condition; Using filesort
select auto from t1 where 
string > "aaaa" and 
vstring > "aaaa" and 
@@ -1043,7 +1043,7 @@ time_field >= '01:01:01' and
date_time >= '1901-01-01 01:01:01' 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	4	Using where with pushed condition; Using filesort
select auto from t1 where 
string >= "aaaa" and 
vstring >= "aaaa" and 
@@ -1103,7 +1103,7 @@ time_field < '04:04:04' and
date_time < '1904-04-04 04:04:04' 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	3	Using where with pushed condition; Using filesort
select auto from t1 where 
string < "dddd" and 
vstring < "dddd" and 
@@ -1162,7 +1162,7 @@ time_field <= '04:04:04' and
date_time <= '1904-04-04 04:04:04' 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	4	Using where with pushed condition; Using filesort
select auto from t1 where 
string <= "dddd" and 
vstring <= "dddd" and 
@@ -1255,7 +1255,7 @@ select auto from t1 where
(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	3	Using where with pushed condition; Using filesort
select auto from t1 where
(string between "aaaa" and "cccc") and 
(vstring between "aaaa" and "cccc") and 
@@ -1358,7 +1358,7 @@ select auto from t1 where
(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	20	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	1	Using where with pushed condition; Using filesort
select auto from t1 where
(string not between "aaaa" and "cccc") and 
(vstring not between "aaaa" and "cccc") and 
@@ -1462,7 +1462,7 @@ time_field in('01:01:01','03:03:03') and
date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	20	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	2	Using where with pushed condition; Using filesort
select auto from t1 where
string in("aaaa","cccc") and 
vstring in("aaaa","cccc") and 
@@ -1514,7 +1514,7 @@ select auto from t1 where
'1901-01-01 01:01:01' in(date_time) 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	medium_index	medium_index	3	const	10	Using where with pushed condition; Using filesort
1	SIMPLE	t1	ref	medium_index	medium_index	3	const	1	Using where with pushed condition; Using filesort
select auto from t1 where
"aaaa" in(string) and 
"aaaa" in(vstring) and 
@@ -1565,7 +1565,7 @@ time_field not in('01:01:01','03:03:03') and
date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') 
order by auto;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	30	Using where with pushed condition; Using filesort
1	SIMPLE	t1	range	medium_index	medium_index	3	NULL	2	Using where with pushed condition; Using filesort
select auto from t1 where
string not in("aaaa","cccc") and 
vstring not in("aaaa","cccc") and 
@@ -1738,7 +1738,7 @@ pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4
explain
select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t4	range	attr1	attr1	4	NULL	10	Using where with pushed condition; Using filesort
1	SIMPLE	t4	range	attr1	attr1	4	NULL	5	Using where with pushed condition; Using filesort
select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1;
pk1	attr1	attr2	attr3	attr4
2	2	9223372036854775804	2	c
@@ -1746,7 +1746,7 @@ pk1 attr1 attr2 attr3 attr4
explain
select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t4	range	attr1	attr1	4	NULL	10	Using where with pushed condition; Using temporary; Using filesort
1	SIMPLE	t4	range	attr1	attr1	4	NULL	4	Using where with pushed condition; Using temporary; Using filesort
1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	6	Using where
select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
pk1	attr1	attr2	attr3	attr4	pk1	attr1	attr2	attr3	attr4
+138 −0
Original line number Diff line number Diff line
@@ -658,3 +658,141 @@ insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
select count(*) from t1 where c<'bbb';
count(*)
1
drop table t1;
set autocommit=1;
show session variables like 'ndb_index_stat_%';
Variable_name	Value
ndb_index_stat_cache_entries	32
ndb_index_stat_enable	ON
ndb_index_stat_update_freq	20
set ndb_index_stat_enable = off;
show session variables like 'ndb_index_stat_%';
Variable_name	Value
ndb_index_stat_cache_entries	32
ndb_index_stat_enable	OFF
ndb_index_stat_update_freq	20
create table t1 (a int, b int, c varchar(10) not null,
primary key using hash (a), index(b,c)) engine=ndb;
insert into t1 values
(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
select count(*) from t1 where b < 10;
count(*)
0
select count(*) from t1 where b >= 10 and c >= 'bbb';
count(*)
6
select count(*) from t1 where b > 10;
count(*)
6
select count(*) from t1 where b <= 20 and c < 'ccc';
count(*)
4
select count(*) from t1 where b = 20 and c = 'ccc';
count(*)
1
select count(*) from t1 where b > 20;
count(*)
3
select count(*) from t1 where b = 30 and c > 'aaa';
count(*)
2
select count(*) from t1 where b <= 20;
count(*)
6
select count(*) from t1 where b >= 20 and c > 'aaa';
count(*)
4
drop table t1;
set ndb_index_stat_enable = on;
set ndb_index_stat_cache_entries = 0;
show session variables like 'ndb_index_stat_%';
Variable_name	Value
ndb_index_stat_cache_entries	0
ndb_index_stat_enable	ON
ndb_index_stat_update_freq	20
create table t1 (a int, b int, c varchar(10) not null,
primary key using hash (a), index(b,c)) engine=ndb;
insert into t1 values
(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
select count(*) from t1 where b < 10;
count(*)
0
select count(*) from t1 where b >= 10 and c >= 'bbb';
count(*)
6
select count(*) from t1 where b > 10;
count(*)
6
select count(*) from t1 where b <= 20 and c < 'ccc';
count(*)
4
select count(*) from t1 where b = 20 and c = 'ccc';
count(*)
1
select count(*) from t1 where b > 20;
count(*)
3
select count(*) from t1 where b = 30 and c > 'aaa';
count(*)
2
select count(*) from t1 where b <= 20;
count(*)
6
select count(*) from t1 where b >= 20 and c > 'aaa';
count(*)
4
drop table t1;
set ndb_index_stat_enable = on;
set ndb_index_stat_cache_entries = 4;
set ndb_index_stat_update_freq = 2;
show session variables like 'ndb_index_stat_%';
Variable_name	Value
ndb_index_stat_cache_entries	4
ndb_index_stat_enable	ON
ndb_index_stat_update_freq	2
create table t1 (a int, b int, c varchar(10) not null,
primary key using hash (a), index(b,c)) engine=ndb;
insert into t1 values
(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
select count(*) from t1 where b < 10;
count(*)
0
select count(*) from t1 where b >= 10 and c >= 'bbb';
count(*)
6
select count(*) from t1 where b > 10;
count(*)
6
select count(*) from t1 where b <= 20 and c < 'ccc';
count(*)
4
select count(*) from t1 where b = 20 and c = 'ccc';
count(*)
1
select count(*) from t1 where b > 20;
count(*)
3
select count(*) from t1 where b = 30 and c > 'aaa';
count(*)
2
select count(*) from t1 where b <= 20;
count(*)
6
select count(*) from t1 where b >= 20 and c > 'aaa';
count(*)
4
drop table t1;
set ndb_index_stat_enable = @@global.ndb_index_stat_enable;
set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries;
set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq;
show session variables like 'ndb_index_stat_%';
Variable_name	Value
ndb_index_stat_cache_entries	32
ndb_index_stat_enable	ON
ndb_index_stat_update_freq	20
Loading