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
7377f546
Commit
7377f546
authored
Oct 02, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
bf5b57ad
bef1d7d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Docs/manual.texi
Docs/manual.texi
+5
-0
sql/sql_parse.cc
sql/sql_parse.cc
+3
-3
No files found.
Docs/manual.texi
View file @
7377f546
...
@@ -35217,6 +35217,9 @@ In other words, you can't access the values of the old row from a
...
@@ -35217,6 +35217,9 @@ In other words, you can't access the values of the old row from a
@code{REPLACE} statement. In some old MySQL versions it appeared that
@code{REPLACE} statement. In some old MySQL versions it appeared that
you could do this, but that was a bug that has been corrected.
you could do this, but that was a bug that has been corrected.
To be able to use @code{REPLACE} you must have @code{INSERT} and
@code{DELETE} privileges for the table.
When you use a @code{REPLACE} command, @code{mysql_affected_rows()}
When you use a @code{REPLACE} command, @code{mysql_affected_rows()}
will return 2 if the new row replaced an old row. This is because
will return 2 if the new row replaced an old row. This is because
one row was inserted and then the duplicate was deleted.
one row was inserted and then the duplicate was deleted.
...
@@ -50830,6 +50833,8 @@ Fixed some @code{ORDER BY ... DESC} problems with InnoDB.
...
@@ -50830,6 +50833,8 @@ Fixed some @code{ORDER BY ... DESC} problems with InnoDB.
Fixed an inadvertently changed option (@code{--ignore-space}) back to the
Fixed an inadvertently changed option (@code{--ignore-space}) back to the
original @code{--ignore-spaces} in @code{mysqlclient}. (Both syntaxes will
original @code{--ignore-spaces} in @code{mysqlclient}. (Both syntaxes will
work).
work).
@item
Don't require @code{UPDATE} privilege when using @code{REPLACE}.
@end itemize
@end itemize
@node News-4.0.4, News-4.0.3, News-4.0.5, News-4.0.x
@node News-4.0.4, News-4.0.3, News-4.0.5, News-4.0.x
sql/sql_parse.cc
View file @
7377f546
...
@@ -1878,10 +1878,10 @@ mysql_execute_command(void)
...
@@ -1878,10 +1878,10 @@ mysql_execute_command(void)
lex
->
lock_option
);
lex
->
lock_option
);
break
;
break
;
case
SQLCOM_REPLACE
:
case
SQLCOM_REPLACE
:
if
(
check_access
(
thd
,
INSERT_ACL
|
UPDATE_ACL
|
DELETE_ACL
,
if
(
check_access
(
thd
,
INSERT_ACL
|
DELETE_ACL
,
tables
->
db
,
&
tables
->
grant
.
privilege
))
tables
->
db
,
&
tables
->
grant
.
privilege
))
goto
error
;
/* purecov: inspected */
goto
error
;
/* purecov: inspected */
if
(
grant_option
&&
check_grant
(
thd
,
INSERT_ACL
|
UPDATE_ACL
|
DELETE_ACL
,
if
(
grant_option
&&
check_grant
(
thd
,
INSERT_ACL
|
DELETE_ACL
,
tables
))
tables
))
goto
error
;
goto
error
;
...
@@ -1899,7 +1899,7 @@ mysql_execute_command(void)
...
@@ -1899,7 +1899,7 @@ mysql_execute_command(void)
*/
*/
{
{
ulong
privilege
=
(
lex
->
sql_command
==
SQLCOM_INSERT_SELECT
?
ulong
privilege
=
(
lex
->
sql_command
==
SQLCOM_INSERT_SELECT
?
INSERT_ACL
:
INSERT_ACL
|
UPDATE_ACL
|
DELETE_ACL
);
INSERT_ACL
:
INSERT_ACL
|
DELETE_ACL
);
TABLE_LIST
*
save_next
=
tables
->
next
;
TABLE_LIST
*
save_next
=
tables
->
next
;
tables
->
next
=
0
;
tables
->
next
=
0
;
if
(
check_access
(
thd
,
privilege
,
if
(
check_access
(
thd
,
privilege
,
...
...
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