From be01d89661cc062e1f6636988e8a331aa1265def Mon Sep 17 00:00:00 2001
From: "tomas@whalegate.ndb.mysql.com" <>
Date: Mon, 16 Apr 2007 14:15:30 +0200
Subject: [PATCH] some more tests + drop stuff after done

---
 mysql-test/r/ndb_single_user.result | 29 +++++++++++++++++++++++++++++
 mysql-test/t/ndb_single_user.test   | 26 +++++++++++++++++++++++++-
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/mysql-test/r/ndb_single_user.result b/mysql-test/r/ndb_single_user.result
index 9d8a6613e43..54ae99b2f4f 100644
--- a/mysql-test/r/ndb_single_user.result
+++ b/mysql-test/r/ndb_single_user.result
@@ -28,11 +28,40 @@ show warnings;
 Level	Code	Message
 Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1516	Failed to create TABLESPACE
+DROP LOGFILE GROUP lg1 
+ENGINE =NDB;
+ERROR HY000: Failed to drop LOGFILE GROUP
+show warnings;
+Level	Code	Message
+Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Error	1517	Failed to drop LOGFILE GROUP
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile.dat'
 USE LOGFILE GROUP lg1
 INITIAL_SIZE 12M
 ENGINE NDB;
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE NDB;
+ERROR HY000: Failed to alter:  DROP DATAFILE
+show warnings;
+Level	Code	Message
+Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Error	1521	Failed to alter:  DROP DATAFILE
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE NDB;
+DROP TABLESPACE ts1
+ENGINE NDB;
+ERROR HY000: Failed to drop TABLESPACE
+show warnings;
+Level	Code	Message
+Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Error	1517	Failed to drop TABLESPACE
+DROP TABLESPACE ts1
+ENGINE NDB;
+DROP LOGFILE GROUP lg1 
+ENGINE =NDB;
 insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0);
 create table t2 as select * from t1;
 select * from t1 where a = 1;
diff --git a/mysql-test/t/ndb_single_user.test b/mysql-test/t/ndb_single_user.test
index fd6205e9023..3c6656be9f9 100644
--- a/mysql-test/t/ndb_single_user.test
+++ b/mysql-test/t/ndb_single_user.test
@@ -44,19 +44,43 @@ INITIAL_SIZE 16M
 UNDO_BUFFER_SIZE = 1M
 ENGINE=NDB;
 --connection server2
---error 1516
+--error ER_CREATE_FILEGROUP_FAILED
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile.dat'
 USE LOGFILE GROUP lg1
 INITIAL_SIZE 12M
 ENGINE NDB;
 show warnings;
+--error ER_DROP_FILEGROUP_FAILED
+DROP LOGFILE GROUP lg1 
+ENGINE =NDB;
+show warnings;
 --connection server1
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile.dat'
 USE LOGFILE GROUP lg1
 INITIAL_SIZE 12M
 ENGINE NDB;
+--connection server2
+--error ER_ALTER_FILEGROUP_FAILED
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE NDB;
+show warnings;
+--connection server1
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE NDB;
+--connection server2
+--error ER_DROP_FILEGROUP_FAILED
+DROP TABLESPACE ts1
+ENGINE NDB;
+show warnings;
+--connection server1
+DROP TABLESPACE ts1
+ENGINE NDB;
+DROP LOGFILE GROUP lg1 
+ENGINE =NDB;
 insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0);
 create table t2 as select * from t1;
 # read with pk
-- 
2.30.9