1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-16 00:42:55 +03:00

A fix and a test case for Bug#9359 "Prepared statements take snapshot

of system vars at PREPARE time": implement a special Item
to handle system variables. This item substitutes itself with 
a basic constant containing variable value at fix_fields.
This commit is contained in:
konstantin@mysql.com
2005-07-16 03:29:13 +04:00
parent 0298bc347a
commit e08caeeee2
7 changed files with 112 additions and 51 deletions

View File

@ -358,6 +358,11 @@ inline THD *_current_thd(void)
#include "protocol.h"
#include "sql_udf.h"
class user_var_entry;
enum enum_var_type
{
OPT_DEFAULT, OPT_SESSION, OPT_GLOBAL
};
class sys_var;
#include "item.h"
typedef Comp_creator* (*chooser_compare_func_creator)(bool invert);
/* sql_parse.cc */
@ -1119,12 +1124,9 @@ extern bool sql_cache_init();
extern void sql_cache_free();
extern int sql_cache_hit(THD *thd, char *inBuf, uint length);
/* item.cc */
/* item_func.cc */
Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
LEX_STRING component);
Item *get_system_var(THD *thd, enum_var_type var_type, const char *var_name,
uint length, const char *item_name);
/* item_func.cc */
int get_var_with_binlog(THD *thd, LEX_STRING &name,
user_var_entry **out_entry);
/* log.cc */