diff options
author | monty@mysql.com <> | 2004-12-12 19:54:26 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-12-12 19:54:26 +0200 |
commit | b4dc75c877b45e2eb97e5fc15fda4292e0f6f705 (patch) | |
tree | 0b2135b3614cd5ba6da325532046689525053f1e | |
parent | 3b14ba64fd196e14fb26ce21e7a09a919e613a1b (diff) | |
download | mariadb-git-b4dc75c877b45e2eb97e5fc15fda4292e0f6f705.tar.gz |
Fix test results that may change from run to run
Added comments (from code review on pull)
-rw-r--r-- | mysql-test/r/heap.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_5merge.result | 4 | ||||
-rw-r--r-- | mysql-test/t/heap.test | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 12 |
4 files changed, 13 insertions, 7 deletions
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 7c4ce234d58..bcdb24668bb 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -622,7 +622,7 @@ qq *a *a*a * explain select * from t1 where v='a'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const 7 Using where +1 SIMPLE t1 ref v v 13 const # Using where drop table t1; create table t1 (a char(10), unique using btree (a)) engine=heap; insert into t1 values ('a'); diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 9a0b0cb8b75..1eaf747e8c6 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1698,7 +1698,7 @@ t5 CREATE TABLE `t5` ( `param03` double default NULL, `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -4707,7 +4707,7 @@ t5 CREATE TABLE `t5` ( `param03` double default NULL, `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` varchar(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test index 31b7f997519..6353cd78d6a 100644 --- a/mysql-test/t/heap.test +++ b/mysql-test/t/heap.test @@ -360,6 +360,8 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' --error 1062 alter table t1 add unique(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); +# Number of rows is not constant for b-trees keys +--replace_column 9 # explain select * from t1 where v='a'; drop table t1; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 7cc746793dc..71467664085 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2135,6 +2135,10 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) } } } + /* + If we have information schema its always the first table and only + the first table. Reset for other tables. + */ with_i_schema= 0; } } @@ -2838,7 +2842,7 @@ static int get_schema_views_record(THD *thd, struct st_table_list *tables, } -void store_constarints(TABLE *table, const char*db, const char *tname, +void store_constraints(TABLE *table, const char*db, const char *tname, const char *key_name, uint key_len, const char *con_type, uint con_len) { @@ -2874,10 +2878,10 @@ static int get_schema_constarints_record(THD *thd, struct st_table_list *tables, continue; if (i == primary_key && !strcmp(key_info->name, primary_key_name)) - store_constarints(table, base_name, file_name, key_info->name, + store_constraints(table, base_name, file_name, key_info->name, strlen(key_info->name), "PRIMARY KEY", 11); else if (key_info->flags & HA_NOSAME) - store_constarints(table, base_name, file_name, key_info->name, + store_constraints(table, base_name, file_name, key_info->name, strlen(key_info->name), "UNIQUE", 6); } @@ -2886,7 +2890,7 @@ static int get_schema_constarints_record(THD *thd, struct st_table_list *tables, List_iterator_fast<FOREIGN_KEY_INFO> it(f_key_list); while ((f_key_info=it++)) { - store_constarints(table, base_name, file_name, f_key_info->forein_id->str, + store_constraints(table, base_name, file_name, f_key_info->forein_id->str, strlen(f_key_info->forein_id->str), "FOREIGN KEY", 11); } } |