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
2ba517a3
Commit
2ba517a3
authored
Sep 08, 2003
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for #1210
parent
bebe295d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
6 deletions
+27
-6
include/errmsg.h
include/errmsg.h
+1
-0
libmysql/errmsg.c
libmysql/errmsg.c
+6
-3
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+4
-3
libmysqld/libmysqld.c
libmysqld/libmysqld.c
+16
-0
No files found.
include/errmsg.h
View file @
2ba517a3
...
@@ -86,3 +86,4 @@ extern const char *client_errors[]; /* Error messages */
...
@@ -86,3 +86,4 @@ extern const char *client_errors[]; /* Error messages */
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2045
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2045
#define CR_CONN_UNKNOW_PROTOCOL 2046
#define CR_CONN_UNKNOW_PROTOCOL 2046
#define CR_INVALID_CONN_HANDLE 2047
#define CR_INVALID_CONN_HANDLE 2047
#define CR_MYSQL_SERVER_INIT_MISSED 2048
libmysql/errmsg.c
View file @
2ba517a3
...
@@ -71,7 +71,8 @@ const char *client_errors[]=
...
@@ -71,7 +71,8 @@ const char *client_errors[]=
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Wrong or unknown protocol"
,
"Wrong or unknown protocol"
,
"Invalid connection handle"
"Invalid connection handle"
,
"mysql_server_init wasn't called"
};
};
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
...
@@ -126,7 +127,8 @@ const char *client_errors[]=
...
@@ -126,7 +127,8 @@ const char *client_errors[]=
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Wrong or unknown protocol"
,
"Wrong or unknown protocol"
,
"Invalid connection handle"
"Invalid connection handle"
,
"mysql_server_init wasn't called"
};
};
#else
/* ENGLISH */
#else
/* ENGLISH */
...
@@ -179,7 +181,8 @@ const char *client_errors[]=
...
@@ -179,7 +181,8 @@ const char *client_errors[]=
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Server abandoded and don't sent the answer event (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Can't open shared memory. Can't send the request event to server (%lu)"
,
"Wrong or unknown protocol"
,
"Wrong or unknown protocol"
,
"Invalid connection handle"
"Invalid connection handle"
,
"mysql_server_init wasn't called"
};
};
#endif
#endif
...
...
libmysqld/lib_sql.cc
View file @
2ba517a3
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
static
int
fake_argc
=
1
;
static
int
fake_argc
=
1
;
static
char
*
fake_argv
[]
=
{(
char
*
)
""
,
0
};
static
char
*
fake_argv
[]
=
{(
char
*
)
""
,
0
};
static
const
char
*
fake_groups
[]
=
{
"server"
,
"embedded"
,
0
};
static
const
char
*
fake_groups
[]
=
{
"server"
,
"embedded"
,
0
};
static
char
inited
,
org_my_init_done
;
static
char
org_my_init_done
;
char
server_inited
;
#if defined (__WIN__)
#if defined (__WIN__)
#include "../sql/mysqld.cpp"
#include "../sql/mysqld.cpp"
...
@@ -181,9 +182,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
...
@@ -181,9 +182,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
/* Only call MY_INIT() if it hasn't been called before */
/* Only call MY_INIT() if it hasn't been called before */
if
(
!
inited
)
if
(
!
server_
inited
)
{
{
inited
=
1
;
server_
inited
=
1
;
org_my_init_done
=
my_init_done
;
org_my_init_done
=
my_init_done
;
}
}
if
(
!
org_my_init_done
)
if
(
!
org_my_init_done
)
...
...
libmysqld/libmysqld.c
View file @
2ba517a3
...
@@ -79,6 +79,8 @@ struct passwd *getpwuid(uid_t);
...
@@ -79,6 +79,8 @@ struct passwd *getpwuid(uid_t);
char
*
getlogin
(
void
);
char
*
getlogin
(
void
);
#endif
#endif
extern
char
server_inited
;
#ifdef __WIN__
#ifdef __WIN__
static
my_bool
is_NT
(
void
)
static
my_bool
is_NT
(
void
)
{
{
...
@@ -210,6 +212,20 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -210,6 +212,20 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
db
?
db
:
"(Null)"
,
db
?
db
:
"(Null)"
,
user
?
user
:
"(Null)"
));
user
?
user
:
"(Null)"
));
#ifdef EMBEDDED_LIBRARY
/*
Here we check that mysql_server_init was called before.
Actually we can perform the test for client (not embedded) library as well.
But i'm afraid some old applications will be broken then.
*/
if
(
!
server_inited
)
{
mysql
->
net
.
last_errno
=
CR_MYSQL_SERVER_INIT_MISSED
;
strmov
(
mysql
->
net
.
last_error
,
ER
(
mysql
->
net
.
last_errno
));
goto
error
;
}
#endif
/*EMBEDDED_LIBRARY*/
if
(
mysql
->
options
.
methods_to_use
==
MYSQL_OPT_USE_REMOTE_CONNECTION
)
if
(
mysql
->
options
.
methods_to_use
==
MYSQL_OPT_USE_REMOTE_CONNECTION
)
cli_mysql_real_connect
(
mysql
,
host
,
user
,
cli_mysql_real_connect
(
mysql
,
host
,
user
,
passwd
,
db
,
port
,
unix_socket
,
client_flag
);
passwd
,
db
,
port
,
unix_socket
,
client_flag
);
...
...
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