Commit 303ad65f authored by konstantin@mysql.com's avatar konstantin@mysql.com

Post-merge fixes.

parent 5678bc52
...@@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where 1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where
explain select * from t1 where btn="a" and new_col="a"; explain select * from t1 where btn="a" and new_col="a";
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref btn btn 11 const,const 1 Using where 1 SIMPLE t1 ref btn btn 11 const,const 2 Using where
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int default NULL, a int default NULL,
...@@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL; ...@@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL;
a b a b
explain SELECT * FROM t1 WHERE a IS NULL; explain SELECT * FROM t1 WHERE a IS NULL;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 5 const 1 Using where 1 SIMPLE t1 ref a a 5 const 2 Using where
SELECT * FROM t1 WHERE a<=>NULL; SELECT * FROM t1 WHERE a<=>NULL;
a b a b
NULL 99 NULL 99
...@@ -701,6 +701,15 @@ insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd ...@@ -701,6 +701,15 @@ insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1 ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1
drop table t1; drop table t1;
CREATE TABLE t1 (a int, key(a)) engine=heap;
insert delayed into t1 values (0);
delete from t1;
select * from t1;
a
insert delayed into t1 values (0), (1);
select * from t1 where a = 0;
a
drop table t1;
create table t1 (c char(10)) engine=memory; create table t1 (c char(10)) engine=memory;
create table t2 (c varchar(10)) engine=memory; create table t2 (c varchar(10)) engine=memory;
show table status like 't_'; show table status like 't_';
......
...@@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where 1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where
explain select * from t1 where btn="a" and new_col="a"; explain select * from t1 where btn="a" and new_col="a";
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref btn btn 11 const,const 1 Using where 1 SIMPLE t1 ref btn btn 11 const,const 2 Using where
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int default NULL, a int default NULL,
...@@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL; ...@@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL;
a b a b
explain SELECT * FROM t1 WHERE a IS NULL; explain SELECT * FROM t1 WHERE a IS NULL;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 5 const 1 Using where 1 SIMPLE t1 ref a a 5 const 2 Using where
SELECT * FROM t1 WHERE a<=>NULL; SELECT * FROM t1 WHERE a<=>NULL;
a b a b
NULL 99 NULL 99
...@@ -220,16 +220,16 @@ insert into t1 values ('aaag', 'prefill-hash=3',0); ...@@ -220,16 +220,16 @@ insert into t1 values ('aaag', 'prefill-hash=3',0);
insert into t1 values ('aaah', 'prefill-hash=6',0); insert into t1 values ('aaah', 'prefill-hash=6',0);
explain select * from t1 where a='aaaa'; explain select * from t1 where a='aaaa';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where
explain select * from t1 where a='aaab'; explain select * from t1 where a='aaab';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where
explain select * from t1 where a='aaac'; explain select * from t1 where a='aaac';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where
explain select * from t1 where a='aaad'; explain select * from t1 where a='aaad';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where
insert into t1 select * from t1; insert into t1 select * from t1;
flush tables; flush tables;
explain select * from t1 where a='aaaa'; explain select * from t1 where a='aaaa';
...@@ -291,25 +291,25 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'), ...@@ -291,25 +291,25 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'),
insert into t2 select * from t1; insert into t2 select * from t1;
explain select * from t1 where name='matt'; explain select * from t1 where name='matt';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where 1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where
explain select * from t2 where name='matt'; explain select * from t2 where name='matt';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where 1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where
explain select * from t1 where name='Lilu'; explain select * from t1 where name='Lilu';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where 1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where
explain select * from t2 where name='Lilu'; explain select * from t2 where name='Lilu';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where 1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where
explain select * from t1 where name='Phil'; explain select * from t1 where name='Phil';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where 1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where
explain select * from t2 where name='Phil'; explain select * from t2 where name='Phil';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where 1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where
explain select * from t1 where name='Lilu'; explain select * from t1 where name='Lilu';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where 1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where
explain select * from t2 where name='Lilu'; explain select * from t2 where name='Lilu';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where 1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where
...@@ -364,5 +364,5 @@ a ...@@ -364,5 +364,5 @@ a
3 3
explain select a from t1 where a in (1,3); explain select a from t1 where a in (1,3);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where 1 SIMPLE t1 range a a 5 NULL 4 Using where
drop table t1; drop table t1;
...@@ -15,18 +15,6 @@ select 4; ...@@ -15,18 +15,6 @@ select 4;
4 4
4 4
drop table t1; drop table t1;
select get_lock("a", 10);
get_lock("a", 10)
1
select get_lock("a", 10);
get_lock("a", 10)
NULL
select 1;
1
1
select RELEASE_LOCK("a");
RELEASE_LOCK("a")
1
create table t1 (id int primary key); create table t1 (id int primary key);
create table t2 (id int unsigned not null); create table t2 (id int unsigned not null);
insert into t2 select id from t1; insert into t2 select id from t1;
...@@ -39,3 +27,15 @@ select ((@id := kill_id) - kill_id) from t3; ...@@ -39,3 +27,15 @@ select ((@id := kill_id) - kill_id) from t3;
kill @id; kill @id;
ERROR 08S01: Server shutdown in progress ERROR 08S01: Server shutdown in progress
drop table t1, t2, t3; drop table t1, t2, t3;
select get_lock("a", 10);
get_lock("a", 10)
1
select get_lock("a", 10);
get_lock("a", 10)
NULL
select 1;
1
1
select RELEASE_LOCK("a");
RELEASE_LOCK("a")
1
...@@ -47,7 +47,6 @@ connection con2; ...@@ -47,7 +47,6 @@ connection con2;
select 4; select 4;
drop table t1; drop table t1;
disconnect con2;
connection default; connection default;
# #
# BUG#14851: killing long running subquery processed via a temporary table. # BUG#14851: killing long running subquery processed via a temporary table.
...@@ -88,8 +87,6 @@ connection conn1; ...@@ -88,8 +87,6 @@ connection conn1;
-- error 1053 -- error 1053
reap; reap;
disconnect conn1;
disconnect conn2;
connection default; connection default;
drop table t1, t2, t3; drop table t1, t2, t3;
......
...@@ -53,7 +53,7 @@ handlerton heap_hton= { ...@@ -53,7 +53,7 @@ handlerton heap_hton= {
ha_heap::ha_heap(TABLE *table_arg) ha_heap::ha_heap(TABLE *table_arg)
:handler(&heap_hton, table_arg), file(0), records_changed(0), :handler(&heap_hton, table_arg), file(0), records_changed(0),
key_stats_version(0) key_stat_version(0)
{} {}
...@@ -532,7 +532,7 @@ ha_rows ha_heap::records_in_range(uint inx, key_range *min_key, ...@@ -532,7 +532,7 @@ ha_rows ha_heap::records_in_range(uint inx, key_range *min_key,
return records; return records;
/* Assert that info() did run. We need current statistics here. */ /* Assert that info() did run. We need current statistics here. */
DBUG_ASSERT(key_stats_ok); DBUG_ASSERT(key_stat_version);
return key->rec_per_key[key->key_parts-1]; return key->rec_per_key[key->key_parts-1];
} }
......
...@@ -14697,23 +14697,6 @@ static void test_opt_reconnect() ...@@ -14697,23 +14697,6 @@ static void test_opt_reconnect()
mysql_close(lmysql); mysql_close(lmysql);
} }
/* Bug #16144: mysql_stmt_attr_get type error */
static void test_bug16144()
{
const my_bool flag_orig= (my_bool) 0xde;
my_bool flag= flag_orig;
MYSQL_STMT *stmt;
myheader("test_bug16144");
/* Check that attr_get returns correct data on little and big endian CPUs */
stmt= mysql_stmt_init(mysql);
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag);
mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag);
DIE_UNLESS(flag == flag_orig);
mysql_stmt_close(stmt);
}
static void test_bug12744() static void test_bug12744()
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment