Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fcb7292e
Commit
fcb7292e
authored
Sep 08, 2001
by
monty@tik.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unlock tables on BEGIN
parent
9570e8b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
5 deletions
+20
-5
sql-bench/test-create.sh
sql-bench/test-create.sh
+10
-2
sql/ha_innobase.cc
sql/ha_innobase.cc
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+3
-3
sql/sql_parse.cc
sql/sql_parse.cc
+6
-0
No files found.
sql-bench/test-create.sh
View file @
fcb7292e
...
...
@@ -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
}))
...
...
sql/ha_innobase.cc
View file @
fcb7292e
...
...
@@ -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
)
{
...
...
sql/mysqld.cc
View file @
fcb7292e
...
...
@@ -2017,7 +2017,7 @@ The server will not act as a slave.");
}
#else
handle_connections_sockets
(
0
);
#ifdef EXTRA_DEBUG
#ifdef EXTRA_DEBUG
2
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_DEBUG
2
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_DEBUG
2
sql_print_error
(
"After lock_thread_count"
);
#endif
#else
...
...
sql/sql_parse.cc
View file @
fcb7292e
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment