Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f95ebd12
Commit
f95ebd12
authored
Jan 11, 2006
by
jmiller@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes done from Jonas's review of pervious commit
parent
68ef8b07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
186 additions
and
186 deletions
+186
-186
mysql-test/r/ndb_dd_basic.result
mysql-test/r/ndb_dd_basic.result
+93
-93
mysql-test/t/ndb_dd_basic.test
mysql-test/t/ndb_dd_basic.test
+93
-93
No files found.
mysql-test/r/ndb_dd_basic.result
View file @
f95ebd12
...
...
@@ -17,15 +17,15 @@ ALTER TABLESPACE ts1
ADD DATAFILE 'datafile02.dat'
INITIAL_SIZE = 4M
ENGINE=NDB;
CREATE TABLE t
est.t
1
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;
INSERT INTO t
est.t
1 VALUES (0, 0, 0);
SELECT * FROM t
est.t
1;
INSERT INTO t1 VALUES (0, 0, 0);
SELECT * FROM t1;
pk1 b c
0 0 0
INSERT INTO t
est.t
1 VALUES
INSERT INTO t1 VALUES
(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
...
...
@@ -126,7 +126,7 @@ INSERT INTO test.t1 VALUES
(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490),
(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495),
(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500);
SELECT COUNT(*) FROM t
est.t
1;
SELECT COUNT(*) FROM t1;
COUNT(*)
501
CREATE LOGFILE GROUP lg2
...
...
@@ -156,198 +156,198 @@ ADD UNDOFILE 'x.dat'
INITIAL_SIZE 1000000000000K
ENGINE = NDB;
ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion
DROP TABLE t
est.t
1;
CREATE TABLE t
est.t
1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB;
INSERT INTO t
est.t
1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3');
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB;
INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3');
BEGIN;
UPDATE t
est.t
1 SET b = '2' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '2' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
2
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 2 1
UPDATE t
est.t
1 SET c = '2' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '2' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
2
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 2 2
UPDATE t
est.t
1 SET b = '3' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '3' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
3
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 3 2
COMMIT;
SELECT * FROM t
est.t
1 ORDER BY 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 3 2
2 2 2
3 3 3
BEGIN;
UPDATE t
est.t
1 SET c = '3' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '3' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
3
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 3 3
UPDATE t
est.t
1 SET b = '4' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '4' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
4
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 4 3
UPDATE t
est.t
1 SET c = '4' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '4' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
4
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 4 4
COMMIT;
SELECT * FROM t
est.t
1 ORDER BY 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 4 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '5' WHERE a = 1;
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '5' WHERE a = 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 5 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '6' WHERE b = '5';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '6' WHERE b = '5';
SELECT * FROM t1 ORDER BY 1;
a b c
1 6 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '7'WHERE c = '4';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '7'WHERE c = '4';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '5' WHERE a = 1;
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '5' WHERE a = 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 5
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '6' WHERE b = '7';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '6' WHERE b = '7';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 6
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '7' WHERE c = '6';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '7' WHERE c = '6';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 7
2 2 2
3 3 3
DROP TABLE t
est.t
1;
CREATE TABLE t
est.t
1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB;
INSERT INTO t
est.t
1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3');
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB;
INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3');
BEGIN;
UPDATE t
est.t
1 SET b = '2' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '2' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
2
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 2 1
UPDATE t
est.t
1 SET c = '2' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '2' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
2
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 2 2
UPDATE t
est.t
1 SET b = '3' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '3' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
3
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 3 2
COMMIT;
SELECT * FROM t
est.t
1 ORDER BY 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 3 2
2 2 2
3 3 3
BEGIN;
UPDATE t
est.t
1 SET c = '3' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '3' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
3
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 3 3
UPDATE t
est.t
1 SET b = '4' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET b = '4' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
4
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 4 3
UPDATE t
est.t
1 SET c = '4' WHERE a = 1;
SELECT b FROM t
est.t
1 WHERE a = 1;
UPDATE t1 SET c = '4' WHERE a = 1;
SELECT b FROM t1 WHERE a = 1;
b
4
SELECT * FROM t
est.t
1 WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
a b c
1 4 4
COMMIT;
SELECT * FROM t
est.t
1 ORDER BY 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 4 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '5' WHERE a = 1;
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '5' WHERE a = 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 5 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '6' WHERE b = '5';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '6' WHERE b = '5';
SELECT * FROM t1 ORDER BY 1;
a b c
1 6 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET b = '7' WHERE c = '4';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET b = '7' WHERE c = '4';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 4
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '5' WHERE a = 1;
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '5' WHERE a = 1;
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 5
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '6' WHERE b = '7';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '6' WHERE b = '7';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 6
2 2 2
3 3 3
UPDATE t
est.t
1 SET c = '7' WHERE c = '6';
SELECT * FROM t
est.t
1 ORDER BY 1;
UPDATE t1 SET c = '7' WHERE c = '6';
SELECT * FROM t1 ORDER BY 1;
a b c
1 7 7
2 2 2
3 3 3
DROP TABLE t
est.t
1;
CREATE TABLE t
est.t
1 (
DROP TABLE t1;
CREATE TABLE t1 (
a INT NOT NULL PRIMARY KEY,
b TEXT NOT NULL
) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
...
...
@@ -363,36 +363,36 @@ set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
INSERT INTO t
est.t
1 VALUES(1,@b1);
INSERT INTO t
est.t
1 VALUES(2,@b2);
SELECT a,length(b),substr(b,1+2*900,2) FROM t
est.t
1 WHERE a=1;
INSERT INTO t1 VALUES(1,@b1);
INSERT INTO t1 VALUES(2,@b2);
SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1;
a length(b) substr(b,1+2*900,2)
1 2256 b1
SELECT a,length(b),substr(b,1+2*9000,2) FROM t
est.t
1 WHERE a=2;
SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2;
a length(b) substr(b,1+2*9000,2)
2 20000 b2
UPDATE t
est.t
1 SET b=@b2 WHERE a=1;
UPDATE t
est.t
1 SET b=@b1 WHERE a=2;
SELECT a,length(b),substr(b,1+2*9000,2) FROM t
est.t
1 WHERE a=1;
UPDATE t1 SET b=@b2 WHERE a=1;
UPDATE t1 SET b=@b1 WHERE a=2;
SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1;
a length(b) substr(b,1+2*9000,2)
1 20000 b2
SELECT a,length(b),substr(b,1+2*900,2) FROM t
est.t
1 WHERE a=2;
SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2;
a length(b) substr(b,1+2*900,2)
2 2256 b1
UPDATE t
est.t
1 SET b=concat(b,b) WHERE a=1;
UPDATE t
est.t
1 SET b=concat(b,b) WHERE a=2;
SELECT a,length(b),substr(b,1+4*9000,2) FROM t
est.t
1 WHERE a=1;
UPDATE t1 SET b=concat(b,b) WHERE a=1;
UPDATE t1 SET b=concat(b,b) WHERE a=2;
SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1;
a length(b) substr(b,1+4*9000,2)
1 40000 b2
SELECT a,length(b),substr(b,1+4*900,2) FROM t
est.t
1 WHERE a=2;
SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2;
a length(b) substr(b,1+4*900,2)
2 4512 b1
DELETE FROM t
est.t
1 WHERE a=1;
DELETE FROM t
est.t
1 WHERE a=2;
SELECT COUNT(*) FROM t
est.t
1;
DELETE FROM t1 WHERE a=1;
DELETE FROM t1 WHERE a=2;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t
est.t
1;
DROP TABLE t1;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE = NDB;
...
...
mysql-test/t/ndb_dd_basic.test
View file @
f95ebd12
...
...
@@ -49,15 +49,15 @@ ENGINE=NDB;
# Create a table using this tablespace
########################################
CREATE
TABLE
t
est
.
t
1
CREATE
TABLE
t1
(
pk1
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
NOT
NULL
,
c
INT
NOT
NULL
)
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDB
;
INSERT
INTO
t
est
.
t
1
VALUES
(
0
,
0
,
0
);
SELECT
*
FROM
t
est
.
t
1
;
INSERT
INTO
t1
VALUES
(
0
,
0
,
0
);
SELECT
*
FROM
t1
;
INSERT
INTO
t
est
.
t
1
VALUES
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
),(
2
,
2
,
2
),(
3
,
3
,
3
),(
4
,
4
,
4
),(
5
,
5
,
5
),
(
6
,
6
,
6
),(
7
,
7
,
7
),(
8
,
8
,
8
),(
9
,
9
,
9
),(
10
,
10
,
10
),
(
11
,
11
,
11
),(
12
,
12
,
12
),(
13
,
13
,
13
),(
14
,
14
,
14
),(
15
,
15
,
15
),
...
...
@@ -159,7 +159,7 @@ INSERT INTO test.t1 VALUES
(
491
,
491
,
491
),(
492
,
492
,
492
),(
493
,
493
,
493
),(
494
,
494
,
494
),(
495
,
495
,
495
),
(
496
,
496
,
496
),(
497
,
497
,
497
),(
498
,
498
,
498
),(
499
,
499
,
499
),(
500
,
500
,
500
);
SELECT
COUNT
(
*
)
FROM
t
est
.
t
1
;
SELECT
COUNT
(
*
)
FROM
t1
;
####################################
# Test error cases with size numbers
...
...
@@ -194,99 +194,99 @@ ADD UNDOFILE 'x.dat'
INITIAL_SIZE
1000000000000
K
ENGINE
=
NDB
;
DROP
TABLE
t
est
.
t
1
;
DROP
TABLE
t1
;
############################
# Test update of mm/dd part
############################
CREATE
TABLE
t
est
.
t
1
(
a
INT
PRIMARY
KEY
,
b
CHAR
(
4
)
NOT
NULL
,
c
CHAR
(
4
)
NOT
NULL
,
KEY
(
b
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDB
;
INSERT
INTO
t
est
.
t
1
VALUES
(
1
,
'1'
,
'1'
),
(
2
,
'2'
,
'2'
),
(
3
,
'3'
,
'3'
);
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
CHAR
(
4
)
NOT
NULL
,
c
CHAR
(
4
)
NOT
NULL
,
KEY
(
b
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDB
;
INSERT
INTO
t1
VALUES
(
1
,
'1'
,
'1'
),
(
2
,
'2'
,
'2'
),
(
3
,
'3'
,
'3'
);
BEGIN
;
UPDATE
t
est
.
t
1
SET
b
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
c
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
COMMIT
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
BEGIN
;
UPDATE
t
est
.
t
1
SET
c
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
c
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
COMMIT
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'6'
WHERE
b
=
'5'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'7'
WHERE
c
=
'4'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'6'
WHERE
b
=
'7'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'7'
WHERE
c
=
'6'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
DROP
TABLE
t
est
.
t
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'6'
WHERE
b
=
'5'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'7'
WHERE
c
=
'4'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'6'
WHERE
b
=
'7'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'7'
WHERE
c
=
'6'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
DROP
TABLE
t1
;
#####
CREATE
TABLE
t
est
.
t
1
(
a
INT
PRIMARY
KEY
,
b
VARCHAR
(
4
)
NOT
NULL
,
c
CHAR
(
4
)
NOT
NULL
,
KEY
(
b
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
NDB
;
INSERT
INTO
t
est
.
t
1
VALUE
(
1
,
'1'
,
'1'
),
(
2
,
'2'
,
'2'
),
(
3
,
'3'
,
'3'
);
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
VARCHAR
(
4
)
NOT
NULL
,
c
CHAR
(
4
)
NOT
NULL
,
KEY
(
b
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
NDB
;
INSERT
INTO
t1
VALUE
(
1
,
'1'
,
'1'
),
(
2
,
'2'
,
'2'
),
(
3
,
'3'
,
'3'
);
BEGIN
;
UPDATE
t
est
.
t
1
SET
b
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
c
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'2'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
COMMIT
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
BEGIN
;
UPDATE
t
est
.
t
1
SET
c
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
c
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'3'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'4'
WHERE
a
=
1
;
SELECT
b
FROM
t1
WHERE
a
=
1
;
SELECT
*
FROM
t1
WHERE
a
=
1
;
COMMIT
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'6'
WHERE
b
=
'5'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
b
=
'7'
WHERE
c
=
'4'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'6'
WHERE
b
=
'7'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
UPDATE
t
est
.
t
1
SET
c
=
'7'
WHERE
c
=
'6'
;
SELECT
*
FROM
t
est
.
t
1
ORDER
BY
1
;
DROP
TABLE
t
est
.
t
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'6'
WHERE
b
=
'5'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
b
=
'7'
WHERE
c
=
'4'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'5'
WHERE
a
=
1
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'6'
WHERE
b
=
'7'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
UPDATE
t1
SET
c
=
'7'
WHERE
c
=
'6'
;
SELECT
*
FROM
t1
ORDER
BY
1
;
DROP
TABLE
t1
;
########################
# Test for blobs...
########################
CREATE
TABLE
t
est
.
t
1
(
CREATE
TABLE
t1
(
a
INT
NOT
NULL
PRIMARY
KEY
,
b
TEXT
NOT
NULL
)
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDBCLUSTER
;
...
...
@@ -308,22 +308,22 @@ set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set
@
b2
=
concat
(
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
);
set
@
b2
=
concat
(
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
,
@
b2
);
INSERT
INTO
t
est
.
t
1
VALUES
(
1
,
@
b1
);
INSERT
INTO
t
est
.
t
1
VALUES
(
2
,
@
b2
);
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
900
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
9000
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
2
;
UPDATE
t
est
.
t
1
SET
b
=@
b2
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=@
b1
WHERE
a
=
2
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
9000
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
900
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
2
;
UPDATE
t
est
.
t
1
SET
b
=
concat
(
b
,
b
)
WHERE
a
=
1
;
UPDATE
t
est
.
t
1
SET
b
=
concat
(
b
,
b
)
WHERE
a
=
2
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
4
*
9000
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
4
*
900
,
2
)
FROM
t
est
.
t
1
WHERE
a
=
2
;
DELETE
FROM
t
est
.
t
1
WHERE
a
=
1
;
DELETE
FROM
t
est
.
t
1
WHERE
a
=
2
;
SELECT
COUNT
(
*
)
FROM
t
est
.
t
1
;
DROP
TABLE
t
est
.
t
1
;
INSERT
INTO
t1
VALUES
(
1
,
@
b1
);
INSERT
INTO
t1
VALUES
(
2
,
@
b2
);
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
900
,
2
)
FROM
t1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
9000
,
2
)
FROM
t1
WHERE
a
=
2
;
UPDATE
t1
SET
b
=@
b2
WHERE
a
=
1
;
UPDATE
t1
SET
b
=@
b1
WHERE
a
=
2
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
9000
,
2
)
FROM
t1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
2
*
900
,
2
)
FROM
t1
WHERE
a
=
2
;
UPDATE
t1
SET
b
=
concat
(
b
,
b
)
WHERE
a
=
1
;
UPDATE
t1
SET
b
=
concat
(
b
,
b
)
WHERE
a
=
2
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
4
*
9000
,
2
)
FROM
t1
WHERE
a
=
1
;
SELECT
a
,
length
(
b
),
substr
(
b
,
1
+
4
*
900
,
2
)
FROM
t1
WHERE
a
=
2
;
DELETE
FROM
t1
WHERE
a
=
1
;
DELETE
FROM
t1
WHERE
a
=
2
;
SELECT
COUNT
(
*
)
FROM
t1
;
DROP
TABLE
t1
;
###################
# Test Cleanup
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment