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
39b1aaed
Commit
39b1aaed
authored
Oct 26, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit of WL#3686 test case already in 5.1 to get regression testing, no code committed
parent
bb6346fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
0 deletions
+154
-0
mysql-test/suite/ndb/r/ndb_update_no_read.result
mysql-test/suite/ndb/r/ndb_update_no_read.result
+75
-0
mysql-test/suite/ndb/t/ndb_update_no_read.test
mysql-test/suite/ndb/t/ndb_update_no_read.test
+79
-0
No files found.
mysql-test/suite/ndb/r/ndb_update_no_read.result
0 → 100644
View file @
39b1aaed
DROP TABLE IF EXISTS t1;
create table t1 (a int not null primary key, b int not null, c int,
unique index_b (b) using hash)
engine ndb;
insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
(9,2,2),(10,1,2);
update t1 set c = 111, b = 20 where a = 1;
select * from t1 where a = 1 order by a;
a b c
1 20 111
delete from t1 where a = 1;
select * from t1 where a = 1 order by a;
a b c
update t1 set c = 12, b = 19 where b = 2;
select * from t1 where b = 2 order by a;
a b c
delete from t1 where b = 19;
select * from t1 where b = 19 order by a;
a b c
update t1 set c = 22 where a = 10 or a >= 10;
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 2
8 3 2
10 1 22
update t1 set c = 23 where a in (8,10);
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 2
8 3 23
10 1 23
update t1 set c = 23 where a in (7,8) or a >= 10;
select * from t1 order by a;
a b c
2 9 1
3 8 1
4 7 1
5 6 1
6 5 2
7 4 23
8 3 23
10 1 23
update t1 set c = 11 where a = 3 or b = 7;
select * from t1 where a = 3 or b = 7 order by a;
a b c
3 8 11
4 7 11
update t1 set a = 13, b = 20 where a = 3;
select * from t1 where a = 13 order by a;
a b c
13 20 11
update t1 set a = 12, b = 19 where b = 7;
select * from t1 where b = 19 order by a;
a b c
12 19 11
select * from t1 where b = 7 order by a;
a b c
update t1 set c = 12, b = 29 where a = 5 and b = 6;
select * from t1 where b = 19 order by a;
a b c
12 19 11
delete from t1 where b = 6 and c = 12;
select * from t1 where b = 6 order by a;
a b c
drop table t1;
mysql-test/suite/ndb/t/ndb_update_no_read.test
0 → 100644
View file @
39b1aaed
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
#
# New test case for WL 3686 (which is not until CGE-6.3)
# but test is committed in 5.1 to verify consistant results.
#
# When only constant expressions in update statements and
# only PK or UK in WHERE clause. No extra WHERE parts are
# allowed. WL #3687 takes of more advanced variants of
# avoiding the read before the update/delete
create
table
t1
(
a
int
not
null
primary
key
,
b
int
not
null
,
c
int
,
unique
index_b
(
b
)
using
hash
)
engine
ndb
;
insert
into
t1
values
(
1
,
10
,
1
),(
2
,
9
,
1
),(
3
,
8
,
1
),(
4
,
7
,
1
),(
5
,
6
,
1
),(
6
,
5
,
2
),(
7
,
4
,
2
),(
8
,
3
,
2
),
(
9
,
2
,
2
),(
10
,
1
,
2
);
# These ones should use optimisation
update
t1
set
c
=
111
,
b
=
20
where
a
=
1
;
select
*
from
t1
where
a
=
1
order
by
a
;
delete
from
t1
where
a
=
1
;
select
*
from
t1
where
a
=
1
order
by
a
;
update
t1
set
c
=
12
,
b
=
19
where
b
=
2
;
select
*
from
t1
where
b
=
2
order
by
a
;
delete
from
t1
where
b
=
19
;
select
*
from
t1
where
b
=
19
order
by
a
;
update
t1
set
c
=
22
where
a
=
10
or
a
>=
10
;
select
*
from
t1
order
by
a
;
update
t1
set
c
=
23
where
a
in
(
8
,
10
);
select
*
from
t1
order
by
a
;
update
t1
set
c
=
23
where
a
in
(
7
,
8
)
or
a
>=
10
;
select
*
from
t1
order
by
a
;
# These ones should not use optimisation
update
t1
set
c
=
11
where
a
=
3
or
b
=
7
;
select
*
from
t1
where
a
=
3
or
b
=
7
order
by
a
;
update
t1
set
a
=
13
,
b
=
20
where
a
=
3
;
select
*
from
t1
where
a
=
13
order
by
a
;
update
t1
set
a
=
12
,
b
=
19
where
b
=
7
;
select
*
from
t1
where
b
=
19
order
by
a
;
select
*
from
t1
where
b
=
7
order
by
a
;
update
t1
set
c
=
12
,
b
=
29
where
a
=
5
and
b
=
6
;
select
*
from
t1
where
b
=
19
order
by
a
;
delete
from
t1
where
b
=
6
and
c
=
12
;
select
*
from
t1
where
b
=
6
order
by
a
;
drop
table
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