mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL3527: 5.1
renamed "--old-mode" to "--old" to prevent ambiguity. "old" now appears in SHOW VARIABLES as a read-only option.
This commit is contained in:
@ -1141,4 +1141,9 @@ EXPLAIN SELECT 1 FROM t2 WHERE a IN
|
|||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index
|
1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index
|
||||||
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 256 Using where
|
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 256 Using where
|
||||||
|
SHOW VARIABLES LIKE 'old';
|
||||||
|
Variable_name Value
|
||||||
|
old OFF
|
||||||
|
SET @@old = off;
|
||||||
|
ERROR HY000: Variable 'old' is a read only variable
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
@ -755,7 +755,8 @@ SET SQL_MODE = '';
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Bug #21174: Index degrades sort performance and
|
# Bug #21174: Index degrades sort performance and
|
||||||
# optimizer does not honor IGNORE INDEX
|
# optimizer does not honor IGNORE INDEX.
|
||||||
|
# a.k.a WL3527.
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (a INT, b INT,
|
CREATE TABLE t1 (a INT, b INT,
|
||||||
PRIMARY KEY (a),
|
PRIMARY KEY (a),
|
||||||
@ -819,4 +820,8 @@ EXPLAIN SELECT a, SUM(b) FROM t2 IGNORE INDEX (a) GROUP BY a LIMIT 2;
|
|||||||
EXPLAIN SELECT 1 FROM t2 WHERE a IN
|
EXPLAIN SELECT 1 FROM t2 WHERE a IN
|
||||||
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
|
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
|
||||||
|
|
||||||
|
SHOW VARIABLES LIKE 'old';
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SET @@old = off;
|
||||||
|
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
@ -6268,7 +6268,7 @@ The minimum value for this variable is 4096.",
|
|||||||
(gptr*) &global_system_variables.net_write_timeout,
|
(gptr*) &global_system_variables.net_write_timeout,
|
||||||
(gptr*) &max_system_variables.net_write_timeout, 0, GET_ULONG,
|
(gptr*) &max_system_variables.net_write_timeout, 0, GET_ULONG,
|
||||||
REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
|
REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
|
||||||
{ "old_mode", OPT_OLD_MODE, "Use compatible behaviour.",
|
{ "old", OPT_OLD_MODE, "Use compatible behavior.",
|
||||||
(gptr*) &global_system_variables.old_mode,
|
(gptr*) &global_system_variables.old_mode,
|
||||||
(gptr*) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG,
|
(gptr*) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
|
@ -356,6 +356,8 @@ sys_var_thd_ulong sys_net_retry_count("net_retry_count",
|
|||||||
&SV::net_retry_count,
|
&SV::net_retry_count,
|
||||||
0, fix_net_retry_count);
|
0, fix_net_retry_count);
|
||||||
sys_var_thd_bool sys_new_mode("new", &SV::new_mode);
|
sys_var_thd_bool sys_new_mode("new", &SV::new_mode);
|
||||||
|
sys_var_bool_ptr_readonly sys_old_mode("old",
|
||||||
|
&global_system_variables.old_mode);
|
||||||
sys_var_thd_bool sys_old_alter_table("old_alter_table",
|
sys_var_thd_bool sys_old_alter_table("old_alter_table",
|
||||||
&SV::old_alter_table);
|
&SV::old_alter_table);
|
||||||
sys_var_thd_bool sys_old_passwords("old_passwords", &SV::old_passwords);
|
sys_var_thd_bool sys_old_passwords("old_passwords", &SV::old_passwords);
|
||||||
@ -942,6 +944,7 @@ SHOW_VAR init_vars[]= {
|
|||||||
{sys_net_retry_count.name, (char*) &sys_net_retry_count, SHOW_SYS},
|
{sys_net_retry_count.name, (char*) &sys_net_retry_count, SHOW_SYS},
|
||||||
{sys_net_write_timeout.name,(char*) &sys_net_write_timeout, SHOW_SYS},
|
{sys_net_write_timeout.name,(char*) &sys_net_write_timeout, SHOW_SYS},
|
||||||
{sys_new_mode.name, (char*) &sys_new_mode, SHOW_SYS},
|
{sys_new_mode.name, (char*) &sys_new_mode, SHOW_SYS},
|
||||||
|
{sys_old_mode.name, (char*) &sys_old_mode, SHOW_SYS},
|
||||||
{sys_old_alter_table.name, (char*) &sys_old_alter_table, SHOW_SYS},
|
{sys_old_alter_table.name, (char*) &sys_old_alter_table, SHOW_SYS},
|
||||||
{sys_old_passwords.name, (char*) &sys_old_passwords, SHOW_SYS},
|
{sys_old_passwords.name, (char*) &sys_old_passwords, SHOW_SYS},
|
||||||
{"open_files_limit", (char*) &open_files_limit, SHOW_LONG},
|
{"open_files_limit", (char*) &open_files_limit, SHOW_LONG},
|
||||||
|
@ -169,6 +169,16 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class sys_var_bool_ptr_readonly :public sys_var_bool_ptr
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
sys_var_bool_ptr_readonly(const char *name_arg, my_bool *value_arg)
|
||||||
|
:sys_var_bool_ptr(name_arg, value_arg)
|
||||||
|
{}
|
||||||
|
bool is_readonly() const { return 1; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class sys_var_str :public sys_var
|
class sys_var_str :public sys_var
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -5772,7 +5772,6 @@ bool setup_tables_and_check_access(THD *thd,
|
|||||||
TABLE_LIST *leaves_tmp= NULL;
|
TABLE_LIST *leaves_tmp= NULL;
|
||||||
bool first_table= true;
|
bool first_table= true;
|
||||||
|
|
||||||
thd->leaf_count= 0;
|
|
||||||
if (setup_tables(thd, context, from_clause, tables,
|
if (setup_tables(thd, context, from_clause, tables,
|
||||||
&leaves_tmp, select_insert))
|
&leaves_tmp, select_insert))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -5790,7 +5789,6 @@ bool setup_tables_and_check_access(THD *thd,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
first_table= 0;
|
first_table= 0;
|
||||||
thd->leaf_count++;
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user