mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Fixed reentrantness bugs in select (lex->result) and select_dumpvar, and added cool
prime number test example. mysql-test/r/sp.result: New prime number example. (Good for future benchmarkings too.) mysql-test/t/sp.test: New prime number example. (Good for future benchmarkings too.) sql/sql_class.cc: Reset row_count in select_dumpvar when preparing, to make it reentrant as a lex member. sql/sql_select.cc: Don't delete result if it's a lex member (since lex needs to be reentrant).
This commit is contained in:
@@ -972,6 +972,8 @@ int select_dumpvar::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
|
||||
Item *item;
|
||||
my_var *mv;
|
||||
LEX_STRING *ls;
|
||||
|
||||
row_count= 0;
|
||||
if (var_list.elements != list.elements)
|
||||
{
|
||||
my_error(ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT, MYF(0));
|
||||
@@ -996,6 +998,7 @@ int select_dumpvar::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool select_dumpvar::send_data(List<Item> &items)
|
||||
{
|
||||
List_iterator_fast<Item_func_set_user_var> li(vars);
|
||||
|
Reference in New Issue
Block a user