Commit 79218343 authored by bell@laptop.sanja.is.com.ua's avatar bell@laptop.sanja.is.com.ua

Merge laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-constructors-4.1
parents e99441b0 862ff0ed
...@@ -898,7 +898,7 @@ int ha_myisam::index_read(byte * buf, const byte * key, ...@@ -898,7 +898,7 @@ int ha_myisam::index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag) uint key_len, enum ha_rkey_function find_flag)
{ {
statistic_increment(ha_read_key_count,&LOCK_status); statistic_increment(ha_read_key_count,&LOCK_status);
int error=mi_rkey(file,buf,active_index, key, key_len, (enum ha_rkey_function)find_flag); int error=mi_rkey(file,buf,active_index, key, key_len, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0; table->status=error ? STATUS_NOT_FOUND: 0;
return error; return error;
} }
...@@ -907,7 +907,7 @@ int ha_myisam::index_read_idx(byte * buf, uint index, const byte * key, ...@@ -907,7 +907,7 @@ int ha_myisam::index_read_idx(byte * buf, uint index, const byte * key,
uint key_len, enum ha_rkey_function find_flag) uint key_len, enum ha_rkey_function find_flag)
{ {
statistic_increment(ha_read_key_count,&LOCK_status); statistic_increment(ha_read_key_count,&LOCK_status);
int error=mi_rkey(file,buf,index, key, key_len, (enum ha_rkey_function)find_flag); int error=mi_rkey(file,buf,index, key, key_len, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0; table->status=error ? STATUS_NOT_FOUND: 0;
return error; return error;
} }
......
This diff is collapsed.
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
pointer in constructor initialization list, but we need pass pointer pointer in constructor initialization list, but we need pass pointer
to subselect Item class to select_subselect classes constructor. to subselect Item class to select_subselect classes constructor.
*/ */
virtual void init (THD *thd, st_select_lex *select_lex, virtual void init (st_select_lex *select_lex,
select_subselect *result); select_subselect *result);
~Item_subselect(); ~Item_subselect();
...@@ -111,7 +111,7 @@ class Item_singlerow_subselect :public Item_subselect ...@@ -111,7 +111,7 @@ class Item_singlerow_subselect :public Item_subselect
protected: protected:
Item_cache *value, **row; Item_cache *value, **row;
public: public:
Item_singlerow_subselect(THD *thd, st_select_lex *select_lex); Item_singlerow_subselect(st_select_lex *select_lex);
Item_singlerow_subselect() :Item_subselect(), value(0), row (0) {} Item_singlerow_subselect() :Item_subselect(), value(0), row (0) {}
subs_type substype() { return SINGLEROW_SUBS; } subs_type substype() { return SINGLEROW_SUBS; }
...@@ -139,7 +139,7 @@ public: ...@@ -139,7 +139,7 @@ public:
class Item_maxmin_subselect: public Item_singlerow_subselect class Item_maxmin_subselect: public Item_singlerow_subselect
{ {
public: public:
Item_maxmin_subselect(THD *thd, st_select_lex *select_lex, bool max); Item_maxmin_subselect(st_select_lex *select_lex, bool max);
}; };
/* exists subselect */ /* exists subselect */
...@@ -150,7 +150,7 @@ protected: ...@@ -150,7 +150,7 @@ protected:
longlong value; /* value of this item (boolean: exists/not-exists) */ longlong value; /* value of this item (boolean: exists/not-exists) */
public: public:
Item_exists_subselect(THD *thd, st_select_lex *select_lex); Item_exists_subselect(st_select_lex *select_lex);
Item_exists_subselect(): Item_subselect() {} Item_exists_subselect(): Item_subselect() {}
subs_type substype() { return EXISTS_SUBS; } subs_type substype() { return EXISTS_SUBS; }
...@@ -187,7 +187,7 @@ protected: ...@@ -187,7 +187,7 @@ protected:
public: public:
Item_func_not_all *upper_not; // point on NOT before ALL subquery Item_func_not_all *upper_not; // point on NOT before ALL subquery
Item_in_subselect(THD *thd, Item * left_expr, st_select_lex *select_lex); Item_in_subselect(Item * left_expr, st_select_lex *select_lex);
Item_in_subselect() Item_in_subselect()
:Item_exists_subselect(), abort_on_null(0), upper_not(0) {} :Item_exists_subselect(), abort_on_null(0), upper_not(0) {}
...@@ -215,6 +215,7 @@ public: ...@@ -215,6 +215,7 @@ public:
friend class subselect_indexsubquery_engine; friend class subselect_indexsubquery_engine;
}; };
/* ALL/ANY/SOME subselect */ /* ALL/ANY/SOME subselect */
class Item_allany_subselect :public Item_in_subselect class Item_allany_subselect :public Item_in_subselect
{ {
...@@ -222,7 +223,7 @@ protected: ...@@ -222,7 +223,7 @@ protected:
compare_func_creator func; compare_func_creator func;
public: public:
Item_allany_subselect(THD *thd, Item * left_expr, compare_func_creator f, Item_allany_subselect(Item * left_expr, compare_func_creator f,
st_select_lex *select_lex); st_select_lex *select_lex);
// only ALL subquery has upper not // only ALL subquery has upper not
...@@ -230,6 +231,7 @@ public: ...@@ -230,6 +231,7 @@ public:
trans_res select_transformer(JOIN *join); trans_res select_transformer(JOIN *join);
}; };
class subselect_engine: public Sql_alloc class subselect_engine: public Sql_alloc
{ {
protected: protected:
...@@ -240,16 +242,19 @@ protected: ...@@ -240,16 +242,19 @@ protected:
bool maybe_null; /* may be null (first item in select) */ bool maybe_null; /* may be null (first item in select) */
public: public:
subselect_engine(THD *thd, Item_subselect *si, select_subselect *res) subselect_engine(Item_subselect *si, select_subselect *res)
:thd(0)
{ {
result= res; result= res;
item= si; item= si;
this->thd= thd;
res_type= STRING_RESULT; res_type= STRING_RESULT;
maybe_null= 0; maybe_null= 0;
} }
virtual ~subselect_engine() {}; // to satisfy compiler virtual ~subselect_engine() {}; // to satisfy compiler
// set_thd should be called before prepare()
void set_thd(THD *thd) { this->thd= thd; }
THD * get_thd() { return thd; }
virtual int prepare()= 0; virtual int prepare()= 0;
virtual void fix_length_and_dec(Item_cache** row)= 0; virtual void fix_length_and_dec(Item_cache** row)= 0;
virtual int exec()= 0; virtual int exec()= 0;
...@@ -261,6 +266,7 @@ public: ...@@ -261,6 +266,7 @@ public:
bool may_be_null() { return maybe_null; }; bool may_be_null() { return maybe_null; };
}; };
class subselect_single_select_engine: public subselect_engine class subselect_single_select_engine: public subselect_engine
{ {
my_bool prepared; /* simple subselect is prepared */ my_bool prepared; /* simple subselect is prepared */
...@@ -269,7 +275,7 @@ class subselect_single_select_engine: public subselect_engine ...@@ -269,7 +275,7 @@ class subselect_single_select_engine: public subselect_engine
st_select_lex *select_lex; /* corresponding select_lex */ st_select_lex *select_lex; /* corresponding select_lex */
JOIN * join; /* corresponding JOIN structure */ JOIN * join; /* corresponding JOIN structure */
public: public:
subselect_single_select_engine(THD *thd, st_select_lex *select, subselect_single_select_engine(st_select_lex *select,
select_subselect *result, select_subselect *result,
Item_subselect *item); Item_subselect *item);
int prepare(); int prepare();
...@@ -281,12 +287,12 @@ public: ...@@ -281,12 +287,12 @@ public:
void exclude(); void exclude();
}; };
class subselect_union_engine: public subselect_engine class subselect_union_engine: public subselect_engine
{ {
st_select_lex_unit *unit; /* corresponding unit structure */ st_select_lex_unit *unit; /* corresponding unit structure */
public: public:
subselect_union_engine(THD *thd, subselect_union_engine(st_select_lex_unit *u,
st_select_lex_unit *u,
select_subselect *result, select_subselect *result,
Item_subselect *item); Item_subselect *item);
int prepare(); int prepare();
...@@ -298,6 +304,7 @@ public: ...@@ -298,6 +304,7 @@ public:
void exclude(); void exclude();
}; };
struct st_join_table; struct st_join_table;
class subselect_uniquesubquery_engine: public subselect_engine class subselect_uniquesubquery_engine: public subselect_engine
{ {
...@@ -306,25 +313,30 @@ protected: ...@@ -306,25 +313,30 @@ protected:
Item *cond; Item *cond;
public: public:
// constructor can assign THD because it will be called after JOIN::prepare
subselect_uniquesubquery_engine(THD *thd, st_join_table *tab_arg, subselect_uniquesubquery_engine(THD *thd, st_join_table *tab_arg,
Item_subselect *subs, Item *where) Item_subselect *subs, Item *where)
:subselect_engine(thd, subs, 0), tab(tab_arg), cond(where) :subselect_engine(subs, 0), tab(tab_arg), cond(where)
{} {
set_thd(thd);
}
~subselect_uniquesubquery_engine();
int prepare(); int prepare();
void fix_length_and_dec(Item_cache** row); void fix_length_and_dec(Item_cache** row);
int exec(); int exec();
uint cols() { return 1; } uint cols() { return 1; }
bool dependent() { return 1; } bool dependent() { return 1; }
bool uncacheable() { return 1; } bool uncacheable() { return 1; }
void exclude(); void exclude();
static int end_exec(TABLE *table);
}; };
class subselect_indexsubquery_engine: public subselect_uniquesubquery_engine class subselect_indexsubquery_engine: public subselect_uniquesubquery_engine
{ {
bool check_null; bool check_null;
public: public:
// constructor can assign THD because it will be called after JOIN::prepare
subselect_indexsubquery_engine(THD *thd, st_join_table *tab_arg, subselect_indexsubquery_engine(THD *thd, st_join_table *tab_arg,
Item_subselect *subs, Item *where, Item_subselect *subs, Item *where,
bool chk_null) bool chk_null)
......
...@@ -1564,7 +1564,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, ...@@ -1564,7 +1564,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
VOID(pthread_mutex_unlock(&LOCK_log)); VOID(pthread_mutex_unlock(&LOCK_log));
return 0; return 0;
} }
if ((specialflag & SPECIAL_LONG_LOG_FORMAT) || query_start_arg) if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT) || query_start_arg)
{ {
current_time=time(NULL); current_time=time(NULL);
if (current_time != last_time) if (current_time != last_time)
...@@ -1617,7 +1617,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, ...@@ -1617,7 +1617,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
// Save value if we do an insert. // Save value if we do an insert.
if (thd->insert_id_used) if (thd->insert_id_used)
{ {
if (specialflag & SPECIAL_LONG_LOG_FORMAT) if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT))
{ {
end=strmov(end,",insert_id="); end=strmov(end,",insert_id=");
end=longlong10_to_str((longlong) thd->last_insert_id,end,-10); end=longlong10_to_str((longlong) thd->last_insert_id,end,-10);
......
...@@ -262,6 +262,8 @@ my_bool opt_log_slave_updates= 0; ...@@ -262,6 +262,8 @@ my_bool opt_log_slave_updates= 0;
my_bool opt_console= 0, opt_bdb, opt_innodb, opt_isam; my_bool opt_console= 0, opt_bdb, opt_innodb, opt_isam;
my_bool opt_readonly, use_temp_pool, relay_log_purge; my_bool opt_readonly, use_temp_pool, relay_log_purge;
my_bool opt_secure_auth= 0; my_bool opt_secure_auth= 0;
my_bool opt_short_log_format= 0;
my_bool opt_log_queries_not_using_indexes= 0;
volatile bool mqh_used = 0; volatile bool mqh_used = 0;
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options; uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
...@@ -3455,7 +3457,7 @@ enum options ...@@ -3455,7 +3457,7 @@ enum options
OPT_SKIP_PRIOR, OPT_BIG_TABLES, OPT_SKIP_PRIOR, OPT_BIG_TABLES,
OPT_STANDALONE, OPT_ONE_THREAD, OPT_STANDALONE, OPT_ONE_THREAD,
OPT_CONSOLE, OPT_LOW_PRIORITY_UPDATES, OPT_CONSOLE, OPT_LOW_PRIORITY_UPDATES,
OPT_SKIP_HOST_CACHE, OPT_LONG_FORMAT, OPT_SKIP_HOST_CACHE, OPT_SHORT_LOG_FORMAT,
OPT_FLUSH, OPT_SAFE, OPT_FLUSH, OPT_SAFE,
OPT_BOOTSTRAP, OPT_SKIP_SHOW_DB, OPT_BOOTSTRAP, OPT_SKIP_SHOW_DB,
OPT_TABLE_TYPE, OPT_INIT_FILE, OPT_TABLE_TYPE, OPT_INIT_FILE,
...@@ -3562,7 +3564,8 @@ enum options ...@@ -3562,7 +3564,8 @@ enum options
OPT_DEFAULT_WEEK_FORMAT, OPT_DEFAULT_WEEK_FORMAT,
OPT_GROUP_CONCAT_MAX_LEN, OPT_GROUP_CONCAT_MAX_LEN,
OPT_DEFAULT_COLLATION, OPT_DEFAULT_COLLATION,
OPT_SECURE_AUTH OPT_SECURE_AUTH,
OPT_LOG_QUERIES_NOT_USING_INDEXES
}; };
...@@ -3769,9 +3772,17 @@ Disable with --skip-bdb (will save memory).", ...@@ -3769,9 +3772,17 @@ Disable with --skip-bdb (will save memory).",
"Log slow queries to this log file. Defaults logging to hostname-slow.log file.", "Log slow queries to this log file. Defaults logging to hostname-slow.log file.",
(gptr*) &opt_slow_logname, (gptr*) &opt_slow_logname, 0, GET_STR, OPT_ARG, (gptr*) &opt_slow_logname, (gptr*) &opt_slow_logname, 0, GET_STR, OPT_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"log-long-format", OPT_LONG_FORMAT, {"log-long-format", '0',
"Log some extra information to update log.", 0, 0, 0, GET_NO_ARG, NO_ARG, "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-short-format", OPT_SHORT_LOG_FORMAT,
"Don't log extra information to update and slow-query logs.",
(gptr*) &opt_short_log_format, (gptr*) &opt_short_log_format,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-queries-not-using-indexes", OPT_LOG_QUERIES_NOT_USING_INDEXES,
"Log queries that are executed without benefit of any index.",
(gptr*) &opt_log_queries_not_using_indexes, (gptr*) &opt_log_queries_not_using_indexes,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-slave-updates", OPT_LOG_SLAVE_UPDATES, {"log-slave-updates", OPT_LOG_SLAVE_UPDATES,
"Tells the slave to log the updates from the slave thread to the binary log. You will need to turn it on if you plan to daisy-chain the slaves.", "Tells the slave to log the updates from the slave thread to the binary log. You will need to turn it on if you plan to daisy-chain the slaves.",
(gptr*) &opt_log_slave_updates, (gptr*) &opt_log_slave_updates, 0, GET_BOOL, (gptr*) &opt_log_slave_updates, (gptr*) &opt_log_slave_updates, 0, GET_BOOL,
...@@ -5166,9 +5177,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -5166,9 +5177,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case (int) OPT_SKIP_RESOLVE: case (int) OPT_SKIP_RESOLVE:
opt_specialflag|=SPECIAL_NO_RESOLVE; opt_specialflag|=SPECIAL_NO_RESOLVE;
break; break;
case (int) OPT_LONG_FORMAT:
opt_specialflag|=SPECIAL_LONG_LOG_FORMAT;
break;
case (int) OPT_SKIP_NETWORKING: case (int) OPT_SKIP_NETWORKING:
opt_disable_networking=1; opt_disable_networking=1;
mysqld_port=0; mysqld_port=0;
...@@ -5508,6 +5516,10 @@ static void get_options(int argc,char **argv) ...@@ -5508,6 +5516,10 @@ static void get_options(int argc,char **argv)
keybuff_size= (((KEY_CACHE *) find_named(&key_caches, "default", 7, keybuff_size= (((KEY_CACHE *) find_named(&key_caches, "default", 7,
&not_used))->size); &not_used))->size);
} }
if (opt_short_log_format)
opt_specialflag|= SPECIAL_SHORT_LOG_FORMAT;
if (opt_log_queries_not_using_indexes)
opt_specialflag|= SPECIAL_LOG_QUERIES_NOT_USING_INDEXES;
} }
...@@ -5622,14 +5634,16 @@ static uint set_maximum_open_files(uint max_file_limit) ...@@ -5622,14 +5634,16 @@ static uint set_maximum_open_files(uint max_file_limit)
rlimit.rlim_cur=rlimit.rlim_max=max_file_limit; rlimit.rlim_cur=rlimit.rlim_max=max_file_limit;
if (setrlimit(RLIMIT_NOFILE,&rlimit)) if (setrlimit(RLIMIT_NOFILE,&rlimit))
{ {
sql_print_error("Warning: setrlimit couldn't increase number of open files to more than %lu (request: %u)", if (global_system_variables.log_warnings)
old_cur, max_file_limit); /* purecov: inspected */ sql_print_error("Warning: setrlimit couldn't increase number of open files to more than %lu (request: %u)",
old_cur, max_file_limit); /* purecov: inspected */
max_file_limit=old_cur; max_file_limit=old_cur;
} }
else else
{ {
(void) getrlimit(RLIMIT_NOFILE,&rlimit); (void) getrlimit(RLIMIT_NOFILE,&rlimit);
if ((uint) rlimit.rlim_cur != max_file_limit) if ((uint) rlimit.rlim_cur != max_file_limit &&
global_system_variables.log_warnings)
sql_print_error("Warning: setrlimit returned ok, but didn't change limits. Max open files is %ld (request: %u)", sql_print_error("Warning: setrlimit returned ok, but didn't change limits. Max open files is %ld (request: %u)",
(ulong) rlimit.rlim_cur, (ulong) rlimit.rlim_cur,
max_file_limit); /* purecov: inspected */ max_file_limit); /* purecov: inspected */
......
...@@ -1566,7 +1566,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1566,7 +1566,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->variables.long_query_time || thd->variables.long_query_time ||
((thd->lex.select_lex.options & ((thd->lex.select_lex.options &
(QUERY_NO_INDEX_USED | QUERY_NO_GOOD_INDEX_USED)) && (QUERY_NO_INDEX_USED | QUERY_NO_GOOD_INDEX_USED)) &&
(specialflag & SPECIAL_LONG_LOG_FORMAT))) (specialflag & SPECIAL_LOG_QUERIES_NOT_USING_INDEXES)))
{ {
long_query_count++; long_query_count++;
mysql_slow_log.write(thd, thd->query, thd->query_length, start_of_query); mysql_slow_log.write(thd, thd->query, thd->query_length, start_of_query);
......
...@@ -6661,7 +6661,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, ...@@ -6661,7 +6661,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
usable_keys=0; usable_keys=0;
break; break;
} }
usable_keys&=((Item_field*) (*tmp_order->item))->field->part_of_sortkey; if (!(usable_keys&= (((Item_field*) (*tmp_order->item))->field->
part_of_sortkey)))
break; // No usable keys
} }
ref_key= -1; ref_key= -1;
......
...@@ -2238,10 +2238,10 @@ expr_expr: ...@@ -2238,10 +2238,10 @@ expr_expr:
| expr NOT IN_SYM '(' expr_list ')' | expr NOT IN_SYM '(' expr_list ')'
{ $5->push_front($1); $$= new Item_func_not(new Item_func_in(*$5)); } { $5->push_front($1); $$= new Item_func_not(new Item_func_in(*$5)); }
| expr IN_SYM in_subselect | expr IN_SYM in_subselect
{ $$= new Item_in_subselect(YYTHD, $1, $3); } { $$= new Item_in_subselect($1, $3); }
| expr NOT IN_SYM in_subselect | expr NOT IN_SYM in_subselect
{ {
$$= new Item_func_not(new Item_in_subselect(YYTHD, $1, $4)); $$= new Item_func_not(new Item_in_subselect($1, $4));
} }
| expr BETWEEN_SYM no_and_expr AND expr | expr BETWEEN_SYM no_and_expr AND expr
{ $$= new Item_func_between($1,$3,$5); } { $$= new Item_func_between($1,$3,$5); }
...@@ -2263,7 +2263,7 @@ expr_expr: ...@@ -2263,7 +2263,7 @@ expr_expr:
| expr comp_op all_or_any in_subselect %prec EQ | expr comp_op all_or_any in_subselect %prec EQ
{ {
Item_allany_subselect *it= Item_allany_subselect *it=
new Item_allany_subselect(YYTHD, $1, (*$2)($3), $4); new Item_allany_subselect($1, (*$2)($3), $4);
if ($3) if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */ $$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else else
...@@ -2309,7 +2309,7 @@ no_in_expr: ...@@ -2309,7 +2309,7 @@ no_in_expr:
| no_in_expr comp_op all_or_any in_subselect %prec EQ | no_in_expr comp_op all_or_any in_subselect %prec EQ
{ {
Item_allany_subselect *it= Item_allany_subselect *it=
new Item_allany_subselect(YYTHD, $1, (*$2)($3), $4); new Item_allany_subselect($1, (*$2)($3), $4);
if ($3) if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */ $$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else else
...@@ -2340,10 +2340,10 @@ no_and_expr: ...@@ -2340,10 +2340,10 @@ no_and_expr:
| no_and_expr NOT IN_SYM '(' expr_list ')' | no_and_expr NOT IN_SYM '(' expr_list ')'
{ $5->push_front($1); $$= new Item_func_not(new Item_func_in(*$5)); } { $5->push_front($1); $$= new Item_func_not(new Item_func_in(*$5)); }
| no_and_expr IN_SYM in_subselect | no_and_expr IN_SYM in_subselect
{ $$= new Item_in_subselect(YYTHD, $1, $3); } { $$= new Item_in_subselect($1, $3); }
| no_and_expr NOT IN_SYM in_subselect | no_and_expr NOT IN_SYM in_subselect
{ {
$$= new Item_func_not(new Item_in_subselect(YYTHD, $1, $4)); $$= new Item_func_not(new Item_in_subselect($1, $4));
} }
| no_and_expr BETWEEN_SYM no_and_expr AND expr | no_and_expr BETWEEN_SYM no_and_expr AND expr
{ $$= new Item_func_between($1,$3,$5); } { $$= new Item_func_between($1,$3,$5); }
...@@ -2364,7 +2364,7 @@ no_and_expr: ...@@ -2364,7 +2364,7 @@ no_and_expr:
| no_and_expr comp_op all_or_any in_subselect %prec EQ | no_and_expr comp_op all_or_any in_subselect %prec EQ
{ {
Item_allany_subselect *it= Item_allany_subselect *it=
new Item_allany_subselect(YYTHD, $1, (*$2)($3), $4); new Item_allany_subselect($1, (*$2)($3), $4);
if ($3) if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */ $$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else else
...@@ -5356,9 +5356,8 @@ singlerow_subselect: ...@@ -5356,9 +5356,8 @@ singlerow_subselect:
singlerow_subselect_init: singlerow_subselect_init:
select_init2 select_init2
{ {
$$= new Item_singlerow_subselect(YYTHD, $$= new Item_singlerow_subselect(Lex->current_select->
Lex->current_select->master_unit()-> master_unit()->first_select());
first_select());
}; };
exists_subselect: exists_subselect:
...@@ -5371,9 +5370,8 @@ exists_subselect: ...@@ -5371,9 +5370,8 @@ exists_subselect:
exists_subselect_init: exists_subselect_init:
select_init2 select_init2
{ {
$$= new Item_exists_subselect(YYTHD, $$= new Item_exists_subselect(Lex->current_select->master_unit()->
Lex->current_select->master_unit()-> first_select());
first_select());
}; };
in_subselect: in_subselect:
......
...@@ -107,8 +107,9 @@ ...@@ -107,8 +107,9 @@
#define SPECIAL_NO_PRIOR 128 /* Don't prioritize threads */ #define SPECIAL_NO_PRIOR 128 /* Don't prioritize threads */
#define SPECIAL_BIG_SELECTS 256 /* Don't use heap tables */ #define SPECIAL_BIG_SELECTS 256 /* Don't use heap tables */
#define SPECIAL_NO_HOST_CACHE 512 /* Don't cache hosts */ #define SPECIAL_NO_HOST_CACHE 512 /* Don't cache hosts */
#define SPECIAL_LONG_LOG_FORMAT 1024 #define SPECIAL_SHORT_LOG_FORMAT 1024
#define SPECIAL_SAFE_MODE 2048 #define SPECIAL_SAFE_MODE 2048
#define SPECIAL_LOG_QUERIES_NOT_USING_INDEXES 4096 /* Log q not using indexes */
/* Extern defines */ /* Extern defines */
#define store_record(A,B) bmove_align((A)->B,(A)->record[0],(size_t) (A)->reclength) #define store_record(A,B) bmove_align((A)->B,(A)->record[0],(size_t) (A)->reclength)
......
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