mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
43 lines
1.3 KiB
Text
43 lines
1.3 KiB
Text
|
stop slave;
|
||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
|
reset master;
|
||
|
reset slave;
|
||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
|
start slave;
|
||
|
DROP DATABASE IF EXISTS TEST_DB;
|
||
|
CREATE DATABASE TEST_DB;
|
||
|
USE TEST_DB;
|
||
|
CREATE TABLE SUBSCRIBER
|
||
|
( NUMBER CHAR(12) BINARY NOT NULL,
|
||
|
NAME CHAR(32) BINARY NOT NULL,
|
||
|
GROUP_ID INT UNSIGNED NOT NULL,
|
||
|
LOCATION INT UNSIGNED NOT NULL,
|
||
|
SESSIONS INT UNSIGNED NOT NULL,
|
||
|
CHANGED_BY CHAR(32) BINARY NOT NULL,
|
||
|
CHANGED_TIME CHAR(32) BINARY NOT NULL,
|
||
|
PRIMARY KEY USING HASH (NUMBER))
|
||
|
ENGINE = NDB;
|
||
|
CREATE TABLE GROUP2
|
||
|
( GROUP_ID INT UNSIGNED NOT NULL,
|
||
|
GROUP_NAME CHAR(32) BINARY NOT NULL,
|
||
|
ALLOW_READ CHAR(1) BINARY NOT NULL,
|
||
|
ALLOW_INSERT INT UNSIGNED NOT NULL,
|
||
|
ALLOW_DELETE INT UNSIGNED NOT NULL,
|
||
|
PRIMARY KEY USING HASH (GROUP_ID))
|
||
|
ENGINE = NDB;
|
||
|
CREATE TABLE SESSION
|
||
|
( NUMBER CHAR(12) BINARY NOT NULL,
|
||
|
SERVER_ID INT UNSIGNED NOT NULL,
|
||
|
DATA BINARY(2000) NOT NULL,
|
||
|
PRIMARY KEY USING HASH (NUMBER,SERVER_ID))
|
||
|
ENGINE = NDB;
|
||
|
CREATE TABLE SERVER
|
||
|
( SUFFIX CHAR(2) BINARY NOT NULL,
|
||
|
SERVER_ID INT UNSIGNED NOT NULL,
|
||
|
NAME CHAR(32) BINARY NOT NULL,
|
||
|
NO_OF_READ INT UNSIGNED NOT NULL,
|
||
|
NO_OF_INSERT INT UNSIGNED NOT NULL,
|
||
|
NO_OF_DELETE INT UNSIGNED NOT NULL,
|
||
|
PRIMARY KEY USING HASH (SUFFIX, SERVER_ID))
|
||
|
ENGINE = NDB;
|