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
059b1e56
Commit
059b1e56
authored
Jun 05, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes
parent
0303cd57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
29 deletions
+31
-29
include/sql_common.h
include/sql_common.h
+1
-0
mysql-test/r/repair_part1.result
mysql-test/r/repair_part1.result
+0
-0
mysql-test/t/repair_part1.test
mysql-test/t/repair_part1.test
+0
-0
scripts/Makefile.am
scripts/Makefile.am
+3
-2
sql-common/client.c
sql-common/client.c
+27
-27
No files found.
include/sql_common.h
View file @
059b1e56
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
extern
const
char
*
unknown_sqlstate
;
extern
const
char
*
unknown_sqlstate
;
extern
const
char
*
not_error_sqlstate
;
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
...
mysql-test/r/repair.result
→
mysql-test/r/repair
_part1
.result
View file @
059b1e56
File moved
mysql-test/t/repair.test
→
mysql-test/t/repair
_part1
.test
View file @
059b1e56
File moved
scripts/Makefile.am
View file @
059b1e56
...
@@ -33,7 +33,6 @@ bin_SCRIPTS = @server_scripts@ \
...
@@ -33,7 +33,6 @@ bin_SCRIPTS = @server_scripts@ \
mysql_explain_log
\
mysql_explain_log
\
mysql_tableinfo
\
mysql_tableinfo
\
mysqld_multi
\
mysqld_multi
\
fill_help_tables
\
mysql_create_system_tables
mysql_create_system_tables
EXTRA_SCRIPTS
=
make_binary_distribution.sh
\
EXTRA_SCRIPTS
=
make_binary_distribution.sh
\
...
@@ -140,5 +139,7 @@ SUFFIXES = .sh
...
@@ -140,5 +139,7 @@ SUFFIXES = .sh
# Don't update the files from bitkeeper
# Don't update the files from bitkeeper
%
::
SCCS/s.%
%
::
SCCS/s.%
all
:
make_win_src_distribution make_binary_distribution
all
:
fill_help_tables.sql
make_win_src_distribution make_binary_distribution
fill_help_tables.sql
:
fill_help_tables ../Docs/manual.texi
./fill_help_tables < ../Docs/manual.texi
>
fill_help_tables.sql
sql-common/client.c
View file @
059b1e56
...
@@ -99,7 +99,8 @@
...
@@ -99,7 +99,8 @@
#include "client_settings.h"
#include "client_settings.h"
#include <sql_common.h>
#include <sql_common.h>
const
char
*
unknown_sqlstate
=
"000000"
;
const
char
*
unknown_sqlstate
=
"HY0000"
;
const
char
*
not_error_sqlstate
=
"00000"
;
#ifdef MYSQL_CLIENT
#ifdef MYSQL_CLIENT
extern
my_bool
stmt_close
(
MYSQL_STMT
*
stmt
,
my_bool
skip_list
);
extern
my_bool
stmt_close
(
MYSQL_STMT
*
stmt
,
my_bool
skip_list
);
...
@@ -339,10 +340,10 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
...
@@ -339,10 +340,10 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
/*
/*
The name of event and file-mapping events create agree next rule:
The name of event and file-mapping events create agree next rule:
shared_memory_base_name+unique_part
shared_memory_base_name+unique_part
Where:
Where:
shared_memory_base_name is unique value for each server
shared_memory_base_name is unique value for each server
unique_part is uniquel value for each object (events and file-mapping)
unique_part is uniquel value for each object (events and file-mapping)
*/
*/
suffix_pos
=
strxmov
(
tmp
,
shared_memory_base_name
,
"_"
,
NullS
);
suffix_pos
=
strxmov
(
tmp
,
shared_memory_base_name
,
"_"
,
NullS
);
strmov
(
suffix_pos
,
"CONNECT_REQUEST"
);
strmov
(
suffix_pos
,
"CONNECT_REQUEST"
);
...
@@ -369,36 +370,34 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
...
@@ -369,36 +370,34 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
error_allow
=
CR_SHARED_MEMORY_CONNECT_MAP_ERROR
;
error_allow
=
CR_SHARED_MEMORY_CONNECT_MAP_ERROR
;
goto
err
;
goto
err
;
}
}
/*
Send to server request of connection
/* Send to server request of connection */
*/
if
(
!
SetEvent
(
event_connect_request
))
if
(
!
SetEvent
(
event_connect_request
))
{
{
error_allow
=
CR_SHARED_MEMORY_CONNECT_SET_ERROR
;
error_allow
=
CR_SHARED_MEMORY_CONNECT_SET_ERROR
;
goto
err
;
goto
err
;
}
}
/*
Wait of answer from server
/* Wait of answer from server */
*/
if
(
WaitForSingleObject
(
event_connect_answer
,
connect_timeout
*
1000
)
!=
if
(
WaitForSingleObject
(
event_connect_answer
,
connect_timeout
*
1000
)
!=
WAIT_OBJECT_0
)
WAIT_OBJECT_0
)
{
{
error_allow
=
CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR
;
error_allow
=
CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR
;
goto
err
;
goto
err
;
}
}
/*
Get number of connection
/* Get number of connection */
*/
connect_number
=
uint4korr
(
handle_connect_map
);
/*WAX2*/
connect_number
=
uint4korr
(
handle_connect_map
);
/*WAX2*/
p
=
int2str
(
connect_number
,
connect_number_char
,
10
);
p
=
int2str
(
connect_number
,
connect_number_char
,
10
);
/*
/*
The name of event and file-mapping events create agree next rule:
The name of event and file-mapping events create agree next rule:
shared_memory_base_name+unique_part+number_of_connection
shared_memory_base_name+unique_part+number_of_connection
Where:
Where:
shared_memory_base_name is uniquel value for each server
shared_memory_base_name is uniquel value for each server
unique_part is uniquel value for each object (events and file-mapping)
unique_part is uniquel value for each object (events and file-mapping)
number_of_connection is number of connection between server and client
number_of_connection is number of connection between server and client
*/
*/
suffix_pos
=
strxmov
(
tmp
,
shared_memory_base_name
,
"_"
,
connect_number_char
,
suffix_pos
=
strxmov
(
tmp
,
shared_memory_base_name
,
"_"
,
connect_number_char
,
"_"
,
NullS
);
"_"
,
NullS
);
...
@@ -506,7 +505,7 @@ net_safe_read(MYSQL *mysql)
...
@@ -506,7 +505,7 @@ net_safe_read(MYSQL *mysql)
{
{
NET
*
net
=
&
mysql
->
net
;
NET
*
net
=
&
mysql
->
net
;
ulong
len
=
0
;
ulong
len
=
0
;
init_sigpipe_variables
init_sigpipe_variables
;
/* Don't give sigpipe errors if the client doesn't want them */
/* Don't give sigpipe errors if the client doesn't want them */
set_sigpipe
(
mysql
);
set_sigpipe
(
mysql
);
...
@@ -571,7 +570,7 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -571,7 +570,7 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
{
{
NET
*
net
=
&
mysql
->
net
;
NET
*
net
=
&
mysql
->
net
;
my_bool
result
=
1
;
my_bool
result
=
1
;
init_sigpipe_variables
init_sigpipe_variables
;
/* Don't give sigpipe errors if the client doesn't want them */
/* Don't give sigpipe errors if the client doesn't want them */
set_sigpipe
(
mysql
);
set_sigpipe
(
mysql
);
...
@@ -589,8 +588,8 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -589,8 +588,8 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
}
}
net
->
last_error
[
0
]
=
0
;
net
->
last_error
[
0
]
=
0
;
net
->
last_errno
=
0
;
net
->
last_errno
=
0
;
strmov
(
net
->
sqlstate
,
unknown
_sqlstate
);
strmov
(
net
->
sqlstate
,
not_error
_sqlstate
);
mysql
->
net
.
report_error
=
0
;
mysql
->
net
.
report_error
=
0
;
mysql
->
info
=
0
;
mysql
->
info
=
0
;
mysql
->
affected_rows
=
~
(
my_ulonglong
)
0
;
mysql
->
affected_rows
=
~
(
my_ulonglong
)
0
;
...
@@ -624,7 +623,7 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -624,7 +623,7 @@ advanced_command(MYSQL *mysql, enum enum_server_command command,
if
(
!
skip_check
)
if
(
!
skip_check
)
result
=
((
mysql
->
packet_length
=
net_safe_read
(
mysql
))
==
packet_error
?
result
=
((
mysql
->
packet_length
=
net_safe_read
(
mysql
))
==
packet_error
?
1
:
0
);
1
:
0
);
end:
end:
reset_sigpipe
(
mysql
);
reset_sigpipe
(
mysql
);
return
result
;
return
result
;
}
}
...
@@ -665,7 +664,7 @@ void end_server(MYSQL *mysql)
...
@@ -665,7 +664,7 @@ void end_server(MYSQL *mysql)
DBUG_ENTER
(
"end_server"
);
DBUG_ENTER
(
"end_server"
);
if
(
mysql
->
net
.
vio
!=
0
)
if
(
mysql
->
net
.
vio
!=
0
)
{
{
init_sigpipe_variables
init_sigpipe_variables
;
DBUG_PRINT
(
"info"
,(
"Net: %s"
,
vio_description
(
mysql
->
net
.
vio
)));
DBUG_PRINT
(
"info"
,(
"Net: %s"
,
vio_description
(
mysql
->
net
.
vio
)));
set_sigpipe
(
mysql
);
set_sigpipe
(
mysql
);
vio_delete
(
mysql
->
net
.
vio
);
vio_delete
(
mysql
->
net
.
vio
);
...
@@ -1457,7 +1456,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -1457,7 +1456,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
#ifdef HAVE_SYS_UN_H
#ifdef HAVE_SYS_UN_H
struct
sockaddr_un
UNIXaddr
;
struct
sockaddr_un
UNIXaddr
;
#endif
#endif
init_sigpipe_variables
init_sigpipe_variables
;
DBUG_ENTER
(
"mysql_real_connect"
);
DBUG_ENTER
(
"mysql_real_connect"
);
LINT_INIT
(
host_info
);
LINT_INIT
(
host_info
);
...
@@ -1561,7 +1560,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -1561,7 +1560,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_SOCKET
,
TRUE
);
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_SOCKET
,
TRUE
);
bzero
((
char
*
)
&
UNIXaddr
,
sizeof
(
UNIXaddr
));
bzero
((
char
*
)
&
UNIXaddr
,
sizeof
(
UNIXaddr
));
UNIXaddr
.
sun_family
=
AF_UNIX
;
UNIXaddr
.
sun_family
=
AF_UNIX
;
strm
ov
(
UNIXaddr
.
sun_path
,
unix_socket
);
strm
ake
(
UNIXaddr
.
sun_path
,
unix_socket
,
sizeof
(
UNIXaddr
.
sun_path
)
-
1
);
if
(
my_connect
(
sock
,(
struct
sockaddr
*
)
&
UNIXaddr
,
sizeof
(
UNIXaddr
),
if
(
my_connect
(
sock
,(
struct
sockaddr
*
)
&
UNIXaddr
,
sizeof
(
UNIXaddr
),
mysql
->
options
.
connect_timeout
))
mysql
->
options
.
connect_timeout
))
{
{
...
@@ -2090,15 +2089,16 @@ static void mysql_fix_pointers(MYSQL* mysql, MYSQL* old_mysql)
...
@@ -2090,15 +2089,16 @@ static void mysql_fix_pointers(MYSQL* mysql, MYSQL* old_mysql)
#endif
/*MYSQL_CLIENT*/
#endif
/*MYSQL_CLIENT*/
}
}
my_bool
mysql_reconnect
(
MYSQL
*
mysql
)
my_bool
mysql_reconnect
(
MYSQL
*
mysql
)
{
{
MYSQL
tmp_mysql
;
MYSQL
tmp_mysql
;
DBUG_ENTER
(
"mysql_reconnect"
);
DBUG_ENTER
(
"mysql_reconnect"
);
if
(
!
mysql
->
reconnect
if
(
!
mysql
->
reconnect
||
||
(
mysql
->
server_status
&
SERVER_STATUS_IN_TRANS
)
||
!
mysql
->
host_info
)
(
mysql
->
server_status
&
SERVER_STATUS_IN_TRANS
)
||
!
mysql
->
host_info
)
{
{
/* Allow reconnect next time */
/* Allow reconnect next time */
mysql
->
server_status
&=
~
SERVER_STATUS_IN_TRANS
;
mysql
->
server_status
&=
~
SERVER_STATUS_IN_TRANS
;
strmov
(
mysql
->
net
.
sqlstate
,
unknown_sqlstate
);
strmov
(
mysql
->
net
.
sqlstate
,
unknown_sqlstate
);
mysql
->
net
.
last_errno
=
CR_SERVER_GONE_ERROR
;
mysql
->
net
.
last_errno
=
CR_SERVER_GONE_ERROR
;
...
...
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