From c707c7eae738627bb39c2b9c1f050e90971e8959 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Nov 2006 15:51:53 +0300 Subject: [PATCH] BUG#20637: "load data concurrent infile" locks the table Note that we ignore CONCURRENT if LOAD DATA CONCURRENT is used from inside a stored routine and MySQL is compiled with Query Cache support (this is not in the manual). The problem was that the condition test of "we are inside stored routine" was reversed, thus CONCURRENT _worked only_ from stored routine. The solution is to use proper condition test. No test case is provided because the test case would require a large amount of input, and it's hard to tell is SELECT is really blocked or just slow (subject to race). sql/sql_yacc.yy: Fix the condition of TL_WRITE_CONCURRENT_INSERT on LOAD DATA CONCURRENT, which was reversed, and return valid value if we are in SP. --- sql/sql_yacc.yy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6f24a42c07c..7347a2aabb8 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7031,6 +7031,8 @@ load_data_lock: Ignore this option in SP to avoid problem with query cache */ if (Lex->sphead != 0) + $$= YYTHD->update_lock_default; + else #endif $$= TL_WRITE_CONCURRENT_INSERT; }