summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-01-15 20:06:18 +0200
committerMichael Widenius <monty@askmonty.org>2010-01-15 20:06:18 +0200
commitae8d0b378e472847053ff4c4f1612dd6bd3b1a47 (patch)
treea4a2fbfb3a469c42be3a9e5ba95da7d0912375f3 /sql/sql_yacc.yy
parentd121e6630519a66eec7c953ee0eae623f592ce87 (diff)
downloadmariadb-git-ae8d0b378e472847053ff4c4f1612dd6bd3b1a47.tar.gz
Fixed that we use same flags when testing for assembler as by makefiles.
Fixed bug in locking by triggers found by test case when compiling without query cache configure.in: Fixed that we use same flags when testing for assembler as by makefiles. sql/sql_yacc.yy: Fixed bug in locking by triggers found by test case when compiling without query cache The idea should be that triggers uses the same lock method (low_priority_locks...) as main tables.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy23
1 files changed, 5 insertions, 18 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index c9a08200479..c89fafef023 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -9483,16 +9483,12 @@ replace:
insert_lock_option:
/* empty */
{
-#ifdef HAVE_QUERY_CACHE
/*
- If it is SP we do not allow insert optimisation whan result of
+ If it is SP we do not allow insert optimisation when result of
insert visible only after the table unlocking but everyone can
read table.
*/
$$= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
-#else
- $$= TL_WRITE_CONCURRENT_INSERT;
-#endif
}
| LOW_PRIORITY { $$= TL_WRITE_LOW_PRIORITY; }
| DELAYED_SYM { $$= TL_WRITE_DELAYED; }
@@ -10515,15 +10511,11 @@ load_data_lock:
/* empty */ { $$= TL_WRITE_DEFAULT; }
| CONCURRENT
{
-#ifdef HAVE_QUERY_CACHE
/*
- Ignore this option in SP to avoid problem with query cache
+ Ignore this option in SP to avoid problem with query cache and
+ triggers with non default priority locks
*/
- if (Lex->sphead != 0)
- $$= TL_WRITE_DEFAULT;
- else
-#endif
- $$= TL_WRITE_CONCURRENT_INSERT;
+ $$= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
| LOW_PRIORITY { $$= TL_WRITE_LOW_PRIORITY; }
;
@@ -12237,12 +12229,7 @@ lock_option:
| WRITE_SYM { $$= TL_WRITE_DEFAULT; }
| WRITE_SYM CONCURRENT
{
-#ifdef HAVE_QUERY_CACHE
- if (Lex->sphead != 0)
- $$= TL_WRITE_DEFAULT;
- else
-#endif
- $$= TL_WRITE_CONCURRENT_INSERT;
+ $$= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
| LOW_PRIORITY WRITE_SYM { $$= TL_WRITE_LOW_PRIORITY; }