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
814314be
Commit
814314be
authored
Feb 13, 2008
by
gshchepa/uchum@host.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge host.loc:/home/uchum/work/5.0-opt-gca
into host.loc:/home/uchum/work/5.0-opt
parents
f264f92c
18770a0d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
2 deletions
+67
-2
mysql-test/r/grant3.result
mysql-test/r/grant3.result
+17
-0
mysql-test/r/select.result
mysql-test/r/select.result
+6
-0
mysql-test/t/grant3.test
mysql-test/t/grant3.test
+26
-0
mysql-test/t/select.test
mysql-test/t/select.test
+11
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+4
-1
sql/sql_acl.cc
sql/sql_acl.cc
+3
-1
No files found.
mysql-test/r/grant3.result
View file @
814314be
...
...
@@ -138,3 +138,20 @@ SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by
user host db select_priv
DROP USER CUser2@localhost;
DROP USER CUser2@LOCALHOST;
CREATE DATABASE mysqltest_1;
CREATE TABLE mysqltest_1.t1 (a INT);
CREATE USER 'mysqltest1'@'%';
GRANT SELECT, UPDATE ON `mysqltest_1`.* TO 'mysqltest1'@'%';
REVOKE SELECT ON `mysqltest_1`.* FROM 'mysqltest1'@'%';
GRANT SELECT, UPDATE ON `mysqltest\_1`.* TO 'mysqltest1'@'%';
FLUSH PRIVILEGES;
SHOW GRANTS;
Grants for mysqltest1@%
GRANT USAGE ON *.* TO 'mysqltest1'@'%'
GRANT SELECT, UPDATE ON `mysqltest\_1`.* TO 'mysqltest1'@'%'
GRANT UPDATE ON `mysqltest_1`.* TO 'mysqltest1'@'%'
SELECT * FROM mysqltest_1.t1;
a
DROP USER 'mysqltest1'@'%';
DROP DATABASE mysqltest_1;
End of 5.0 tests
mysql-test/r/select.result
View file @
814314be
...
...
@@ -4328,4 +4328,10 @@ SELECT * FROM t1 WHERE c1 > NULL + 1;
c1
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) NOT NULL PRIMARY KEY);
INSERT INTO t1 (a) VALUES ('foo0'), ('bar0'), ('baz0');
SELECT * FROM t1 WHERE a IN (CONCAT('foo', 0), 'bar');
a
foo0
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/grant3.test
View file @
814314be
...
...
@@ -134,3 +134,29 @@ SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by
DROP
USER
CUser2
@
localhost
;
DROP
USER
CUser2
@
LOCALHOST
;
#
# Bug#31194: Privilege ordering does not order properly for wildcard values
#
CREATE
DATABASE
mysqltest_1
;
CREATE
TABLE
mysqltest_1
.
t1
(
a
INT
);
CREATE
USER
'mysqltest1'
@
'%'
;
GRANT
SELECT
,
UPDATE
ON
`mysqltest_1`
.*
TO
'mysqltest1'
@
'%'
;
REVOKE
SELECT
ON
`mysqltest_1`
.*
FROM
'mysqltest1'
@
'%'
;
GRANT
SELECT
,
UPDATE
ON
`mysqltest\_1`
.*
TO
'mysqltest1'
@
'%'
;
FLUSH
PRIVILEGES
;
connect
(
conn1
,
localhost
,
mysqltest1
,,);
connection
conn1
;
SHOW
GRANTS
;
SELECT
*
FROM
mysqltest_1
.
t1
;
disconnect
conn1
;
connection
default
;
DROP
USER
'mysqltest1'
@
'%'
;
DROP
DATABASE
mysqltest_1
;
--
echo
End
of
5.0
tests
mysql-test/t/select.test
View file @
814314be
...
...
@@ -3672,4 +3672,15 @@ DROP TABLE t1;
--
echo
###########################################################################
#
# Bug #33764: Wrong result with IN(), CONCAT() and implicit type conversion
#
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
NOT
NULL
PRIMARY
KEY
);
INSERT
INTO
t1
(
a
)
VALUES
(
'foo0'
),
(
'bar0'
),
(
'baz0'
);
SELECT
*
FROM
t1
WHERE
a
IN
(
CONCAT
(
'foo'
,
0
),
'bar'
);
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/item_cmpfunc.cc
View file @
814314be
...
...
@@ -2995,7 +2995,10 @@ void in_string::set(uint pos,Item *item)
{
if
(
res
->
uses_buffer_owned_by
(
str
))
res
->
copy
();
*
str
=
*
res
;
if
(
item
->
type
()
==
Item
::
FUNC_ITEM
)
str
->
copy
(
*
res
);
else
*
str
=
*
res
;
}
if
(
!
str
->
charset
())
{
...
...
sql/sql_acl.cc
View file @
814314be
...
...
@@ -668,7 +668,9 @@ static ulong get_sort(uint count,...)
{
for
(;
*
str
;
str
++
)
{
if
(
*
str
==
wild_many
||
*
str
==
wild_one
||
*
str
==
wild_prefix
)
if
(
*
str
==
wild_prefix
&&
str
[
1
])
str
++
;
else
if
(
*
str
==
wild_many
||
*
str
==
wild_one
)
{
wild_pos
=
(
uint
)
(
str
-
start
)
+
1
;
break
;
...
...
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