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
e03d4330
Commit
e03d4330
authored
Sep 25, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
cfff5b50
12ac759d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
Docs/manual.texi
Docs/manual.texi
+6
-0
sql/sql_acl.cc
sql/sql_acl.cc
+7
-6
sql/time.cc
sql/time.cc
+18
-1
No files found.
Docs/manual.texi
View file @
e03d4330
...
@@ -50453,6 +50453,12 @@ each individual 4.0.x release.
...
@@ -50453,6 +50453,12 @@ each individual 4.0.x release.
@itemize @bullet
@itemize @bullet
@item
@item
Fixed bug where @code{GRANT}/@code{REVOKE} failed if hostname was given in
not matching case.
@item
Don't give warning in @code{LOAD DATA INFILE} when setting a
@code{timestamp} to a string of '0'.
@item
Fixed bug in @code{myisamchk -R} mode.
Fixed bug in @code{myisamchk -R} mode.
@item
@item
Fixed bug that caused @code{mysqld} to crash on @code{REVOKE}.
Fixed bug that caused @code{mysqld} to crash on @code{REVOKE}.
sql/sql_acl.cc
View file @
e03d4330
...
@@ -643,7 +643,8 @@ static void acl_update_user(const char *user, const char *host,
...
@@ -643,7 +643,8 @@ static void acl_update_user(const char *user, const char *host,
!
strcmp
(
user
,
acl_user
->
user
))
!
strcmp
(
user
,
acl_user
->
user
))
{
{
if
(
!
acl_user
->
host
.
hostname
&&
!
host
[
0
]
||
if
(
!
acl_user
->
host
.
hostname
&&
!
host
[
0
]
||
acl_user
->
host
.
hostname
&&
!
strcmp
(
host
,
acl_user
->
host
.
hostname
))
acl_user
->
host
.
hostname
&&
!
my_strcasecmp
(
host
,
acl_user
->
host
.
hostname
))
{
{
acl_user
->
access
=
privileges
;
acl_user
->
access
=
privileges
;
if
(
mqh
->
bits
&
1
)
if
(
mqh
->
bits
&
1
)
...
@@ -732,7 +733,7 @@ static void acl_update_db(const char *user, const char *host, const char *db,
...
@@ -732,7 +733,7 @@ static void acl_update_db(const char *user, const char *host, const char *db,
!
strcmp
(
user
,
acl_db
->
user
))
!
strcmp
(
user
,
acl_db
->
user
))
{
{
if
(
!
acl_db
->
host
.
hostname
&&
!
host
[
0
]
||
if
(
!
acl_db
->
host
.
hostname
&&
!
host
[
0
]
||
acl_db
->
host
.
hostname
&&
!
str
cmp
(
host
,
acl_db
->
host
.
hostname
))
acl_db
->
host
.
hostname
&&
!
my_strcase
cmp
(
host
,
acl_db
->
host
.
hostname
))
{
{
if
(
!
acl_db
->
db
&&
!
db
[
0
]
||
if
(
!
acl_db
->
db
&&
!
db
[
0
]
||
acl_db
->
db
&&
!
strcmp
(
db
,
acl_db
->
db
))
acl_db
->
db
&&
!
strcmp
(
db
,
acl_db
->
db
))
...
@@ -1666,7 +1667,7 @@ static GRANT_TABLE *table_hash_search(const char *host,const char* ip,
...
@@ -1666,7 +1667,7 @@ static GRANT_TABLE *table_hash_search(const char *host,const char* ip,
{
{
if
(
exact
)
if
(
exact
)
{
{
if
((
host
&&
!
str
cmp
(
host
,
grant_table
->
host
))
||
if
((
host
&&
!
my_strcase
cmp
(
host
,
grant_table
->
host
))
||
(
ip
&&
!
strcmp
(
ip
,
grant_table
->
host
)))
(
ip
&&
!
strcmp
(
ip
,
grant_table
->
host
)))
return
grant_table
;
return
grant_table
;
}
}
...
@@ -2723,7 +2724,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
...
@@ -2723,7 +2724,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
if
(
!
(
host
=
acl_user
->
host
.
hostname
))
if
(
!
(
host
=
acl_user
->
host
.
hostname
))
host
=
"%"
;
host
=
"%"
;
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
!
str
cmp
(
lex_user
->
host
.
str
,
host
))
!
my_strcase
cmp
(
lex_user
->
host
.
str
,
host
))
break
;
break
;
}
}
if
(
counter
==
acl_users
.
elements
)
if
(
counter
==
acl_users
.
elements
)
...
@@ -2870,7 +2871,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
...
@@ -2870,7 +2871,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
host
=
""
;
host
=
""
;
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
!
str
cmp
(
lex_user
->
host
.
str
,
host
))
!
my_strcase
cmp
(
lex_user
->
host
.
str
,
host
))
{
{
want_access
=
acl_db
->
access
;
want_access
=
acl_db
->
access
;
if
(
want_access
)
if
(
want_access
)
...
@@ -2929,7 +2930,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
...
@@ -2929,7 +2930,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
host
=
""
;
host
=
""
;
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
if
(
!
strcmp
(
lex_user
->
user
.
str
,
user
)
&&
!
str
cmp
(
lex_user
->
host
.
str
,
host
))
!
my_strcase
cmp
(
lex_user
->
host
.
str
,
host
))
{
{
want_access
=
grant_table
->
privs
;
want_access
=
grant_table
->
privs
;
if
((
want_access
|
grant_table
->
cols
)
!=
0
)
if
((
want_access
|
grant_table
->
cols
)
!=
0
)
...
...
sql/time.cc
View file @
e03d4330
...
@@ -429,6 +429,7 @@ timestamp_type
...
@@ -429,6 +429,7 @@ timestamp_type
str_to_TIME
(
const
char
*
str
,
uint
length
,
TIME
*
l_time
,
bool
fuzzy_date
)
str_to_TIME
(
const
char
*
str
,
uint
length
,
TIME
*
l_time
,
bool
fuzzy_date
)
{
{
uint
field_length
,
year_length
,
digits
,
i
,
number_of_fields
,
date
[
7
];
uint
field_length
,
year_length
,
digits
,
i
,
number_of_fields
,
date
[
7
];
uint
not_zero_date
;
const
char
*
pos
;
const
char
*
pos
;
const
char
*
end
=
str
+
length
;
const
char
*
end
=
str
+
length
;
DBUG_ENTER
(
"str_to_TIME"
);
DBUG_ENTER
(
"str_to_TIME"
);
...
@@ -446,6 +447,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
...
@@ -446,6 +447,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
digits
=
(
uint
)
(
pos
-
str
);
digits
=
(
uint
)
(
pos
-
str
);
year_length
=
(
digits
==
4
||
digits
==
8
||
digits
>=
14
)
?
4
:
2
;
year_length
=
(
digits
==
4
||
digits
==
8
||
digits
>=
14
)
?
4
:
2
;
field_length
=
year_length
-
1
;
field_length
=
year_length
-
1
;
not_zero_date
=
0
;
for
(
i
=
0
;
i
<
6
&&
str
!=
end
&&
isdigit
(
*
str
)
;
i
++
)
for
(
i
=
0
;
i
<
6
&&
str
!=
end
&&
isdigit
(
*
str
)
;
i
++
)
{
{
uint
tmp_value
=
(
uint
)
(
uchar
)
(
*
str
++
-
'0'
);
uint
tmp_value
=
(
uint
)
(
uchar
)
(
*
str
++
-
'0'
);
...
@@ -455,6 +457,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
...
@@ -455,6 +457,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
str
++
;
str
++
;
}
}
date
[
i
]
=
tmp_value
;
date
[
i
]
=
tmp_value
;
not_zero_date
|=
tmp_value
;
if
(
i
==
2
&&
str
!=
end
&&
*
str
==
'T'
)
if
(
i
==
2
&&
str
!=
end
&&
*
str
==
'T'
)
str
++
;
// ISO8601: CCYYMMDDThhmmss
str
++
;
// ISO8601: CCYYMMDDThhmmss
else
if
(
i
!=
5
)
// Skip inter-field delimiters
else
if
(
i
!=
5
)
// Skip inter-field delimiters
...
@@ -478,6 +481,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
...
@@ -478,6 +481,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
while
(
str
++
!=
end
&&
isdigit
(
str
[
0
])
&&
field_length
--
)
while
(
str
++
!=
end
&&
isdigit
(
str
[
0
])
&&
field_length
--
)
tmp_value
=
tmp_value
*
10
+
(
uint
)
(
uchar
)
(
*
str
-
'0'
);
tmp_value
=
tmp_value
*
10
+
(
uint
)
(
uchar
)
(
*
str
-
'0'
);
date
[
6
]
=
tmp_value
;
date
[
6
]
=
tmp_value
;
not_zero_date
|=
tmp_value
;
}
}
else
else
date
[
6
]
=
0
;
date
[
6
]
=
0
;
...
@@ -491,7 +495,20 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
...
@@ -491,7 +495,20 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
date
[
2
]
>
31
||
date
[
3
]
>
23
||
date
[
4
]
>
59
||
date
[
5
]
>
59
||
date
[
2
]
>
31
||
date
[
3
]
>
23
||
date
[
4
]
>
59
||
date
[
5
]
>
59
||
!
fuzzy_date
&&
(
date
[
1
]
==
0
||
date
[
2
]
==
0
))
!
fuzzy_date
&&
(
date
[
1
]
==
0
||
date
[
2
]
==
0
))
{
{
current_thd
->
cuted_fields
++
;
/* Only give warning for a zero date if there is some garbage after */
if
(
!
not_zero_date
)
// If zero date
{
for
(;
str
!=
end
;
str
++
)
{
if
(
!
isspace
(
*
str
))
{
not_zero_date
=
1
;
// Give warning
break
;
}
}
}
if
(
not_zero_date
)
current_thd
->
cuted_fields
++
;
DBUG_RETURN
(
TIMESTAMP_NONE
);
DBUG_RETURN
(
TIMESTAMP_NONE
);
}
}
if
(
str
!=
end
&&
current_thd
->
count_cuted_fields
)
if
(
str
!=
end
&&
current_thd
->
count_cuted_fields
)
...
...
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