mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
post-merge fix
mysql-test/r/information_schema.result: Auto merged mysql-test/r/lowercase_table2.result: Auto merged sql/item_strfunc.h: Auto merged sql/sql_show.cc: Auto merged mysql-test/t/information_schema.test: manual merge
This commit is contained in:
@ -912,58 +912,62 @@ grant select (f1) on mysqltest.t1 to user1@localhost;
|
|||||||
grant select on mysqltest.t2 to user2@localhost;
|
grant select on mysqltest.t2 to user2@localhost;
|
||||||
grant select on mysqltest.* to user3@localhost;
|
grant select on mysqltest.* to user3@localhost;
|
||||||
grant select on *.* to user4@localhost;
|
grant select on *.* to user4@localhost;
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user1'@'localhost' NULL USAGE NO
|
'user1'@'localhost' NULL USAGE NO
|
||||||
show grants;
|
show grants;
|
||||||
Grants for user1@localhost
|
Grants for user1@localhost
|
||||||
GRANT USAGE ON *.* TO 'user1'@'localhost'
|
GRANT USAGE ON *.* TO 'user1'@'localhost'
|
||||||
GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost'
|
GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost'
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user2'@'localhost' NULL USAGE NO
|
'user2'@'localhost' NULL USAGE NO
|
||||||
show grants;
|
show grants;
|
||||||
Grants for user2@localhost
|
Grants for user2@localhost
|
||||||
GRANT USAGE ON *.* TO 'user2'@'localhost'
|
GRANT USAGE ON *.* TO 'user2'@'localhost'
|
||||||
GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost'
|
GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost'
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user3'@'localhost' NULL mysqltest SELECT NO
|
'user3'@'localhost' NULL mysqltest SELECT NO
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user3'@'localhost' NULL USAGE NO
|
'user3'@'localhost' NULL USAGE NO
|
||||||
show grants;
|
show grants;
|
||||||
Grants for user3@localhost
|
Grants for user3@localhost
|
||||||
GRANT USAGE ON *.* TO 'user3'@'localhost'
|
GRANT USAGE ON *.* TO 'user3'@'localhost'
|
||||||
GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost'
|
GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost'
|
||||||
select * from information_schema.column_privileges where grantee like '%user%';
|
select * from information_schema.column_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
||||||
select * from information_schema.table_privileges where grantee like '%user%';
|
select * from information_schema.table_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
||||||
select * from information_schema.schema_privileges where grantee like '%user%';
|
select * from information_schema.schema_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user3'@'localhost' NULL mysqltest SELECT NO
|
'user3'@'localhost' NULL mysqltest SELECT NO
|
||||||
select * from information_schema.user_privileges where grantee like '%user%';
|
select * from information_schema.user_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'user1'@'localhost' NULL USAGE NO
|
'user1'@'localhost' NULL USAGE NO
|
||||||
'user2'@'localhost' NULL USAGE NO
|
'user2'@'localhost' NULL USAGE NO
|
||||||
@ -1175,3 +1179,12 @@ NULL test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER
|
|||||||
drop view v1, v2;
|
drop view v1, v2;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
set @a:= '.';
|
||||||
|
create table t1(f1 char(5));
|
||||||
|
create table t2(f1 char(5));
|
||||||
|
select concat(@a, table_name), @a, table_name
|
||||||
|
from information_schema.tables where table_schema = 'test';
|
||||||
|
concat(@a, table_name) @a table_name
|
||||||
|
.t1 . t1
|
||||||
|
.t2 . t2
|
||||||
|
drop table t1,t2;
|
||||||
|
@ -165,3 +165,12 @@ create table t1Aa (col1 int);
|
|||||||
select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
|
select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
|
||||||
col1
|
col1
|
||||||
drop table t2aA, t1Aa;
|
drop table t2aA, t1Aa;
|
||||||
|
create database mysqltest_LC2;
|
||||||
|
use mysqltest_LC2;
|
||||||
|
create table myUC (i int);
|
||||||
|
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
||||||
|
where TABLE_SCHEMA ='mysqltest_LC2';
|
||||||
|
TABLE_SCHEMA TABLE_NAME
|
||||||
|
mysqltest_LC2 myUC
|
||||||
|
use test;
|
||||||
|
drop database mysqltest_LC2;
|
||||||
|
@ -580,28 +580,32 @@ connect (con2,localhost,user2,,mysqltest);
|
|||||||
connect (con3,localhost,user3,,mysqltest);
|
connect (con3,localhost,user3,,mysqltest);
|
||||||
connect (con4,localhost,user4,,);
|
connect (con4,localhost,user4,,);
|
||||||
connection con1;
|
connection con1;
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
show grants;
|
show grants;
|
||||||
connection con2;
|
connection con2;
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
show grants;
|
show grants;
|
||||||
connection con3;
|
connection con3;
|
||||||
select * from information_schema.column_privileges;
|
select * from information_schema.column_privileges order by grantee;
|
||||||
select * from information_schema.table_privileges;
|
select * from information_schema.table_privileges order by grantee;
|
||||||
select * from information_schema.schema_privileges;
|
select * from information_schema.schema_privileges order by grantee;
|
||||||
select * from information_schema.user_privileges;
|
select * from information_schema.user_privileges order by grantee;
|
||||||
show grants;
|
show grants;
|
||||||
connection con4;
|
connection con4;
|
||||||
select * from information_schema.column_privileges where grantee like '%user%';
|
select * from information_schema.column_privileges where grantee like '%user%'
|
||||||
select * from information_schema.table_privileges where grantee like '%user%';
|
order by grantee;
|
||||||
select * from information_schema.schema_privileges where grantee like '%user%';
|
select * from information_schema.table_privileges where grantee like '%user%'
|
||||||
select * from information_schema.user_privileges where grantee like '%user%';
|
order by grantee;
|
||||||
|
select * from information_schema.schema_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
|
select * from information_schema.user_privileges where grantee like '%user%'
|
||||||
|
order by grantee;
|
||||||
show grants;
|
show grants;
|
||||||
connection default;
|
connection default;
|
||||||
drop user user1@localhost, user2@localhost, user3@localhost, user4@localhost;
|
drop user user1@localhost, user2@localhost, user3@localhost, user4@localhost;
|
||||||
@ -824,25 +828,6 @@ select routine_name from information_schema.routines;
|
|||||||
delete from proc where name='';
|
delete from proc where name='';
|
||||||
use test;
|
use test;
|
||||||
|
|
||||||
#
|
|
||||||
# End of 5.0 tests.
|
|
||||||
#
|
|
||||||
# Show engines
|
|
||||||
#
|
|
||||||
|
|
||||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
|
||||||
|
|
||||||
#
|
|
||||||
# INFORMATION_SCHEMA.PROCESSLIST
|
|
||||||
#
|
|
||||||
|
|
||||||
grant select on *.* to user3148@localhost;
|
|
||||||
connect (con3148,localhost,user3148,,test);
|
|
||||||
connection con3148;
|
|
||||||
select user,db from information_schema.processlist;
|
|
||||||
connection default;
|
|
||||||
drop user user3148@localhost;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#16681 information_schema shows forbidden VIEW details
|
# Bug#16681 information_schema shows forbidden VIEW details
|
||||||
#
|
#
|
||||||
@ -862,3 +847,31 @@ drop view v1, v2;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
|
||||||
|
#
|
||||||
|
set @a:= '.';
|
||||||
|
create table t1(f1 char(5));
|
||||||
|
create table t2(f1 char(5));
|
||||||
|
select concat(@a, table_name), @a, table_name
|
||||||
|
from information_schema.tables where table_schema = 'test';
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
|
# End of 5.0 tests.
|
||||||
|
#
|
||||||
|
# Show engines
|
||||||
|
#
|
||||||
|
|
||||||
|
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||||
|
|
||||||
|
#
|
||||||
|
# INFORMATION_SCHEMA.PROCESSLIST
|
||||||
|
#
|
||||||
|
|
||||||
|
grant select on *.* to user3148@localhost;
|
||||||
|
connect (con3148,localhost,user3148,,test);
|
||||||
|
connection con3148;
|
||||||
|
select user,db from information_schema.processlist;
|
||||||
|
connection default;
|
||||||
|
drop user user3148@localhost;
|
||||||
|
|
||||||
|
@ -139,3 +139,14 @@ select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
|
|||||||
drop table t2aA, t1Aa;
|
drop table t2aA, t1Aa;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
|
||||||
|
#
|
||||||
|
create database mysqltest_LC2;
|
||||||
|
use mysqltest_LC2;
|
||||||
|
create table myUC (i int);
|
||||||
|
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
||||||
|
where TABLE_SCHEMA ='mysqltest_LC2';
|
||||||
|
use test;
|
||||||
|
drop database mysqltest_LC2;
|
||||||
|
@ -691,6 +691,7 @@ public:
|
|||||||
str->charset(), conv_charset, &errors))
|
str->charset(), conv_charset, &errors))
|
||||||
null_value= 1;
|
null_value= 1;
|
||||||
use_cached_value= 1;
|
use_cached_value= 1;
|
||||||
|
str_value.mark_as_const();
|
||||||
safe= (errors == 0);
|
safe= (errors == 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2394,7 +2394,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
ST_SCHEMA_TABLE *schema_table= tables->schema_table;
|
ST_SCHEMA_TABLE *schema_table= tables->schema_table;
|
||||||
SELECT_LEX sel;
|
SELECT_LEX sel;
|
||||||
INDEX_FIELD_VALUES idx_field_vals;
|
INDEX_FIELD_VALUES idx_field_vals;
|
||||||
char path[FN_REFLEN], *end, *base_name, *file_name;
|
char path[FN_REFLEN], *end, *base_name, *orig_base_name, *file_name;
|
||||||
uint len;
|
uint len;
|
||||||
bool with_i_schema;
|
bool with_i_schema;
|
||||||
enum enum_schema_tables schema_table_idx;
|
enum enum_schema_tables schema_table_idx;
|
||||||
@ -2474,7 +2474,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
|
|
||||||
partial_cond= make_cond_for_info_schema(cond, tables);
|
partial_cond= make_cond_for_info_schema(cond, tables);
|
||||||
it.rewind(); /* To get access to new elements in basis list */
|
it.rewind(); /* To get access to new elements in basis list */
|
||||||
while ((base_name= it++) ||
|
while ((orig_base_name= base_name= it++) ||
|
||||||
/*
|
/*
|
||||||
generate error for non existing database.
|
generate error for non existing database.
|
||||||
(to save old behaviour for SHOW TABLES FROM db)
|
(to save old behaviour for SHOW TABLES FROM db)
|
||||||
@ -2505,6 +2505,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
if (mysql_find_files(thd, &files, base_name,
|
if (mysql_find_files(thd, &files, base_name,
|
||||||
path, idx_field_vals.table_value, 0))
|
path, idx_field_vals.table_value, 0))
|
||||||
goto err;
|
goto err;
|
||||||
|
if (lower_case_table_names)
|
||||||
|
orig_base_name= thd->strdup(base_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
List_iterator_fast<char> it_files(files);
|
List_iterator_fast<char> it_files(files);
|
||||||
@ -2573,7 +2575,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
in this case.
|
in this case.
|
||||||
*/
|
*/
|
||||||
res= schema_table->process_table(thd, show_table_list, table,
|
res= schema_table->process_table(thd, show_table_list, table,
|
||||||
res, base_name,
|
res, orig_base_name,
|
||||||
show_table_list->alias);
|
show_table_list->alias);
|
||||||
close_tables_for_reopen(thd, &show_table_list);
|
close_tables_for_reopen(thd, &show_table_list);
|
||||||
DBUG_ASSERT(!lex->query_tables_own_last);
|
DBUG_ASSERT(!lex->query_tables_own_last);
|
||||||
|
Reference in New Issue
Block a user