mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Dbdict
- set table state in releaseTableObject - make handleTabInfoInit release object if parsing fails - make sure table is not accessed is parsing fails
This commit is contained in:
parent
a366d6eefc
commit
2917d9fdbb
1 changed files with 2 additions and 5 deletions
|
@ -2867,7 +2867,6 @@ Dbdict::execALTER_TABLE_REQ(Signal* signal)
|
||||||
if(parseRecord.errorCode != 0){
|
if(parseRecord.errorCode != 0){
|
||||||
jam();
|
jam();
|
||||||
c_opCreateTable.release(alterTabPtr);
|
c_opCreateTable.release(alterTabPtr);
|
||||||
parseRecord.tablePtr.p->tabState = TableRecord::NOT_DEFINED;
|
|
||||||
alterTableRef(signal, req,
|
alterTableRef(signal, req,
|
||||||
(AlterTableRef::ErrorCode) parseRecord.errorCode,
|
(AlterTableRef::ErrorCode) parseRecord.errorCode,
|
||||||
aParseRecord);
|
aParseRecord);
|
||||||
|
@ -3052,7 +3051,6 @@ Dbdict::execALTER_TAB_REQ(Signal * signal)
|
||||||
if(parseRecord.errorCode != 0){
|
if(parseRecord.errorCode != 0){
|
||||||
jam();
|
jam();
|
||||||
c_opCreateTable.release(alterTabPtr);
|
c_opCreateTable.release(alterTabPtr);
|
||||||
parseRecord.tablePtr.p->tabState = TableRecord::NOT_DEFINED;
|
|
||||||
alterTabRef(signal, req,
|
alterTabRef(signal, req,
|
||||||
(AlterTableRef::ErrorCode) parseRecord.errorCode,
|
(AlterTableRef::ErrorCode) parseRecord.errorCode,
|
||||||
aParseRecord);
|
aParseRecord);
|
||||||
|
@ -3437,7 +3435,6 @@ Dbdict::execALTER_TAB_CONF(Signal * signal){
|
||||||
// Release resources
|
// Release resources
|
||||||
TableRecordPtr tabPtr;
|
TableRecordPtr tabPtr;
|
||||||
c_tableRecordPool.getPtr(tabPtr, regAlterTabPtr->m_tablePtrI);
|
c_tableRecordPool.getPtr(tabPtr, regAlterTabPtr->m_tablePtrI);
|
||||||
tabPtr.p->tabState = TableRecord::NOT_DEFINED;
|
|
||||||
releaseTableObject(tabPtr.i, false);
|
releaseTableObject(tabPtr.i, false);
|
||||||
c_opCreateTable.release(alterTabPtr);
|
c_opCreateTable.release(alterTabPtr);
|
||||||
c_blockState = BS_IDLE;
|
c_blockState = BS_IDLE;
|
||||||
|
@ -3571,7 +3568,6 @@ Dbdict::alterTab_writeTableConf(Signal* signal,
|
||||||
jam();
|
jam();
|
||||||
// Release resources
|
// Release resources
|
||||||
c_tableRecordPool.getPtr(tabPtr, regAlterTabPtr->m_tablePtrI);
|
c_tableRecordPool.getPtr(tabPtr, regAlterTabPtr->m_tablePtrI);
|
||||||
tabPtr.p->tabState = TableRecord::NOT_DEFINED;
|
|
||||||
releaseTableObject(tabPtr.i, false);
|
releaseTableObject(tabPtr.i, false);
|
||||||
c_opCreateTable.release(alterTabPtr);
|
c_opCreateTable.release(alterTabPtr);
|
||||||
c_blockState = BS_IDLE;
|
c_blockState = BS_IDLE;
|
||||||
|
@ -4459,7 +4455,6 @@ Dbdict::createTab_dropComplete(Signal* signal,
|
||||||
|
|
||||||
TableRecordPtr tabPtr;
|
TableRecordPtr tabPtr;
|
||||||
c_tableRecordPool.getPtr(tabPtr, createTabPtr.p->m_tablePtrI);
|
c_tableRecordPool.getPtr(tabPtr, createTabPtr.p->m_tablePtrI);
|
||||||
tabPtr.p->tabState = TableRecord::NOT_DEFINED;
|
|
||||||
|
|
||||||
releaseTableObject(tabPtr.i);
|
releaseTableObject(tabPtr.i);
|
||||||
PageRecordPtr pagePtr;
|
PageRecordPtr pagePtr;
|
||||||
|
@ -5497,6 +5492,8 @@ void Dbdict::releaseTableObject(Uint32 tableId, bool removeFromHash)
|
||||||
c_tableRecordPool.getPtr(tablePtr, tableId);
|
c_tableRecordPool.getPtr(tablePtr, tableId);
|
||||||
if (removeFromHash)
|
if (removeFromHash)
|
||||||
c_tableRecordHash.remove(tablePtr);
|
c_tableRecordHash.remove(tablePtr);
|
||||||
|
|
||||||
|
tablePtr.p->tabState = TableRecord::NOT_DEFINED;
|
||||||
|
|
||||||
Uint32 nextAttrRecord = tablePtr.p->firstAttribute;
|
Uint32 nextAttrRecord = tablePtr.p->firstAttribute;
|
||||||
while (nextAttrRecord != RNIL) {
|
while (nextAttrRecord != RNIL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue