Commit 5d7607f3 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: style fixes, sql_join_cache.cc

parent 8246b0ac
...@@ -5609,8 +5609,8 @@ set join_cache_level = default; ...@@ -5609,8 +5609,8 @@ set join_cache_level = default;
set optimizer_switch=@tmp_optimizer_switch; set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
# #
# Bug #925985: LEFT JOIN with optimize_join_buffer_size=off + # lp:925985 LEFT JOIN with optimize_join_buffer_size=off +
# join_buffer_size > join_buffer_space_limit # join_buffer_size > join_buffer_space_limit
# #
CREATE TABLE t1 (a int); CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (5), (3); INSERT INTO t1 VALUES (5), (3);
......
...@@ -3587,8 +3587,8 @@ set optimizer_switch=@tmp_optimizer_switch; ...@@ -3587,8 +3587,8 @@ set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
--echo # --echo #
--echo # Bug #925985: LEFT JOIN with optimize_join_buffer_size=off + --echo # lp:925985 LEFT JOIN with optimize_join_buffer_size=off +
--echo # join_buffer_size > join_buffer_space_limit --echo # join_buffer_size > join_buffer_space_limit
--echo # --echo #
CREATE TABLE t1 (a int); CREATE TABLE t1 (a int);
......
This diff is collapsed.
...@@ -10752,6 +10752,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ...@@ -10752,6 +10752,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
uint bufsz= 4096; uint bufsz= 4096;
JOIN_CACHE *prev_cache=0; JOIN_CACHE *prev_cache=0;
JOIN *join= tab->join; JOIN *join= tab->join;
MEM_ROOT *root= join->thd->mem_root;
uint cache_level= tab->used_join_cache_level; uint cache_level= tab->used_join_cache_level;
bool force_unlinked_cache= bool force_unlinked_cache=
!(join->allowed_join_cache_types & JOIN_CACHE_INCREMENTAL_BIT); !(join->allowed_join_cache_types & JOIN_CACHE_INCREMENTAL_BIT);
...@@ -10871,7 +10872,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ...@@ -10871,7 +10872,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
case JT_ALL: case JT_ALL:
if (cache_level == 1) if (cache_level == 1)
prev_cache= 0; prev_cache= 0;
if ((tab->cache= new JOIN_CACHE_BNL(join, tab, prev_cache)) && if ((tab->cache= new (root) JOIN_CACHE_BNL(join, tab, prev_cache)) &&
!tab->cache->init(options & SELECT_DESCRIBE)) !tab->cache->init(options & SELECT_DESCRIBE))
{ {
tab->icp_other_tables_ok= FALSE; tab->icp_other_tables_ok= FALSE;
...@@ -10906,7 +10907,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ...@@ -10906,7 +10907,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
goto no_join_cache; goto no_join_cache;
if (cache_level == 3) if (cache_level == 3)
prev_cache= 0; prev_cache= 0;
if ((tab->cache= new JOIN_CACHE_BNLH(join, tab, prev_cache)) && if ((tab->cache= new (root) JOIN_CACHE_BNLH(join, tab, prev_cache)) &&
!tab->cache->init(options & SELECT_DESCRIBE)) !tab->cache->init(options & SELECT_DESCRIBE))
{ {
tab->icp_other_tables_ok= FALSE; tab->icp_other_tables_ok= FALSE;
...@@ -10927,7 +10928,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, ...@@ -10927,7 +10928,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
{ {
if (cache_level == 5) if (cache_level == 5)
prev_cache= 0; prev_cache= 0;
if ((tab->cache= new JOIN_CACHE_BKA(join, tab, flags, prev_cache)) && if ((tab->cache= new (root) JOIN_CACHE_BKA(join, tab, flags, prev_cache)) &&
!tab->cache->init(options & SELECT_DESCRIBE)) !tab->cache->init(options & SELECT_DESCRIBE))
return (6 - MY_TEST(!prev_cache)); return (6 - MY_TEST(!prev_cache));
goto no_join_cache; goto no_join_cache;
...@@ -10936,10 +10937,10 @@ uint check_join_cache_usage(JOIN_TAB *tab, ...@@ -10936,10 +10937,10 @@ uint check_join_cache_usage(JOIN_TAB *tab,
{ {
if (cache_level == 7) if (cache_level == 7)
prev_cache= 0; prev_cache= 0;
if ((tab->cache= new JOIN_CACHE_BKAH(join, tab, flags, prev_cache)) && if ((tab->cache= new (root) JOIN_CACHE_BKAH(join, tab, flags, prev_cache)) &&
!tab->cache->init(options & SELECT_DESCRIBE)) !tab->cache->init(options & SELECT_DESCRIBE))
{ {
tab->idx_cond_fact_out= FALSE; tab->idx_cond_fact_out= FALSE;
return (8 - MY_TEST(!prev_cache)); return (8 - MY_TEST(!prev_cache));
} }
goto no_join_cache; goto no_join_cache;
......
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