Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1982 05/12/14 16:31:08 gluh@stripped +5 -0
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
Fill schema tables with data before filesort if it's necessary
sql/sql_show.cc
1.301 05/12/14 16:29:47 gluh@stripped +11 -1
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
handle I_S tables only once if statement is not subselect
sql/sql_select.h
1.104 05/12/14 16:29:47 gluh@stripped +1 -0
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
added schema_table_processed. If it's true it means that
I_S table is alredy filled with data
sql/sql_select.cc
1.380 05/12/14 16:29:47 gluh@stripped +6 -0
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
Fill schema tables with data before filesort if it's necessary
mysql-test/t/information_schema.test
1.64 05/12/14 16:29:47 gluh@stripped +9 -0
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
test case
mysql-test/r/information_schema.result
1.91 05/12/14 16:29:46 gluh@stripped +8 -0
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
test case
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Bugs/5.0.15307
--- 1.379/sql/sql_select.cc Thu Dec 1 11:14:00 2005
+++ 1.380/sql/sql_select.cc Wed Dec 14 16:29:47 2005
@@ -11477,6 +11477,12 @@ create_sort_index(THD *thd, JOIN *join,
goto err;
}
}
+
+ /* Fill schema tables with data before filesort if it's necessary */
+ if ((join->select_lex->options & OPTION_SCHEMA_TABLE) &&
+ get_schema_tables_result(join))
+ goto err;
+
if (table->s->tmp_table)
table->file->info(HA_STATUS_VARIABLE); // Get record count
table->sort.found_records=filesort(thd, table,sortorder, length,
--- 1.103/sql/sql_select.h Wed Nov 30 14:52:09 2005
+++ 1.104/sql/sql_select.h Wed Dec 14 16:29:47 2005
@@ -133,6 +133,7 @@ typedef struct st_join_table {
uint used_fields,used_fieldlength,used_blobs;
enum join_type type;
bool cached_eq_ref_table,eq_ref_table,not_used_in_distinct;
+ bool schema_table_processed;
TABLE_REF ref;
JOIN_CACHE cache;
JOIN *join;
--- 1.300/sql/sql_show.cc Thu Dec 1 10:59:16 2005
+++ 1.301/sql/sql_show.cc Wed Dec 14 16:29:47 2005
@@ -3828,7 +3828,16 @@ bool get_schema_tables_result(JOIN *join
TABLE_LIST *table_list= tab->table->pos_in_table_list;
if (table_list->schema_table && thd->fill_derived_tables())
{
- if (&lex->unit != lex->current_select->master_unit()) // is subselect
+ bool is_subselect= (&lex->unit != lex->current_select->master_unit());
+ /*
+ The schema table is already processed and
+ the statement is not a subselect.
+ So we don't need to handle this table again.
+ */
+ if (tab->schema_table_processed && !is_subselect)
+ continue;
+
+ if (is_subselect) // is subselect
{
table_list->table->file->extra(HA_EXTRA_RESET_STATE);
table_list->table->file->delete_all_rows();
@@ -3841,6 +3850,7 @@ bool get_schema_tables_result(JOIN *join
if (table_list->schema_table->fill_table(thd, table_list,
tab->select_cond))
result= 1;
+ tab->schema_table_processed= TRUE;
}
}
thd->no_warnings_for_error= 0;
--- 1.90/mysql-test/r/information_schema.result Thu Dec 1 10:59:16 2005
+++ 1.91/mysql-test/r/information_schema.result Wed Dec 14 16:29:46 2005
@@ -1056,3 +1056,11 @@ where table_name="v1";
table_type
VIEW
drop view v1;
+select column_type, group_concat(table_schema, '.', table_name), count(*) as num
+from information_schema.columns where
+table_schema='information_schema' and
+(column_type = 'varchar(7)' or column_type = 'varchar(20)')
+group by column_type order by num;
+column_type group_concat(table_schema, '.', table_name) num
+varchar(20) information_schema.COLUMNS 1
+varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
--- 1.63/mysql-test/t/information_schema.test Thu Dec 1 10:59:16 2005
+++ 1.64/mysql-test/t/information_schema.test Wed Dec 14 16:29:47 2005
@@ -748,3 +748,12 @@ drop table t1;
select table_type from information_schema.tables
where table_name="v1";
drop view v1;
+
+#
+# Bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema
+#
+select column_type, group_concat(table_schema, '.', table_name), count(*) as num
+from information_schema.columns where
+table_schema='information_schema' and
+(column_type = 'varchar(7)' or column_type = 'varchar(20)')
+group by column_type order by num;
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.1982) BUG#15307 | gluh | 14 Dec |