mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix test results that may change from run to run
Added comments (from code review on pull)
This commit is contained in:
@@ -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');
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user