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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
794b3b52
Commit
794b3b52
authored
May 10, 2004
by
magnus@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated ndb_basic
parent
86bb6a2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
8 deletions
+67
-8
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+51
-3
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+16
-5
No files found.
mysql-test/r/ndb_basic.result
View file @
794b3b52
...
...
@@ -25,11 +25,59 @@ pk1 attr1
DELETE FROM t1;
SELECT * FROM t1;
pk1 attr1
INSERT INTO t1 VALUES (9410,9412);
INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765),
(7,8), (8,9), (9,10), (10,11), (11,12), (12,13), (13,14);
UPDATE t1 SET attr1 = 9999;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9999
8 9999
9 9999
10 9999
11 9999
12 9999
13 9999
9408 9999
9410 9999
9411 9999
UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9999
9410 9999
9411 9999
UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9997
9410 9997
9411 9997
DELETE FROM t1 WHERE pk1 = 9410;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1
INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765);
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9997
9411 9997
DELETE FROM t1;
SELECT * FROM t1;
pk1 attr1
...
...
mysql-test/t/ndb_basic.test
View file @
794b3b52
...
...
@@ -23,6 +23,7 @@ SELECT pk1 FROM t1;
SELECT
*
FROM
t1
;
SELECT
t1
.*
FROM
t1
;
# Update on record by primary key
UPDATE
t1
SET
attr1
=
1
WHERE
pk1
=
9410
;
SELECT
*
FROM
t1
;
...
...
@@ -35,13 +36,23 @@ SELECT * FROM t1;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
# Delete the record by specifying pk
INSERT
INTO
t1
VALUES
(
9410
,
9412
);
# Insert more records and update them all at once
INSERT
INTO
t1
VALUES
(
9410
,
9412
),
(
9411
,
9413
),
(
9408
,
8765
),
(
7
,
8
),
(
8
,
9
),
(
9
,
10
),
(
10
,
11
),
(
11
,
12
),
(
12
,
13
),
(
13
,
14
);
UPDATE
t1
SET
attr1
=
9999
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
UPDATE
t1
SET
attr1
=
9998
WHERE
pk1
<
1000
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
UPDATE
t1
SET
attr1
=
9997
WHERE
attr1
=
9999
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Delete one record by specifying pk
DELETE
FROM
t1
WHERE
pk1
=
9410
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Insert three records and delete the
INSERT
INTO
t1
VALUES
(
9410
,
9412
),
(
9411
,
9413
),
(
9408
,
8765
);
# Delete all from table
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
...
...
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