mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
This commit is contained in:
commit
09cfa4f9dc
6 changed files with 47 additions and 10 deletions
|
@ -29,7 +29,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
|
||||
NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2
|
||||
FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
|
@ -68,7 +69,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
|
||||
NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2
|
||||
FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
|
|
|
@ -29,7 +29,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
NULL mysqltest1 v1 SELECT 'тест' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
|
||||
NULL mysqltest1 v1 SELECT 'тест' AS c1, кол AS c2
|
||||
FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
|
@ -68,7 +69,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
NULL mysqltest1 v1 SELECT 'тест' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
|
||||
NULL mysqltest1 v1 SELECT 'тест' AS c1, кол AS c2
|
||||
FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
|
|
|
@ -387,10 +387,14 @@ 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 DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
|
||||
NULL test v0 select schema_name from information_schema.schemata NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v1 select table_name from information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v2 select column_name from information_schema.columns NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v3 select CHARACTER_SET_NAME from information_schema.character_sets NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v4 select COLLATION_NAME from information_schema.collations NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v1 select table_name from information_schema.tables
|
||||
where table_name="v1" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v2 select column_name from information_schema.columns
|
||||
where table_name="v2" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v3 select CHARACTER_SET_NAME from information_schema.character_sets
|
||||
where CHARACTER_SET_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
NULL test v4 select COLLATION_NAME from information_schema.collations
|
||||
where COLLATION_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
|
||||
drop view v0, v1, v2, v3, v4;
|
||||
create table t1 (a int);
|
||||
grant select,update,insert on t1 to mysqltest_1@localhost;
|
||||
|
@ -1540,4 +1544,16 @@ count(*)
|
|||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
|
||||
count(*)
|
||||
0
|
||||
CREATE VIEW v1
|
||||
AS SELECT *
|
||||
FROM INFORMATION_SCHEMA.TABLES;
|
||||
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
|
||||
VIEW_DEFINITION
|
||||
SELECT *
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
DROP VIEW v1;
|
||||
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME ='information_schema';
|
||||
SCHEMA_NAME
|
||||
information_schema
|
||||
End of 5.1 tests.
|
||||
|
|
|
@ -1178,4 +1178,20 @@ select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TA
|
|||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
|
||||
|
||||
#
|
||||
# Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
|
||||
#
|
||||
CREATE VIEW v1
|
||||
AS SELECT *
|
||||
FROM INFORMATION_SCHEMA.TABLES;
|
||||
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
|
||||
DROP VIEW v1;
|
||||
|
||||
#
|
||||
# Bug#30795 Query on INFORMATION_SCHEMA.SCHEMATA, wrong result
|
||||
#
|
||||
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME ='information_schema';
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
|
|
@ -3339,7 +3339,8 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
/*
|
||||
If we have lookup db value we should check that the database exists
|
||||
*/
|
||||
if(lookup_field_vals.db_value.str && !lookup_field_vals.wild_db_value)
|
||||
if(lookup_field_vals.db_value.str && !lookup_field_vals.wild_db_value &&
|
||||
!with_i_schema)
|
||||
{
|
||||
char path[FN_REFLEN+16];
|
||||
uint path_len;
|
||||
|
|
|
@ -672,7 +672,7 @@ static File_option view_parameters[]=
|
|||
FILE_OPTIONS_STRING},
|
||||
{{(char*) STRING_WITH_LEN("view_body_utf8")},
|
||||
my_offsetof(TABLE_LIST, view_body_utf8),
|
||||
FILE_OPTIONS_STRING},
|
||||
FILE_OPTIONS_ESTRING},
|
||||
{{NullS, 0}, 0,
|
||||
FILE_OPTIONS_STRING}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue