Below is the list of changes that have just been committed into a local
5.1 repository of justin.he. When justin.he 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-04-27 18:46:43+08:00, Justin.He@stripped +3 -0
Bug#24560 Data nodes died(lgman) if undo_buffer_size from logfile group has small value
mysql-test/r/ndb_dd_ddl.result@stripped, 2007-04-27 18:46:40+08:00,
Justin.He@stripped +27 -0
update result for adding testcase of undo_buffer_size limiation
mysql-test/t/ndb_dd_ddl.test@stripped, 2007-04-27 18:46:40+08:00,
Justin.He@stripped +40 -0
add test case for undo_buffer_size limitation when create logfile group
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-04-27 18:46:41+08:00,
Justin.He@stripped +5 -1
since undo_buffer_size cannot be less than 96KB in LGMAN block,
add a check to verify this limitation
# 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: Justin.He
# Host: dev3-240.dev.cn.tlan
# Root: /home/justin.he/mysql/mysql-5.1/bug24560-5.1-new-ndb-bj
--- 1.14/mysql-test/r/ndb_dd_ddl.result 2007-04-27 18:46:51 +08:00
+++ 1.15/mysql-test/r/ndb_dd_ddl.result 2007-04-27 18:46:51 +08:00
@@ -1,6 +1,33 @@
DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS mysqltest;
CREATE DATABASE mysqltest;
+**** undo_buffer_size Limitation Testing ****
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 0
+engine=ndb;
+ERROR HY000: Failed to create LOGFILE GROUP
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 1
+engine=ndb;
+ERROR HY000: Failed to create LOGFILE GROUP
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 98303
+engine=ndb;
+ERROR HY000: Failed to create LOGFILE GROUP
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 98304
+engine=ndb;
+DROP LOGFILE GROUP lg1
+ENGINE=NDB;
+**** End undo_buffer_size Limitation Testing ****
**** Begin Duplicate Statement Testing ****
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
--- 1.12/mysql-test/t/ndb_dd_ddl.test 2007-04-27 18:46:51 +08:00
+++ 1.13/mysql-test/t/ndb_dd_ddl.test 2007-04-27 18:46:51 +08:00
@@ -34,6 +34,46 @@
CREATE DATABASE mysqltest;
--enable_warnings
+############## undo_buffer_size Limiatation Testing #########
+
+--echo **** undo_buffer_size Limitation Testing ****
+
+# bug#24560, undo_buffer_size could not less than 96KB(98304 bytes)
+# Verify can't create only logfile group when undo_buffer_size < 96KB
+--error ER_CREATE_FILEGROUP_FAILED
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 0
+engine=ndb;
+
+--error ER_CREATE_FILEGROUP_FAILED
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 1
+engine=ndb;
+
+--error ER_CREATE_FILEGROUP_FAILED
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 98303
+engine=ndb;
+
+# Verify can create only logfile group when undo_buffer_size >= 96KB
+create logfile group lg1
+add undofile 'undofile.dat'
+initial_size 1M
+undo_buffer_size = 98304
+engine=ndb;
+
+DROP LOGFILE GROUP lg1
+ENGINE=NDB;
+
+--echo **** End undo_buffer_size Limitation Testing ****
+############# End undo_buffer_size Limitation ############
+
############## Duplcate Statement Testing #########
--echo **** Begin Duplicate Statement Testing ****
--- 1.122/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-04-27 18:46:51 +08:00
+++ 1.123/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-04-27 18:46:51 +08:00
@@ -18,6 +18,7 @@
#define DBDICT_C
#include "Dbdict.hpp"
+#include "diskpage.hpp"
#include <ndb_limits.h>
#include <NdbOut.hpp>
@@ -15547,7 +15548,10 @@
}
else if(fg.FilegroupType == DictTabInfo::LogfileGroup)
{
- if(!fg.LF_UndoBufferSize)
+ /**
+ * undo_buffer_size can't be less than 96KB in LGMAN block
+ */
+ if(fg.LF_UndoBufferSize < 3 * File_formats::NDB_PAGE_SIZE)
{
op->m_errorCode = CreateFilegroupRef::InvalidUndoBufferSize;
break;
| Thread |
|---|
| • bk commit into 5.1 tree (Justin.He:1.2553) BUG#24560 | justin.he | 27 Apr |