diff options
author | unknown <monty@donna.mysql.fi> | 2001-02-21 14:16:00 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-02-21 14:16:00 +0200 |
commit | 6839b1728d8f6abc12cf4e75363a5b4591ad392d (patch) | |
tree | 34f7d174c7e612bd03a5cf88fe4e2ac2411a33a4 /sql | |
parent | 0897a73a267b86615395c2d770f95428be5057cf (diff) | |
download | mariadb-git-6839b1728d8f6abc12cf4e75363a5b4591ad392d.tar.gz |
Fixes for innobase
Added test for ALTER TABLE ORDER BY
BUILD/FINISH.sh:
Fixes for innobase
BUILD/compile-pentium-debug:
Fixes for innobase
Docs/manual.texi:
Fixes for innobase
include/my_pthread.h:
Fixes for innobase
innobase/Makefile.am:
Fixes for innobase
innobase/btr/Makefile.am:
Fixes for innobase
innobase/data/Makefile.am:
Fixes for innobase
innobase/eval/Makefile.am:
Fixes for innobase
innobase/include/Makefile.i:
Fixes for innobase
innobase/os/Makefile.am:
Fixes for innobase
mysql-test/t/alter_table.test:
Added test for ALTER TABLE ORDER BY
mysys/my_error.c:
Skip 'l' in '%lu'
mysys/my_vsnprintf.c:
cleanup
sql/ha_innobase.cc:
Fixed type + remove warnings
sql/ha_innobase.h:
Remove warnings
sql/handler.cc:
cleanup
sql/sql_class.cc:
remove warnings
sql/sql_parse.cc:
remove warnings
sql/sql_table.cc:
Fixed bug in ALTER TABLE ... ORDER BY
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innobase.cc | 25 | ||||
-rw-r--r-- | sql/ha_innobase.h | 2 | ||||
-rw-r--r-- | sql/handler.cc | 5 | ||||
-rw-r--r-- | sql/sql_class.cc | 5 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_table.cc | 5 |
6 files changed, 24 insertions, 20 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 5116d6ef07f..0bc88e9368b 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -418,7 +418,7 @@ innobase_init(void) int err; bool ret; ibool test_bool; - static char *current_dir[3]; + static char current_dir[3]; DBUG_ENTER("innobase_init"); /* Use current_dir if no paths are set */ @@ -431,13 +431,14 @@ innobase_init(void) if (!innobase_data_file_path) { - fprintf(stderr,"Can't initialize innobase as 'innobase_data_file_path' is not set\n"); - DBUG_RETURN(TRUE); + fprintf(stderr,"Can't initialize Innobase as 'innobase_data_file_path' is not set\n"); + innobase_skip=1; + DBUG_RETURN(FALSE); // Continue without innobase } srv_data_home = (innobase_data_home_dir ? innobase_data_home_dir : current_dir); - srv_logs_home = ""; + srv_logs_home = (char*) ""; srv_arch_dir = (innobase_log_arch_dir ? innobase_log_arch_dir : current_dir); @@ -2167,8 +2168,9 @@ create_clustered_index_when_no_primary( /* The first '0' below specifies that everything in Innobase is currently created in file space 0 */ - index = dict_mem_index_create((char*) table_name, "GEN_CLUST_INDEX", - 0, DICT_CLUSTERED, 0); + index = dict_mem_index_create((char*) table_name, + (char*) "GEN_CLUST_INDEX", + 0, DICT_CLUSTERED, 0); error = row_create_index_for_mysql(index, trx); error = convert_error_code_to_mysql(error); @@ -2208,7 +2210,7 @@ ha_innobase::create( /* Create the table definition in Innobase */ - if (error = create_table_def(trx, form, norm_name)) { + if ((error = create_table_def(trx, form, norm_name))) { trx_commit_for_mysql(trx); @@ -2248,8 +2250,8 @@ ha_innobase::create( if (primary_key_no != -1) { /* In Innobase the clustered index must always be created first */ - if (error = create_index(trx, form, norm_name, - (uint) primary_key_no)) { + if ((error = create_index(trx, form, norm_name, + (uint) primary_key_no))) { trx_commit_for_mysql(trx); trx_free_for_mysql(trx); @@ -2262,7 +2264,7 @@ ha_innobase::create( if (i != (uint) primary_key_no) { - if (error = create_index(trx, form, norm_name, i)) { + if ((error = create_index(trx, form, norm_name, i))) { trx_commit_for_mysql(trx); @@ -2564,7 +2566,8 @@ ha_innobase::update_table_comment( if (!str) return (char*)comment; - sprintf(str,"%s Innobase free: %lu kB", comment,innobase_get_free_space()); + sprintf(str,"%s Innobase free: %lu kB", comment, + (ulong) innobase_get_free_space()); return((char*) str); } diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index 43dee4b1aae..73991be208d 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -53,10 +53,10 @@ class ha_innobase: public handler 'ref' buffer of the handle, if any */ ulong int_option_flag; uint primary_key; + uint last_dup_key; ulong start_of_scan; /* this is set to 1 when we are starting a table scan but have not yet fetched any row, else 0 */ - uint last_dup_key; uint last_match_mode;/* match mode of the latest search: ROW_SEL_EXACT, ROW_SEL_EXACT_PREFIX, diff --git a/sql/handler.cc b/sql/handler.cc index 0f73a214934..240b1ded5e7 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -138,9 +138,8 @@ int ha_init() #ifdef HAVE_INNOBASE_DB if (!innobase_skip) { - int error; - if ((error=innobase_init())) - return error; + if (innobase_init()) + return -1; } #endif return 0; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0587ad6f31c..e9f696fedab 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -75,9 +75,8 @@ static void free_var(user_var_entry *entry) ****************************************************************************/ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), - insert_id_used(0), - bootstrap(0),in_lock_tables(0), - global_read_lock(0) + insert_id_used(0),in_lock_tables(0), + global_read_lock(0),bootstrap(0) { proc_info="login"; host=user=priv_user=db=query=ip=0; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 5ff0bc91c5f..fb3bba722de 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -214,7 +214,7 @@ static int check_for_max_user_connections(const char *user, int u_length, (byte*) temp_user, temp_len); if (uc) /* user found ; check for no. of connections */ { - if (max_user_connections == uc->connections) + if ((uint) max_user_connections == uc->connections) { net_printf(&(current_thd->net),ER_TOO_MANY_USER_CONNECTIONS, temp_user); pthread_mutex_unlock(&LOCK_user_conn); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index bfda0fc757b..ce054353cc5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1644,11 +1644,14 @@ copy_data_between_tables(TABLE *from,TABLE *to, found_count=delete_count=0; - if(order) { + if (order) + { from->io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); bzero((char*) &tables,sizeof(tables)); tables.table = from; + tables.name = tables.real_name= from->real_name; + tables.db = from->table_cache_key; error=1; if (setup_order(thd, &tables, fields, all_fields, order) || |