diff options
-rw-r--r-- | VC++Files/mysql.dsw | 9 | ||||
-rw-r--r-- | VC++Files/mysys/mysys.dsp | 4 | ||||
-rw-r--r-- | client/mysqlcheck.c | 2 | ||||
-rw-r--r-- | client/mysqltest.c | 13 | ||||
-rw-r--r-- | include/keycache.h | 3 | ||||
-rw-r--r-- | include/m_ctype.h | 8 | ||||
-rw-r--r-- | include/my_base.h | 1 | ||||
-rw-r--r-- | myisam/mi_keycache.c | 6 | ||||
-rw-r--r-- | mysql-test/r/count_distinct3.result | 1 | ||||
-rw-r--r-- | mysql-test/r/rpl_change_master.result | 12 | ||||
-rw-r--r-- | mysql-test/t/count_distinct3.test | 3 | ||||
-rw-r--r-- | mysql-test/t/rpl_change_master.test | 2 | ||||
-rw-r--r-- | mysys/default.c | 1 | ||||
-rw-r--r-- | mysys/mf_keycache.c | 8 | ||||
-rw-r--r-- | mysys/my_getopt.c | 4 | ||||
-rw-r--r-- | sql/ha_myisam.cc | 11 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item_timefunc.cc | 30 | ||||
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 1 | ||||
-rw-r--r-- | sql/sql_repl.cc | 5 | ||||
-rw-r--r-- | sql/sql_select.h | 22 | ||||
-rw-r--r-- | sql/sql_table.cc | 3 | ||||
-rw-r--r-- | strings/ctype-tis620.c | 8 |
24 files changed, 96 insertions, 65 deletions
diff --git a/VC++Files/mysql.dsw b/VC++Files/mysql.dsw index 4ff8c1df3fc..ea391362b84 100644 --- a/VC++Files/mysql.dsw +++ b/VC++Files/mysql.dsw @@ -251,6 +251,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name strings End Project Dependency + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency }}} ############################################################################### @@ -275,6 +278,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name strings End Project Dependency + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency }}} ############################################################################### @@ -311,6 +317,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name strings End Project Dependency + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency }}} ############################################################################### diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp index 1867a3d02d4..3f9d37b395f 100644 --- a/VC++Files/mysys/mysys.dsp +++ b/VC++Files/mysys/mysys.dsp @@ -298,6 +298,10 @@ SOURCE=.\my_copy.c # End Source File # Begin Source File +SOURCE=.\my_crc32.c +# End Source File +# Begin Source File + SOURCE=.\my_create.c # End Source File # Begin Source File diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 00767ae98a7..1768d948373 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -309,6 +309,8 @@ static int get_options(int *argc, char ***argv) else what_to_do = DO_CHECK; } + + /* TODO: This variable is not yet used */ if (!(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); diff --git a/client/mysqltest.c b/client/mysqltest.c index 6a7f4ab7cac..e3e3d19984a 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -118,7 +118,6 @@ static FILE** cur_file; static FILE** file_stack_end; static uint lineno_stack[MAX_INCLUDE_DEPTH]; static char TMPDIR[FN_REFLEN]; -static int *block_ok_stack_end; static int *cur_block, *block_stack_end; static int block_stack[BLOCK_STACK_DEPTH]; @@ -1495,7 +1494,6 @@ int do_connect(struct st_query* q) char* p=q->first_argument; char buff[FN_REFLEN]; int con_port; - int con_error; int free_con_sock = 0; DBUG_ENTER("do_connect"); @@ -1560,9 +1558,9 @@ int do_connect(struct st_query* q) /* Special database to allow one to connect without a database name */ if (con_db && !strcmp(con_db,"*NO-ONE*")) con_db=0; - if ((con_error = safe_connect(&next_con->mysql, con_host, - con_user, con_pass, - con_db, con_port, con_sock ? con_sock: 0))) + if ((safe_connect(&next_con->mysql, con_host, + con_user, con_pass, + con_db, con_port, con_sock ? con_sock: 0))) die("Could not open connection '%s': %s", con_name, mysql_error(&next_con->mysql)); @@ -2018,12 +2016,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), int parse_args(int argc, char **argv) { - int ho_error; - load_defaults("my",load_default_groups,&argc,&argv); default_argv= argv; - if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) + if ((handle_options(&argc, &argv, my_long_options, get_one_option))) exit(1); if (argc > 1) @@ -2454,7 +2450,6 @@ int main(int argc, char **argv) memset(block_stack, 0, sizeof(block_stack)); block_stack_end = block_stack + BLOCK_STACK_DEPTH; memset(block_ok_stack, 0, sizeof(block_stack)); - block_ok_stack_end = block_ok_stack + BLOCK_STACK_DEPTH; cur_block = block_stack; block_ok = block_ok_stack; *block_ok = 1; diff --git a/include/keycache.h b/include/keycache.h index 824c5874ffc..340ab881fee 100644 --- a/include/keycache.h +++ b/include/keycache.h @@ -91,9 +91,6 @@ typedef struct st_key_cache ulong global_cache_read; /* number of reads from files to the cache */ int blocks; /* max number of blocks in the cache */ my_bool in_init; /* Set to 1 in MySQL during init/resize */ - - /* optional call back function */ - void (*action)(struct st_key_cache *); } KEY_CACHE; /* The default key cache */ diff --git a/include/m_ctype.h b/include/m_ctype.h index e2b2f7f1668..0228b359111 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -335,6 +335,14 @@ uint my_instr_mb(struct charset_info_st *, extern my_bool my_parse_charset_xml(const char *bug, uint len, int (*add)(CHARSET_INFO *cs)); +#undef _U +#undef _L +#undef _NMR +#undef _SPC +#undef _PNT +#undef _CTR +#undef _B +#undef _X #define _U 01 /* Upper case */ #define _L 02 /* Lower case */ diff --git a/include/my_base.h b/include/my_base.h index 1bd0f47afa4..25521d7b13d 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -46,7 +46,6 @@ #define HA_OPEN_DELAY_KEY_WRITE 8 /* Don't update index */ #define HA_OPEN_ABORT_IF_CRASHED 16 #define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */ -#define HA_OPEN_TO_ASSIGN 64 /* Open for key cache assignment */ /* The following is parameter to ha_rkey() how to use key */ diff --git a/myisam/mi_keycache.c b/myisam/mi_keycache.c index 2c808c68c98..fc51f331d76 100644 --- a/myisam/mi_keycache.c +++ b/myisam/mi_keycache.c @@ -93,6 +93,11 @@ int mi_assign_to_key_cache(MI_INFO *info, (void) flush_key_blocks(key_cache, share->kfile, FLUSH_REMOVE); /* + ensure that setting the key cache and changing the multi_key_cache + is done atomicly + */ + pthread_mutex_lock(&share->intern_lock); + /* Tell all threads to use the new key cache This should be seen at the lastes for the next call to an myisam function. */ @@ -102,6 +107,7 @@ int mi_assign_to_key_cache(MI_INFO *info, if (multi_key_cache_set(share->unique_file_name, share->unique_name_length, share->key_cache)) error= my_errno; + pthread_mutex_unlock(&share->intern_lock); DBUG_RETURN(error); } diff --git a/mysql-test/r/count_distinct3.result b/mysql-test/r/count_distinct3.result index 633bb2fa252..086e1360b0c 100644 --- a/mysql-test/r/count_distinct3.result +++ b/mysql-test/r/count_distinct3.result @@ -5,3 +5,4 @@ COUNT(*) 4181000 SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp; DROP TABLE t1; +set @@read_buffer_size=default; diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index be2aec616b0..883cb65171c 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -1,9 +1,9 @@ -slave stop; +stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -slave start; +start slave; select get_lock("a",5); get_lock("a",5) 1 @@ -15,12 +15,12 @@ select * from t1; n 1 show slave status; -Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root 9306 1 master-bin.001 273 slave-relay-bin.002 255 master-bin.001 No No 0 0 214 314 +Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +# 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No # change master to master_user='root'; show slave status; -Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root 9306 1 master-bin.001 214 slave-relay-bin.001 4 master-bin.001 No No 0 0 214 4 +Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +# 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No # select release_lock("a"); release_lock("a") 1 diff --git a/mysql-test/t/count_distinct3.test b/mysql-test/t/count_distinct3.test index e6cc98d47df..9d2bb0d139a 100644 --- a/mysql-test/t/count_distinct3.test +++ b/mysql-test/t/count_distinct3.test @@ -21,6 +21,7 @@ while ($1) INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev); dec $1; } +set @@read_buffer_size=2*1024*1024; CREATE TABLE t2 SELECT * FROM t1; INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2; INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1; @@ -53,3 +54,5 @@ SELECT COUNT(*) FROM t1; SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp; --enable_result_log DROP TABLE t1; + +set @@read_buffer_size=default; diff --git a/mysql-test/t/rpl_change_master.test b/mysql-test/t/rpl_change_master.test index 61de22fe57b..33fc2d75dd3 100644 --- a/mysql-test/t/rpl_change_master.test +++ b/mysql-test/t/rpl_change_master.test @@ -11,8 +11,10 @@ connection slave; sleep 3; # can't sync_with_master as we should be blocked stop slave; select * from t1; +--replace_column 1 # 33 # show slave status; change master to master_user='root'; +--replace_column 1 # 33 # show slave status; # Will restart from after the values(2), which is bug select release_lock("a"); diff --git a/mysys/default.c b/mysys/default.c index b1d9e40a1c2..3a751eb4e29 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -251,6 +251,7 @@ int load_defaults(const char *conf_file, const char **groups, err: fprintf(stderr,"Fatal error in defaults handling. Program aborted\n"); exit(1); + return 0; /* Keep compiler happy */ } diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 10ec72c220e..b1ef03fdcd2 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -15,8 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* - These functions are to handle keyblock cacheing - for NISAM, MISAM and PISAM databases. + These functions handle keyblock cacheing for ISAM and MyISAM tables. + One cache can handle many files. It must contain buffers of the same blocksize. init_key_cache() should be used to init cache handler. @@ -282,6 +282,7 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, if (! keycache->key_cache_inited) { keycache->key_cache_inited= 1; + keycache->in_init= 0; pthread_mutex_init(&keycache->cache_lock, MY_MUTEX_INIT_FAST); } @@ -2159,9 +2160,6 @@ restart: } } - if (type == FLUSH_REMOVE && keycache->action) - (*keycache->action)(keycache); - #ifndef DBUG_OFF DBUG_EXECUTE("check_keycache", test_key_cache(keycache, "end of flush_key_blocks", 0);); diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 7fa8c9d4fa1..830c62b349b 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -83,7 +83,7 @@ int handle_options(int *argc, char ***argv, char *)) { uint opt_found, argvpos= 0, length, i; - my_bool end_of_options= 0, must_be_var, set_maximum_value, special_used, + my_bool end_of_options= 0, must_be_var, set_maximum_value, option_is_loose; char **pos, **pos_end, *optend, *prev_found, *opt_str, key_name[FN_REFLEN]; @@ -104,7 +104,6 @@ int handle_options(int *argc, char ***argv, char *argument= 0; must_be_var= 0; set_maximum_value= 0; - special_used= 0; option_is_loose= 0; cur_arg++; /* skip '-' */ @@ -202,7 +201,6 @@ int handle_options(int *argc, char ***argv, /* We were called with a special prefix, we can reuse opt_found */ - special_used= 1; opt_str+= (special_opt_prefix_lengths[i] + 1); if (i == OPT_LOOSE) option_is_loose= 1; diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 3cdd923d085..a10eeb3c934 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -720,13 +720,10 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt) if ((error= mi_assign_to_key_cache(file, map, new_key_cache))) { - switch (error) { - default: - char buf[80]; - my_snprintf(buf, sizeof(buf), - "Failed to flush to index file (errno: %d)", error); - errmsg= buf; - } + char buf[80]; + my_snprintf(buf, sizeof(buf), + "Failed to flush to index file (errno: %d)", error); + errmsg= buf; error= HA_ADMIN_CORRUPT; } diff --git a/sql/item.cc b/sql/item.cc index 4cd52c54097..9684fd3e518 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1196,7 +1196,7 @@ int Item_uint::save_in_field(Field *field, bool no_conversions) TODO: To be fixed when wen have a field->store(longlong, unsigned_flag) method */ - Item_int::save_in_field(field, no_conversions); + return Item_int::save_in_field(field, no_conversions); } diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index e73ecc99ffe..496ea0ed5c8 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -235,7 +235,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, /* Second part */ case 'f': tmp= (char*) val_end; - l_time->second_part= my_strtoll10(val, &tmp, &error); + l_time->second_part= (int) my_strtoll10(val, &tmp, &error); val= tmp; break; @@ -1219,7 +1219,7 @@ String *Item_func_sec_to_time::val_str(String *str) sec= (uint) ((ulonglong) seconds % 3600); ltime.day= 0; - ltime.hour= seconds/3600; + ltime.hour= (uint) (seconds/3600); ltime.minute= sec/60; ltime.second= sec % 60; @@ -1850,9 +1850,8 @@ String *Item_datetime_typecast::val_str(String *str) if (!get_arg0_date(<ime,1) && !make_datetime(ltime.second_part ? DATE_TIME_MICROSECOND : DATE_TIME, <ime, str)) - return str; + return str; -null_date: null_value=1; return 0; } @@ -1911,8 +1910,8 @@ String *Item_date_typecast::val_str(String *str) String *Item_func_makedate::val_str(String *str) { TIME l_time; - long daynr= args[1]->val_int(); - long yearnr= args[0]->val_int(); + long daynr= (long) args[1]->val_int(); + long yearnr= (long) args[0]->val_int(); long days; if (args[0]->null_value || args[1]->null_value || @@ -1920,7 +1919,7 @@ String *Item_func_makedate::val_str(String *str) goto err; days= calc_daynr(yearnr,1,1) + daynr - 1; - // Day number from year 0 to 9999-12-31 + /* Day number from year 0 to 9999-12-31 */ if (days >= 0 && days < MAX_DAY_NUMBER) { null_value=0; @@ -2124,7 +2123,8 @@ String *Item_func_timediff::val_str(String *str) microseconds= l_time1.second_part - l_sign*l_time2.second_part; seconds= ((longlong) days*86400L + l_time1.hour*3600L + l_time1.minute*60L + l_time1.second + microseconds/1000000L - - (longlong)l_sign*(l_time2.hour*3600L+l_time2.minute*60L+l_time2.second)); + (longlong)l_sign*(l_time2.hour*3600L+l_time2.minute*60L+ + l_time2.second)); l_time3.neg= 0; if (seconds < 0) @@ -2145,7 +2145,7 @@ String *Item_func_timediff::val_str(String *str) if ((l_time2.neg == l_time1.neg) && l_time1.neg) l_time3.neg= l_time3.neg ? 0 : 1; - calc_time_from_sec(&l_time3, seconds, microseconds); + calc_time_from_sec(&l_time3, (long) seconds, microseconds); if (!make_datetime(l_time1.second_part || l_time2.second_part ? TIME_MICROSECOND : TIME_ONLY, @@ -2167,9 +2167,9 @@ String *Item_func_maketime::val_str(String *str) { TIME ltime; - long hour= args[0]->val_int(); - long minute= args[1]->val_int(); - long second= args[2]->val_int(); + long hour= (long) args[0]->val_int(); + long minute= (long) args[1]->val_int(); + long second= (long) args[2]->val_int(); if ((null_value=(args[0]->null_value || args[1]->null_value || @@ -2185,9 +2185,9 @@ String *Item_func_maketime::val_str(String *str) ltime.neg= 1; hour= -hour; } - ltime.hour= (ulong)hour; - ltime.minute= (ulong)minute; - ltime.second= (ulong)second; + ltime.hour= (ulong) hour; + ltime.minute= (ulong) minute; + ltime.second= (ulong) second; make_time((DATE_TIME_FORMAT *) 0, <ime, str); return str; } diff --git a/sql/set_var.cc b/sql/set_var.cc index a7d077d8fc2..9b7be4afacc 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1884,7 +1884,7 @@ end: bool sys_var_key_cache_long::update(THD *thd, set_var *var) { - ulong tmp= var->value->val_int(); + ulong tmp= (ulong) var->value->val_int(); LEX_STRING *base_name= &var->base; bool error= 0; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 85b82d3b488..354214a4da5 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1056,7 +1056,6 @@ void mysql_stmt_reset(THD *thd, char *packet) void mysql_stmt_free(THD *thd, char *packet) { ulong stmt_id= uint4korr(packet); - PREP_STMT *stmt; DBUG_ENTER("mysql_stmt_free"); if (!find_prepared_statement(thd, stmt_id, "close")) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 49ca1ed1c8c..a3c9396db11 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1080,8 +1080,9 @@ int change_master(THD* thd, MASTER_INFO* mi) of replication is not 100% clear, so we guard against problems using max(). */ - mi->master_log_pos = max(BIN_LOG_HEADER_SIZE, mi->rli.master_log_pos); - strmake(mi->master_log_name,mi->rli.master_log_name, + mi->master_log_pos = max(BIN_LOG_HEADER_SIZE, + mi->rli.group_master_log_pos); + strmake(mi->master_log_name, mi->rli.group_master_log_name, sizeof(mi->master_log_name)-1); } diff --git a/sql/sql_select.h b/sql/sql_select.h index 24854713a0e..5f0370a5a32 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -166,11 +166,23 @@ class JOIN :public Sql_alloc JOIN *tmp_join; // copy of this JOIN to be used with temporary tables ROLLUP rollup; // Used with rollup - bool select_distinct, //Is select distinct? - no_order, simple_order, simple_group, - skip_sort_order, need_tmp, - hidden_group_fields, - buffer_result; + bool select_distinct; // Set if SELECT DISTINCT + + /* + simple_xxxxx is set if ORDER/GROUP BY doesn't include any references + to other tables than the first non-constant table in the JOIN. + It's also set if ORDER/GROUP BY is empty. + */ + bool simple_order, simple_group; + /* + Is set only in case if we have a GROUP BY clause + and no ORDER BY after constant elimination of 'order'. + */ + bool no_order; + /* Is set if we have a GROUP BY and we have ORDER BY on a constant. */ + bool skip_sort_order; + + bool need_tmp, hidden_group_fields, buffer_result; DYNAMIC_ARRAY keyuse; Item::cond_result cond_value; List<Item> all_fields; // to store all fields that used in query diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ea14249e907..8504a408605 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1652,8 +1652,7 @@ int mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables, check_opt.key_cache= key_cache; DBUG_RETURN(mysql_admin_table(thd, tables, &check_opt, "assign_to_keycache", TL_READ_NO_INSERT, 0, - HA_OPEN_TO_ASSIGN, 0, - &handler::assign_to_keycache)); + 0, 0, &handler::assign_to_keycache)); } diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index fd5e58ad8a7..a2edc33b3d2 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -472,13 +472,13 @@ static uchar *thai2sortable(const uchar *tstr, uint len, uint *out_length) const uchar *p= tstr; uchar *outBuf; uchar *pRight1, *pRight2, *pRight3; - uchar *pLeft1, *pLeft2, *pLeft3; + uchar *pLeft2, *pLeft3; uint bufSize; uint RightSize; bufSize= (uint) (len + 1) * BUFFER_MULTIPLY; RightSize= sizeof(uchar) * (len + 1); - if (!(outBuf= pLeft1= pRight1= + if (!(outBuf= pRight1= (uchar *)malloc(sizeof(uchar) * bufSize + RightSize*2))) { /* @@ -608,8 +608,8 @@ int my_strnxfrm_tis620(CHARSET_INFO *cs __attribute__((unused)), int my_strcoll_tis620(const uchar * s1, const uchar * s2) { - return my_strnncoll_tis620((CHARSET_INFO *) 0, s1, strlen(s1), s2, - strlen(s1)); + return my_strnncoll_tis620((CHARSET_INFO *) 0, s1, strlen((char*) s1), + s2, strlen((char*) s1)); } |