403Webshell
Server IP : 45.40.142.9  /  Your IP : 216.73.216.250
Web Server : Apache
System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : bayspec ( 506)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/mysql-test/suite/ndb/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/mysql-test/suite/ndb/t/ndb_addnode.test
--source include/ndb_have_online_alter.inc
-- source include/have_ndb.inc
-- source include/not_embedded.inc
--result_format 2

--exec $NDB_MGM -e show

CREATE LOGFILE GROUP lg_1
    ADD UNDOFILE 'undo_1.dat'
    INITIAL_SIZE 4M
    UNDO_BUFFER_SIZE 2M
    ENGINE NDB;

CREATE TABLESPACE ts_1
    ADD DATAFILE 'data_1.dat'
    USE LOGFILE GROUP lg_1
    INITIAL_SIZE 4M
    ENGINE NDB;

create table t1(id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb;
create table t2(id int NOT NULL PRIMARY KEY, data char(8))
TABLESPACE ts_1 STORAGE DISK engine=ndb;

load data local infile 'suite/ndb/data/table_data10000.dat' into table t1 fields terminated by ' ' lines terminated by '\n';
load data local infile 'suite/ndb/data/table_data10000.dat' into table t2 fields terminated by ' ' lines terminated by '\n';

## Create nodegroup for "new" nodes
--exec $NDB_MGM -e "create nodegroup 3,4"

# Cluster running after adding two ndbd nodes
--exec $NDB_MGM -e show

## Drop
--exec $NDB_MGM -e "drop nodegroup 1"
## and create
--exec $NDB_MGM -e "create nodegroup 3,4"

create table t3(id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb;
create table t4(id int NOT NULL PRIMARY KEY, data char(8))
TABLESPACE ts_1 STORAGE DISK engine=ndb;

insert into t3(id, data) VALUES 
(1,'new'), (2,'new'),(3,'new'),(4,'new'),(5,'new'),
(6,'new'),(7,'new'),(8,'new'),(9,'new'),(10,'new');
insert into t4(id, data) VALUES
(1,'new'), (2,'new'),(3,'new'),(4,'new'),(5,'new'),
(6,'new'),(7,'new'),(8,'new'),(9,'new'),(10,'new');

alter online table t1 reorganize partition;
alter online table t2 reorganize partition;

## Drop nodegroup with "new" nodes is not allowed with data one those nodes
# NOTE: --error=0 is due to return codes doesnt work on windoze
--error 0,255
--exec $NDB_MGM -e "drop nodegroup 1"

## Nodegroup with "new" nodes still exist after dropping it as shown:
--exec $NDB_MGM -e show

drop table t1,t2,t3,t4;

## Drop nodegroup with "new" nodes
--exec $NDB_MGM -e "drop nodegroup 1"

## Nodegroup with "new" nodes still exists after dropping it as shown:
--exec $NDB_MGM -e show

# Cleanup
ALTER TABLESPACE ts_1 DROP DATAFILE 'data_1.dat' ENGINE NDB;
DROP TABLESPACE ts_1 ENGINE NDB;
DROP LOGFILE GROUP lg_1 ENGINE NDB;

exit;

Youez - 2016 - github.com/yon3zu
LinuXploit