mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.0-opt
This commit is contained in:
commit
800b160031
3 changed files with 96 additions and 0 deletions
|
@ -1170,3 +1170,65 @@ f1()
|
|||
DROP FUNCTION f1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP USER mysql_bug20230@localhost;
|
||||
SELECT t.table_name, c1.column_name
|
||||
FROM information_schema.tables t
|
||||
INNER JOIN
|
||||
information_schema.columns c1
|
||||
ON t.table_schema = c1.table_schema AND
|
||||
t.table_name = c1.table_name
|
||||
WHERE t.table_schema = 'information_schema' AND
|
||||
c1.ordinal_position =
|
||||
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
||||
FROM information_schema.columns c2
|
||||
WHERE c2.table_schema = t.table_schema AND
|
||||
c2.table_name = t.table_name AND
|
||||
c2.column_name LIKE '%SCHEMA%'
|
||||
);
|
||||
table_name column_name
|
||||
CHARACTER_SETS CHARACTER_SET_NAME
|
||||
COLLATIONS COLLATION_NAME
|
||||
COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
|
||||
COLUMNS TABLE_SCHEMA
|
||||
COLUMN_PRIVILEGES TABLE_SCHEMA
|
||||
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
||||
ROUTINES ROUTINE_SCHEMA
|
||||
SCHEMATA SCHEMA_NAME
|
||||
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
||||
STATISTICS TABLE_SCHEMA
|
||||
TABLES TABLE_SCHEMA
|
||||
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
TABLE_PRIVILEGES TABLE_SCHEMA
|
||||
TRIGGERS TRIGGER_SCHEMA
|
||||
USER_PRIVILEGES GRANTEE
|
||||
VIEWS TABLE_SCHEMA
|
||||
SELECT t.table_name, c1.column_name
|
||||
FROM information_schema.tables t
|
||||
INNER JOIN
|
||||
information_schema.columns c1
|
||||
ON t.table_schema = c1.table_schema AND
|
||||
t.table_name = c1.table_name
|
||||
WHERE t.table_schema = 'information_schema' AND
|
||||
c1.ordinal_position =
|
||||
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
||||
FROM information_schema.columns c2
|
||||
WHERE c2.table_schema = 'information_schema' AND
|
||||
c2.table_name = t.table_name AND
|
||||
c2.column_name LIKE '%SCHEMA%'
|
||||
);
|
||||
table_name column_name
|
||||
CHARACTER_SETS CHARACTER_SET_NAME
|
||||
COLLATIONS COLLATION_NAME
|
||||
COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
|
||||
COLUMNS TABLE_SCHEMA
|
||||
COLUMN_PRIVILEGES TABLE_SCHEMA
|
||||
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
||||
ROUTINES ROUTINE_SCHEMA
|
||||
SCHEMATA SCHEMA_NAME
|
||||
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
||||
STATISTICS TABLE_SCHEMA
|
||||
TABLES TABLE_SCHEMA
|
||||
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
TABLE_PRIVILEGES TABLE_SCHEMA
|
||||
TRIGGERS TRIGGER_SCHEMA
|
||||
USER_PRIVILEGES GRANTEE
|
||||
VIEWS TABLE_SCHEMA
|
||||
|
|
|
@ -887,4 +887,37 @@ DROP FUNCTION f1;
|
|||
DROP PROCEDURE p1;
|
||||
DROP USER mysql_bug20230@localhost;
|
||||
|
||||
#
|
||||
# Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA
|
||||
#
|
||||
|
||||
SELECT t.table_name, c1.column_name
|
||||
FROM information_schema.tables t
|
||||
INNER JOIN
|
||||
information_schema.columns c1
|
||||
ON t.table_schema = c1.table_schema AND
|
||||
t.table_name = c1.table_name
|
||||
WHERE t.table_schema = 'information_schema' AND
|
||||
c1.ordinal_position =
|
||||
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
||||
FROM information_schema.columns c2
|
||||
WHERE c2.table_schema = t.table_schema AND
|
||||
c2.table_name = t.table_name AND
|
||||
c2.column_name LIKE '%SCHEMA%'
|
||||
);
|
||||
SELECT t.table_name, c1.column_name
|
||||
FROM information_schema.tables t
|
||||
INNER JOIN
|
||||
information_schema.columns c1
|
||||
ON t.table_schema = c1.table_schema AND
|
||||
t.table_name = c1.table_name
|
||||
WHERE t.table_schema = 'information_schema' AND
|
||||
c1.ordinal_position =
|
||||
( SELECT COALESCE(MIN(c2.ordinal_position),1)
|
||||
FROM information_schema.columns c2
|
||||
WHERE c2.table_schema = 'information_schema' AND
|
||||
c2.table_name = t.table_name AND
|
||||
c2.column_name LIKE '%SCHEMA%'
|
||||
);
|
||||
|
||||
# End of 5.0 tests.
|
||||
|
|
|
@ -3963,6 +3963,7 @@ bool get_schema_tables_result(JOIN *join)
|
|||
table_list->table->file->delete_all_rows();
|
||||
free_io_cache(table_list->table);
|
||||
filesort_free_buffers(table_list->table);
|
||||
table_list->table->null_row= 0;
|
||||
}
|
||||
else
|
||||
table_list->table->file->records= 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue