2749 Konstantin Osipov 2008-07-26
WL#4502 "Benchmark the effect of early net_end_statement"
commit the patch for benchmarking.
The patch changes the order of events in the main loop of the
connection thread:
first it closes the tables open to execute a statement, and only
then it sends "OK" status to the client. Previously we would perform
actions in the opposite order, to gain speed.
The previous order was breaking borders between layers (dispatch_command
is a network layer, and shouldn't call close_thread_tables(),
which belongs to mysql_execute_command, the execution layer),
causing complains from QA and users for counter-intuitive behaviour
(with MyISAM concurrent insert it could cause a select in a concurrent
connection to read stale data from the server).
modified:
sql/sql_parse.cc
2748 Georgi Kodinov 2008-07-25
disabled user_limits because it's still failing even after the fix for bug 23921
modified:
mysql-test/t/disabled.def
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2008-07-24 08:26:24 +0000
+++ b/sql/sql_parse.cc 2008-07-26 07:10:46 +0000
@@ -1430,13 +1430,14 @@ bool dispatch_command(enum enum_server_c
ha_maria::implicit_commit(thd, FALSE);
#endif
- net_end_statement(thd);
- query_cache_end_of_result(thd);
-
thd->proc_info= "closing tables";
/* Free tables */
close_thread_tables(thd);
+ net_end_statement(thd);
+ query_cache_end_of_result(thd);
+
+
if (!thd->is_error() && !thd->killed_errno())
{
mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_RESULT,0,my_time(0),
| Thread |
|---|
| • bzr push into mysql-6.0-backup branch (konstantin:2748 to 2749) WL#4502 | Konstantin Osipov | 26 Jul |