Commit a41b148e authored by unknown's avatar unknown

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
parent dac2557a
......@@ -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}))
......
......@@ -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) {
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment