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
9ee11094
Commit
9ee11094
authored
Feb 28, 2001
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql into serg.mysql.com:/usr/home/serg/Abk/mysql
parents
375be6d5
01370b46
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
24 deletions
+74
-24
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+2
-1
Docs/manual.texi
Docs/manual.texi
+2
-0
innobase/include/os0file.h
innobase/include/os0file.h
+8
-4
innobase/os/os0file.c
innobase/os/os0file.c
+2
-5
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+18
-0
sql/slave.cc
sql/slave.cc
+38
-10
sql/slave.h
sql/slave.h
+4
-4
No files found.
BitKeeper/etc/logging_ok
View file @
9ee11094
mwagner@evoq.mwagner.org
heikki@donna.mysql.fi
heikki@donna.mysql.fi
mwagner@evoq.mwagner.org
sasha@mysql.sashanet.com
serg@serg.mysql.com
serg@serg.mysql.com
Docs/manual.texi
View file @
9ee11094
...
@@ -41660,6 +41660,8 @@ not yet 100 % confident in this code.
...
@@ -41660,6 +41660,8 @@ not yet 100 % confident in this code.
@appendixsubsec Changes in release 3.23.34
@appendixsubsec Changes in release 3.23.34
@itemize @bullet
@itemize @bullet
@item
@item
Improved error diagnostic for slave thread exit
@item
Fixed bug in @code{ALTER TABLE ... ORDER BY}.
Fixed bug in @code{ALTER TABLE ... ORDER BY}.
@item
@item
Added option @code{max_user_connections} to @code{mysqld}.
Added option @code{max_user_connections} to @code{mysqld}.
innobase/include/os0file.h
View file @
9ee11094
...
@@ -28,10 +28,14 @@ Created 10/21/1995 Heikki Tuuri
...
@@ -28,10 +28,14 @@ Created 10/21/1995 Heikki Tuuri
#define POSIX_ASYNC_IO
#define POSIX_ASYNC_IO
#endif
#endif
#ifndef S_IRWXU
#ifndef S_IRUSR
#define S_IRWXU 00700
#define
#define S_IRWXG 00070
#define S_IRUSR 00400
#define S_IRWXO 00007
#define S_IWUSR 00200
#define S_IRGRP 00040
#define S_IWGRP 00020
#define S_IROTH 00004
#define S_IWOTH 00002
#endif
#endif
#endif
#endif
...
...
innobase/os/os0file.c
View file @
9ee11094
...
@@ -316,11 +316,8 @@ os_file_create(
...
@@ -316,11 +316,8 @@ os_file_create(
UT_NOT_USED
(
purpose
);
UT_NOT_USED
(
purpose
);
if
(
create_mode
==
OS_FILE_CREATE
)
{
if
(
create_mode
==
OS_FILE_CREATE
)
{
#ifndef S_IRWXU
file
=
open
(
name
,
create_flag
,
S_IRUSR
|
S_IRGRP
|
S_IROTH
file
=
open
(
name
,
create_flag
);
|
S_IWUSR
|
S_IWGRP
|
S_IWOTH
);
#else
file
=
open
(
name
,
create_flag
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
#endif
}
else
{
}
else
{
file
=
open
(
name
,
create_flag
);
file
=
open
(
name
,
create_flag
);
}
}
...
...
mysql-test/t/fulltext.test
View file @
9ee11094
...
@@ -45,3 +45,21 @@ select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ti
...
@@ -45,3 +45,21 @@ select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ti
show
keys
from
t2
;
show
keys
from
t2
;
show
create
table
t2
;
show
create
table
t2
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
# check for bug reported by Stephan Skusa
drop
table
if
exists
fulltextTEST
;
CREATE
TABLE
fulltextTEST
(
field1
varchar
(
40
)
NOT
NULL
,
field2
varchar
(
20
)
NOT
NULL
,
field3
varchar
(
40
)
NOT
NULL
,
PRIMARY
KEY
(
field1
),
FULLTEXT
idx_fulltext
(
field1
,
field2
,
field3
)
);
INSERT
INTO
fulltextTEST
VALUES
(
'test1'
,
'test1.1'
,
'test1.1.1'
);
INSERT
INTO
fulltextTEST
VALUES
(
'test2'
,
'test2.1'
,
'test2.1.1'
);
select
*
from
fulltextTEST
where
MATCH
(
field1
,
field2
,
field3
)
AGAINST
(
NULL
);
drop
table
fulltextTEST
;
sql/slave.cc
View file @
9ee11094
...
@@ -588,7 +588,7 @@ int show_master_info(THD* thd)
...
@@ -588,7 +588,7 @@ int show_master_info(THD* thd)
net_store_data
(
packet
,
(
uint32
)
glob_mi
.
port
);
net_store_data
(
packet
,
(
uint32
)
glob_mi
.
port
);
net_store_data
(
packet
,
(
uint32
)
glob_mi
.
connect_retry
);
net_store_data
(
packet
,
(
uint32
)
glob_mi
.
connect_retry
);
net_store_data
(
packet
,
glob_mi
.
log_file_name
);
net_store_data
(
packet
,
glob_mi
.
log_file_name
);
net_store_data
(
packet
,
(
longlong
)
glob_mi
.
pos
);
net_store_data
(
packet
,
(
uint32
)
glob_mi
.
pos
);
pthread_mutex_unlock
(
&
glob_mi
.
lock
);
pthread_mutex_unlock
(
&
glob_mi
.
lock
);
pthread_mutex_lock
(
&
LOCK_slave
);
pthread_mutex_lock
(
&
LOCK_slave
);
net_store_data
(
packet
,
slave_running
?
"Yes"
:
"No"
);
net_store_data
(
packet
,
slave_running
?
"Yes"
:
"No"
);
...
@@ -1150,7 +1150,7 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1150,7 +1150,7 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
int
error
=
1
;
int
error
=
1
;
bool
retried_once
=
0
;
bool
retried_once
=
0
;
u
longlong
last_failed_pos
=
0
;
u
int32
last_failed_pos
=
0
;
// needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
// needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
my_thread_init
();
my_thread_init
();
...
@@ -1160,7 +1160,10 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1160,7 +1160,10 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
pthread_detach_this_thread
();
pthread_detach_this_thread
();
if
(
init_slave_thread
(
thd
)
||
init_master_info
(
&
glob_mi
))
if
(
init_slave_thread
(
thd
)
||
init_master_info
(
&
glob_mi
))
{
sql_print_error
(
"Failed during slave thread initialization"
);
goto
err
;
goto
err
;
}
thd
->
thread_stack
=
(
char
*
)
&
thd
;
// remember where our stack is
thd
->
thread_stack
=
(
char
*
)
&
thd
;
// remember where our stack is
thd
->
temporary_tables
=
save_temporary_tables
;
// restore temp tables
thd
->
temporary_tables
=
save_temporary_tables
;
// restore temp tables
threads
.
append
(
thd
);
threads
.
append
(
thd
);
...
@@ -1175,7 +1178,7 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1175,7 +1178,7 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
goto
err
;
goto
err
;
}
}
thd
->
proc_info
=
"
C
onnecting to master"
;
thd
->
proc_info
=
"
c
onnecting to master"
;
#ifndef DBUG_OFF
#ifndef DBUG_OFF
sql_print_error
(
"Slave thread initialized"
);
sql_print_error
(
"Slave thread initialized"
);
#endif
#endif
...
@@ -1187,7 +1190,10 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1187,7 +1190,10 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
RPL_LOG_NAME
,
RPL_LOG_NAME
,
glob_mi
.
pos
);
glob_mi
.
pos
);
else
else
{
sql_print_error
(
"Slave thread killed while connecting to master"
);
goto
err
;
goto
err
;
}
while
(
!
slave_killed
(
thd
))
while
(
!
slave_killed
(
thd
))
{
{
...
@@ -1196,9 +1202,13 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1196,9 +1202,13 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
{
{
sql_print_error
(
"Failed on request_dump()"
);
sql_print_error
(
"Failed on request_dump()"
);
if
(
slave_killed
(
thd
))
if
(
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed while requesting master \
dump"
);
goto
err
;
goto
err
;
}
thd
->
proc_info
=
"Waiting to reconnect after a failed dump request"
;
thd
->
proc_info
=
"Wai
i
ting to reconnect after a failed dump request"
;
if
(
mysql
->
net
.
vio
)
if
(
mysql
->
net
.
vio
)
vio_close
(
mysql
->
net
.
vio
);
vio_close
(
mysql
->
net
.
vio
);
// first time retry immediately, assuming that we can recover
// first time retry immediately, assuming that we can recover
...
@@ -1210,14 +1220,21 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
...
@@ -1210,14 +1220,21 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
retried_once
=
1
;
retried_once
=
1
;
if
(
slave_killed
(
thd
))
if
(
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed while retrying master \
dump"
);
goto
err
;
goto
err
;
}
thd
->
proc_info
=
"Reconnecting after a failed dump request"
;
thd
->
proc_info
=
"Reconnecting after a failed dump request"
;
sql_print_error
(
"Slave: failed dump request, reconnecting to \
sql_print_error
(
"Slave: failed dump request, reconnecting to \
try again, log '%s' at postion %ld"
,
RPL_LOG_NAME
,
try again, log '%s' at postion %ld"
,
RPL_LOG_NAME
,
last_failed_pos
=
glob_mi
.
pos
);
last_failed_pos
=
glob_mi
.
pos
);
if
(
safe_reconnect
(
thd
,
mysql
,
&
glob_mi
)
||
slave_killed
(
thd
))
if
(
safe_reconnect
(
thd
,
mysql
,
&
glob_mi
)
||
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed during or after reconnect"
);
goto
err
;
goto
err
;
}
continue
;
continue
;
}
}
...
@@ -1228,7 +1245,10 @@ try again, log '%s' at postion %ld", RPL_LOG_NAME,
...
@@ -1228,7 +1245,10 @@ try again, log '%s' at postion %ld", RPL_LOG_NAME,
thd
->
proc_info
=
"Reading master update"
;
thd
->
proc_info
=
"Reading master update"
;
uint
event_len
=
read_event
(
mysql
,
&
glob_mi
);
uint
event_len
=
read_event
(
mysql
,
&
glob_mi
);
if
(
slave_killed
(
thd
))
if
(
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed while reading event"
);
goto
err
;
goto
err
;
}
if
(
event_len
==
packet_error
)
if
(
event_len
==
packet_error
)
{
{
...
@@ -1241,13 +1261,21 @@ try again, log '%s' at postion %ld", RPL_LOG_NAME,
...
@@ -1241,13 +1261,21 @@ try again, log '%s' at postion %ld", RPL_LOG_NAME,
retried_once
=
1
;
retried_once
=
1
;
if
(
slave_killed
(
thd
))
if
(
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed while waiting to \
reconnect after a failed read"
);
goto
err
;
goto
err
;
}
thd
->
proc_info
=
"Reconnecting after a failed read"
;
thd
->
proc_info
=
"Reconnecting after a failed read"
;
sql_print_error
(
"Slave: Failed reading log event, \
sql_print_error
(
"Slave: Failed reading log event, \
reconnecting to retry, log '%s' position %ld"
,
RPL_LOG_NAME
,
reconnecting to retry, log '%s' position %ld"
,
RPL_LOG_NAME
,
last_failed_pos
=
glob_mi
.
pos
);
last_failed_pos
=
glob_mi
.
pos
);
if
(
safe_reconnect
(
thd
,
mysql
,
&
glob_mi
)
||
slave_killed
(
thd
))
if
(
safe_reconnect
(
thd
,
mysql
,
&
glob_mi
)
||
slave_killed
(
thd
))
{
sql_print_error
(
"Slave thread killed during or after a \
reconnect done to recover from failed read"
);
goto
err
;
goto
err
;
}
break
;
break
;
}
}
...
...
sql/slave.h
View file @
9ee11094
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
typedef
struct
st_master_info
typedef
struct
st_master_info
{
{
char
log_file_name
[
FN_REFLEN
];
char
log_file_name
[
FN_REFLEN
];
u
longlong
pos
,
pending
;
u
int32
pos
,
pending
;
File
fd
;
// we keep the file open, so we need to remember the file pointer
File
fd
;
// we keep the file open, so we need to remember the file pointer
IO_CACHE
file
;
IO_CACHE
file
;
// the variables below are needed because we can change masters on the fly
// the variables below are needed because we can change masters on the fly
...
@@ -29,11 +29,11 @@ typedef struct st_master_info
...
@@ -29,11 +29,11 @@ typedef struct st_master_info
pthread_mutex_destroy
(
&
lock
);
pthread_mutex_destroy
(
&
lock
);
pthread_cond_destroy
(
&
cond
);
pthread_cond_destroy
(
&
cond
);
}
}
inline
void
inc_pending
(
u
longlong
val
)
inline
void
inc_pending
(
u
int32
val
)
{
{
pending
+=
val
;
pending
+=
val
;
}
}
inline
void
inc_pos
(
u
longlong
val
)
inline
void
inc_pos
(
u
int32
val
)
{
{
pthread_mutex_lock
(
&
lock
);
pthread_mutex_lock
(
&
lock
);
pos
+=
val
+
pending
;
pos
+=
val
+
pending
;
...
@@ -43,7 +43,7 @@ typedef struct st_master_info
...
@@ -43,7 +43,7 @@ typedef struct st_master_info
}
}
// thread safe read of position - not needed if we are in the slave thread,
// thread safe read of position - not needed if we are in the slave thread,
// but required otherwise
// but required otherwise
inline
void
read_pos
(
u
longlong
&
var
)
inline
void
read_pos
(
u
int32
&
var
)
{
{
pthread_mutex_lock
(
&
lock
);
pthread_mutex_lock
(
&
lock
);
var
=
pos
;
var
=
pos
;
...
...
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