Description:
Looking at storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
the default log group and tablespace names are "DEFAULT-LG" and
"DEFAULT-TS" with a dash.
The manual [1] says "DEFAULT_LG" and "DEFAULT_TS" (with an underscore
instead of a dash though), and these forms have the advantage that
they can be used without having to quote them with backticks in
SQL statements (e.g `DEFAULT-LG`, as otherwise the dash would
be interpreted as a minus)
[1] http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-ndbd-definition.html#id3360980
How to repeat:
Set up an initial log group and table space using config.ini,
without specifying log group or table space names:
InitialLogFileGroup = undo_buffer_size=128M; undo1.log:32M;
InitialTablespace = data1.dat: 256M;
Start the cluster and try to create a table using the
default table space name 'DEFAULT-TS':
CREATE TABLE t1
(
id INT PRIMARY KEY
)
TABLESPACE DEFAULT-TS STORAGE DISK
ENGINE NDBCLUSTER
;
Without putting DEFAULT-TS into backticks this will
fail with:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT-TS STORAGE DISK ENGINE NDBCLUSTER' at line 1
Suggested fix:
Change defaults to names using underscores:
=== modified file 'storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp'
--- storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2010-06-24 21:42:03 +0000
+++ storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2010-08-06 13:43:27 +0000
@@ -338,7 +338,7 @@
{
key = "undo_buffer_size=";
group.size = 64*1024*1024;
- group.name = "DEFAULT-LG";
+ group.name = "DEFAULT_LG";
group.type = type;
filetype = DictTabInfo::Undofile;
}
@@ -346,7 +346,7 @@
{
key = "extent_size=";
group.size = 1024*1024;
- group.name = "DEFAULT-TS";
+ group.name = "DEFAULT_TS";
group.type = type;
filetype = DictTabInfo::Datafile;
}