mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-single-user
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
This commit is contained in:
commit
78dce2dd97
4 changed files with 57 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
|||
use test;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
|
||||
create table t1 (a int key, b int unique, c int) engine ndb;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 4007)
|
||||
ERROR HY000: Can't create table './test/t1.frm' (errno: 299)
|
||||
create table t1 (a int key, b int unique, c int) 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;
|
||||
|
@ -28,19 +28,29 @@ insert into t1 select * from t2;
|
|||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
create index new_index on t1 (c);
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
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);
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
select * from t1 where a = 1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
select * from t1 where b = 4;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
update t1 set b=102 where a = 2;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
update t1 set b=103 where b = 3;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
update t1 set b=b+100;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
update t1 set b=b+100 where a > 7;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
BEGIN;
|
||||
update t1 set b=b+100 where a=1;
|
||||
BEGIN;
|
||||
update t1 set b=b+100 where a=2;
|
||||
update t1 set b=b+100 where a=3;
|
||||
COMMIT;
|
||||
update t1 set b=b+100 where a=4;
|
||||
ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
|
||||
COMMIT;
|
||||
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
|
||||
drop table t1;
|
||||
|
|
|
@ -35,4 +35,3 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb
|
|||
|
||||
plugin : Bug#25659 memory leak via "plugins" test
|
||||
rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
|
||||
ndb_single_user : Bug#27021 Error codes in mysqld in single user mode varies
|
||||
|
|
|
@ -51,34 +51,55 @@ insert into t1 select * from t2;
|
|||
--connection server2
|
||||
--error 1051
|
||||
drop table t1;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
create index new_index on t1 (c);
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
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);
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
select * from t1 where a = 1;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
select * from t1 where b = 4;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
update t1 set b=102 where a = 2;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
update t1 set b=103 where b = 3;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
update t1 set b=b+100;
|
||||
--error 1146
|
||||
#--error 1296
|
||||
--error 1296
|
||||
update t1 set b=b+100 where a > 7;
|
||||
|
||||
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
#
|
||||
# we should be able to run transaction while in single user mode
|
||||
#
|
||||
--connection server1
|
||||
BEGIN;
|
||||
update t1 set b=b+100 where a=1;
|
||||
|
||||
--connection server2
|
||||
BEGIN;
|
||||
update t1 set b=b+100 where a=2;
|
||||
|
||||
# enter single user mode
|
||||
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
--connection server1
|
||||
update t1 set b=b+100 where a=3;
|
||||
COMMIT;
|
||||
|
||||
# while on other mysqld it should be aborted
|
||||
--connection server2
|
||||
--error 1296
|
||||
update t1 set b=b+100 where a=4;
|
||||
--error 1296
|
||||
COMMIT;
|
||||
|
||||
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
# cleanup
|
||||
--connection server1
|
||||
drop table t1;
|
||||
|
|
|
@ -346,6 +346,7 @@ public:
|
|||
|
||||
Uint32 RowGCIFlag;
|
||||
Uint32 RowChecksumFlag;
|
||||
|
||||
Uint32 SingleUserMode;
|
||||
|
||||
Table() {}
|
||||
|
|
Loading…
Reference in a new issue