mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
remove unused parts of code
fix for 'show create schema_table' fix for usage schema tables in subselect 'wrong schema table charset' fix mysql-test/r/information_schema.result: 'wrong schema table charset' fix mysql-test/t/information_schema.test: 'wrong schema table charset' fix sql/mysql_priv.h: fix for 'show create schema_table' sql/sql_class.cc: 'wrong schema table charset' fix sql/sql_class.h: 'wrong schema table charset' fix sql/sql_parse.cc: fix for 'show create schema_table' sql/sql_select.cc: 'wrong schema table charset' fix sql/sql_show.cc: remove unused parts of code fix for 'show create schema_table' fix for usage schema tables in subselect sql/table.h: remove unused parts of coed tests/client_test.c: 'wrong schema table charset' fix
This commit is contained in:
@ -116,7 +116,7 @@ Field Type Collation Null Key Default Extra Privileges Comment
|
||||
Insert_priv enum('N','Y') utf8_bin N select,insert,update,references
|
||||
show full columns from v1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
c char(64) latin1_swedish_ci select,insert,update,references
|
||||
c char(64) utf8_general_ci select,insert,update,references
|
||||
select * from information_schema.COLUMNS where table_name="t1"
|
||||
and column_name= "a";
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME TYPE COLLATION_NAME IS_NULLABLE KEY COLUMN_DEFAULT EXTRA PRIVILEGES COMMENT
|
||||
@ -245,7 +245,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where
|
||||
select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
|
||||
mysql.proc b where a.ROUTINE_NAME = b.name;
|
||||
mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8);
|
||||
ROUTINE_NAME name
|
||||
sub1 sub1
|
||||
sel2 sel2
|
||||
@ -292,10 +292,10 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
|
||||
select * from information_schema.VIEWS where TABLE_NAME like "v%";
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE
|
||||
NULL test v0 select `SCHEMATA`.`SCHEMA_NAME` AS `c` from `information_schema`.`SCHEMATA` NONE NO
|
||||
NULL test v1 select `TABLES`.`TABLE_NAME` AS `c` from `information_schema`.`TABLES` where (`TABLES`.`TABLE_NAME` = _latin1'v1') NONE NO
|
||||
NULL test v2 select `COLUMNS`.`COLUMN_NAME` AS `c` from `information_schema`.`COLUMNS` where (`COLUMNS`.`TABLE_NAME` = _latin1'v2') NONE NO
|
||||
NULL test v3 select `CHARACTER_SETS`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`CHARACTER_SETS` where (`CHARACTER_SETS`.`CHARACTER_SET_NAME` like _latin1'latin1%') NONE NO
|
||||
NULL test v4 select `COLLATIONS`.`COLLATION_NAME` AS `c` from `information_schema`.`COLLATIONS` where (`COLLATIONS`.`COLLATION_NAME` like _latin1'latin1%') NONE NO
|
||||
NULL test v1 select `TABLES`.`TABLE_NAME` AS `c` from `information_schema`.`TABLES` where (`TABLES`.`TABLE_NAME` = _utf8'v1') NONE NO
|
||||
NULL test v2 select `COLUMNS`.`COLUMN_NAME` AS `c` from `information_schema`.`COLUMNS` where (`COLUMNS`.`TABLE_NAME` = _utf8'v2') NONE NO
|
||||
NULL test v3 select `CHARACTER_SETS`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`CHARACTER_SETS` where (`CHARACTER_SETS`.`CHARACTER_SET_NAME` like _utf8'latin1%') NONE NO
|
||||
NULL test v4 select `COLLATIONS`.`COLLATION_NAME` AS `c` from `information_schema`.`COLLATIONS` where (`COLLATIONS`.`COLLATION_NAME` like _utf8'latin1%') NONE NO
|
||||
drop view v0, v1, v2, v3, v4;
|
||||
create table t1 (a int);
|
||||
grant select,update,insert on t1 to mysqltest_1@localhost;
|
||||
@ -445,3 +445,44 @@ select AUTO_INCREMENT from information_schema.tables where table_name = 't1';
|
||||
AUTO_INCREMENT
|
||||
4
|
||||
drop table t1;
|
||||
create table t1 (s1 int);
|
||||
insert into t1 values (0),(9),(0);
|
||||
select s1 from t1 where s1 in (select version from
|
||||
information_schema.tables) union select version from
|
||||
information_schema.tables;
|
||||
s1
|
||||
9
|
||||
drop table t1;
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.CHARACTER_SETS;
|
||||
Table Create Table
|
||||
CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
|
||||
`CHARACTER_SET_NAME` char(30) NOT NULL default '',
|
||||
`Description` char(60) NOT NULL default '',
|
||||
`DEFAULT_COLLATE_NAME` char(60) NOT NULL default '',
|
||||
`Maxlen` bigint(3) NOT NULL default '0'
|
||||
) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2282
|
||||
set names latin2;
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.CHARACTER_SETS;
|
||||
Table Create Table
|
||||
CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
|
||||
`CHARACTER_SET_NAME` char(30) NOT NULL default '',
|
||||
`Description` char(60) NOT NULL default '',
|
||||
`DEFAULT_COLLATE_NAME` char(60) NOT NULL default '',
|
||||
`Maxlen` bigint(3) NOT NULL default '0'
|
||||
) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2282
|
||||
set names latin1;
|
||||
create table t1 select * from information_schema.CHARACTER_SETS
|
||||
where CHARACTER_SET_NAME like "latin1";
|
||||
select * from t1;
|
||||
CHARACTER_SET_NAME Description DEFAULT_COLLATE_NAME Maxlen
|
||||
latin1 ISO 8859-1 West European latin1_swedish_ci 1
|
||||
alter table t1 default character set utf8;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`CHARACTER_SET_NAME` char(30) NOT NULL default '',
|
||||
`Description` char(60) NOT NULL default '',
|
||||
`DEFAULT_COLLATE_NAME` char(60) NOT NULL default '',
|
||||
`Maxlen` bigint(3) NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
drop table t1;
|
||||
|
@ -104,7 +104,7 @@ information_schema.SCHEMATA b where
|
||||
a.ROUTINE_SCHEMA = b.SCHEMA_NAME;
|
||||
|
||||
select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
|
||||
mysql.proc b where a.ROUTINE_NAME = b.name;
|
||||
mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8);
|
||||
select count(*) from information_schema.ROUTINES;
|
||||
|
||||
#
|
||||
@ -222,4 +222,23 @@ create table t1 (a int not null auto_increment,b int, primary key (a));
|
||||
insert into t1 values (1,1),(NULL,3),(NULL,4);
|
||||
select AUTO_INCREMENT from information_schema.tables where table_name = 't1';
|
||||
drop table t1;
|
||||
|
||||
|
||||
create table t1 (s1 int);
|
||||
insert into t1 values (0),(9),(0);
|
||||
select s1 from t1 where s1 in (select version from
|
||||
information_schema.tables) union select version from
|
||||
information_schema.tables;
|
||||
drop table t1;
|
||||
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.CHARACTER_SETS;
|
||||
set names latin2;
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.CHARACTER_SETS;
|
||||
set names latin1;
|
||||
|
||||
create table t1 select * from information_schema.CHARACTER_SETS
|
||||
where CHARACTER_SET_NAME like "latin1";
|
||||
select * from t1;
|
||||
alter table t1 default character set utf8;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
Reference in New Issue
Block a user