diff options
author | unknown <monty@hundin.mysql.fi> | 2002-08-17 05:18:06 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-08-17 05:18:06 +0300 |
commit | 4ed427921d9614b9d9a0ded478fc5e42128f6bf0 (patch) | |
tree | 6ddcfd168371a75010c2bd6892cf8b2b33839553 /sql | |
parent | ac6dc20ae0b4daa20390366eb5d1572f4c5113cf (diff) | |
download | mariadb-git-4ed427921d9614b9d9a0ded478fc5e42128f6bf0.tar.gz |
Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc)
Removed thread marking of safemalloc blocks (becasue of alignment problems)
Temporary fix for bigint comparison.
configure.in:
Added size checking of char*
BitKeeper/etc/ignore:
Added sql-bench/innotest1 sql-bench/innotest1a sql-bench/innotest1b sql-bench/innotest2 sql-bench/innotest2a sql-bench/innotest2b to the ignore list
mysql-test/r/select.result:
Cleaned up test
mysql-test/t/select.test:
Cleaned up test
mysys/my_static.h:
Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc)
mysys/safemalloc.c:
Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc)
sql/field.h:
Temporary fix for bigint comparison.
sql/gen_lex_hash.cc:
Smaller hash table
sql/item_cmpfunc.cc:
Cleanup
sql/mysqld.cc:
Removed thread marking of safemalloc blocks (becasue of alignment problems)
sql/opt_range.cc:
Comment
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.h | 1 | ||||
-rw-r--r-- | sql/gen_lex_hash.cc | 2 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 12 | ||||
-rw-r--r-- | sql/mysqld.cc | 7 | ||||
-rw-r--r-- | sql/opt_range.cc | 1 |
5 files changed, 9 insertions, 14 deletions
diff --git a/sql/field.h b/sql/field.h index 956c77e5024..0f0225da3d2 100644 --- a/sql/field.h +++ b/sql/field.h @@ -445,6 +445,7 @@ public: void sort_string(char *buff,uint length); uint32 pack_length() const { return 8; } void sql_type(String &str) const; + bool store_for_compare() { return 1; } }; #endif diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index bd48c65586a..c24e7b6d124 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -469,7 +469,7 @@ int main(int argc,char **argv) int error; MY_INIT(argv[0]); - start_value=7281255L; best_t1=4459515L; best_t2=321142L; best_type=2; /* mode=5953 add=7 type: 0 */ + start_value=2925024L; best_t1=654916L; best_t2=1723390L; best_type=3; /* mode=4943 add=1 type: 0 */ if (get_options(argc,(char **) argv)) exit(1); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 8e010e7de8a..e5544bc7bc2 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -42,13 +42,13 @@ static bool convert_constant_item(Field *field, Item **item) { if ((*item)->const_item()) { - (*item)->save_in_field(field); - if (!((*item)->null_value)) + if (!(*item)->save_in_field(field) && + !((*item)->null_value)) { Item *tmp=new Item_int_with_ref(field->val_int(), *item); if (tmp) *item=tmp; - return 1; + return 1; // Item was replaced } } return 0; @@ -57,7 +57,7 @@ static bool convert_constant_item(Field *field, Item **item) void Item_bool_func2::fix_length_and_dec() { - max_length=1; + max_length=1; // Function returns 0 or 1 /* As some compare functions are generated after sql_yacc, @@ -69,7 +69,7 @@ void Item_bool_func2::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; - if (field->store_for_compare() || field->result_type() == INT_RESULT) + if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) { @@ -81,7 +81,7 @@ void Item_bool_func2::fix_length_and_dec() if (args[1]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[1])->field; - if (field->store_for_compare() || field->result_type() == INT_RESULT) + if (field->store_for_compare()) { if (convert_constant_item(field,&args[0])) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d94d702cdc8..1ccbab496a9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -37,15 +37,9 @@ #define ONE_THREAD #endif -#ifdef SAFEMALLOC -#define SHUTDOWN_THD shutdown_th=pthread_self(); -#define MAIN_THD main_th=pthread_self(); -#define SIGNAL_THD signal_th=pthread_self(); -#else #define SHUTDOWN_THD #define MAIN_THD #define SIGNAL_THD -#endif #ifdef PURIFY #define IF_PURIFY(A,B) (A) @@ -763,7 +757,6 @@ static void __cdecl kill_server(int sig_ptr) sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */ #if defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2) - SHUTDOWN_THD; my_thread_init(); // If this is a new thread #endif close_connections(); diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 2a76229ecf9..4d8290628a7 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1026,6 +1026,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, if (value->save_in_field(field)) { + // TODO; Check if we can we remove the following block. if (type == Item_func::EQUAL_FUNC) { /* convert column_name <=> NULL -> column_name IS NULL */ |