Commit c9513074 authored by unknown's avatar unknown

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1

parents 5e6debe6 7233b5d5
...@@ -73,7 +73,7 @@ LINK32=xilink6.exe ...@@ -73,7 +73,7 @@ LINK32=xilink6.exe
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /GZ /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../libmysqld" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c # ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../libmysqld" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "SAFEMALLOC" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
# SUBTRACT CPP /X /Fr # SUBTRACT CPP /X /Fr
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
......
...@@ -420,3 +420,19 @@ count(*)-8 ...@@ -420,3 +420,19 @@ count(*)-8
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
count(*)-9 count(*)-9
0 0
drop table t1;
create table t1(a int primary key, b int not null, index(b));
insert into t1 values (1,1), (2,2);
set autocommit=0;
begin;
select count(*) from t1;
count(*)
2
ALTER TABLE t1 ADD COLUMN c int;
select a from t1 where b = 2;
a
2
show tables;
Tables_in_test
t1
drop table t1;
...@@ -236,3 +236,21 @@ select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; ...@@ -236,3 +236,21 @@ select count(*)-5 from t1 use index (ti) where ti < '10:11:11';
select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; select count(*)-6 from t1 use index (ti) where ti <= '10:11:11';
select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; select count(*)-8 from t1 use index (ti) where ti < '23:59:59';
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
drop table t1;
# bug#7798
create table t1(a int primary key, b int not null, index(b));
insert into t1 values (1,1), (2,2);
connect (con1,localhost,,,test);
connect (con2,localhost,,,test);
connection con1;
set autocommit=0;
begin;
select count(*) from t1;
connection con2;
ALTER TABLE t1 ADD COLUMN c int;
connection con1;
select a from t1 where b = 2;
show tables;
drop table t1;
...@@ -1879,7 +1879,6 @@ void Dbtc::packKeyData000Lab(Signal* signal, ...@@ -1879,7 +1879,6 @@ void Dbtc::packKeyData000Lab(Signal* signal,
Uint32 totalLen) Uint32 totalLen)
{ {
CacheRecord * const regCachePtr = cachePtr.p; CacheRecord * const regCachePtr = cachePtr.p;
UintR Tmp;
jam(); jam();
Uint32 len = 0; Uint32 len = 0;
...@@ -8503,14 +8502,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) ...@@ -8503,14 +8502,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
apiConnectptr.i = scanTabReq->apiConnectPtr; apiConnectptr.i = scanTabReq->apiConnectPtr;
tabptr.i = scanTabReq->tableId; tabptr.i = scanTabReq->tableId;
if (apiConnectptr.i >= capiConnectFilesize || if (apiConnectptr.i >= capiConnectFilesize)
tabptr.i >= ctabrecFilesize) { {
jam(); jam();
warningHandlerLab(signal); warningHandlerLab(signal);
return; return;
}//if }//if
ptrAss(apiConnectptr, apiConnectRecord); ptrAss(apiConnectptr, apiConnectRecord);
ApiConnectRecord * transP = apiConnectptr.p; ApiConnectRecord * transP = apiConnectptr.p;
if (transP->apiConnectstate != CS_CONNECTED) { if (transP->apiConnectstate != CS_CONNECTED) {
jam(); jam();
// could be left over from TCKEYREQ rollback // could be left over from TCKEYREQ rollback
...@@ -8524,9 +8525,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) ...@@ -8524,9 +8525,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
} else { } else {
jam(); jam();
errCode = ZSTATE_ERROR; errCode = ZSTATE_ERROR;
goto SCAN_TAB_error; goto SCAN_TAB_error_no_state_change;
} }
} }
if(tabptr.i >= ctabrecFilesize)
{
errCode = ZUNKNOWN_TABLE_ERROR;
goto SCAN_TAB_error;
}
ptrAss(tabptr, tableRecord); ptrAss(tabptr, tableRecord);
if ((aiLength == 0) || if ((aiLength == 0) ||
(!tabptr.p->checkTable(schemaVersion)) || (!tabptr.p->checkTable(schemaVersion)) ||
...@@ -8621,8 +8629,18 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) ...@@ -8621,8 +8629,18 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
errCode = ZNO_SCANREC_ERROR; errCode = ZNO_SCANREC_ERROR;
goto SCAN_TAB_error; goto SCAN_TAB_error;
SCAN_TAB_error: SCAN_TAB_error:
jam(); jam();
/**
* Prepare for up coming ATTRINFO/KEYINFO
*/
transP->apiConnectstate = CS_ABORTING;
transP->abortState = AS_IDLE;
transP->transid[0] = transid1;
transP->transid[1] = transid2;
SCAN_TAB_error_no_state_change:
ScanTabRef * ref = (ScanTabRef*)&signal->theData[0]; ScanTabRef * ref = (ScanTabRef*)&signal->theData[0];
ref->apiConnectPtr = transP->ndbapiConnect; ref->apiConnectPtr = transP->ndbapiConnect;
ref->transId1 = transid1; ref->transId1 = transid1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment