Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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
1.2158 06/03/10 14:36:48 jonas@stripped +7 -0
ndb dd -
implement limitation with only on logfile group, since SR is really buggy with several
storage/ndb/src/ndbapi/ndberror.c
1.53 06/03/10 14:36:45 jonas@stripped +1 -0
New error code for "only one logfile group" limitation
storage/ndb/src/kernel/blocks/lgman.cpp
1.19 06/03/10 14:36:45 jonas@stripped +8 -3
New error code for "only one logfile group" limitation
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
1.3 06/03/10 14:36:45 jonas@stripped +2 -1
New error code for "only one logfile group" limitation
mysql-test/t/ndb_dd_dump.test
1.4 06/03/10 14:36:45 jonas@stripped +1 -14
Test that only 1 logfile group can be created
mysql-test/t/ndb_dd_ddl.test
1.8 06/03/10 14:36:45 jonas@stripped +13 -1
Test that only 1 logfile group can be created
mysql-test/r/ndb_dd_dump.result
1.3 06/03/10 14:36:45 jonas@stripped +2 -15
Test that only 1 logfile group can be created
mysql-test/r/ndb_dd_ddl.result
1.6 06/03/10 14:36:45 jonas@stripped +10 -0
Test that only 1 logfile group can be created
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.1-new
--- 1.5/mysql-test/r/ndb_dd_ddl.result 2006-03-06 10:55:32 +01:00
+++ 1.6/mysql-test/r/ndb_dd_ddl.result 2006-03-10 14:36:45 +01:00
@@ -7,6 +7,16 @@
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
--- 1.7/mysql-test/t/ndb_dd_ddl.test 2006-03-06 10:55:32 +01:00
+++ 1.8/mysql-test/t/ndb_dd_ddl.test 2006-03-10 14:36:45 +01:00
@@ -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
@@ -40,6 +43,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
--- 1.2/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp 2006-01-11 09:26:03
+01:00
+++ 1.3/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp 2006-03-10 14:36:45
+01:00
@@ -70,7 +70,8 @@
NoError = 0,
FilegroupAlreadyExists = 1502,
OutOfFilegroupRecords = 1503,
- OutOfLogBufferMemory = 1504
+ OutOfLogBufferMemory = 1504,
+ OneLogfileGroupLimit = 1514
};
Uint32 senderData;
--- 1.18/storage/ndb/src/kernel/blocks/lgman.cpp 2006-03-09 15:42:52 +01:00
+++ 1.19/storage/ndb/src/kernel/blocks/lgman.cpp 2006-03-10 14:36:45 +01:00
@@ -326,6 +326,13 @@
break;
}
+ if (!m_logfile_group_list.isEmpty())
+ {
+ jam();
+ err = CreateFilegroupImplRef::OneLogfileGroupLimit;
+ break;
+ }
+
if (!m_logfile_group_pool.seize(ptr))
{
jam();
@@ -1035,10 +1042,8 @@
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)
{
--- 1.52/storage/ndb/src/ndbapi/ndberror.c 2006-03-06 11:13:55 +01:00
+++ 1.53/storage/ndb/src/ndbapi/ndberror.c 2006-03-10 14:36:45 +01:00
@@ -413,6 +413,7 @@
{ 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"
},
--- 1.2/mysql-test/r/ndb_dd_dump.result 2006-02-02 10:55:57 +01:00
+++ 1.3/mysql-test/r/ndb_dd_dump.result 2006-03-10 14:36:45 +01:00
@@ -8,15 +8,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
@@ -34,7 +25,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;
CREATE TABLE t1
@@ -173,7 +164,6 @@
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 @@
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 @@
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 ts2 ENGINE = NDB;
DROP TABLESPACE ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
-DROP LOGFILE GROUP lg2 ENGINE = NDB;
--- 1.3/mysql-test/t/ndb_dd_dump.test 2006-02-22 10:07:29 +01:00
+++ 1.4/mysql-test/t/ndb_dd_dump.test 2006-03-10 14:36:45 +01:00
@@ -15,17 +15,6 @@
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 @@
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 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 ts3 ENGINE = NDB;
DROP LOGFILE GROUP lg1 ENGINE = NDB;
-DROP LOGFILE GROUP lg2 ENGINE = NDB;
#End 5.1 test case
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2158) | jonas | 10 Mar |