Commit fab84ec9 authored by Sergei Golubchik's avatar Sergei Golubchik

removes references to a sysvar that disappeared 6 years ago

parent 32efbaa1
......@@ -40,7 +40,7 @@ The following specify which files/extra groups are read (specified before remain
--big-tables Old variable, which if set to 1, allows large result sets
by saving all temporary sets to disk, avoiding 'table
full' errors. No longer needed, as the server now handles
this automatically. sql_big_tables is a synonym.
this automatically.
--bind-address=name IP address to bind to.
--binlog-annotate-row-events
Tells the master to annotate RBR events with the
......
......@@ -1860,7 +1860,7 @@ Variable_name Value
Subquery_cache_hit 0
Subquery_cache_miss 4
drop table t1;
#test of sql_big_tables switch and outer table reference in subquery with grouping
#test of big_tables switch and outer table reference in subquery with grouping
set big_tables=1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3);
......
......@@ -428,7 +428,7 @@ select a, a in (select a from t1 where -1 < benchmark(a,100)) from t1 as ext;
show status like "subquery_cache%";
drop table t1;
--echo #test of sql_big_tables switch and outer table reference in subquery with grouping
--echo #test of big_tables switch and outer table reference in subquery with grouping
set big_tables=1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3);
......
SET @session_start_value = @@session.sql_big_tables;
SELECT @session_start_value;
@session_start_value
0
'#--------------------FN_DYNVARS_154_01------------------------#'
SET @@session.sql_big_tables = 0;
SET @@session.sql_big_tables = DEFAULT;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
SET @@session.sql_big_tables = 1;
SET @@session.sql_big_tables = DEFAULT;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
'#---------------------FN_DYNVARS_154_02-------------------------#'
SET sql_big_tables = 1;
SELECT @@sql_big_tables;
@@sql_big_tables
1
SELECT session.sql_big_tables;
ERROR 42S02: Unknown table 'session' in field list
SELECT local.sql_big_tables;
ERROR 42S02: Unknown table 'local' in field list
SET session sql_big_tables = 0;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
'#--------------------FN_DYNVARS_154_03------------------------#'
SET @@session.sql_big_tables = 0;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
SET @@session.sql_big_tables = 1;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
1
'#--------------------FN_DYNVARS_154_04-------------------------#'
SET @@session.sql_big_tables = -1;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '-1'
SET @@session.sql_big_tables = 2;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '2'
SET @@session.sql_big_tables = "T";
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'T'
SET @@session.sql_big_tables = "Y";
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'Y'
SET @@session.sql_big_tables = TRÜE;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'TRÜE'
SET @@session.sql_big_tables = ÕN;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'ÕN'
SET @@session.sql_big_tables = OF;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'OF'
SET @@session.sql_big_tables = ÓFF;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'ÓFF'
SET @@session.sql_big_tables = '¹';
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '¹'
SET @@session.sql_big_tables = NO;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_154_05----------------------------#'
SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
SELECT @@global.sql_big_tables;
@@global.sql_big_tables
1
SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
SELECT @@global.sql_big_tables;
@@global.sql_big_tables
0
'#----------------------FN_DYNVARS_154_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='sql_big_tables';
count(VARIABLE_VALUE)
1
'#----------------------FN_DYNVARS_154_07------------------------#'
SELECT IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_big_tables';
IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_big_tables';
VARIABLE_VALUE
ON
'#---------------------FN_DYNVARS_154_08-------------------------#'
SET @@session.sql_big_tables = OFF;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
SET @@session.sql_big_tables = ON;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
1
'#---------------------FN_DYNVARS_154_09----------------------#'
SET @@session.sql_big_tables = TRUE;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
1
SET @@session.sql_big_tables = FALSE;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
SET @@session.sql_big_tables = @session_start_value;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
0
** Setup **
SET @old_big_tables = @@SESSION.sql_big_tables;
CREATE TABLE t1(a varchar(20), b varchar(20));
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
'#--------------------FN_DYNVARS_155_01-------------------------#'
SET SESSION sql_big_tables = 1;
SET @diskTableCount = 0;
SET @tempTableCount = 0;
select count(a), b from t1 group by b;
count(a) b
5 bb
SET @diskTableCount = 1 - @diskTableCount;
SET @tempTableCount = 1 - @tempTableCount;
SELECT @diskTableCount;
@diskTableCount
1
1 Expected
SELECT @tempTableCount;
@tempTableCount
1
1 Expected
'#--------------------FN_DYNVARS_155_02-------------------------#'
SET SESSION sql_big_tables = 0;
SET @diskTableCount = 1;
SET @tempTableCount = 1;
SELECT * FROM (SELECT ta.b as a, tb.a as b FROM t1 as ta INNER JOIN t1 as tb ON ta.a = tb.a) sub;
a b
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
bb aa
SET @diskTableCount = 1 - @diskTableCount;
SET @tempTableCount = 2 - @tempTableCount;
SELECT @diskTableCount;
@diskTableCount
0
0 Expected
SELECT @tempTableCount;
@tempTableCount
1
1 Expected
'#--------------------FN_DYNVARS_155_03-------------------------#'
** Connecting con_int1 using root **
** Connection con_int1 **
SELECT @@SESSION.sql_big_tables;
@@SESSION.sql_big_tables
0
0 / FALSE Expected;
SET SESSION sql_big_tables = FALSE;
** Connecting con_int2 using root **
** Connection con_int2 **
SELECT @@SESSION.sql_big_tables;
@@SESSION.sql_big_tables
0
0 / FALSE Expected;
SET SESSION sql_big_tables = TRUE;
** Connection con_int1 **
SELECT @@SESSION.sql_big_tables;
@@SESSION.sql_big_tables
0
0 / FALSE Expected;
** Connection con_int2 **
SELECT @@SESSION.sql_big_tables;
@@SESSION.sql_big_tables
1
1 / TRUE Expected;
** Connection default **
Disconnecting Connections con_int1, con_int2
SET SESSION sql_big_tables = @old_big_tables;
DROP TABLE t1;
......@@ -306,7 +306,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......
......@@ -306,7 +306,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......
......@@ -2335,7 +2335,7 @@ multi_update::initialize_tables(JOIN *join)
tmp_param->field_count= temp_fields.elements;
tmp_param->func_count= temp_fields.elements - 1;
calc_group_buffer(tmp_param, &group);
/* small table, ignore SQL_BIG_TABLES */
/* small table, ignore @@big_tables */
my_bool save_big_tables= thd->variables.big_tables;
thd->variables.big_tables= FALSE;
tmp_tables[cnt]=create_tmp_table(thd, tmp_param, temp_fields,
......
......@@ -4160,8 +4160,7 @@ export sys_var *Sys_autocommit_ptr= &Sys_autocommit; // for sql_yacc.yy
static Sys_var_mybool Sys_big_tables(
"big_tables", "Old variable, which if set to 1, allows large result sets "
"by saving all temporary sets to disk, avoiding 'table full' errors. No "
"longer needed, as the server now handles this automatically. "
"sql_big_tables is a synonym.",
"longer needed, as the server now handles this automatically.",
SESSION_VAR(big_tables), CMD_LINE(OPT_ARG), DEFAULT(FALSE));
static Sys_var_bit Sys_big_selects(
......
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