Commit 2eee0e9b authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: mainly formatting, plus one helper

parent 1fe4a71b
set local sql_mode=""; set local sql_mode="";
set global sql_mode=""; set global sql_mode="";
drop table if exists t1,t2;
drop view if exists v1,v2;
drop function if exists f1;
drop function if exists f2;
show tables from INFORMATION_SCHEMA like 'T%'; show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_information_schema (T%) Tables_in_information_schema (T%)
TABLES TABLES
...@@ -17,6 +13,10 @@ create database mbase; ...@@ -17,6 +13,10 @@ create database mbase;
use `inf%`; use `inf%`;
show tables; show tables;
Tables_in_inf% Tables_in_inf%
#
# Bug#18113 SELECT * FROM information_schema.xxx crashes server
# Bug#17204 second CALL to procedure crashes Server
#
grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost'; grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
grant all privileges on `mbase`.* to 'mysqltest_1'@'localhost'; grant all privileges on `mbase`.* to 'mysqltest_1'@'localhost';
create table t1 (f1 int); create table t1 (f1 int);
...@@ -65,6 +65,9 @@ drop database `inf%`; ...@@ -65,6 +65,9 @@ drop database `inf%`;
drop procedure mbase.p1; drop procedure mbase.p1;
drop database mbase; drop database mbase;
disconnect user1; disconnect user1;
#
# Bug#18282 INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views
#
use test; use test;
create table t1 (i int); create table t1 (i int);
create function f1 () returns int return (select max(i) from t1); create function f1 () returns int return (select max(i) from t1);
...@@ -88,6 +91,10 @@ v2 VIEW VIEW ...@@ -88,6 +91,10 @@ v2 VIEW VIEW
drop function f1; drop function f1;
drop function f2; drop function f2;
drop view v1, v2; drop view v1, v2;
#
# Bug#20543 select on information_schema strange warnings, view, different
# schemas/users
#
create database testdb_1; create database testdb_1;
create user testdb_1@localhost; create user testdb_1@localhost;
grant all on testdb_1.* to testdb_1@localhost with grant option; grant all on testdb_1.* to testdb_1@localhost with grant option;
...@@ -216,6 +223,9 @@ disconnect testdb_2; ...@@ -216,6 +223,9 @@ disconnect testdb_2;
connection default; connection default;
drop user testdb_1@localhost; drop user testdb_1@localhost;
drop user testdb_2@localhost; drop user testdb_2@localhost;
#
# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
#
create database testdb_1; create database testdb_1;
create table testdb_1.t1 (a int); create table testdb_1.t1 (a int);
create view testdb_1.v1 as select * from testdb_1.t1; create view testdb_1.v1 as select * from testdb_1.t1;
...@@ -246,6 +256,9 @@ connection user1; ...@@ -246,6 +256,9 @@ connection user1;
disconnect user1; disconnect user1;
connection default; connection default;
set global sql_mode=default; set global sql_mode=default;
#
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
#
create user foo@localhost; create user foo@localhost;
grant select on test.* to foo@localhost; grant select on test.* to foo@localhost;
create procedure rootonly() select 1; create procedure rootonly() select 1;
...@@ -325,3 +338,6 @@ disconnect foo; ...@@ -325,3 +338,6 @@ disconnect foo;
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i; drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
drop user foo@localhost; drop user foo@localhost;
drop procedure rootonly; drop procedure rootonly;
#
# End of 10.2 tests
#
...@@ -2,21 +2,11 @@ ...@@ -2,21 +2,11 @@
# in the embedded server by default). So skip the test in embedded-server mode. # in the embedded server by default). So skip the test in embedded-server mode.
-- source include/not_embedded.inc -- source include/not_embedded.inc
#Don't run this test when thread_pool active
--source include/not_threadpool.inc
-- source include/testdb_only.inc -- source include/testdb_only.inc
set local sql_mode=""; set local sql_mode="";
set global sql_mode=""; set global sql_mode="";
--disable_warnings
drop table if exists t1,t2;
drop view if exists v1,v2;
drop function if exists f1;
drop function if exists f2;
--enable_warnings
--replace_result 'Tables_in_INFORMATION_SCHEMA (T%)' 'Tables_in_information_schema (T%)' --replace_result 'Tables_in_INFORMATION_SCHEMA (T%)' 'Tables_in_information_schema (T%)'
--sorted_result --sorted_result
show tables from INFORMATION_SCHEMA like 'T%'; show tables from INFORMATION_SCHEMA like 'T%';
...@@ -25,9 +15,10 @@ create database mbase; ...@@ -25,9 +15,10 @@ create database mbase;
use `inf%`; use `inf%`;
show tables; show tables;
# --echo #
# Bug#18113 SELECT * FROM information_schema.xxx crashes server --echo # Bug#18113 SELECT * FROM information_schema.xxx crashes server
# Bug#17204 second CALL to procedure crashes Server --echo # Bug#17204 second CALL to procedure crashes Server
--echo #
# Crash happened when one selected data from one of INFORMATION_SCHEMA # Crash happened when one selected data from one of INFORMATION_SCHEMA
# tables and in order to build its contents server had to open view which # tables and in order to build its contents server had to open view which
# used stored function and table or view on which one had not global or # used stored function and table or view on which one had not global or
...@@ -89,9 +80,9 @@ drop procedure mbase.p1; ...@@ -89,9 +80,9 @@ drop procedure mbase.p1;
drop database mbase; drop database mbase;
disconnect user1; disconnect user1;
# --echo #
# Bug#18282 INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views --echo # Bug#18282 INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views
# --echo #
use test; use test;
create table t1 (i int); create table t1 (i int);
create function f1 () returns int return (select max(i) from t1); create function f1 () returns int return (select max(i) from t1);
...@@ -110,11 +101,10 @@ drop function f2; ...@@ -110,11 +101,10 @@ drop function f2;
drop view v1, v2; drop view v1, v2;
--enable_view_protocol --enable_view_protocol
# --echo #
# Bug#20543 select on information_schema strange warnings, view, different --echo # Bug#20543 select on information_schema strange warnings, view, different
# schemas/users --echo # schemas/users
# --echo #
#
--disable_service_connection --disable_service_connection
create database testdb_1; create database testdb_1;
create user testdb_1@localhost; create user testdb_1@localhost;
...@@ -225,9 +215,9 @@ connection default; ...@@ -225,9 +215,9 @@ connection default;
drop user testdb_1@localhost; drop user testdb_1@localhost;
drop user testdb_2@localhost; drop user testdb_2@localhost;
# --echo #
# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS --echo # Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
# --echo #
create database testdb_1; create database testdb_1;
create table testdb_1.t1 (a int); create table testdb_1.t1 (a int);
create view testdb_1.v1 as select * from testdb_1.t1; create view testdb_1.v1 as select * from testdb_1.t1;
...@@ -259,9 +249,9 @@ connection default; ...@@ -259,9 +249,9 @@ connection default;
set global sql_mode=default; set global sql_mode=default;
# --echo #
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables --echo # MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
# --echo #
create user foo@localhost; create user foo@localhost;
grant select on test.* to foo@localhost; grant select on test.* to foo@localhost;
...@@ -303,3 +293,7 @@ drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i; ...@@ -303,3 +293,7 @@ drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
drop user foo@localhost; drop user foo@localhost;
drop procedure rootonly; drop procedure rootonly;
--enable_service_connection --enable_service_connection
--echo #
--echo # End of 10.2 tests
--echo #
...@@ -94,7 +94,6 @@ def mysql PRIMARY mysql transaction_registry ...@@ -94,7 +94,6 @@ def mysql PRIMARY mysql transaction_registry
######################################################################################### #########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
######################################################################################### #########################################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
...@@ -104,7 +103,6 @@ CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3); ...@@ -104,7 +103,6 @@ CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3);
CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
ENGINE = <some_engine_type>; ENGINE = <some_engine_type>;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost'; CREATE USER 'testuser1'@'localhost';
GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost';
...@@ -158,8 +156,6 @@ DROP DATABASE db_datadict; ...@@ -158,8 +156,6 @@ DROP DATABASE db_datadict;
######################################################################################### #########################################################################################
# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications
######################################################################################### #########################################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS test.t1_my_table;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT table_name FROM information_schema.table_constraints SELECT table_name FROM information_schema.table_constraints
WHERE table_name LIKE 't1_my_table%'; WHERE table_name LIKE 't1_my_table%';
...@@ -310,8 +306,6 @@ table_name ...@@ -310,8 +306,6 @@ table_name
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported # DDL on INFORMATION_SCHEMA tables are not supported
######################################################################## ########################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS db_datadict.t1;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1)) CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1))
ENGINE = <engine_type>; ENGINE = <engine_type>;
......
...@@ -36,7 +36,6 @@ eval SHOW TABLES FROM information_schema LIKE '$is_table'; ...@@ -36,7 +36,6 @@ eval SHOW TABLES FROM information_schema LIKE '$is_table';
# #
--source suite/funcs_1/datadict/is_table_query.inc --source suite/funcs_1/datadict/is_table_query.inc
--echo ######################################################################### --echo #########################################################################
--echo # Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout --echo # Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout
--echo ######################################################################### --echo #########################################################################
...@@ -85,9 +84,6 @@ ORDER BY constraint_schema, table_name, constraint_name; ...@@ -85,9 +84,6 @@ ORDER BY constraint_schema, table_name, constraint_name;
# mysql is_table_constraints_mysql # mysql is_table_constraints_mysql
# information_schema is_table_constraints_is # information_schema is_table_constraints_is
# #
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
--enable_warnings
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
--replace_result $engine_type <some_engine_type> --replace_result $engine_type <some_engine_type>
eval eval
...@@ -102,8 +98,6 @@ CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, ...@@ -102,8 +98,6 @@ CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT,
f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2))
ENGINE = $engine_type; ENGINE = $engine_type;
--error 0,ER_CANNOT_USER
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost'; CREATE USER 'testuser1'@'localhost';
GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost';
...@@ -161,10 +155,6 @@ DROP DATABASE db_datadict; ...@@ -161,10 +155,6 @@ DROP DATABASE db_datadict;
# automatically deletes all relevant information on that object from # automatically deletes all relevant information on that object from
# every appropriate INFORMATION_SCHEMA table. # every appropriate INFORMATION_SCHEMA table.
# #
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS test.t1_my_table;
--enable_warnings
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT table_name FROM information_schema.table_constraints SELECT table_name FROM information_schema.table_constraints
...@@ -281,10 +271,6 @@ WHERE table_name = 't1_my_tablex'; ...@@ -281,10 +271,6 @@ WHERE table_name = 't1_my_tablex';
# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data # 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data
# in an INFORMATION_SCHEMA table. # in an INFORMATION_SCHEMA table.
# #
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS db_datadict.t1;
--enable_warnings
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
--replace_result $engine_type <engine_type> --replace_result $engine_type <engine_type>
eval eval
......
...@@ -5210,6 +5210,13 @@ class GRANT_TABLE :public GRANT_NAME ...@@ -5210,6 +5210,13 @@ class GRANT_TABLE :public GRANT_NAME
}; };
ulong GRANT_INFO::all_privilege()
{
return (grant_table_user ? grant_table_user->cols : 0) |
(grant_table_role ? grant_table_role->cols : 0) | privilege;
}
void GRANT_NAME::set_user_details(const char *h, const char *d, void GRANT_NAME::set_user_details(const char *h, const char *d,
const char *u, const char *t, const char *u, const char *t,
bool is_routine) bool is_routine)
...@@ -8227,9 +8234,7 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, ...@@ -8227,9 +8234,7 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
if (!(~t_ref->grant.privilege & want_access)) if (!(~t_ref->grant.privilege & want_access))
continue; continue;
if ((want_access&= ~((grant_table ? grant_table->cols : 0) | if ((want_access&= ~t_ref->grant.all_privilege()))
(grant_table_role ? grant_table_role->cols : 0) |
t_ref->grant.privilege)))
{ {
goto err; // impossible goto err; // impossible
} }
......
...@@ -6778,10 +6778,8 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables, ...@@ -6778,10 +6778,8 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
if (show_table->file) if (show_table->file)
{ {
(void) read_statistics_for_tables(thd, tables); (void) read_statistics_for_tables(thd, tables);
show_table->file->info(HA_STATUS_VARIABLE | show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK |
HA_STATUS_NO_LOCK | HA_STATUS_CONST | HA_STATUS_TIME);
HA_STATUS_CONST |
HA_STATUS_TIME);
set_statistics_for_table(thd, show_table); set_statistics_for_table(thd, show_table);
} }
for (uint i=0 ; i < show_table->s->keys ; i++,key_info++) for (uint i=0 ; i < show_table->s->keys ; i++,key_info++)
...@@ -7108,14 +7106,10 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables, ...@@ -7108,14 +7106,10 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
TABLE *show_table= tables->table; TABLE *show_table= tables->table;
KEY *key_info=show_table->s->key_info; KEY *key_info=show_table->s->key_info;
uint primary_key= show_table->s->primary_key; uint primary_key= show_table->s->primary_key;
show_table->file->info(HA_STATUS_VARIABLE | show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK |
HA_STATUS_NO_LOCK |
HA_STATUS_TIME); HA_STATUS_TIME);
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++) for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
{ {
if (i != primary_key && !(key_info->flags & HA_NOSAME))
continue;
if (i == primary_key && !strcmp(key_info->name.str, primary_key_name)) if (i == primary_key && !strcmp(key_info->name.str, primary_key_name))
{ {
if (store_constraints(thd, table, db_name, table_name, if (store_constraints(thd, table, db_name, table_name,
...@@ -7133,16 +7127,14 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables, ...@@ -7133,16 +7127,14 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
} }
// Table check constraints // Table check constraints
for ( uint i = 0; i < show_table->s->table_check_constraints; i++ ) for (uint i = 0; i < show_table->s->table_check_constraints; i++)
{ {
Virtual_column_info *check = show_table->check_constraints[ i ]; Virtual_column_info *check = show_table->check_constraints[i];
if ( store_constraints( thd, table, db_name, table_name, check->name.str, if (store_constraints(thd, table, db_name, table_name,
check->name.length, check->name.str, check->name.length,
STRING_WITH_LEN( "CHECK" ) ) ) STRING_WITH_LEN("CHECK")))
{ DBUG_RETURN(1);
DBUG_RETURN( 1 );
}
} }
show_table->file->get_foreign_key_list(thd, &f_key_list); show_table->file->get_foreign_key_list(thd, &f_key_list);
...@@ -7153,7 +7145,7 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables, ...@@ -7153,7 +7145,7 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
if (store_constraints(thd, table, db_name, table_name, if (store_constraints(thd, table, db_name, table_name,
f_key_info->foreign_id->str, f_key_info->foreign_id->str,
strlen(f_key_info->foreign_id->str), strlen(f_key_info->foreign_id->str),
"FOREIGN KEY", 11)) STRING_WITH_LEN("FOREIGN KEY")))
DBUG_RETURN(1); DBUG_RETURN(1);
} }
} }
...@@ -7284,8 +7276,7 @@ store_key_column_usage(TABLE *table, const LEX_CSTRING *db_name, ...@@ -7284,8 +7276,7 @@ store_key_column_usage(TABLE *table, const LEX_CSTRING *db_name,
} }
static int get_schema_key_column_usage_record(THD *thd, static int get_schema_key_column_usage_record(THD *thd, TABLE_LIST *tables,
TABLE_LIST *tables,
TABLE *table, bool res, TABLE *table, bool res,
const LEX_CSTRING *db_name, const LEX_CSTRING *db_name,
const LEX_CSTRING *table_name) const LEX_CSTRING *table_name)
...@@ -7306,8 +7297,7 @@ static int get_schema_key_column_usage_record(THD *thd, ...@@ -7306,8 +7297,7 @@ static int get_schema_key_column_usage_record(THD *thd,
TABLE *show_table= tables->table; TABLE *show_table= tables->table;
KEY *key_info=show_table->s->key_info; KEY *key_info=show_table->s->key_info;
uint primary_key= show_table->s->primary_key; uint primary_key= show_table->s->primary_key;
show_table->file->info(HA_STATUS_VARIABLE | show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK |
HA_STATUS_NO_LOCK |
HA_STATUS_TIME); HA_STATUS_TIME);
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++) for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
{ {
...@@ -7317,18 +7307,15 @@ static int get_schema_key_column_usage_record(THD *thd, ...@@ -7317,18 +7307,15 @@ static int get_schema_key_column_usage_record(THD *thd,
KEY_PART_INFO *key_part= key_info->key_part; KEY_PART_INFO *key_part= key_info->key_part;
for (uint j=0 ; j < key_info->user_defined_key_parts ; j++,key_part++) for (uint j=0 ; j < key_info->user_defined_key_parts ; j++,key_part++)
{ {
if (key_part->field) f_idx++;
{ restore_record(table, s->default_values);
f_idx++; store_key_column_usage(table, db_name, table_name,
restore_record(table, s->default_values); key_info->name.str, key_info->name.length,
store_key_column_usage(table, db_name, table_name, key_part->field->field_name.str,
key_info->name.str, key_info->name.length, key_part->field->field_name.length,
key_part->field->field_name.str, (longlong) f_idx);
key_part->field->field_name.length, if (schema_table_store_record(thd, table))
(longlong) f_idx); DBUG_RETURN(1);
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
}
} }
} }
...@@ -8189,8 +8176,7 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables, ...@@ -8189,8 +8176,7 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables,
{ {
List<FOREIGN_KEY_INFO> f_key_list; List<FOREIGN_KEY_INFO> f_key_list;
TABLE *show_table= tables->table; TABLE *show_table= tables->table;
show_table->file->info(HA_STATUS_VARIABLE | show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK |
HA_STATUS_NO_LOCK |
HA_STATUS_TIME); HA_STATUS_TIME);
show_table->file->get_foreign_key_list(thd, &f_key_list); show_table->file->get_foreign_key_list(thd, &f_key_list);
......
...@@ -336,6 +336,9 @@ typedef struct st_grant_info ...@@ -336,6 +336,9 @@ typedef struct st_grant_info
ulong orig_want_privilege; ulong orig_want_privilege;
/** The grant state for internal tables. */ /** The grant state for internal tables. */
GRANT_INTERNAL_INFO m_internal; GRANT_INTERNAL_INFO m_internal;
/* OR table and all column privileges */
ulong all_privilege();
} GRANT_INFO; } GRANT_INFO;
enum tmp_table_type enum tmp_table_type
......
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