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
3d0e2e70
Commit
3d0e2e70
authored
Jan 11, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
442fae37
d5f18e63
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
336 additions
and
51 deletions
+336
-51
BitKeeper/etc/gone
BitKeeper/etc/gone
+235
-0
Build-tools/Bootstrap
Build-tools/Bootstrap
+2
-1
innobase/os/os0file.c
innobase/os/os0file.c
+1
-1
mysql-test/r/rpl_many_optimize.result
mysql-test/r/rpl_many_optimize.result
+9
-0
mysql-test/t/rpl_many_optimize.test
mysql-test/t/rpl_many_optimize.test
+20
-0
sql-common/client.c
sql-common/client.c
+38
-22
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+17
-13
sql/net_serv.cc
sql/net_serv.cc
+2
-0
sql/set_var.cc
sql/set_var.cc
+2
-3
sql/sql_table.cc
sql/sql_table.cc
+10
-11
No files found.
BitKeeper/etc/gone
View file @
3d0e2e70
This diff is collapsed.
Click to expand it.
Build-tools/Bootstrap
View file @
3d0e2e70
...
@@ -38,7 +38,7 @@ $opt_dry_run= undef;
...
@@ -38,7 +38,7 @@ $opt_dry_run= undef;
$opt_export_only
=
undef
;
$opt_export_only
=
undef
;
$opt_help
=
$opt_verbose
=
0
;
$opt_help
=
$opt_verbose
=
0
;
$opt_log
=
undef
;
$opt_log
=
undef
;
$opt_mail
=
"";
$opt_mail
=
"
build
\
@mysql
.com
";
$opt_pull
=
undef
;
$opt_pull
=
undef
;
$opt_revision
=
undef
;
$opt_revision
=
undef
;
$opt_suffix
=
"";
$opt_suffix
=
"";
...
@@ -431,6 +431,7 @@ Options:
...
@@ -431,6 +431,7 @@ Options:
include a log file snippet, if logging is enabled)
include a log file snippet, if logging is enabled)
Note that the \@-Sign needs to be quoted!
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
Example: --mail=user\\\@domain.com
Default: build\@mysql.com
-q, --quiet Be quiet
-q, --quiet Be quiet
-p, --pull Update the source BK trees before building
-p, --pull Update the source BK trees before building
-r, --revision=<rev> Export the tree as of revision <rev>
-r, --revision=<rev> Export the tree as of revision <rev>
...
...
innobase/os/os0file.c
View file @
3d0e2e70
...
@@ -1767,7 +1767,7 @@ os_file_flush(
...
@@ -1767,7 +1767,7 @@ os_file_flush(
#else
#else
int
ret
;
int
ret
;
#if
def HAVE_DARWIN_THREADS
#if
defined(HAVE_DARWIN_THREADS) && defined(F_FULLFSYNC)
/* Apple has disabled fsync() for internal disk drives in OS X. That
/* Apple has disabled fsync() for internal disk drives in OS X. That
caused corruption for a user when he tested a power outage. Let us in
caused corruption for a user when he tested a power outage. Let us in
OS X use a nonstandard flush method recommended by an Apple
OS X use a nonstandard flush method recommended by an Apple
...
...
mysql-test/r/rpl_many_optimize.result
0 → 100644
View file @
3d0e2e70
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (a int not null auto_increment primary key, b int, key(b));
INSERT INTO t1 (a) VALUES (1),(2);
drop table t1;
mysql-test/t/rpl_many_optimize.test
0 → 100644
View file @
3d0e2e70
# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]"
source
include
/
master
-
slave
.
inc
;
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
int
,
key
(
b
));
INSERT
INTO
t1
(
a
)
VALUES
(
1
),(
2
);
# Now many OPTIMIZE to test if we crash (BUG#7658)
let
$
1
=
300
;
disable_query_log
;
disable_result_log
;
while
(
$
1
)
{
eval
OPTIMIZE
TABLE
t1
;
dec
$
1
;
}
enable_result_log
;
enable_query_log
;
drop
table
t1
;
# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE)
sync_slave_with_master
;
sql-common/client.c
View file @
3d0e2e70
...
@@ -318,8 +318,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
...
@@ -318,8 +318,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
{
{
net
->
last_errno
=
CR_NAMEDPIPEOPEN_ERROR
;
net
->
last_errno
=
CR_NAMEDPIPEOPEN_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
host
,
unix_socket
,
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
(
ulong
)
GetLastError
());
ER
(
net
->
last_errno
),
host
,
unix_socket
,
(
ulong
)
GetLastError
());
return
INVALID_HANDLE_VALUE
;
return
INVALID_HANDLE_VALUE
;
}
}
/* wait for for an other instance */
/* wait for for an other instance */
...
@@ -327,8 +328,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
...
@@ -327,8 +328,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
{
{
net
->
last_errno
=
CR_NAMEDPIPEWAIT_ERROR
;
net
->
last_errno
=
CR_NAMEDPIPEWAIT_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
host
,
unix_socket
,
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
(
ulong
)
GetLastError
());
ER
(
net
->
last_errno
),
host
,
unix_socket
,
(
ulong
)
GetLastError
());
return
INVALID_HANDLE_VALUE
;
return
INVALID_HANDLE_VALUE
;
}
}
}
}
...
@@ -336,8 +338,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
...
@@ -336,8 +338,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
{
{
net
->
last_errno
=
CR_NAMEDPIPEOPEN_ERROR
;
net
->
last_errno
=
CR_NAMEDPIPEOPEN_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
host
,
unix_socket
,
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
(
ulong
)
GetLastError
());
ER
(
net
->
last_errno
),
host
,
unix_socket
,
(
ulong
)
GetLastError
());
return
INVALID_HANDLE_VALUE
;
return
INVALID_HANDLE_VALUE
;
}
}
dwMode
=
PIPE_READMODE_BYTE
|
PIPE_WAIT
;
dwMode
=
PIPE_READMODE_BYTE
|
PIPE_WAIT
;
...
@@ -346,8 +349,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
...
@@ -346,8 +349,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
CloseHandle
(
hPipe
);
CloseHandle
(
hPipe
);
net
->
last_errno
=
CR_NAMEDPIPESETSTATE_ERROR
;
net
->
last_errno
=
CR_NAMEDPIPESETSTATE_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
host
,
unix_socket
,
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
(
ulong
)
GetLastError
());
ER
(
net
->
last_errno
),
host
,
unix_socket
,
(
ulong
)
GetLastError
());
return
INVALID_HANDLE_VALUE
;
return
INVALID_HANDLE_VALUE
;
}
}
*
arg_host
=
host
;
*
arg_unix_socket
=
unix_socket
;
/* connect arg */
*
arg_host
=
host
;
*
arg_unix_socket
=
unix_socket
;
/* connect arg */
...
@@ -560,9 +564,11 @@ err:
...
@@ -560,9 +564,11 @@ err:
net
->
last_errno
=
error_allow
;
net
->
last_errno
=
error_allow
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
if
(
error_allow
==
CR_SHARED_MEMORY_EVENT_ERROR
)
if
(
error_allow
==
CR_SHARED_MEMORY_EVENT_ERROR
)
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
suffix_pos
,
error_code
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
suffix_pos
,
error_code
);
else
else
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
error_code
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
error_code
);
return
(
INVALID_HANDLE_VALUE
);
return
(
INVALID_HANDLE_VALUE
);
}
}
return
(
handle_map
);
return
(
handle_map
);
...
@@ -792,7 +798,8 @@ static int check_license(MYSQL *mysql)
...
@@ -792,7 +798,8 @@ static int check_license(MYSQL *mysql)
if
(
net
->
last_errno
==
ER_UNKNOWN_SYSTEM_VARIABLE
)
if
(
net
->
last_errno
==
ER_UNKNOWN_SYSTEM_VARIABLE
)
{
{
net
->
last_errno
=
CR_WRONG_LICENSE
;
net
->
last_errno
=
CR_WRONG_LICENSE
;
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
required_license
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
required_license
);
}
}
return
1
;
return
1
;
}
}
...
@@ -809,7 +816,8 @@ static int check_license(MYSQL *mysql)
...
@@ -809,7 +816,8 @@ static int check_license(MYSQL *mysql)
strncmp
(
row
[
0
],
required_license
,
sizeof
(
required_license
))))
strncmp
(
row
[
0
],
required_license
,
sizeof
(
required_license
))))
{
{
net
->
last_errno
=
CR_WRONG_LICENSE
;
net
->
last_errno
=
CR_WRONG_LICENSE
;
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
required_license
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
required_license
);
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
return
net
->
last_errno
;
return
net
->
last_errno
;
...
@@ -1647,7 +1655,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1647,7 +1655,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
sock
=
0
;
sock
=
0
;
unix_socket
=
0
;
unix_socket
=
0
;
host
=
mysql
->
options
.
shared_memory_base_name
;
host
=
mysql
->
options
.
shared_memory_base_name
;
sprintf
(
host_info
=
buff
,
ER
(
CR_SHARED_MEMORY_CONNECTION
),
host
);
my_snprintf
(
host_info
=
buff
,
sizeof
(
buff
)
-
1
,
ER
(
CR_SHARED_MEMORY_CONNECTION
),
host
);
}
}
}
}
#endif
/* HAVE_SMEM */
#endif
/* HAVE_SMEM */
...
@@ -1667,7 +1676,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1667,7 +1676,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
{
{
net
->
last_errno
=
CR_SOCKET_CREATE_ERROR
;
net
->
last_errno
=
CR_SOCKET_CREATE_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
socket_errno
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
socket_errno
);
goto
error
;
goto
error
;
}
}
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_SOCKET
,
TRUE
);
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_SOCKET
,
TRUE
);
...
@@ -1681,7 +1691,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1681,7 +1691,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
socket_errno
));
socket_errno
));
net
->
last_errno
=
CR_CONNECTION_ERROR
;
net
->
last_errno
=
CR_CONNECTION_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
unix_socket
,
socket_errno
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
unix_socket
,
socket_errno
);
goto
error
;
goto
error
;
}
}
mysql
->
options
.
protocol
=
MYSQL_PROTOCOL_SOCKET
;
mysql
->
options
.
protocol
=
MYSQL_PROTOCOL_SOCKET
;
...
@@ -1711,7 +1722,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1711,7 +1722,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
else
else
{
{
net
->
vio
=
vio_new_win32pipe
(
hPipe
);
net
->
vio
=
vio_new_win32pipe
(
hPipe
);
sprintf
(
host_info
=
buff
,
ER
(
CR_NAMEDPIPE_CONNECTION
),
unix_socket
);
my_snprintf
(
host_info
=
buff
,
sizeof
(
buff
)
-
1
,
ER
(
CR_NAMEDPIPE_CONNECTION
),
unix_socket
);
}
}
}
}
#endif
#endif
...
@@ -1724,7 +1736,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1724,7 +1736,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
port
=
mysql_port
;
port
=
mysql_port
;
if
(
!
host
)
if
(
!
host
)
host
=
LOCAL_HOST
;
host
=
LOCAL_HOST
;
sprintf
(
host_info
=
buff
,
ER
(
CR_TCP_CONNECTION
),
host
);
my_snprintf
(
host_info
=
buff
,
sizeof
(
buff
)
-
1
,
ER
(
CR_TCP_CONNECTION
),
host
);
DBUG_PRINT
(
"info"
,(
"Server name: '%s'. TCP sock: %d"
,
host
,
port
));
DBUG_PRINT
(
"info"
,(
"Server name: '%s'. TCP sock: %d"
,
host
,
port
));
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
thr_alarm_init
(
&
alarmed
);
thr_alarm_init
(
&
alarmed
);
...
@@ -1739,7 +1751,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1739,7 +1751,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
{
{
net
->
last_errno
=
CR_IPSOCK_ERROR
;
net
->
last_errno
=
CR_IPSOCK_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
socket_errno
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
socket_errno
);
goto
error
;
goto
error
;
}
}
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_TCPIP
,
FALSE
);
net
->
vio
=
vio_new
(
sock
,
VIO_TYPE_TCPIP
,
FALSE
);
...
@@ -1766,7 +1779,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1766,7 +1779,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
my_gethostbyname_r_free
();
my_gethostbyname_r_free
();
net
->
last_errno
=
CR_UNKNOWN_HOST
;
net
->
last_errno
=
CR_UNKNOWN_HOST
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
CR_UNKNOWN_HOST
),
host
,
tmp_errno
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
CR_UNKNOWN_HOST
),
host
,
tmp_errno
);
goto
error
;
goto
error
;
}
}
memcpy
(
&
sock_addr
.
sin_addr
,
hp
->
h_addr
,
memcpy
(
&
sock_addr
.
sin_addr
,
hp
->
h_addr
,
...
@@ -1781,7 +1795,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1781,7 +1795,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
host
));
host
));
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
sprintf
(
net
->
last_error
,
ER
(
CR_CONN_HOST_ERROR
),
host
,
socket_errno
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
CR_CONN_HOST_ERROR
),
host
,
socket_errno
);
goto
error
;
goto
error
;
}
}
}
}
...
@@ -1834,8 +1849,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
...
@@ -1834,8 +1849,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
{
{
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
net
->
last_errno
=
CR_VERSION_ERROR
;
net
->
last_errno
=
CR_VERSION_ERROR
;
sprintf
(
net
->
last_error
,
ER
(
CR_VERSION_ERROR
),
mysql
->
protocol_version
,
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
PROTOCOL_VERSION
);
ER
(
CR_VERSION_ERROR
),
mysql
->
protocol_version
,
PROTOCOL_VERSION
);
goto
error
;
goto
error
;
}
}
end
=
strend
((
char
*
)
net
->
read_pos
+
1
);
end
=
strend
((
char
*
)
net
->
read_pos
+
1
);
...
...
sql/examples/ha_archive.cc
View file @
3d0e2e70
...
@@ -333,10 +333,8 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
...
@@ -333,10 +333,8 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
if
((
share
->
archive_write
=
gzopen
(
share
->
data_file_name
,
"ab"
))
==
NULL
)
if
((
share
->
archive_write
=
gzopen
(
share
->
data_file_name
,
"ab"
))
==
NULL
)
goto
error2
;
goto
error2
;
if
(
my_hash_insert
(
&
archive_open_tables
,
(
byte
*
)
share
))
if
(
my_hash_insert
(
&
archive_open_tables
,
(
byte
*
)
share
))
goto
error2
;
thr_lock_init
(
&
share
->
lock
);
if
(
pthread_mutex_init
(
&
share
->
mutex
,
MY_MUTEX_INIT_FAST
))
goto
error3
;
goto
error3
;
thr_lock_init
(
&
share
->
lock
);
}
}
share
->
use_count
++
;
share
->
use_count
++
;
pthread_mutex_unlock
(
&
archive_mutex
);
pthread_mutex_unlock
(
&
archive_mutex
);
...
@@ -344,14 +342,13 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
...
@@ -344,14 +342,13 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
return
share
;
return
share
;
error3:
error3:
VOID
(
pthread_mutex_destroy
(
&
share
->
mutex
));
thr_lock_delete
(
&
share
->
lock
);
/* We close, but ignore errors since we already have errors */
/* We close, but ignore errors since we already have errors */
(
void
)
gzclose
(
share
->
archive_write
);
(
void
)
gzclose
(
share
->
archive_write
);
error2:
error2:
my_close
(
share
->
meta_file
,
MYF
(
0
));
my_close
(
share
->
meta_file
,
MYF
(
0
));
error:
error:
pthread_mutex_unlock
(
&
archive_mutex
);
pthread_mutex_unlock
(
&
archive_mutex
);
VOID
(
pthread_mutex_destroy
(
&
share
->
mutex
));
my_free
((
gptr
)
share
,
MYF
(
0
));
my_free
((
gptr
)
share
,
MYF
(
0
));
return
NULL
;
return
NULL
;
...
@@ -485,23 +482,30 @@ int ha_archive::create(const char *name, TABLE *table_arg,
...
@@ -485,23 +482,30 @@ int ha_archive::create(const char *name, TABLE *table_arg,
if
((
archive
=
gzdopen
(
create_file
,
"ab"
))
==
NULL
)
if
((
archive
=
gzdopen
(
create_file
,
"ab"
))
==
NULL
)
{
{
error
=
errno
;
error
=
errno
;
delete_table
(
name
);
goto
error2
;
goto
error
;
}
}
if
(
write_data_header
(
archive
))
if
(
write_data_header
(
archive
))
{
{
gzclose
(
archive
)
;
error
=
errno
;
goto
error
2
;
goto
error
3
;
}
}
if
(
gzclose
(
archive
))
if
(
gzclose
(
archive
))
{
error
=
errno
;
goto
error2
;
goto
error2
;
}
my_close
(
create_file
,
MYF
(
0
));
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
error3:
/* We already have an error, so ignore results of gzclose. */
(
void
)
gzclose
(
archive
);
error2:
error2:
error
=
errno
;
my_close
(
create_file
,
MYF
(
0
))
;
delete_table
(
name
);
delete_table
(
name
);
error:
error:
/* Return error number, if we got one */
/* Return error number, if we got one */
DBUG_RETURN
(
error
?
error
:
-
1
);
DBUG_RETURN
(
error
?
error
:
-
1
);
...
@@ -751,7 +755,7 @@ int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -751,7 +755,7 @@ int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
if
((
rebuild_file
=
gzopen
(
data_file_name
,
"rb"
))
==
NULL
)
if
((
rebuild_file
=
gzopen
(
data_file_name
,
"rb"
))
==
NULL
)
DBUG_RETURN
(
errno
?
errno
:
-
1
);
DBUG_RETURN
(
errno
?
errno
:
-
1
);
if
(
rc
=
read_data_header
(
rebuild_file
))
if
(
(
rc
=
read_data_header
(
rebuild_file
)
))
goto
error
;
goto
error
;
/*
/*
...
@@ -823,7 +827,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -823,7 +827,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
}
while
(
read
=
gzread
(
reader
,
block
,
IO_SIZE
))
while
(
(
read
=
gzread
(
reader
,
block
,
IO_SIZE
)
))
gzwrite
(
writer
,
block
,
read
);
gzwrite
(
writer
,
block
,
read
);
gzclose
(
reader
);
gzclose
(
reader
);
...
...
sql/net_serv.cc
View file @
3d0e2e70
...
@@ -255,6 +255,8 @@ my_bool
...
@@ -255,6 +255,8 @@ my_bool
my_net_write
(
NET
*
net
,
const
char
*
packet
,
ulong
len
)
my_net_write
(
NET
*
net
,
const
char
*
packet
,
ulong
len
)
{
{
uchar
buff
[
NET_HEADER_SIZE
];
uchar
buff
[
NET_HEADER_SIZE
];
if
(
unlikely
(
!
net
->
vio
))
// nowhere to write
return
0
;
/*
/*
Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH
Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH
length. The last packet is always a packet that is < MAX_PACKET_LENGTH.
length. The last packet is always a packet that is < MAX_PACKET_LENGTH.
...
...
sql/set_var.cc
View file @
3d0e2e70
...
@@ -745,11 +745,11 @@ struct show_var_st init_vars[]= {
...
@@ -745,11 +745,11 @@ struct show_var_st init_vars[]= {
{
"innodb_fast_shutdown"
,
(
char
*
)
&
innobase_fast_shutdown
,
SHOW_MY_BOOL
},
{
"innodb_fast_shutdown"
,
(
char
*
)
&
innobase_fast_shutdown
,
SHOW_MY_BOOL
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_file_per_table"
,
(
char
*
)
&
innobase_file_per_table
,
SHOW_MY_BOOL
},
{
"innodb_file_per_table"
,
(
char
*
)
&
innobase_file_per_table
,
SHOW_MY_BOOL
},
{
"innodb_locks_unsafe_for_binlog"
,
(
char
*
)
&
innobase_locks_unsafe_for_binlog
,
SHOW_MY_BOOL
},
{
"innodb_flush_log_at_trx_commit"
,
(
char
*
)
&
innobase_flush_log_at_trx_commit
,
SHOW_INT
},
{
"innodb_flush_log_at_trx_commit"
,
(
char
*
)
&
innobase_flush_log_at_trx_commit
,
SHOW_INT
},
{
"innodb_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_force_recovery"
,
(
char
*
)
&
innobase_force_recovery
,
SHOW_LONG
},
{
"innodb_force_recovery"
,
(
char
*
)
&
innobase_force_recovery
,
SHOW_LONG
},
{
"innodb_lock_wait_timeout"
,
(
char
*
)
&
innobase_lock_wait_timeout
,
SHOW_LONG
},
{
"innodb_lock_wait_timeout"
,
(
char
*
)
&
innobase_lock_wait_timeout
,
SHOW_LONG
},
{
"innodb_locks_unsafe_for_binlog"
,
(
char
*
)
&
innobase_locks_unsafe_for_binlog
,
SHOW_MY_BOOL
},
{
"innodb_log_arch_dir"
,
(
char
*
)
&
innobase_log_arch_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_arch_dir"
,
(
char
*
)
&
innobase_log_arch_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_archive"
,
(
char
*
)
&
innobase_log_archive
,
SHOW_MY_BOOL
},
{
"innodb_log_archive"
,
(
char
*
)
&
innobase_log_archive
,
SHOW_MY_BOOL
},
{
"innodb_log_buffer_size"
,
(
char
*
)
&
innobase_log_buffer_size
,
SHOW_LONG
},
{
"innodb_log_buffer_size"
,
(
char
*
)
&
innobase_log_buffer_size
,
SHOW_LONG
},
...
@@ -758,10 +758,9 @@ struct show_var_st init_vars[]= {
...
@@ -758,10 +758,9 @@ struct show_var_st init_vars[]= {
{
"innodb_log_group_home_dir"
,
(
char
*
)
&
innobase_log_group_home_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_group_home_dir"
,
(
char
*
)
&
innobase_log_group_home_dir
,
SHOW_CHAR_PTR
},
{
sys_innodb_max_dirty_pages_pct
.
name
,
(
char
*
)
&
sys_innodb_max_dirty_pages_pct
,
SHOW_SYS
},
{
sys_innodb_max_dirty_pages_pct
.
name
,
(
char
*
)
&
sys_innodb_max_dirty_pages_pct
,
SHOW_SYS
},
{
sys_innodb_max_purge_lag
.
name
,
(
char
*
)
&
sys_innodb_max_purge_lag
,
SHOW_SYS
},
{
sys_innodb_max_purge_lag
.
name
,
(
char
*
)
&
sys_innodb_max_purge_lag
,
SHOW_SYS
},
{
sys_innodb_table_locks
.
name
,
(
char
*
)
&
sys_innodb_table_locks
,
SHOW_SYS
},
{
sys_innodb_max_purge_lag
.
name
,
(
char
*
)
&
sys_innodb_max_purge_lag
,
SHOW_SYS
},
{
"innodb_mirrored_log_groups"
,
(
char
*
)
&
innobase_mirrored_log_groups
,
SHOW_LONG
},
{
"innodb_mirrored_log_groups"
,
(
char
*
)
&
innobase_mirrored_log_groups
,
SHOW_LONG
},
{
"innodb_open_files"
,
(
char
*
)
&
innobase_open_files
,
SHOW_LONG
},
{
"innodb_open_files"
,
(
char
*
)
&
innobase_open_files
,
SHOW_LONG
},
{
sys_innodb_table_locks
.
name
,
(
char
*
)
&
sys_innodb_table_locks
,
SHOW_SYS
},
{
"innodb_thread_concurrency"
,
(
char
*
)
&
innobase_thread_concurrency
,
SHOW_LONG
},
{
"innodb_thread_concurrency"
,
(
char
*
)
&
innobase_thread_concurrency
,
SHOW_LONG
},
#endif
#endif
{
sys_interactive_timeout
.
name
,(
char
*
)
&
sys_interactive_timeout
,
SHOW_SYS
},
{
sys_interactive_timeout
.
name
,(
char
*
)
&
sys_interactive_timeout
,
SHOW_SYS
},
...
...
sql/sql_table.cc
View file @
3d0e2e70
...
@@ -3588,6 +3588,16 @@ copy_data_between_tables(TABLE *from,TABLE *to,
...
@@ -3588,6 +3588,16 @@ copy_data_between_tables(TABLE *from,TABLE *to,
ulong
save_sql_mode
;
ulong
save_sql_mode
;
DBUG_ENTER
(
"copy_data_between_tables"
);
DBUG_ENTER
(
"copy_data_between_tables"
);
/*
Turn off recovery logging since rollback of an alter table is to
delete the new table so there is no need to log the changes to it.
This needs to be done before external_lock
*/
error
=
ha_enable_transaction
(
thd
,
FALSE
);
if
(
error
)
DBUG_RETURN
(
-
1
);
if
(
!
(
copy
=
new
Copy_field
[
to
->
s
->
fields
]))
if
(
!
(
copy
=
new
Copy_field
[
to
->
s
->
fields
]))
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
...
@@ -3646,17 +3656,6 @@ copy_data_between_tables(TABLE *from,TABLE *to,
...
@@ -3646,17 +3656,6 @@ copy_data_between_tables(TABLE *from,TABLE *to,
goto
err
;
goto
err
;
};
};
/*
Turn off recovery logging since rollback of an alter table is to
delete the new table so there is no need to log the changes to it.
*/
error
=
ha_enable_transaction
(
thd
,
FALSE
);
if
(
error
)
{
error
=
1
;
goto
err
;
}
/* Handler must be told explicitly to retrieve all columns, because
/* Handler must be told explicitly to retrieve all columns, because
this function does not set field->query_id in the columns to the
this function does not set field->query_id in the columns to the
current query id */
current query id */
...
...
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