我有 MySQL Cluster 实例,并希望将一列 (BLOB) 存储在磁盘而不是内存中。
我尝试按照本教程进行操作:http: //mikaelronstrom.blogspot.com/2006/02/how-to-define-table-that-uses-disk.html
这是我得到的输出:
mysql> CREATE DATABASE test1;
Query OK, 1 row affected (0.00 sec)
mysql> use test1;
Database changed
CREATE LOGFILE GROUP lg1
-> ADD UNDOFILE 'undofile.dat'
-> INITIAL_SIZE 16M
-> UNDO_BUFFER_SIZE = 1M
-> ENGINE = NDB;
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 '16M
UNDO_BUFFER_SIZE = 1M
ENGINE = NDB' at line 3
以下是此命令的语法:http
://dev.mysql.com/doc/refman/5.5/en/create-logfile-group.html 知道为什么这不起作用吗?我找不到违反此命令语法的地方。
CREATE LOGFILE GROUP 和 CREATE TABLESPACE 只接受字节作为单位。
http://bugs.mysql.com/bug.php?id=62858
将 MB 转换为字节后,日志文件组已为我成功创建。