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
6e35c1a9
Commit
6e35c1a9
authored
Dec 26, 2002
by
peter@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add proper error message for old client connecting new server using user which has password in
new format SCRUM
parent
ee8fa226
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
52 additions
and
17 deletions
+52
-17
include/mysqld_error.h
include/mysqld_error.h
+2
-1
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+1
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+1
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+1
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+1
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+1
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+1
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+1
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+1
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+1
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+1
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+1
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+1
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+1
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+1
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+1
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+1
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+1
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+1
-0
sql/share/serbian/errmsg.txt
sql/share/serbian/errmsg.txt
+1
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+1
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+1
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+1
-0
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+27
-16
No files found.
include/mysqld_error.h
View file @
6e35c1a9
...
@@ -265,4 +265,5 @@
...
@@ -265,4 +265,5 @@
#define ER_DERIVED_MUST_HAVE_ALIAS 1246
#define ER_DERIVED_MUST_HAVE_ALIAS 1246
#define ER_SELECT_REDUCED 1247
#define ER_SELECT_REDUCED 1247
#define ER_TABLENAME_NOT_ALLOWED_HERE 1248
#define ER_TABLENAME_NOT_ALLOWED_HERE 1248
#define ER_ERROR_MESSAGES 249
#define ER_NOT_SUPPORTED_AUTH_MODE 1249
#define ER_ERROR_MESSAGES 250
sql/share/czech/errmsg.txt
View file @
6e35c1a9
...
@@ -259,3 +259,4 @@ v/*
...
@@ -259,3 +259,4 @@ v/*
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/danish/errmsg.txt
View file @
6e35c1a9
...
@@ -253,3 +253,4 @@
...
@@ -253,3 +253,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/dutch/errmsg.txt
View file @
6e35c1a9
...
@@ -261,3 +261,4 @@
...
@@ -261,3 +261,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/english/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias",
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/estonian/errmsg.txt
View file @
6e35c1a9
...
@@ -255,3 +255,4 @@
...
@@ -255,3 +255,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/french/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/german/errmsg.txt
View file @
6e35c1a9
...
@@ -260,3 +260,4 @@
...
@@ -260,3 +260,4 @@
"Für jede abgeleitete Tabelle muss ein eigener Alias angegeben werden.",
"Für jede abgeleitete Tabelle muss ein eigener Alias angegeben werden.",
"Select %u wurde während der Optimierung reduziert.",
"Select %u wurde während der Optimierung reduziert.",
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden."
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden."
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/greek/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/hungarian/errmsg.txt
View file @
6e35c1a9
...
@@ -252,3 +252,4 @@
...
@@ -252,3 +252,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/italian/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/japanese/errmsg.txt
View file @
6e35c1a9
...
@@ -252,3 +252,4 @@
...
@@ -252,3 +252,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/korean/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/norwegian-ny/errmsg.txt
View file @
6e35c1a9
...
@@ -252,3 +252,4 @@
...
@@ -252,3 +252,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/norwegian/errmsg.txt
View file @
6e35c1a9
...
@@ -252,3 +252,4 @@
...
@@ -252,3 +252,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/polish/errmsg.txt
View file @
6e35c1a9
...
@@ -254,3 +254,4 @@
...
@@ -254,3 +254,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/portuguese/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/romanian/errmsg.txt
View file @
6e35c1a9
...
@@ -254,3 +254,4 @@
...
@@ -254,3 +254,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/russian/errmsg.txt
View file @
6e35c1a9
...
@@ -253,3 +253,4 @@
...
@@ -253,3 +253,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u ",
"Select %u ",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/serbian/errmsg.txt
View file @
6e35c1a9
...
@@ -246,3 +246,4 @@
...
@@ -246,3 +246,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/slovak/errmsg.txt
View file @
6e35c1a9
...
@@ -258,3 +258,4 @@
...
@@ -258,3 +258,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/spanish/errmsg.txt
View file @
6e35c1a9
...
@@ -251,3 +251,4 @@
...
@@ -251,3 +251,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/swedish/errmsg.txt
View file @
6e35c1a9
...
@@ -250,3 +250,4 @@
...
@@ -250,3 +250,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was reduced during optimisation",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/share/ukrainian/errmsg.txt
View file @
6e35c1a9
...
@@ -255,3 +255,4 @@
...
@@ -255,3 +255,4 @@
"Every derived table must have it's own alias"
"Every derived table must have it's own alias"
"Select %u was iii",
"Select %u was iii",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
\ No newline at end of file
sql/sql_parse.cc
View file @
6e35c1a9
...
@@ -189,9 +189,9 @@ end:
...
@@ -189,9 +189,9 @@ end:
static
int
check_user
(
THD
*
thd
,
enum_server_command
command
,
const
char
*
user
,
static
int
check_user
(
THD
*
thd
,
enum_server_command
command
,
const
char
*
user
,
const
char
*
passwd
,
const
char
*
db
,
bool
check_count
,
const
char
*
passwd
,
const
char
*
db
,
bool
check_count
,
bool
do_send_error
,
char
*
crypted_scramble
,
bool
simple_connect
,
bool
do_send_error
,
bool
had_password
,
uint
*
cur_priv_version
,
char
*
crypted_scramble
,
bool
had_password
,
ACL_USER
**
hint_user
)
uint
*
cur_priv_version
,
ACL_USER
**
hint_user
)
{
{
thd
->
db
=
0
;
thd
->
db
=
0
;
thd
->
db_length
=
0
;
thd
->
db_length
=
0
;
...
@@ -222,14 +222,23 @@ static int check_user(THD *thd,enum_server_command command, const char *user,
...
@@ -222,14 +222,23 @@ static int check_user(THD *thd,enum_server_command command, const char *user,
{
{
if
(
do_send_error
)
if
(
do_send_error
)
{
{
net_printf
(
thd
,
ER_ACCESS_DENIED_ERROR
,
/* Old client should get nicer error message if password version is not supported*/
thd
->
user
,
if
(
simple_connect
&&
*
hint_user
&&
(
*
hint_user
)
->
pversion
)
thd
->
host_or_ip
,
{
had_password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
net_printf
(
thd
,
ER_NOT_SUPPORTED_AUTH_MODE
);
mysql_log
.
write
(
thd
,
COM_CONNECT
,
ER
(
ER_ACCESS_DENIED_ERROR
),
mysql_log
.
write
(
thd
,
COM_CONNECT
,
ER
(
ER_NOT_SUPPORTED_AUTH_MODE
));
thd
->
user
,
}
thd
->
host_or_ip
,
else
had_password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
{
net_printf
(
thd
,
ER_ACCESS_DENIED_ERROR
,
thd
->
user
,
thd
->
host_or_ip
,
had_password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
mysql_log
.
write
(
thd
,
COM_CONNECT
,
ER
(
ER_ACCESS_DENIED_ERROR
),
thd
->
user
,
thd
->
host_or_ip
,
had_password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
}
return
(
1
);
// Error already given
return
(
1
);
// Error already given
}
}
else
else
...
@@ -638,8 +647,9 @@ check_connections(THD *thd)
...
@@ -638,8 +647,9 @@ check_connections(THD *thd)
/* Store information if we used password. passwd will be dammaged */
/* Store information if we used password. passwd will be dammaged */
bool
using_password
=
test
(
passwd
[
0
]);
bool
using_password
=
test
(
passwd
[
0
]);
/* Check user permissions. If password failure we'll get scramble back */
/* Check user permissions. If password failure we'll get scramble back */
if
(
check_user
(
thd
,
COM_CONNECT
,
user
,
passwd
,
db
,
1
,
simple_connect
,
if
(
check_user
(
thd
,
COM_CONNECT
,
user
,
passwd
,
db
,
1
,
simple_connect
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
)
<
0
)
simple_connect
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
)
<
0
)
{
{
/* If The client is old we just have to return error */
/* If The client is old we just have to return error */
if
(
simple_connect
)
if
(
simple_connect
)
...
@@ -679,7 +689,7 @@ check_connections(THD *thd)
...
@@ -679,7 +689,7 @@ check_connections(THD *thd)
}
}
/* Final attempt to check the user based on reply */
/* Final attempt to check the user based on reply */
if
(
check_user
(
thd
,
COM_CONNECT
,
tmp_user
,
(
char
*
)
net
->
read_pos
,
if
(
check_user
(
thd
,
COM_CONNECT
,
tmp_user
,
(
char
*
)
net
->
read_pos
,
tmp_db
,
1
,
1
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
tmp_db
,
1
,
0
,
1
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
))
&
cached_user
))
return
-
1
;
return
-
1
;
}
}
...
@@ -1077,7 +1087,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1077,7 +1087,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
Do not retry if we already have sent error (result>0)
Do not retry if we already have sent error (result>0)
*/
*/
if
(
check_user
(
thd
,
COM_CHANGE_USER
,
user
,
passwd
,
db
,
0
,
simple_connect
,
if
(
check_user
(
thd
,
COM_CHANGE_USER
,
user
,
passwd
,
db
,
0
,
simple_connect
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
)
<
0
)
simple_connect
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
)
<
0
)
{
{
/* If The client is old we just have to have auth failure */
/* If The client is old we just have to have auth failure */
if
(
simple_connect
)
if
(
simple_connect
)
...
@@ -1112,7 +1123,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1112,7 +1123,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/* Final attempt to check the user based on reply */
/* Final attempt to check the user based on reply */
if
(
check_user
(
thd
,
COM_CHANGE_USER
,
tmp_user
,
(
char
*
)
net
->
read_pos
,
if
(
check_user
(
thd
,
COM_CHANGE_USER
,
tmp_user
,
(
char
*
)
net
->
read_pos
,
tmp_db
,
0
,
1
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
tmp_db
,
0
,
0
,
1
,
prepared_scramble
,
using_password
,
&
cur_priv_version
,
&
cached_user
))
&
cached_user
))
goto
restore_user
;
goto
restore_user
;
}
}
...
...
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