Commit ca2b14e7 authored by jimw@mysql.com's avatar jimw@mysql.com

Merge mysql.com:/home/jimw/my/mysql-5.0-12792

into  mysql.com:/home/jimw/my/mysql-5.0-clean
parents e848c7c2 ec00b92f
......@@ -275,7 +275,7 @@ ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with
select @@global.timestamp;
ERROR HY000: Variable 'timestamp' is a SESSION variable
set @@version='';
ERROR HY000: Unknown system variable 'version'
ERROR HY000: Variable 'version' is a read only variable
set @@concurrent_insert=1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
set @@global.sql_auto_is_null=1;
......@@ -384,6 +384,7 @@ select @@sql_max_join_size,@@max_join_size;
set sql_quote_show_create=1;
set sql_safe_updates=1;
set sql_select_limit=1;
set sql_select_limit=default;
set sql_warnings=1;
set global table_cache=100;
set storage_engine=myisam;
......@@ -604,4 +605,11 @@ sql_notes ON
show variables like 'sql_warnings';
Variable_name Value
sql_warnings ON
select @@system_time_zone;
@@system_time_zone
#
select @@version, @@version_comment, @@version_compile_machine,
@@version_compile_os;
@@version @@version_comment @@version_compile_machine @@version_compile_os
# # # #
End of 5.0 tests
......@@ -169,7 +169,7 @@ set collation_connection=NULL;
set global autocommit=1;
--error 1238
select @@global.timestamp;
--error 1193
--error 1238
set @@version='';
--error 1229
set @@concurrent_insert=1;
......@@ -258,6 +258,8 @@ select @@sql_max_join_size,@@max_join_size;
set sql_quote_show_create=1;
set sql_safe_updates=1;
set sql_select_limit=1;
# reset it, so later tests don't get confused
set sql_select_limit=default;
set sql_warnings=1;
set global table_cache=100;
set storage_engine=myisam;
......@@ -491,4 +493,19 @@ set @@sql_notes = 1, @@sql_warnings = 1;
show variables like 'sql_notes';
show variables like 'sql_warnings';
#
# Bug #12792: @@system_time_zone is not SELECTable.
#
# Don't actually output, since it depends on the system
--replace_column 1 #
select @@system_time_zone;
#
# Bug #15684: system variables cannot be SELECTed (e.g. @@version_comment)
#
# Don't actually output, since it depends on the system
--replace_column 1 # 2 # 3 # 4 #
select @@version, @@version_comment, @@version_compile_machine,
@@version_compile_os;
--echo End of 5.0 tests
......@@ -4558,12 +4558,6 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
sys_var *var;
LEX_STRING *base_name, *component_name;
if (component.str == 0 &&
!my_strcasecmp(system_charset_info, name.str, "VERSION"))
return new Item_string(NULL, server_version,
(uint) strlen(server_version),
system_charset_info, DERIVATION_SYSCONST);
if (component.str)
{
base_name= &component;
......
......@@ -380,6 +380,8 @@ sys_var_thd_storage_engine sys_storage_engine("storage_engine",
sys_var_sync_binlog_period sys_sync_binlog_period("sync_binlog", &sync_binlog_period);
#endif
sys_var_bool_ptr sys_sync_frm("sync_frm", &opt_sync_frm);
sys_var_const_str sys_system_time_zone("system_time_zone",
system_time_zone);
sys_var_long_ptr sys_table_cache_size("table_cache",
&table_cache_size);
sys_var_long_ptr sys_table_lock_wait_timeout("table_lock_wait_timeout",
......@@ -394,6 +396,16 @@ sys_var_thd_ulong sys_tmp_table_size("tmp_table_size",
&SV::tmp_table_size);
sys_var_bool_ptr sys_timed_mutexes("timed_mutexes",
&timed_mutexes);
sys_var_const_str sys_version("version", server_version);
#ifdef HAVE_BERKELEY_DB
sys_var_const_str sys_version_bdb("version_bdb", DB_VERSION_STRING);
#endif
sys_var_const_str sys_version_comment("version_comment",
MYSQL_COMPILATION_COMMENT);
sys_var_const_str sys_version_compile_machine("version_compile_machine",
MACHINE_TYPE);
sys_var_const_str sys_version_compile_os("version_compile_os",
SYSTEM_TYPE);
sys_var_thd_ulong sys_net_wait_timeout("wait_timeout",
&SV::net_wait_timeout);
......@@ -549,7 +561,6 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
/* Read only variables */
sys_var_const_str sys_os("version_compile_os", SYSTEM_TYPE);
sys_var_readonly sys_have_innodb("have_innodb", OPT_GLOBAL,
SHOW_CHAR, get_have_innodb);
/* Global read-only variable describing server license */
......@@ -704,6 +715,7 @@ sys_var *sys_variables[]=
&sys_sync_binlog_period,
#endif
&sys_sync_frm,
&sys_system_time_zone,
&sys_table_cache_size,
&sys_table_lock_wait_timeout,
&sys_table_type,
......@@ -716,7 +728,13 @@ sys_var *sys_variables[]=
&sys_trans_alloc_block_size,
&sys_trans_prealloc_size,
&sys_tx_isolation,
&sys_os,
&sys_version,
#ifdef HAVE_BERKELEY_DB
&sys_version_bdb,
#endif
&sys_version_comment,
&sys_version_compile_machine,
&sys_version_compile_os,
#ifdef HAVE_INNOBASE_DB
&sys_innodb_fast_shutdown,
&sys_innodb_max_dirty_pages_pct,
......@@ -1025,13 +1043,14 @@ struct show_var_st init_vars[]= {
{sys_tx_isolation.name, (char*) &sys_tx_isolation, SHOW_SYS},
{sys_updatable_views_with_limit.name,
(char*) &sys_updatable_views_with_limit,SHOW_SYS},
{"version", server_version, SHOW_CHAR},
{sys_version.name, (char*) &sys_version, SHOW_SYS},
#ifdef HAVE_BERKELEY_DB
{"version_bdb", (char*) DB_VERSION_STRING, SHOW_CHAR},
{sys_version_bdb.name, (char*) &sys_version_bdb, SHOW_SYS},
#endif
{"version_comment", (char*) MYSQL_COMPILATION_COMMENT, SHOW_CHAR},
{"version_compile_machine", (char*) MACHINE_TYPE, SHOW_CHAR},
{sys_os.name, (char*) &sys_os, SHOW_SYS},
{sys_version_comment.name, (char*) &sys_version_comment, SHOW_SYS},
{sys_version_compile_machine.name, (char*) &sys_version_compile_machine,
SHOW_SYS},
{sys_version_compile_os.name, (char*) &sys_version_compile_os, SHOW_SYS},
{sys_net_wait_timeout.name, (char*) &sys_net_wait_timeout, SHOW_SYS},
{NullS, NullS, SHOW_LONG}
};
......
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