Bug #28198 Single User Mode. Difference of output for empty and non-empty tables
Submitted: 2 May 2007 12:36
Reporter: Serge Kozlov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: 5.1.18-bk
Triage: Triaged: D2 (Serious)

[2 May 2007 12:36] Serge Kozlov
Description:
Currently there is the difference for output between empty and non-empty tables for "SHOW CREATE TABLE ..." and some other queries.

How to repeat:
1. Start cluster with 2 sql nodes.
2. Create two NDB tables and insert data into first table.
3. Switch one sql node to single user mode.
4. Connect to second sql node and try execute "SHOW CREATE TABLE ...":

// - this SQL node in single user mode //
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.18-ndb-6.2.1-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> create table t1 (a int not null key, b int, c varchar(10)) engine ndb;
Query OK, 0 rows affected (1.29 sec)

mysql> create table t2 (a int not null key, b int, c varchar(10)) engine ndb;
Query OK, 0 rows affected (1.30 sec)

mysql> insert into t1 values (1,1,'a');
Query OK, 1 row affected (0.00 sec)

mysql> show create table t1;
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------+
| Table | Create Table

                 |
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------+
| t1    | CREATE TABLE `t1` (
  `a` int(11) NOT NULL,
  `b` int(11) DEFAULT NULL,
  `c` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 |
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------+
1 row in set (0.00 sec)

mysql> show create table t2;
ERROR 1296 (HY000): Got error 299 'Operation not allowed or aborted due to singl
e user mode' from NDBCLUSTER