Fixed compiler warnings and some test failures found by buildbot
dbug/dbug.c: Fixed compiler warnings on windows mysql-test/r/index_intersect_innodb.result: Don't print number of rows as this varies mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Update to use new State mysql-test/suite/handler/heap.result: Update results mysql-test/suite/handler/heap.test: Changed key used in test as the key 'b' will not guarantee order of the two last elements (as the key value is the same) mysql-test/suite/pbxt/r/lock_multi.result: Update to use new State mysql-test/t/index_intersect.test: Don't print number of rows as this varies mysql-test/valgrind.supp: Added suppression for linux mysys/hash.c: Fixed compiler warnings on windows plugin/handler_socket/handlersocket/database.cpp: Fixed compiler warnings sql-common/client_plugin.c: Changed variable to define to avoid compiler warnings when variable is not used sql-common/my_time.c: Initialize all my_time elements to avoid compiler warnings storage/oqgraph/ha_oqgraph.cc: Use right function (to avoid compiler warning) storage/pbxt/src/table_xt.cc: Initialize variables (to avoid compiler warnings)
This commit is contained in:
parent
ab6d450639
commit
39616eb9ef
@ -1481,7 +1481,7 @@ next:
|
||||
subdir=0;
|
||||
while (ctlp < end && *ctlp != ',')
|
||||
ctlp++;
|
||||
len=ctlp-start;
|
||||
len= (int) (ctlp-start);
|
||||
if (start[len-1] == '/')
|
||||
{
|
||||
len--;
|
||||
@ -1544,7 +1544,7 @@ static struct link *ListCopy(struct link *orig)
|
||||
{
|
||||
struct link *new_malloc;
|
||||
struct link *head;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
head= NULL;
|
||||
while (orig != NULL)
|
||||
@ -1999,7 +1999,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
||||
{
|
||||
if (end)
|
||||
{
|
||||
int len=end-name;
|
||||
int len= (int) (end-name);
|
||||
memcpy(cs->stack->name, name, len);
|
||||
cs->stack->name[len]=0;
|
||||
}
|
||||
|
@ -65,22 +65,22 @@ EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'C%' AND Population > 1000000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL 16 Using sort_intersect(Population,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'M%' AND Population > 1500000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL 9 Using sort_intersect(Population,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name LIKE 'M%' AND Population > 300000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Name,Population 35,4 NULL 79 Using sort_intersect(Name,Population); Using where
|
||||
1 SIMPLE City index_merge Population,Name Name,Population 35,4 NULL # Using sort_intersect(Name,Population); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name LIKE 'M%' AND Population > 7000000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL 1 Using sort_intersect(Population,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE Name LIKE 'C%' AND Population > 1000000;
|
||||
ID Name Country Population
|
||||
@ -362,17 +362,17 @@ EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL 2 Using sort_intersect(Population,Name,Country); Using where
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL # Using sort_intersect(Population,Name,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL 2 Using sort_intersect(Population,Country,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL 26 Using sort_intersect(Population,Name,Country); Using where
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL # Using sort_intersect(Population,Name,Country); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
|
||||
ID Name Country Population
|
||||
@ -463,29 +463,29 @@ EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL 11 Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL 1 Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,3 NULL 7 Using sort_intersect(PRIMARY,Country); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,3 NULL # Using sort_intersect(PRIMARY,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
|
||||
AND Country BETWEEN 'S' AND 'Z';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL 2 Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
|
||||
AND Country BETWEEN 'S' AND 'Z' ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL 30 Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
|
||||
ID Name Country Population
|
||||
@ -719,33 +719,33 @@ EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'C%' AND Population > 1000000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL 16 Using sort_intersect(Population,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'M%' AND Population > 1500000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL 9 Using sort_intersect(Population,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL 2 Using sort_intersect(Population,Country,Name); Using where
|
||||
1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Country,Name Name,Population,Country 35,4,3 NULL 7 Using sort_intersect(Name,Population,Country); Using where
|
||||
1 SIMPLE City index_merge Population,Country,Name Name,Population,Country 35,4,3 NULL # Using sort_intersect(Name,Population,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL 1 Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
|
||||
AND Country BETWEEN 'S' AND 'Z';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL 30 Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'C%' AND Population > 1000000;
|
||||
ID Name Country Population
|
||||
@ -886,17 +886,17 @@ EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country LIKE 'M%' AND Population > 1000000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL 16 Using sort_intersect(Population,CountryID); Using where
|
||||
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country='CHN' AND Population > 1500000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL 11 Using sort_intersect(Population,CountryID); Using where
|
||||
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name,CountryID,CountryName CountryName,Population 38,4 NULL 1 Using sort_intersect(CountryName,Population); Using where
|
||||
1 SIMPLE City index_merge Population,Name,CountryID,CountryName CountryName,Population 38,4 NULL # Using sort_intersect(CountryName,Population); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE Country LIKE 'M%' AND Population > 1000000;
|
||||
ID Name Country Population
|
||||
@ -1026,7 +1026,7 @@ EXPLAIN
|
||||
SELECT * FROM t1
|
||||
WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,35 NULL 1 Using sort_intersect(PRIMARY,f4); Using where
|
||||
1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,35 NULL # Using sort_intersect(PRIMARY,f4); Using where
|
||||
SELECT * FROM t1
|
||||
WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
|
||||
f1 f4 f5
|
||||
|
File diff suppressed because one or more lines are too long
@ -206,26 +206,26 @@ ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
set @a=16,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
set @a=16,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
16 ccc
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
@ -234,8 +234,8 @@ a b
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
execute stmt using @a;
|
||||
a b
|
||||
@ -292,15 +292,15 @@ prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
@ -309,7 +309,7 @@ prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
alter table t1 add c int;
|
||||
execute stmt using @a;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
@ -687,7 +687,7 @@ INSERT INTO t1 VALUES(1);
|
||||
HANDLER t1 READ a NEXT;
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT, b INT, KEY(a), KEY b using btree (b), KEY ab using btree(a, b));
|
||||
CREATE TABLE t1(a INT, b INT, KEY(a), KEY b using btree (b), KEY ab using btree(a, b)) engine=memory;
|
||||
INSERT INTO t1 VALUES (2, 20), (2,20), (1, 10), (4, 40), (3, 30), (5,50), (6,50);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a>=(2) limit 3;
|
||||
@ -730,7 +730,7 @@ HANDLER t1 READ b FIRST LIMIT 2;
|
||||
a b
|
||||
1 10
|
||||
2 20
|
||||
HANDLER t1 READ b LAST LIMIT 2;
|
||||
HANDLER t1 READ ab LAST LIMIT 2;
|
||||
a b
|
||||
6 50
|
||||
5 50
|
||||
|
@ -14,7 +14,7 @@ let $key_type=using btree;
|
||||
connect (con1,localhost,root,,);
|
||||
connection default;
|
||||
|
||||
CREATE TABLE t1(a INT, b INT, KEY(a), KEY b using btree (b), KEY ab using btree(a, b));
|
||||
CREATE TABLE t1(a INT, b INT, KEY(a), KEY b using btree (b), KEY ab using btree(a, b)) engine=memory;
|
||||
|
||||
INSERT INTO t1 VALUES (2, 20), (2,20), (1, 10), (4, 40), (3, 30), (5,50), (6,50);
|
||||
|
||||
@ -35,7 +35,7 @@ HANDLER t1 READ a FIRST;
|
||||
--error ER_ILLEGAL_HA
|
||||
HANDLER t1 READ a LAST;
|
||||
HANDLER t1 READ b FIRST LIMIT 2;
|
||||
HANDLER t1 READ b LAST LIMIT 2;
|
||||
HANDLER t1 READ ab LAST LIMIT 2;
|
||||
|
||||
# Table scan
|
||||
HANDLER t1 READ FIRST LIMIT 10;
|
||||
|
@ -139,7 +139,7 @@ lock table t1 read;
|
||||
update t1 set i= 10;
|
||||
select * from t1;
|
||||
Timeout in wait_condition.inc for select count(*) = 1 from information_schema.processlist
|
||||
where state = "Locked" and info = "select * from t1"
|
||||
where state = "Table Lock" and info = "select * from t1"
|
||||
kill query ID;
|
||||
i
|
||||
ERROR 70100: Query execution was interrupted
|
||||
|
@ -53,18 +53,22 @@ SELECT COUNT(*) FROM City WHERE Population > 7000000;
|
||||
# we can get either an index intersection retrieval over key1 and key2
|
||||
# or a range index scan for one of these indexes
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'C%' AND Population > 1000000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'M%' AND Population > 1500000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name LIKE 'M%' AND Population > 300000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name LIKE 'M%' AND Population > 7000000;
|
||||
@ -122,14 +126,17 @@ SELECT COUNT(*) FROM City WHERE Country LIKE 'B%';
|
||||
# over(key1,key2), over(key1,key3) and over(key2,key3)
|
||||
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
|
||||
@ -189,23 +196,28 @@ SELECT COUNT(*) FROM City WHERE Country BETWEEN 'S' AND 'Z';
|
||||
# tested instance the table City.
|
||||
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
|
||||
AND Country BETWEEN 'S' AND 'Z';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
|
||||
@ -263,28 +275,34 @@ SET SESSION sort_buffer_size = 2048;
|
||||
# may be different if sort_buffer_size is set to a small value
|
||||
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'C%' AND Population > 1000000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE
|
||||
Name LIKE 'M%' AND Population > 1500000;
|
||||
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
|
||||
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
|
||||
@ -338,14 +356,17 @@ ANALYZE TABLE City;
|
||||
# index intersection, even in the cases when we have a ref access
|
||||
# for this component
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country LIKE 'M%' AND Population > 1000000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country='CHN' AND Population > 1500000;
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
|
||||
@ -407,6 +428,7 @@ INSERT INTO t1 VALUES
|
||||
(991,'z',0), (992,'M',1), (993,'u',2), (994,'r',2), (995,'b',4),
|
||||
(996,'A',2), (997,'u',0), (998,'a',0), (999,'j',2), (1,'I',2);
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT * FROM t1
|
||||
WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
|
||||
|
@ -546,6 +546,21 @@
|
||||
fun:_dl_signal_error
|
||||
}
|
||||
|
||||
{
|
||||
dlsym memory loss from plugin version 2
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:/lib*/ld-*.so
|
||||
obj:/lib*/ld-*.so
|
||||
obj:/lib*/ld-*.so
|
||||
obj:/lib*/libc-*.so)
|
||||
obj:/lib*/libdl-*.so)
|
||||
obj:/lib*/ld-*.so)
|
||||
obj:/lib*/libdl-*.so)
|
||||
fun:dlsym
|
||||
fun:plugin_dl_add
|
||||
}
|
||||
|
||||
#
|
||||
# Reading wrong addresses on SuSe Linux 10.3 32 bit
|
||||
#
|
||||
|
19
mysys/hash.c
19
mysys/hash.c
@ -181,8 +181,9 @@ my_hash_key(const HASH *hash, const uchar *record, size_t *length,
|
||||
|
||||
static uint my_hash_mask(size_t hashnr, size_t buffmax, size_t maxlength)
|
||||
{
|
||||
if ((hashnr & (buffmax-1)) < maxlength) return (hashnr & (buffmax-1));
|
||||
return (hashnr & ((buffmax >> 1) -1));
|
||||
if ((hashnr & (buffmax-1)) < maxlength)
|
||||
return (uint) (hashnr & (buffmax-1));
|
||||
return (uint) (hashnr & ((buffmax >> 1) -1));
|
||||
}
|
||||
|
||||
static uint my_hash_rec_mask(const HASH *hash, HASH_LINK *pos,
|
||||
@ -483,7 +484,8 @@ my_bool my_hash_insert(HASH *info, const uchar *record)
|
||||
|
||||
my_bool my_hash_delete(HASH *hash, uchar *record)
|
||||
{
|
||||
uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index;
|
||||
uint pos2,pos_hashnr,lastpos_hashnr,idx,empty_index;
|
||||
size_t blength;
|
||||
HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
|
||||
DBUG_ENTER("my_hash_delete");
|
||||
if (!hash->records)
|
||||
@ -572,8 +574,8 @@ exit:
|
||||
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
|
||||
size_t old_key_length)
|
||||
{
|
||||
uint new_index,new_pos_index,blength,records;
|
||||
size_t idx,empty;
|
||||
uint new_index,new_pos_index,records;
|
||||
size_t idx, empty, blength;
|
||||
HASH_LINK org_link,*data,*previous,*pos;
|
||||
DBUG_ENTER("my_hash_update");
|
||||
|
||||
@ -655,7 +657,7 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
|
||||
if (new_index != new_pos_index)
|
||||
{ /* Other record in wrong position */
|
||||
data[empty] = *pos;
|
||||
movelink(data,new_index,new_pos_index,empty);
|
||||
movelink(data,new_index,new_pos_index, (uint) empty);
|
||||
org_link.next=NO_RECORD;
|
||||
data[new_index]= org_link;
|
||||
}
|
||||
@ -663,7 +665,7 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
|
||||
{ /* Link in chain at right position */
|
||||
org_link.next=data[new_index].next;
|
||||
data[empty]=org_link;
|
||||
data[new_index].next=empty;
|
||||
data[new_index].next= (uint) empty;
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@ -727,7 +729,8 @@ my_bool my_hash_check(HASH *hash)
|
||||
{
|
||||
int error;
|
||||
uint i,rec_link,found,max_links,seek,links,idx;
|
||||
uint records,blength;
|
||||
uint records;
|
||||
size_t blength;
|
||||
HASH_LINK *data,*hash_info;
|
||||
|
||||
records=hash->records; blength=hash->blength;
|
||||
|
@ -246,7 +246,7 @@ wait_server_to_start(THD *thd, volatile int& shutdown_flag)
|
||||
DBG_SHUT(fprintf(stderr, "HNDSOCK wsts\n"));
|
||||
pthread_mutex_lock(&LOCK_server_started);
|
||||
while (!mysqld_server_started) {
|
||||
timespec abstime = { };
|
||||
timespec abstime;
|
||||
set_timespec(abstime, 1);
|
||||
pthread_cond_timedwait(&COND_server_started, &LOCK_server_started,
|
||||
&abstime);
|
||||
@ -287,8 +287,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
|
||||
thd->thread_stack, sizeof(THD), of));
|
||||
thd->store_globals();
|
||||
thd->system_thread = static_cast<enum_thread_type>(1<<30UL);
|
||||
const NET v = { 0 };
|
||||
thd->net = v;
|
||||
memset(&thd->net, 0, sizeof(thd->net));
|
||||
if (for_write_flag) {
|
||||
#if MYSQL_VERSION_ID >= 50505
|
||||
thd->variables.option_bits |= OPTION_BIN_LOG;
|
||||
|
@ -50,7 +50,8 @@ struct st_client_plugin_int {
|
||||
static my_bool initialized= 0;
|
||||
static MEM_ROOT mem_root;
|
||||
|
||||
static const char *plugin_declarations_sym= "_mysql_client_plugin_declaration_";
|
||||
#define plugin_declarations_sym "_mysql_client_plugin_declaration_"
|
||||
|
||||
static uint plugin_version[MYSQL_CLIENT_MAX_PLUGINS]=
|
||||
{
|
||||
0, /* these two are taken by Connector/C */
|
||||
|
@ -727,6 +727,10 @@ void my_init_time(void)
|
||||
my_time.hour= (uint) l_time->tm_hour;
|
||||
my_time.minute= (uint) l_time->tm_min;
|
||||
my_time.second= (uint) l_time->tm_sec;
|
||||
my_time.neg= 0;
|
||||
my_time.second_part= 0;
|
||||
my_time.time_type= MYSQL_TIMESTAMP_DATETIME;
|
||||
|
||||
my_system_gmt_sec(&my_time, &my_time_zone, ¬_used); /* Init my_time_zone */
|
||||
}
|
||||
|
||||
|
@ -766,7 +766,7 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
|
||||
if (row.weight_indicator)
|
||||
{
|
||||
field[3]->set_notnull();
|
||||
field[3]->store((double) row.weight, 0);
|
||||
field[3]->store((double) row.weight);
|
||||
}
|
||||
|
||||
if (row.seq_indicator)
|
||||
|
@ -726,7 +726,7 @@ xtPublic void xt_check_tables(XTThreadPtr self)
|
||||
{
|
||||
u_int edx;
|
||||
XTTableEntryPtr te_ptr;
|
||||
volatile XTTableHPtr tab;
|
||||
volatile XTTableHPtr tab= 0;
|
||||
char path[PATH_MAX];
|
||||
|
||||
enter_();
|
||||
@ -1132,7 +1132,7 @@ static int tab_new_handle(XTThreadPtr self, XTTableHPtr *r_tab, XTDatabaseHPtr d
|
||||
XTOpenFilePtr of_rec, of_ind;
|
||||
XTTableEntryPtr te_ptr;
|
||||
size_t tab_format_offset;
|
||||
size_t tab_head_size;
|
||||
size_t tab_head_size= 0;
|
||||
|
||||
enter_();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user