mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed a bug with big result sets and UNION's
BitKeeper/etc/ignore: Added mysys/getopt.c mysys/getopt1.c to the ignore list
This commit is contained in:
@ -469,3 +469,5 @@ vio/test-ssl
|
|||||||
vio/test-sslclient
|
vio/test-sslclient
|
||||||
vio/test-sslserver
|
vio/test-sslserver
|
||||||
vio/viotest-ssl
|
vio/viotest-ssl
|
||||||
|
mysys/getopt.c
|
||||||
|
mysys/getopt1.c
|
||||||
|
@ -182,7 +182,7 @@ typedef struct st_copy_info {
|
|||||||
ha_rows copied;
|
ha_rows copied;
|
||||||
ha_rows error;
|
ha_rows error;
|
||||||
enum enum_duplicates handle_duplicates;
|
enum enum_duplicates handle_duplicates;
|
||||||
int escape_char;
|
int escape_char, errorno;
|
||||||
} COPY_INFO;
|
} COPY_INFO;
|
||||||
|
|
||||||
|
|
||||||
@ -666,6 +666,7 @@ class select_union :public select_result {
|
|||||||
TABLE *table;
|
TABLE *table;
|
||||||
COPY_INFO info;
|
COPY_INFO info;
|
||||||
uint save_time_stamp;
|
uint save_time_stamp;
|
||||||
|
TMP_TABLE_PARAM *tmp_table_param;
|
||||||
|
|
||||||
select_union(TABLE *table_par);
|
select_union(TABLE *table_par);
|
||||||
~select_union();
|
~select_union();
|
||||||
|
@ -447,6 +447,7 @@ int write_record(TABLE *table,COPY_INFO *info)
|
|||||||
err:
|
err:
|
||||||
if (key)
|
if (key)
|
||||||
my_afree(key);
|
my_afree(key);
|
||||||
|
info->errorno= error;
|
||||||
table->file->print_error(error,MYF(0));
|
table->file->print_error(error,MYF(0));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
union_result->save_time_stamp=!describe;
|
union_result->save_time_stamp=!describe;
|
||||||
|
union_result->tmp_table_param=&tmp_table_param;
|
||||||
for (sl= &lex->select_lex; sl; sl=sl->next)
|
for (sl= &lex->select_lex; sl; sl=sl->next)
|
||||||
{
|
{
|
||||||
lex->select=sl;
|
lex->select=sl;
|
||||||
@ -253,7 +253,12 @@ bool select_union::send_data(List<Item> &values)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fill_record(table->field,values);
|
fill_record(table->field,values);
|
||||||
return write_record(table,&info) ? 1 : 0;
|
if ((write_record(table,&info)))
|
||||||
|
{
|
||||||
|
if (create_myisam_from_heap(table, tmp_table_param, info.errorno, 0))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool select_union::send_eof()
|
bool select_union::send_eof()
|
||||||
|
Reference in New Issue
Block a user