Commit 05279c64 authored by unknown's avatar unknown

Post merge fix 2 for

     ChangeSet@1.2509, 2007-08-28
     http://lists.mysql.com/commits/33239
  Fixes for the funcs_1 datadict test bugs
  #30418 "datadict" tests (all engines) fail:
         Dependency on the host name for ordering
  #30420 "datadict" tests (all engines) fail:
         Release build has help tables loaded
  #30438 "{memory,myisam,ndb}__datadict" tests fail:
         Use "InnoDB" without checking
  #30440 "datadict" tests (all engines) fail:
         Character sets depend on
                   configuration


mysql-test/suite/funcs_1/README.txt:
  Improved README
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
  Additions for the NDB variant (currently not in use)
mysql-test/suite/funcs_1/datadict/datadict_master.inc:
  Write a comment about Bug#30689 into the test protocols.
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
  Fix for a not reported bug.
  The missing revoke usage and drop user harmed the next test.
mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb__datadict.result:
  Updated results
mysql-test/suite/funcs_1/r/memory__datadict.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  Updated results
mysql-test/suite/funcs_1/r/ndb__datadict.result:
  Updated results as far as they could be corrected.
  Attention:
     This test failed even before the current bug fixes.
     The updated expected results are now better than before,
     but they do not prevent that the test fails.
     It looks like one script is "damaged" and treats
     this NDB test different than expected within the
     file with expected results.
parent 55b492c0
......@@ -112,6 +112,7 @@ Carsten 16.09.2005
===================================================================
Matthias 25.08.2007
-------------------
Data dictionary tests:
Fixes for Bugs 30418,30420,30438,30440
1. Replace error numbers with error names
2. Replace static "InnoDB" (not all time available) used within an
......@@ -125,10 +126,16 @@ Fixes for Bugs 30418,30420,30438,30440
5. Add two help table related tests (one for build, one for developer)
to ensure that informations about help tables within
INFORMATION_SCHEMA.TABLES/STATISTICS are checked.
6. Note about new Bug#30689 at the beginning of the test.
The files with expected results contain incomplete result sets.
7. Fix the NDB variant of the data dictionary test (ndb__datadict) as far as
it was necessary for the bug fixes mentioned above.
General note:
Most INFORMATION_SCHEMA properties (table layout, permissions etc.)
are not affected by our variation of the storage engines except
that some properties of our tables using a specific storage
engine become visible. So it makes sense to decompose
this test into a storage engine specific part and a non
storage engine specific part in future.
the data dictionary test into a storage engine specific part and
a non storage engine specific part in future.
......@@ -53,7 +53,7 @@ let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("loca
# load tables
# -----------
#
# this was part of the 3 files $<engine>_datadict.test, but it has been moved
# this was part of the 4 files $<engine>_datadict.test, but it has been moved
# here to have only one place where all preparation for the test is done.
#
################################################################################
......@@ -61,11 +61,15 @@ let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("loca
eval SET @ENGINE_INNODB = IF( '$engine_type' = 'innodb', 1, 0);
eval SET @ENGINE_MEMORY = IF( '$engine_type' = 'memory', 1, 0);
eval SET @ENGINE_MYISAM = IF( '$engine_type' = 'myisam', 1, 0);
eval SET @ENGINE_NDB = IF( '$engine_type' = 'ndb', 1, 0);
--enable_query_log
let $engine_myisam= `SELECT @ENGINE_MYISAM = 1`;
let $engine_innodb= `SELECT @ENGINE_INNODB = 1`;
let $engine_memory= `SELECT @ENGINE_MEMORY = 1`;
let $engine_ndb= `SELECT @ENGINE_NDB = 1`;
# Note: The NDB variant with their own tb1 - tb4 tables is not ready for use.
let $engine_ndb= 0;
# Decide, if the objects are to be (re)created
#
......@@ -117,6 +121,17 @@ if ($run)
USE test1;
--source suite/funcs_1/include/myisam_tb2.inc
}
if ($engine_ndb)
{
--source suite/funcs_1/include/ndb_tb1.inc
--source suite/funcs_1/include/ndb_tb2.inc
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/include/ndb_tb4.inc
USE test1;
--source suite/funcs_1/include/ndb_tb2.inc
}
USE test;
--source suite/funcs_1/include/sp_tb.inc
}
......@@ -48,9 +48,11 @@ let $message=
# and otherwise some extra statements needs to be executed as long as the bug is not
# fixed:
let $have_bug_11589= 1;
let $have_bug_30689= 1;
#seems not to work: --vertical_results
eval SELECT $have_bug_11589 AS "have_bug_11589";
eval SELECT $have_bug_30689 AS "have_bug_30689";
#seems not to work: --horizontal_results
# As long as
......@@ -67,6 +69,15 @@ let $message=
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill;
--source include/show_msg80.inc
}
if ($have_bug_30689)
{
let $message= Selects on INFORMATION_SCHEMA.VIEWS present incomplete
content for the column VIEW_DEFINITION in cases where
the view selects(=is based) on an INFORMATION_SCHEMA table.
---> VIEWS vu and vu1
Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S;
--source include/show_msg80.inc
}
#
################################################################################
......
......@@ -430,3 +430,5 @@ disconnect anonymous1;
disconnect anonymous2;
DROP USER ddicttestuser1@'localhost';
DROP USER ddicttestuser2@'localhost';
REVOKE USAGE ON *.* FROM ''@'localhost';
DROP USER ''@'localhost';
......@@ -467,3 +467,5 @@ Cleanup: close connections, DROP USER etc.
####################################################################################
DROP USER ddicttestuser1@'localhost';
DROP USER ddicttestuser2@'localhost';
REVOKE USAGE ON *.* FROM ''@'localhost';
DROP USER ''@'localhost';
......@@ -467,3 +467,5 @@ Cleanup: close connections, DROP USER etc.
####################################################################################
DROP USER ddicttestuser1@'localhost';
DROP USER ddicttestuser2@'localhost';
REVOKE USAGE ON *.* FROM ''@'localhost';
DROP USER ''@'localhost';
......@@ -21,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
SELECT 1 AS "have_bug_30689";
have_bug_30689
1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
Selects on INFORMATION_SCHEMA.VIEWS present incomplete
content for the column VIEW_DEFINITION in cases where
the view selects(=is based) on an INFORMATION_SCHEMA table.
---> VIEWS vu and vu1
Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
......@@ -3189,10 +3199,10 @@ NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 N
NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
......@@ -5516,10 +5526,10 @@ NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
......
......@@ -21,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
SELECT 1 AS "have_bug_30689";
have_bug_30689
1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
Selects on INFORMATION_SCHEMA.VIEWS present incomplete
content for the column VIEW_DEFINITION in cases where
the view selects(=is based) on an INFORMATION_SCHEMA table.
---> VIEWS vu and vu1
Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
......@@ -3172,10 +3182,10 @@ NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 N
NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
......@@ -5499,10 +5509,10 @@ NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
......
......@@ -21,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
SELECT 1 AS "have_bug_30689";
have_bug_30689
1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
Selects on INFORMATION_SCHEMA.VIEWS present incomplete
content for the column VIEW_DEFINITION in cases where
the view selects(=is based) on an INFORMATION_SCHEMA table.
---> VIEWS vu and vu1
Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
......@@ -3242,10 +3252,10 @@ NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 N
NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
......@@ -5569,10 +5579,10 @@ NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER
NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER
NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment