Commit a7f5977c authored by unknown's avatar unknown

Bug #9317: Wrong count for tables in INFORMATION_SCHEMA

  there was no check of result of 
  table->file->write_row() function. When count of rows was
  more than table max_rows(HEAP table) the following recodrs
  were not inserted to the table
  -'schema_table_store_record' function is added. 
    The function checks result of write_row function
    and convert HEAP table to MyISAM if necessary
  - Result check after write_row is added into all 
    I_S function which store the records to I_S tables  


mysql-test/r/information_schema.result:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
mysql-test/t/information_schema.test:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_select.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_show.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/table.h:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
parent 704b8576
......@@ -651,6 +651,8 @@ drop table t1, t2;
CREATE TABLE t_crashme ( f1 BIGINT);
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*)
100
drop view a2, a1;
drop table t_crashme;
select table_schema,table_name, column_name from
......
......@@ -403,6 +403,7 @@ while ($tab_count)
--disable_result_log
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES;
--enable_result_log
SELECT count(*) FROM INFORMATION_SCHEMA.TABLES;
let $tab_count= 65;
while ($tab_count)
{
......
......@@ -8714,8 +8714,9 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
*table= new_table;
table->s= &table->share_not_to_be_used;
table->file->change_table_ptr(table);
thd->proc_info= (!strcmp(save_proc_info,"Copying to tmp table") ?
"Copying to tmp table on disk" : save_proc_info);
if (save_proc_info)
thd->proc_info= (!strcmp(save_proc_info,"Copying to tmp table") ?
"Copying to tmp table on disk" : save_proc_info);
DBUG_RETURN(0);
err:
......
This diff is collapsed.
......@@ -322,6 +322,7 @@ typedef struct st_schema_table
struct st_lex;
class select_union;
class TMP_TABLE_PARAM;
struct Field_translator
{
......@@ -370,6 +371,7 @@ typedef struct st_table_list
ST_SCHEMA_TABLE *schema_table; /* Information_schema table */
st_select_lex *schema_select_lex;
bool schema_table_reformed;
TMP_TABLE_PARAM *schema_table_param;
/* link to select_lex where this table was used */
st_select_lex *select_lex;
st_lex *view; /* link on VIEW lex for merging */
......
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