Bug #37512 the 'M' and 'G' abbreviations should work for INITIAL_SIZE

Submitted: 19 Jun 2008 1:34 Modified: 23 Jul 2008 23:13
Reporter: Feelora Gee Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:mysql-5.1.24 ndb-6.3.15 OS:Linux (redhat as5)
Assigned to: Marc ALFF CPU Architecture:Any
Tags: cluster;create logfile;

[19 Jun 2008 1:34] Feelora Gee
Description:
I am testing the mysql-5.1.24 ndb-6.3.15.
failed:
mysql> CREATE LOGFILE GROUP ndfg ADD UNDOFILE 'nd_undofile.dat' INITIAL_SIZE 128M 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 '128M ENGINE=ndb' at line 1

but success:
mysql>CREATE LOGFILE GROUP ndfg ADD UNDOFILE 'nd_undofile.dat' INITIAL_SIZE 134217728 ENGINE=ndb;
Query OK, 0 rows affected (33.27 sec)

It is a bug of SQL?

How to repeat:
mysql> CREATE LOGFILE GROUP ndfg ADD UNDOFILE 'nd_undofile.dat' INITIAL_SIZE 128M ENGINE=ndb;
[19 Jun 2008 3:15] Valeriy Kravchuk
According to the manual, http://dev.mysql.com/doc/refman/5.1/en/create-logfile-group.html, M and G suffixes should work:

"... Both of these parameters are specified in bytes. You may optionally follow either or both of these with a one-letter abbreviation for an order of magnitude, similar to those used in my.cnf. Generally, this is one of the letters M (for megabytes) or G (for gigabytes)."

So, this is a bug.
[23 Jul 2008 23:13] Marc ALFF
The reported bug can not be repeated using mysql 5.1.28,
the sizes expressed in 'K', 'M' and 'G' are all working correctly.

Test script used:

--include/have_ndb.inc

--error ER_WRONG_SIZE_NUMBER
CREATE LOGFILE GROUP lg
  ADD UNDOFILE 'foo.dat'
  INITIAL_SIZE 1T
  ENGINE=NDB ;

--> 1T is not valid, the error is expected

CREATE LOGFILE GROUP lg
  ADD UNDOFILE 'foo.dat'
  INITIAL_SIZE 1023K
  ENGINE=NDB ;

--> works

DROP LOGFILE GROUP lg
  ENGINE=NDB;

CREATE LOGFILE GROUP lg
  ADD UNDOFILE 'foo.dat'
  INITIAL_SIZE 128M
  ENGINE=NDB ;

--> works

DROP LOGFILE GROUP lg
  ENGINE=NDB;

CREATE LOGFILE GROUP lg
  ADD UNDOFILE 'foo.dat'
  INITIAL_SIZE 1G
  ENGINE=NDB ;

--> works

DROP LOGFILE GROUP lg
  ENGINE=NDB;

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.