MXS-938: Recognize transaction start

Now more information about a transaction start is provided. When
a transaction start statement is parsed, the type of the statement
with be QUERY_TYPE_BEGIN_TRX anded with QUERY_TYPE_READ or
QUERY_TYPE_WRITE if the transaction was explicitly started as READ
ONLY or READ WRITE.

Now also BEGIN WORK and [COMMIT|ROLLBACK] WORK are recognized.
"AND CHAIN" will still need to be recognized.
This commit is contained in:
Johan Wikman
2016-10-19 22:49:03 +03:00
parent 6bcb3ce4dc
commit e1ccc8afe0
4 changed files with 76 additions and 9 deletions

View File

@ -968,7 +968,7 @@ void mxs_sqlite3BeginTransaction(Parse* pParse, int type)
ss_dassert(info);
info->status = QC_QUERY_PARSED;
info->types = QUERY_TYPE_BEGIN_TRX;
info->types = QUERY_TYPE_BEGIN_TRX | type;
}
void mxs_sqlite3BeginTrigger(Parse *pParse, /* The parse context of the CREATE TRIGGER statement */