mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Update results for new varchar handling
Fixed compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length myisam/myisampack.c: Indentation cleanup mysql-test/r/analyse.result: Update results for new varchar handling mysql-test/r/case.result: Update results for new varchar handling mysql-test/r/cast.result: Update results for new varchar handling mysql-test/r/create.result: Update results for new varchar handling mysql-test/r/ctype_mb.result: Update results for new varchar handling mysql-test/r/ctype_ucs.result: Update results for new varchar handling mysql-test/r/ctype_utf8.result: Update results for new varchar handling mysql-test/r/func_group.result: Update results for new varchar handling mysql-test/r/func_str.result: Update results for new varchar handling mysql-test/r/func_system.result: Update results for new varchar handling mysql-test/r/heap.result: Update results for new varchar handling mysql-test/r/heap_hash.result: Update results for new varchar handling mysql-test/r/information_schema.result: Update results for new varchar handling mysql-test/r/metadata.result: Update results for new varchar handling mysql-test/r/null.result: Update results for new varchar handling mysql-test/r/ps_2myisam.result: Update results for new varchar handling mysql-test/r/ps_3innodb.result: Update results for new varchar handling mysql-test/r/ps_4heap.result: Update results for new varchar handling mysql-test/r/ps_5merge.result: Update results for new varchar handling mysql-test/r/ps_6bdb.result: Update results for new varchar handling mysql-test/r/subselect.result: Update results for new varchar handling mysql-test/r/type_ranges.result: Update results for new varchar handling mysql-test/r/union.result: Update results for new varchar handling mysql-test/t/heap.test: Update results for new varchar handling mysql-test/t/type_ranges.test: Added extra test to test generated type for string functions sql/field.cc: Update results for new varchar handling sql/field.h: Update results for new varchar handling We have to use orig_table instead of table as 'table' may point to a new field in the created table sql/field_conv.cc: Update results for new varchar handling sql/ha_heap.cc: Indentation fixes sql/ha_innodb.cc: Update results for new varchar handling sql/item.cc: Update results for new varchar handling Remove compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item.h: Update results for new varchar handling sql/item_func.cc: Update results for new varchar handling String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item_func.h: ANALYZE now return VARCHAR columns sql/procedure.h: Update results for new varchar handling sql/sql_acl.cc: After merge fixes sql/sql_select.cc: Update results for new varchar handling String results in temporary tables are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/sql_show.cc: After merge fixes sql/sql_table.cc: After merge fixes strings/ctype-tis620.c: After merge fixes tests/client_test.c: Fixed results, as in MySQL 5.0 strings in CREATE ... SELECT are creates VARCHAR columns
This commit is contained in:
@ -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
|
||||
explain select * from t1 where btn="a" and new_col="a";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref btn btn 11 const,const 2 Using where
|
||||
1 SIMPLE t1 ref btn btn 11 const,const 1 Using where
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int default NULL,
|
||||
@ -290,28 +290,28 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'),
|
||||
insert into t2 select * from t1;
|
||||
explain select * from t1 where name='matt';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where
|
||||
explain select * from t2 where name='matt';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 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';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where
|
||||
explain select * from t2 where name='Lilu';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 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';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where
|
||||
explain select * from t2 where name='Phil';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 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';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where
|
||||
1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where
|
||||
explain select * from t2 where name='Lilu';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 const 1 Using where
|
||||
1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where
|
||||
insert into t1 (name) select name from t2;
|
||||
insert into t1 (name) select name from t2;
|
||||
insert into t1 (name) select name from t2;
|
||||
@ -324,7 +324,7 @@ count(*)
|
||||
7
|
||||
explain select * from t1 ignore index (btree_idx) where name='matt';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where
|
||||
1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where
|
||||
show index from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 id NULL 91 NULL NULL HASH
|
||||
@ -352,6 +352,6 @@ t3 1 a 1 a NULL NULL NULL NULL HASH
|
||||
t3 1 a 2 b NULL 15 NULL NULL HASH
|
||||
explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 ref a a 40 const,const 6 Using where
|
||||
1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where
|
||||
1 SIMPLE t3 ref a a 44 const,const 6 Using where
|
||||
1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where
|
||||
drop table t1, t2, t3;
|
||||
|
Reference in New Issue
Block a user