!2950 支持兼容lock tables语法和功能

Merge pull request !2950 from 王修强/lock_table
This commit is contained in:
opengauss-bot
2023-02-28 09:01:31 +00:00
committed by Gitee
2 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,10 @@ static void RangeVarCallbackForLockTable(
*/
void LockTableCommand(LockStmt* lockstmt)
{
if (DB_IS_CMPT(B_FORMAT) && lockstmt->isLockTables) {
TransactionState s = GetCurrentTransactionState();
s->blockState = TBLOCK_INPROGRESS;
}
ListCell* p = NULL;
/*

View File

@ -2160,6 +2160,7 @@ typedef struct LockStmt {
bool nowait; /* no wait mode */
bool cancelable; /* send term to lock holder */
int waitSec; /* WAIT time Sec */
bool isLockTables; /* lock tables flag */
} LockStmt;
/* ----------------------