ndb dd -

  implement limitation with only on logfile group, since SR is really buggy with several
parent 942015f4
......@@ -7,6 +7,16 @@ ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;
CREATE LOGFILE GROUP lg2
ADD UNDOFILE 'undofile2.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE 1M
ENGINE NDB;
ERROR HY000: Failed to create LOGFILE GROUP
SHOW WARNINGS;
Level Code Message
Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
Error 1506 Failed to create LOGFILE GROUP
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M
......
......@@ -8,15 +8,6 @@ ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile_lg1_02.dat'
INITIAL_SIZE = 4M
ENGINE NDB;
CREATE LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_01.dat'
UNDO_BUFFER_SIZE = 1M
INITIAL_SIZE 2M
ENGINE NDB;
ALTER LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_02.dat'
INITIAL_SIZE = 4M
ENGINE NDB;
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile_ts1_01.dat'
USE LOGFILE GROUP lg1
......@@ -34,7 +25,7 @@ INITIAL_SIZE 2M
ENGINE NDB;
CREATE TABLESPACE ts3
ADD DATAFILE 'datafile_ts3_01.dat'
USE LOGFILE GROUP lg2
USE LOGFILE GROUP lg1
INITIAL_SIZE 4M
ENGINE NDB;
CREATE TABLE t1
......@@ -173,7 +164,6 @@ DROP TABLESPACE ts1 ENGINE = NDB;
DROP TABLESPACE ts2 ENGINE = NDB;
DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
DROP LOGFILE GROUP lg2 ENGINE = NDB;
SELECT DISTINCT
LOGFILE_GROUP_NAME,
FILE_NAME,
......@@ -184,8 +174,6 @@ FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE
lg1 undofile_lg1_01.dat 1048576 2097152 ndbcluster
lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster
lg2 undofile_lg2_01.dat 1048576 2097152 ndbcluster
lg2 undofile_lg2_02.dat 1048576 4194304 ndbcluster
SELECT DISTINCT
TABLESPACE_NAME,
LOGFILE_GROUP_NAME,
......@@ -198,7 +186,7 @@ TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE
ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster
ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster
ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster
ts3 lg2 datafile_ts3_01.dat 1048576 4194304 ndbcluster
ts3 lg1 datafile_ts3_01.dat 1048576 4194304 ndbcluster
SELECT COUNT(*) FROM t1;
COUNT(*)
500
......@@ -227,4 +215,3 @@ DROP TABLESPACE ts1 ENGINE = NDB;
DROP TABLESPACE ts2 ENGINE = NDB;
DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
DROP LOGFILE GROUP lg2 ENGINE = NDB;
......@@ -20,7 +20,10 @@
# the file name. I know this is not an issue for *nix systems but
# will be when we expand to Windows and Mac. Better put it in now.
############################################
#
# Jonas 2006-03-10
# Add verification that ndb currently is limited to 1 logfile group
#
-- source include/have_ndb.inc
......@@ -41,6 +44,15 @@ INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;
# Verify that one currently can create only 1 logfile group
--error ER_CREATE_FILEGROUP_FAILED
CREATE LOGFILE GROUP lg2
ADD UNDOFILE 'undofile2.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE 1M
ENGINE NDB;
SHOW WARNINGS;
--error ER_CREATE_FILEGROUP_FAILED
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
......
......@@ -15,17 +15,6 @@ ADD UNDOFILE 'undofile_lg1_02.dat'
INITIAL_SIZE = 4M
ENGINE NDB;
CREATE LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_01.dat'
UNDO_BUFFER_SIZE = 1M
INITIAL_SIZE 2M
ENGINE NDB;
ALTER LOGFILE GROUP lg2
ADD UNDOFILE 'undofile_lg2_02.dat'
INITIAL_SIZE = 4M
ENGINE NDB;
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile_ts1_01.dat'
USE LOGFILE GROUP lg1
......@@ -46,7 +35,7 @@ ENGINE NDB;
CREATE TABLESPACE ts3
ADD DATAFILE 'datafile_ts3_01.dat'
USE LOGFILE GROUP lg2
USE LOGFILE GROUP lg1
INITIAL_SIZE 4M
ENGINE NDB;
......@@ -204,7 +193,6 @@ DROP TABLESPACE ts2 ENGINE = NDB;
DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
DROP LOGFILE GROUP lg2 ENGINE = NDB;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql
......@@ -254,6 +242,5 @@ DROP TABLESPACE ts2 ENGINE = NDB;
DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
DROP LOGFILE GROUP lg2 ENGINE = NDB;
#End 5.1 test case
......@@ -70,7 +70,8 @@ struct CreateFilegroupImplRef {
NoError = 0,
FilegroupAlreadyExists = 1502,
OutOfFilegroupRecords = 1503,
OutOfLogBufferMemory = 1504
OutOfLogBufferMemory = 1504,
OneLogfileGroupLimit = 1514
};
Uint32 senderData;
......
......@@ -326,6 +326,13 @@ Lgman::execCREATE_FILEGROUP_REQ(Signal* signal){
break;
}
if (!m_logfile_group_list.isEmpty())
{
jam();
err = CreateFilegroupImplRef::OneLogfileGroupLimit;
break;
}
if (!m_logfile_group_pool.seize(ptr))
{
jam();
......@@ -1035,10 +1042,8 @@ int
Logfile_client::sync_lsn(Signal* signal,
Uint64 lsn, Request* req, Uint32 flags)
{
Lgman::Logfile_group key;
key.m_logfile_group_id= m_logfile_group_id;
Ptr<Lgman::Logfile_group> ptr;
if(m_lgman->m_logfile_group_hash.find(ptr, key))
if(m_lgman->m_logfile_group_list.first(ptr))
{
if(ptr.p->m_last_synced_lsn >= lsn)
{
......
......@@ -413,6 +413,7 @@ ErrorBundle ErrorCodes[] = {
{ 1511, DMEC, IE, "Out of memory" },
{ 1512, DMEC, SE, "File read error" },
{ 1513, DMEC, IE, "Filegroup not online" },
{ 1514, DMEC, SE, "Currently there is a limit of one logfile group" },
{ 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
......
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