diff options
author | unknown <monty@tik.mysql.fi> | 2001-09-08 01:01:10 +0300 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2001-09-08 01:01:10 +0300 |
commit | a41b148e478c522c8fe8037f86969c7eff15073c (patch) | |
tree | 3f8bb55c2b3ec5e00a3dc49b4fed5d540e339591 | |
parent | dac2557acfb7a1b073eb8facfa4b115c6a55126d (diff) | |
download | mariadb-git-a41b148e478c522c8fe8037f86969c7eff15073c.tar.gz |
Unlock tables on BEGIN
sql-bench/test-create.sh:
Made --small-test a bit faster
sql/ha_innobase.cc:
Cleanup memory at exit
sql/mysqld.cc:
Remove debug notes at shutdown
-rw-r--r-- | sql-bench/test-create.sh | 12 | ||||
-rw-r--r-- | sql/ha_innobase.cc | 1 | ||||
-rw-r--r-- | sql/mysqld.cc | 6 | ||||
-rw-r--r-- | sql/sql_parse.cc | 6 |
4 files changed, 20 insertions, 5 deletions
diff --git a/sql-bench/test-create.sh b/sql-bench/test-create.sh index 09d79c67b04..2853984e393 100644 --- a/sql-bench/test-create.sh +++ b/sql-bench/test-create.sh @@ -39,13 +39,21 @@ $opt_loop_count=10000; # Change this to make test harder/easier chomp($pwd = `pwd`); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; +$create_loop_count=$opt_loop_count; if ($opt_small_test) { $opt_loop_count/=100; + $create_loop_count/=1000; } $max_tables=min($limits->{'max_tables'},$opt_loop_count); +if ($opt_small_test) +{ + $max_tables=10; +} + + print "Testing the speed of creating and droping tables\n"; print "Testing with $max_tables tables and $opt_loop_count loop count\n\n"; @@ -177,7 +185,7 @@ print "Testing create+drop\n"; $loop_time=new Benchmark; -for ($i=1 ; $i <= $opt_loop_count ; $i++) +for ($i=1 ; $i <= $create_loop_count ; $i++) { do_many($dbh,$server->create("bench_$i", ["i int NOT NULL", @@ -190,7 +198,7 @@ for ($i=1 ; $i <= $opt_loop_count ; $i++) } $end_time=new Benchmark; -print "Time for create+drop ($opt_loop_count): " . +print "Time for create+drop ($create_loop_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; if ($opt_fast && defined($server->{vacuum})) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 87c40f5ea47..3493b2f2c89 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -617,6 +617,7 @@ innobase_end(void) err = innobase_shutdown_for_mysql(); hash_free(&innobase_open_tables); + my_free(internal_innobase_data_file_path,MYF(MY_ALLOW_ZERO_PTR)); if (err != DB_SUCCESS) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b228d0e4b15..06d41dcce66 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2017,7 +2017,7 @@ The server will not act as a slave."); } #else handle_connections_sockets(0); -#ifdef EXTRA_DEBUG +#ifdef EXTRA_DEBUG2 sql_print_error("Exiting main thread"); #endif #endif /* __NT__ */ @@ -2027,14 +2027,14 @@ The server will not act as a slave."); DBUG_PRINT("quit",("Exiting main thread")); #ifndef __WIN__ -#ifdef EXTRA_DEBUG +#ifdef EXTRA_DEBUG2 sql_print_error("Before Lock_thread_count"); #endif (void) pthread_mutex_lock(&LOCK_thread_count); select_thread_in_use=0; // For close_connections (void) pthread_cond_broadcast(&COND_thread_count); (void) pthread_mutex_unlock(&LOCK_thread_count); -#ifdef EXTRA_DEBUG +#ifdef EXTRA_DEBUG2 sql_print_error("After lock_thread_count"); #endif #else diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index cdbcc203e9c..3dd0176c546 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2120,6 +2120,12 @@ mysql_execute_command(void) break; case SQLCOM_BEGIN: + if (thd->locked_tables) + { + thd->lock=thd->locked_tables; + thd->locked_tables=0; // Will be automaticly closed + close_thread_tables(thd); // Free tables + } if (end_active_trans(thd)) { res= -1; |