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
cfce3d82
Commit
cfce3d82
authored
Jan 26, 2006
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
6e984d6e
5d0e8d81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/update.result
mysql-test/r/update.result
+15
-0
mysql-test/t/update.test
mysql-test/t/update.test
+11
-0
sql/sql_update.cc
sql/sql_update.cc
+1
-2
No files found.
mysql-test/r/update.result
View file @
cfce3d82
...
@@ -358,6 +358,21 @@ update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
...
@@ -358,6 +358,21 @@ update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
affected rows: 3
affected rows: 3
info: Rows matched: 3 Changed: 3 Warnings: 0
info: Rows matched: 3 Changed: 3 Warnings: 0
drop table t1,t2;
drop table t1,t2;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, filler1 char(200), filler2 char(200), key(a));
insert into t2 select A.a + 10*B.a, 'filler','filler' from t1 A, t1 B;
flush status;
update t2 set a=3 where a=2;
show status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
Handler_read_next 1
Handler_read_prev 0
Handler_read_rnd 1
Handler_read_rnd_next 0
drop table t1, t2;
create table t1(f1 int, `*f2` int);
create table t1(f1 int, `*f2` int);
insert into t1 values (1,1);
insert into t1 values (1,1);
update t1 set `*f2`=1;
update t1 set `*f2`=1;
...
...
mysql-test/t/update.test
View file @
cfce3d82
...
@@ -288,6 +288,17 @@ update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
...
@@ -288,6 +288,17 @@ update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
--
disable_info
--
disable_info
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
# BUG#15935
create
table
t1
(
a
int
);
insert
into
t1
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
create
table
t2
(
a
int
,
filler1
char
(
200
),
filler2
char
(
200
),
key
(
a
));
insert
into
t2
select
A
.
a
+
10
*
B
.
a
,
'filler'
,
'filler'
from
t1
A
,
t1
B
;
flush
status
;
update
t2
set
a
=
3
where
a
=
2
;
show
status
like
'handler_read%'
;
drop
table
t1
,
t2
;
#
#
# Bug #16510 Updating field named like '*name' caused server crash
# Bug #16510 Updating field named like '*name' caused server crash
#
#
...
...
sql/sql_update.cc
View file @
cfce3d82
...
@@ -212,7 +212,6 @@ int mysql_update(THD *thd,
...
@@ -212,7 +212,6 @@ int mysql_update(THD *thd,
SORT_FIELD
*
sortorder
;
SORT_FIELD
*
sortorder
;
ha_rows
examined_rows
;
ha_rows
examined_rows
;
used_index
=
MAX_KEY
;
// For call to init_read_record()
table
->
sort
.
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
table
->
sort
.
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
MYF
(
MY_FAE
|
MY_ZEROFILL
));
MYF
(
MY_FAE
|
MY_ZEROFILL
));
if
(
!
(
sortorder
=
make_unireg_sortorder
(
order
,
&
length
))
||
if
(
!
(
sortorder
=
make_unireg_sortorder
(
order
,
&
length
))
||
...
@@ -244,7 +243,7 @@ int mysql_update(THD *thd,
...
@@ -244,7 +243,7 @@ int mysql_update(THD *thd,
DISK_BUFFER_SIZE
,
MYF
(
MY_WME
)))
DISK_BUFFER_SIZE
,
MYF
(
MY_WME
)))
goto
err
;
goto
err
;
if
(
used_index
==
MAX_KEY
)
if
(
used_index
==
MAX_KEY
||
(
select
&&
select
->
quick
)
)
init_read_record
(
&
info
,
thd
,
table
,
select
,
0
,
1
);
init_read_record
(
&
info
,
thd
,
table
,
select
,
0
,
1
);
else
else
init_read_record_idx
(
&
info
,
thd
,
table
,
1
,
used_index
);
init_read_record_idx
(
&
info
,
thd
,
table
,
1
,
used_index
);
...
...
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