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
c9a38e86
Commit
c9a38e86
authored
Apr 28, 2015
by
Arun Kuruvila
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mysql-5.1' into mysql-5.5
parents
c3870e08
fdae90dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
sql/sql_acl.cc
sql/sql_acl.cc
+14
-2
No files found.
sql/sql_acl.cc
View file @
c9a38e86
...
@@ -1242,7 +1242,8 @@ static ulong get_access(TABLE *form, uint fieldnr, uint *next_field)
...
@@ -1242,7 +1242,8 @@ static ulong get_access(TABLE *form, uint fieldnr, uint *next_field)
/*
/*
Return a number which, if sorted 'desc', puts strings in this order:
Return a number which, if sorted 'desc', puts strings in this order:
no wildcards
no wildcards
wildcards
strings containg wildcards and non-wildcard characters
single muilt-wildcard character('%')
empty string
empty string
*/
*/
...
@@ -1259,7 +1260,16 @@ static ulong get_sort(uint count,...)
...
@@ -1259,7 +1260,16 @@ static ulong get_sort(uint count,...)
{
{
char
*
start
,
*
str
=
va_arg
(
args
,
char
*
);
char
*
start
,
*
str
=
va_arg
(
args
,
char
*
);
uint
chars
=
0
;
uint
chars
=
0
;
uint
wild_pos
=
0
;
/* first wildcard position */
uint
wild_pos
=
0
;
/*
wild_pos
0 if string is empty
1 if string is a single muilt-wildcard
character('%')
first wildcard position + 1 if string containg wildcards and
non-wildcard characters
*/
if
((
start
=
str
))
if
((
start
=
str
))
{
{
...
@@ -1270,6 +1280,8 @@ static ulong get_sort(uint count,...)
...
@@ -1270,6 +1280,8 @@ static ulong get_sort(uint count,...)
else
if
(
*
str
==
wild_many
||
*
str
==
wild_one
)
else
if
(
*
str
==
wild_many
||
*
str
==
wild_one
)
{
{
wild_pos
=
(
uint
)
(
str
-
start
)
+
1
;
wild_pos
=
(
uint
)
(
str
-
start
)
+
1
;
if
(
!
(
wild_pos
==
1
&&
*
str
==
wild_many
&&
*
(
++
str
)
==
'\0'
))
wild_pos
++
;
break
;
break
;
}
}
chars
=
128
;
// Marker that chars existed
chars
=
128
;
// Marker that chars existed
...
...
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