Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-07-26 22:31:44+02:00, tomas@stripped +6 -0
online alter table
ref signal was sent to api instead of coordinator
added missing data that was not copied
also allow tables with forced varpart to do online alter
mysql-test/r/ndb_alter_table_online.result@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +0 -0
New BitKeeper file ``mysql-test/r/ndb_alter_table_online.result''
mysql-test/r/ndb_alter_table_online.result@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +0 -0
mysql-test/t/ndb_alter_table_online.test@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +29 -0
New BitKeeper file ``mysql-test/t/ndb_alter_table_online.test''
mysql-test/t/ndb_alter_table_online.test@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +0 -0
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +6 -6
ref signal was sent to api instead of coordinator
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +2 -0
added missing data that was not copied
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +6 -1
added missing data that was not copied
also allow tables with forced varpart to do online alter
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2007-07-26 22:31:41+02:00, tomas@stripped +3 -2
allow tables with forced varpart to do online alter
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-telco-6.2
--- 1.140/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-06-27 11:00:53 +02:00
+++ 1.141/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-07-26 22:31:41 +02:00
@@ -471,7 +471,7 @@
if(signal)
{
+ /* This branch is run at GET_TABINFOREQ */
Uint32 * theData = signal->getDataPtrSend();
CreateFragmentationReq * const req = (CreateFragmentationReq*)theData;
@@ -492,7 +492,7 @@
}
else
{
+ /* This part is run at CREATE_TABLEREQ, ALTER_TABLEREQ */
;
}
@@ -4571,7 +4571,7 @@
ref->errorLine = 0;
ref->errorKey = 0;
ref->errorStatus = 0;
- sendSignal(alterTabPtr.p->m_senderRef, GSN_ALTER_TAB_REF, signal,
+ sendSignal(alterTabPtr.p->m_coordinatorRef, GSN_ALTER_TAB_REF, signal,
AlterTabRef::SignalLength, JBB);
c_blockState = BS_IDLE;
@@ -4823,7 +4823,7 @@
conf->tableVersion = tableVersion;
conf->gci = gci;
conf->requestType = requestType;
- sendSignal(alterTabPtr.p->m_senderRef, GSN_ALTER_TAB_CONF, signal,
+ sendSignal(alterTabPtr.p->m_coordinatorRef, GSN_ALTER_TAB_CONF, signal,
AlterTabConf::SignalLength, JBB);
return;
}
@@ -5009,7 +5009,7 @@
}
/*
+ TODO RONM: Some new code for FragmentData and RangeOrListData
*/
if (supportedAlteration)
{
@@ -5637,7 +5637,7 @@
req->temporaryTable = !!(tabPtr.p->m_bits & TableRecord::TR_Temporary);
/*
+ Need to fetch fragDataPtr from table object instead
*/
if(!fragDataPtr.isNull()){
signal->setSection(fragDataPtr, DiAddTabReq::FRAGMENTATION);
--- 1.85/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-06-20 06:34:48 +02:00
+++ 1.86/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-07-26 22:31:41 +02:00
@@ -433,6 +433,8 @@
struct AlterTabOperation {
Uint32 nextAlterTabOp;
Uint32 newNoOfAttrs;
+ Uint32 newNoOfCharsets;
+ Uint32 newNoOfKeyAttrs;
Uint32 noOfDynNullBits;
Uint32 noOfDynVar;
Uint32 noOfDynFix;
--- 1.49/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2007-05-14 14:47:27 +02:00
+++ 1.50/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2007-07-26 22:31:41 +02:00
@@ -677,7 +677,8 @@
/* Can only add attributes if varpart already present. */
if((regTabPtr->m_attributes[MM].m_no_of_varsize +
- regTabPtr->m_attributes[MM].m_no_of_dynamic) == 0)
+ regTabPtr->m_attributes[MM].m_no_of_dynamic +
+ (regTabPtr->m_bits & Tablerec::TR_ForceVarPart)) == 0)
{
sendAlterTabRef(signal, req, ZINVALID_ALTER_TAB);
return;
@@ -687,6 +688,8 @@
seizeAlterTabOperation(regAlterTabOpPtr);
regAlterTabOpPtr.p->newNoOfAttrs= newNoOfAttr;
+ regAlterTabOpPtr.p->newNoOfCharsets= newNoOfCharsets;
+ regAlterTabOpPtr.p->newNoOfKeyAttrs= newNoOfKeyAttrs;
/* Allocate a new (possibly larger) table descriptor buffer. */
Uint32 allocSize= getTabDescrOffsets(newNoOfAttr, newNoOfCharsets,
@@ -867,6 +870,8 @@
/* Set new attribute counts. */
regTabPtr->m_no_of_attributes= regAlterTabOpPtr.p->newNoOfAttrs;
+ regTabPtr->noOfCharsets= regAlterTabOpPtr.p->newNoOfCharsets;
+ regTabPtr->noOfKeyAttr= regAlterTabOpPtr.p->newNoOfKeyAttrs;
regTabPtr->m_attributes[MM].m_no_of_dyn_fix= regAlterTabOpPtr.p->noOfDynFix;
regTabPtr->m_attributes[MM].m_no_of_dyn_var= regAlterTabOpPtr.p->noOfDynVar;
regTabPtr->m_attributes[MM].m_no_of_dynamic= regAlterTabOpPtr.p->noOfDynamic;
--- 1.171/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2007-07-12 12:19:17 +02:00
+++ 1.172/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2007-07-26 22:31:41 +02:00
@@ -2567,9 +2567,10 @@
- The new column must be memory based.
- The new column can not be a primary key or distribution key.
- There must already be at least one existing memory-stored dynamic or
- variable-sized column (so that the varpart is already allocated).
+ variable-sized column (so that the varpart is already allocated) or
+ varPart must be forced
*/
- found_varpart= false;
+ found_varpart= old_impl.getForceVarPart();
for(Uint32 i= 0; i<old_sz; i++)
{
const NdbColumnImpl *col= impl.m_columns[i];
--- New file ---
+++ mysql-test/r/ndb_alter_table_online.result 07/07/26 22:31:41
--- New file ---
+++ mysql-test/t/ndb_alter_table_online.test 07/07/26 22:31:41
-- source include/have_multi_ndb.inc
-- source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
# basic online alter test
#
CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
INSERT INTO t1 values (1,1);
ALTER TABLE t1 ADD c CHAR(19);
INSERT INTO t1 values (2,1,"a");
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1 (a INT UNSIGNED KEY, b VARCHAR(19)) ENGINE NDB;
INSERT INTO t1 values (1,"a");
ALTER TABLE t1 ADD c INT;
INSERT INTO t1 values (2,"a",1);
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1 (a INT UNSIGNED KEY, b INT COLUMN_FORMAT DYNAMIC) ENGINE NDB;
INSERT INTO t1 values (1,1);
ALTER TABLE t1 ADD c INT;
INSERT INTO t1 values (2,1,1);
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2592) | tomas | 26 Jul |