mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements mysql-test/r/func_sapdb.result: Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) mysql-test/r/type_newdecimal.result: Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) mysql-test/r/user_var.result: More test with SELECT @a:= mysql-test/t/disabled.def: Enable user_var.test for mysql-test/t/user_var.test: More test with SELECT @a:= sql/item.cc: Simple optimization during review of new code sql/item_func.cc: Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) sql/item_timefunc.h: timediff() can return NULL for not NULL arguments sql/sql_base.cc: Remove usage of current_thd() in mysql_make_view() sql/sql_lex.h: Remove usage of current_thd() in mysql_make_view() sql/sql_select.cc: Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements sql/sql_view.cc: Remove usage of current_thd() in mysql_make_view() Simple optimization of new code sql/sql_view.h: Remove usage of current_thd() in mysql_make_view() sql/table.cc: Simple optimization of new code
This commit is contained in:
@ -37,11 +37,11 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
|
||||
TABLE_LIST *table_list, MEM_ROOT *mem_root);
|
||||
static void free_cache_entry(TABLE *entry);
|
||||
static void mysql_rm_tmp_tables(void);
|
||||
static my_bool open_new_frm(const char *path, const char *alias,
|
||||
const char *db, const char *table_name,
|
||||
uint db_stat, uint prgflag,
|
||||
uint ha_open_flags, TABLE *outparam,
|
||||
TABLE_LIST *table_desc, MEM_ROOT *mem_root);
|
||||
static bool open_new_frm(THD *thd, const char *path, const char *alias,
|
||||
const char *db, const char *table_name,
|
||||
uint db_stat, uint prgflag,
|
||||
uint ha_open_flags, TABLE *outparam,
|
||||
TABLE_LIST *table_desc, MEM_ROOT *mem_root);
|
||||
|
||||
extern "C" byte *table_cache_key(const byte *record,uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
@ -1755,7 +1755,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
|
||||
thd->open_options, entry)) &&
|
||||
(error != 5 ||
|
||||
(fn_format(path, path, 0, reg_ext, MY_UNPACK_FILENAME),
|
||||
open_new_frm(path, alias, db, name,
|
||||
open_new_frm(thd, path, alias, db, name,
|
||||
(uint) (HA_OPEN_KEYFILE | HA_OPEN_RNDFILE |
|
||||
HA_GET_INDEX | HA_TRY_READ_ONLY),
|
||||
READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
|
||||
@ -5260,6 +5260,7 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
|
||||
|
||||
SYNOPSIS
|
||||
open_new_frm()
|
||||
THD thread handler
|
||||
path path to .frm
|
||||
alias alias for table
|
||||
db database
|
||||
@ -5273,8 +5274,8 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
|
||||
mem_root temporary MEM_ROOT for parsing
|
||||
*/
|
||||
|
||||
static my_bool
|
||||
open_new_frm(const char *path, const char *alias,
|
||||
static bool
|
||||
open_new_frm(THD *thd, const char *path, const char *alias,
|
||||
const char *db, const char *table_name,
|
||||
uint db_stat, uint prgflag,
|
||||
uint ha_open_flags, TABLE *outparam, TABLE_LIST *table_desc,
|
||||
@ -5296,7 +5297,7 @@ open_new_frm(const char *path, const char *alias,
|
||||
my_error(ER_WRONG_OBJECT, MYF(0), db, table_name, "BASE TABLE");
|
||||
goto err;
|
||||
}
|
||||
if (mysql_make_view(parser, table_desc))
|
||||
if (mysql_make_view(thd, parser, table_desc))
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user