mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
removed using lex->select_lex.options is SHOW TABLE [STATUS] commands (BUG#4288)
mysql-test/r/func_group.result: fixed mysql-test/r/ps.result: SHOW TABLE STATUS test mysql-test/t/ps.test: SHOW TABLE STATUS test sql/sql_parse.cc: Use lex->describe instead of lex->select_lex.options sql/sql_yacc.yy: removed unneed initialization of lex->select_lex.options
This commit is contained in:
@ -576,7 +576,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain
|
||||
select min(a1) from t1 where a1 != 'KKK';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 3 NULL 14 Using where; Using index
|
||||
explain
|
||||
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@ -621,7 +621,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain
|
||||
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref k2 k2 4 const 6 Using where; Using index
|
||||
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
|
||||
drop table t1, t2;
|
||||
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
|
||||
|
@ -209,3 +209,13 @@ name
|
||||
6
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
create table t1 ( a int primary key, b varchar(30)) engine = MYISAM ;
|
||||
prepare stmt1 from ' show table status from test like ''t1%'' ';
|
||||
execute stmt1;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL
|
||||
show table status from test like 't1%' ;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL
|
||||
deallocate prepare stmt1 ;
|
||||
drop table t1;
|
||||
|
@ -194,3 +194,15 @@ execute stmt1 using @id1, @id2;
|
||||
select name from t1 where id=1 or id=6;
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# SHOW TABLE STATUS test
|
||||
#
|
||||
create table t1 ( a int primary key, b varchar(30)) engine = MYISAM ;
|
||||
prepare stmt1 from ' show table status from test like ''t1%'' ';
|
||||
--replace_column 12 # 13 # 14 #
|
||||
execute stmt1;
|
||||
--replace_column 12 # 13 # 14 #
|
||||
show table status from test like 't1%' ;
|
||||
deallocate prepare stmt1 ;
|
||||
drop table t1;
|
||||
|
@ -2938,7 +2938,7 @@ unsent_create_error:
|
||||
goto error;
|
||||
}
|
||||
/* grant is checked in mysqld_show_tables */
|
||||
if (select_lex->options & SELECT_DESCRIBE)
|
||||
if (lex->describe)
|
||||
res= mysqld_extend_show_tables(thd,db,
|
||||
(lex->wild ? lex->wild->ptr() : NullS));
|
||||
else
|
||||
|
@ -4228,13 +4228,12 @@ show_param:
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_TABLES;
|
||||
lex->select_lex.db= $2;
|
||||
lex->select_lex.options= 0;
|
||||
}
|
||||
| TABLE_SYM STATUS_SYM opt_db wild
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_TABLES;
|
||||
lex->select_lex.options|= SELECT_DESCRIBE;
|
||||
lex->describe= DESCRIBE_EXTENDED;
|
||||
lex->select_lex.db= $3;
|
||||
}
|
||||
| OPEN_SYM TABLES opt_db wild
|
||||
@ -4242,7 +4241,6 @@ show_param:
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
|
||||
lex->select_lex.db= $3;
|
||||
lex->select_lex.options= 0;
|
||||
}
|
||||
| ENGINE_SYM storage_engines
|
||||
{ Lex->create_info.db_type= $2; }
|
||||
|
Reference in New Issue
Block a user