diff options
author | unknown <monty@hundin.mysql.fi> | 2002-12-03 13:08:25 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-12-03 13:08:25 +0200 |
commit | 80b143c111fc3df20e3fe2dcfe4880c30b001498 (patch) | |
tree | 4cad7c11d248679cf59fce6e92c37d2d7dc6e486 /sql/sql_class.cc | |
parent | 4f221e351df6c05fdeb95d0b328cf155204195cd (diff) | |
download | mariadb-git-80b143c111fc3df20e3fe2dcfe4880c30b001498.tar.gz |
Change of internal key_field=NULL handling to avoid error messages.
Optimized SELECT DISTINCT ... ORDER BY ... LIMIT
Fixed reference to uninitalized variable
mysql-test/r/distinct.result:
Updated results for new tests
mysql-test/r/func_math.result:
Fixed test of RND()
mysql-test/r/innodb.result:
Updated results for new tests
mysql-test/r/null.result:
Updated results for new tests
mysql-test/t/distinct.test:
New distinct test
mysql-test/t/func_math.test:
Fixed test of RND()
mysql-test/t/innodb.test:
Test for bugs
mysql-test/t/null.test:
TEst for bugs
sql/field.h:
Change of NULL handling to avoid error messages
sql/field_conv.cc:
Change of NULL handling to avoid error messages
sql/item.cc:
Change of NULL handling to avoid error messages
sql/item.h:
Change of NULL handling to avoid error messages
sql/item_cmpfunc.cc:
Change of NULL handling to avoid error messages
sql/item_func.cc:
Change of NULL handling to avoid error messages
sql/item_func.h:
Cleaned up RND() handling
sql/item_timefunc.cc:
Change of NULL handling to avoid error messages
sql/item_timefunc.h:
Change of NULL handling to avoid error messages
sql/opt_range.cc:
Fixed bug in <=> NULL
sql/password.c:
Indentation cleanup
sql/sql_base.cc:
Change of NULL handling to avoid error messages
sql/sql_class.cc:
Fixed reference to uninitalized variable
sql/sql_handler.cc:
Change of NULL handling to avoid error messages
sql/sql_select.cc:
Change of NULL handling to avoid error messages
Optimized SELECT DISTINCT ... ORDER BY ... LIMIT
sql/sql_select.h:
Change of NULL handling to avoid error messages
sql/unireg.cc:
Change of NULL handling to avoid error messages
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index a5f14a507f7..8b276cf0d9b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -158,9 +158,8 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), { pthread_mutex_lock(&LOCK_thread_count); ulong tmp=(ulong) (rnd(&sql_rand) * 3000000); - randominit(&rand, tmp + (ulong) start_time, - tmp + (ulong) thread_id); pthread_mutex_unlock(&LOCK_thread_count); + randominit(&rand, tmp + (ulong) start_time, tmp + (ulong) thread_id); } } @@ -171,16 +170,16 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), void THD::init(void) { + pthread_mutex_lock(&LOCK_global_system_variables); + variables= global_system_variables; + pthread_mutex_unlock(&LOCK_global_system_variables); server_status= SERVER_STATUS_AUTOCOMMIT; - update_lock_default= (variables.low_priority_updates ? - TL_WRITE_LOW_PRIORITY : - TL_WRITE); options= thd_startup_options; sql_mode=(uint) opt_sql_mode; open_options=ha_open_options; - pthread_mutex_lock(&LOCK_global_system_variables); - variables= global_system_variables; - pthread_mutex_unlock(&LOCK_global_system_variables); + update_lock_default= (variables.low_priority_updates ? + TL_WRITE_LOW_PRIORITY : + TL_WRITE); session_tx_isolation= (enum_tx_isolation) variables.tx_isolation; } |