diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.h | 1 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 1 | ||||
-rw-r--r-- | sql/lock.cc | 7 | ||||
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/sql_base.cc | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/sql/field.h b/sql/field.h index de9e98290e7..4290f99ea3e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -544,7 +544,6 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } - enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 42cd0a2ee4f..79d695eea1e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -360,7 +360,6 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; - cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) diff --git a/sql/lock.cc b/sql/lock.cc index aed0e1988ea..9063b1273e0 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -74,7 +74,7 @@ extern HASH open_cache; static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table,uint count, bool unlock, TABLE **write_locked); -static int lock_external(TABLE **table,uint count); +static int lock_external(THD *thd, TABLE **table,uint count); static int unlock_external(THD *thd, TABLE **table,uint count); static void print_lock_error(int error); @@ -110,7 +110,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count) } thd->proc_info="System lock"; - if (lock_external(tables,count)) + if (lock_external(thd, tables, count)) { my_free((gptr) sql_lock,MYF(0)); sql_lock=0; @@ -159,11 +159,10 @@ retry: } -static int lock_external(TABLE **tables,uint count) +static int lock_external(THD *thd, TABLE **tables, uint count) { reg1 uint i; int lock_type,error; - THD *thd=current_thd; DBUG_ENTER("lock_external"); for (i=1 ; i <= count ; i++, tables++) diff --git a/sql/set_var.cc b/sql/set_var.cc index 80a0e0625cb..a992ddf6044 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -502,7 +502,9 @@ struct show_var_st init_vars[]= { {"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL}, {"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL}, {sys_slow_launch_time.name, (char*) &sys_slow_launch_time, SHOW_SYS}, +#ifdef HAVE_SYS_UN_H {"socket", (char*) &mysql_unix_port, SHOW_CHAR_PTR}, +#endif {sys_sort_buffer.name, (char*) &sys_sort_buffer, SHOW_SYS}, {"sql_mode", (char*) &opt_sql_mode, SHOW_LONG}, {"table_cache", (char*) &table_cache_size, SHOW_LONG}, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index fa967d645ef..3b46c53f75c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1275,7 +1275,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db, int error; DBUG_ENTER("open_unireg_entry"); - (void) sprintf(path,"%s/%s/%s",mysql_data_home,db,name); + strxmov(path, mysql_data_home, "/", db, "/", name, NullS); if (openfrm(path,alias, (uint) (HA_OPEN_KEYFILE | HA_OPEN_RNDFILE | HA_GET_INDEX | HA_TRY_READ_ONLY), |