summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-06 10:43:35 +0200
committerunknown <monty@mysql.com>2004-03-06 10:43:35 +0200
commitaa20bd9e8c44fbc14396fa418983b8c515b4e8ad (patch)
tree1cf950921cf3e82b17e59b8516f0db0627a429a2 /sql/set_var.h
parent0b751edc57385e125415a3d0aa8f37ad772e7178 (diff)
downloadmariadb-git-aa20bd9e8c44fbc14396fa418983b8c515b4e8ad.tar.gz
Ensure that one can't from the command line set a variable too small. (Bug #2710)
Allow one to force lower_case_table_names to 0, even if the file system is case insensitive. This fixes some issues on Mac OS X (Bug #2994) Added variables "lower_case_file_system", "version_compile_os" and "license" mysql-test/t/lowercase_table3-master.opt: Rename: mysql-test/t/lowercase_table2-master.opt -> mysql-test/t/lowercase_table3-master.opt mysys/my_getopt.c: Ensure that one can't from the command line set a variable too small (could happen when sub_size was set) sql/mysql_priv.h: Added lower_case_file_system sql/mysqld.cc: Allow one to force lower_case_table_names to 0, even if the file system is case insensitive sql/set_var.cc: Added variable "lower_case_file_system" Added variable "version_compile_os" Added variable "license" sql/set_var.h: Added support for read only strings sql/sql_select.cc: Make join optimizer killable
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index e22c55276a7..08e3f20fdb4 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -156,6 +156,31 @@ public:
};
+class sys_var_const_str :public sys_var
+{
+public:
+ char *value; // Pointer to const value
+ sys_var_const_str(const char *name_arg, const char *value_arg)
+ :sys_var(name_arg), value((char*) value_arg)
+ {}
+ bool check(THD *thd, set_var *var)
+ {
+ return 1;
+ }
+ bool update(THD *thd, set_var *var)
+ {
+ return 1;
+ }
+ SHOW_TYPE type() { return SHOW_CHAR; }
+ byte *value_ptr(THD *thd, enum_var_type type) { return (byte*) value; }
+ bool check_update_type(Item_result type)
+ {
+ return 1;
+ }
+ bool check_default(enum_var_type type) { return 1; }
+};
+
+
class sys_var_enum :public sys_var
{
uint *value;