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
9f6aa117
Commit
9f6aa117
authored
Apr 07, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed innobase_flush_log_at_trx_commit to be 1 as default
Fixed problem with not freed thr_alarm() on slave connect
parent
e96c75fe
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
25 deletions
+24
-25
mysql-test/t/rpl_alter.test
mysql-test/t/rpl_alter.test
+11
-11
sql/ha_innobase.cc
sql/ha_innobase.cc
+1
-1
sql/mini_client.cc
sql/mini_client.cc
+5
-7
sql/mysqld.cc
sql/mysqld.cc
+6
-2
sql/slave.cc
sql/slave.cc
+1
-4
No files found.
mysql-test/t/rpl_alter.test
View file @
9f6aa117
source
include
/
master
-
slave
.
inc
;
source
include
/
master
-
slave
.
inc
;
connection
master
;
connection
master
;
use
test
;
use
test
;
drop
database
if
exists
d
1
;
drop
database
if
exists
test_
$
1
;
create
database
d
1
;
create
database
test_
$
1
;
create
table
d
1
.
t1
(
n
int
);
create
table
test_
$
1.
t1
(
n
int
);
alter
table
d
1
.
t1
add
m
int
;
alter
table
test_
$
1.
t1
add
m
int
;
insert
into
d
1
.
t1
values
(
1
,
2
);
insert
into
test_
$
1.
t1
values
(
1
,
2
);
create
table
d
1
.
t2
(
n
int
);
create
table
test_
$
1.
t2
(
n
int
);
insert
into
d
1
.
t2
values
(
45
);
insert
into
test_
$
1.
t2
values
(
45
);
rename
table
d1
.
t2
to
d1
.
t3
,
d1
.
t1
to
d
1
.
t2
;
rename
table
test_
$
1.
t2
to
test_
$
1.
t3
,
test_
$
1.
t1
to
test_
$
1.
t2
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
select
*
from
d
1
.
t2
;
select
*
from
test_
$
1.
t2
;
select
*
from
d
1
.
t3
;
select
*
from
test_
$
1.
t3
;
connection
master
;
connection
master
;
drop
database
d
1
;
drop
database
test_
$
1
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sql/ha_innobase.cc
View file @
9f6aa117
...
@@ -113,7 +113,7 @@ my_bool innobase_fast_shutdown = TRUE;
...
@@ -113,7 +113,7 @@ my_bool innobase_fast_shutdown = TRUE;
2 : write to the log file at each commit, but flush to disk only once per
2 : write to the log file at each commit, but flush to disk only once per
second */
second */
long
innobase_flush_log_at_trx_commit
=
0
;
long
innobase_flush_log_at_trx_commit
=
1
;
/* The following counter is used to convey information to InnoDB
/* The following counter is used to convey information to InnoDB
about server activity: in selects it is not sensible to call
about server activity: in selects it is not sensible to call
...
...
sql/mini_client.cc
View file @
9f6aa117
...
@@ -515,8 +515,6 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -515,8 +515,6 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
host
?
host
:
"(Null)"
,
host
?
host
:
"(Null)"
,
db
?
db
:
"(Null)"
,
db
?
db
:
"(Null)"
,
user
?
user
:
"(Null)"
));
user
?
user
:
"(Null)"
));
thr_alarm_init
(
&
alarmed
);
thr_alarm
(
&
alarmed
,(
uint
)
net_read_timeout
,
&
alarm_buff
);
bzero
((
char
*
)
&
mysql
->
options
,
sizeof
(
mysql
->
options
));
bzero
((
char
*
)
&
mysql
->
options
,
sizeof
(
mysql
->
options
));
net
->
vio
=
0
;
/* If something goes wrong */
net
->
vio
=
0
;
/* If something goes wrong */
...
@@ -598,7 +596,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -598,7 +596,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
host
=
LOCAL_HOST
;
host
=
LOCAL_HOST
;
sprintf
(
host_info
=
buff
,
ER
(
CR_TCP_CONNECTION
),
host
);
sprintf
(
host_info
=
buff
,
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
));
if
((
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
==
SOCKET_ERROR
)
thr_alarm_init
(
&
alarmed
);
thr_alarm
(
&
alarmed
,
net_read_timeout
,
&
alarm_buff
);
sock
=
(
my_socket
)
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
thr_end_alarm
(
&
alarmed
);
if
(
sock
==
SOCKET_ERROR
)
{
{
net
->
last_errno
=
CR_IPSOCK_ERROR
;
net
->
last_errno
=
CR_IPSOCK_ERROR
;
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
socket_errno
);
sprintf
(
net
->
last_error
,
ER
(
net
->
last_errno
),
socket_errno
);
...
@@ -641,12 +643,8 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -641,12 +643,8 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
socket_errno
,
host
));
socket_errno
,
host
));
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
sprintf
(
net
->
last_error
,
ER
(
CR_CONN_HOST_ERROR
),
host
,
socket_errno
);
sprintf
(
net
->
last_error
,
ER
(
CR_CONN_HOST_ERROR
),
host
,
socket_errno
);
if
(
thr_alarm_in_use
(
&
alarmed
))
thr_end_alarm
(
&
alarmed
);
goto
error
;
goto
error
;
}
}
if
(
thr_alarm_in_use
(
&
alarmed
))
thr_end_alarm
(
&
alarmed
);
}
}
if
(
!
net
->
vio
||
my_net_init
(
net
,
net
->
vio
))
if
(
!
net
->
vio
||
my_net_init
(
net
,
net
->
vio
))
...
...
sql/mysqld.cc
View file @
9f6aa117
...
@@ -1433,8 +1433,12 @@ static void *signal_hand(void *arg __attribute__((unused)))
...
@@ -1433,8 +1433,12 @@ static void *signal_hand(void *arg __attribute__((unused)))
my_thread_init
();
// Init new thread
my_thread_init
();
// Init new thread
DBUG_ENTER
(
"signal_hand"
);
DBUG_ENTER
(
"signal_hand"
);
/* Setup alarm handler */
/*
init_thr_alarm
(
max_connections
+
max_insert_delayed_threads
);
Setup alarm handler
This should actually be '+ max_number_of_slaves' instead of +10,
but the +10 should be quite safe.
*/
init_thr_alarm
(
max_connections
+
max_insert_delayed_threads
+
10
);
#if SIGINT != THR_KILL_SIGNAL
#if SIGINT != THR_KILL_SIGNAL
(
void
)
sigemptyset
(
&
set
);
// Setup up SIGINT for debug
(
void
)
sigemptyset
(
&
set
);
// Setup up SIGINT for debug
(
void
)
sigaddset
(
&
set
,
SIGINT
);
// For debugging
(
void
)
sigaddset
(
&
set
,
SIGINT
);
// For debugging
...
...
sql/slave.cc
View file @
9f6aa117
...
@@ -784,9 +784,6 @@ static int safe_sleep(THD* thd, int sec)
...
@@ -784,9 +784,6 @@ static int safe_sleep(THD* thd, int sec)
*/
*/
thr_alarm
(
&
alarmed
,
2
*
nap_time
,
&
alarm_buff
);
thr_alarm
(
&
alarmed
,
2
*
nap_time
,
&
alarm_buff
);
sleep
(
nap_time
);
sleep
(
nap_time
);
// if we wake up before the alarm goes off, hit the button
// so it will not wake up the wife and kids :-)
if
(
thr_alarm_in_use
(
&
alarmed
))
thr_end_alarm
(
&
alarmed
);
thr_end_alarm
(
&
alarmed
);
if
(
slave_killed
(
thd
))
if
(
slave_killed
(
thd
))
...
...
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