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
cce3acfa
Commit
cce3acfa
authored
Dec 05, 2003
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/kostja/mysql/mysql-4.0-root
parents
a8c811e2
c87747c3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
4 deletions
+76
-4
mysql-test/r/rpl_multi_update.result
mysql-test/r/rpl_multi_update.result
+27
-0
mysql-test/t/rpl_multi_update.test
mysql-test/t/rpl_multi_update.test
+25
-0
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+7
-0
sql/slave.cc
sql/slave.cc
+3
-1
sql/sql_class.h
sql/sql_class.h
+7
-2
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+6
-0
No files found.
mysql-test/r/rpl_multi_update.result
0 → 100644
View file @
cce3acfa
slave stop;
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;
slave start;
drop table if exists t1,t2;
CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
b int unsigned,
) TYPE=MyISAM;
CREATE TABLE t2 (
a int unsigned not null auto_increment primary key,
b int unsigned
) TYPE=MyISAM;
INSERT INTO t1 VALUES (NULL, 0);
INSERT INTO t1 SELECT NULL, 0 FROM t1;
INSERT INTO t2 VALUES (NULL, 0), (NULL,1);
SELECT * FROM t1 ORDER BY a;
a b
1 0
2 0
SELECT * FROM t2 ORDER BY a;
a b
1 0
2 1
UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a;
mysql-test/t/rpl_multi_update.test
0 → 100644
View file @
cce3acfa
source
include
/
master
-
slave
.
inc
;
drop
table
if
exists
t1
,
t2
;
CREATE
TABLE
t1
(
a
int
unsigned
not
null
auto_increment
primary
key
,
b
int
unsigned
,
)
TYPE
=
MyISAM
;
CREATE
TABLE
t2
(
a
int
unsigned
not
null
auto_increment
primary
key
,
b
int
unsigned
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
NULL
,
0
);
INSERT
INTO
t1
SELECT
NULL
,
0
FROM
t1
;
INSERT
INTO
t2
VALUES
(
NULL
,
0
),
(
NULL
,
1
);
SELECT
*
FROM
t1
ORDER
BY
a
;
SELECT
*
FROM
t2
ORDER
BY
a
;
UPDATE
t1
,
t2
SET
t1
.
b
=
t2
.
b
WHERE
t1
.
a
=
t2
.
a
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sql/repl_failsafe.cc
View file @
cce3acfa
...
@@ -52,6 +52,13 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
...
@@ -52,6 +52,13 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
const
char
*
log_file_name
,
const
char
*
log_file_name
,
char
*
errmsg
);
char
*
errmsg
);
/*
All of the functions defined in this file which are not used (the ones to
handle failsafe) are not used; their code has not been updated for more than
one year now so should be considered as BADLY BROKEN. Do not enable it.
The used functions (to handle LOAD DATA FROM MASTER, plus some small
functions like register_slave()) are working.
*/
static
int
init_failsafe_rpl_thread
(
THD
*
thd
)
static
int
init_failsafe_rpl_thread
(
THD
*
thd
)
{
{
...
...
sql/slave.cc
View file @
cce3acfa
...
@@ -2021,7 +2021,9 @@ improper_arguments: %d timed_out: %d",
...
@@ -2021,7 +2021,9 @@ improper_arguments: %d timed_out: %d",
static
int
init_slave_thread
(
THD
*
thd
,
SLAVE_THD_TYPE
thd_type
)
static
int
init_slave_thread
(
THD
*
thd
,
SLAVE_THD_TYPE
thd_type
)
{
{
DBUG_ENTER
(
"init_slave_thread"
);
DBUG_ENTER
(
"init_slave_thread"
);
thd
->
system_thread
=
thd
->
bootstrap
=
1
;
thd
->
system_thread
=
(
thd_type
==
SLAVE_THD_SQL
)
?
SYSTEM_THREAD_SLAVE_SQL
:
SYSTEM_THREAD_SLAVE_IO
;
thd
->
bootstrap
=
1
;
thd
->
host_or_ip
=
""
;
thd
->
host_or_ip
=
""
;
thd
->
client_capabilities
=
0
;
thd
->
client_capabilities
=
0
;
my_net_init
(
&
thd
->
net
,
0
);
my_net_init
(
&
thd
->
net
,
0
);
...
...
sql/sql_class.h
View file @
cce3acfa
...
@@ -460,7 +460,7 @@ public:
...
@@ -460,7 +460,7 @@ public:
long
dbug_thread_id
;
long
dbug_thread_id
;
pthread_t
real_id
;
pthread_t
real_id
;
uint
current_tablenr
,
tmp_table
,
cond_count
;
uint
current_tablenr
,
tmp_table
,
cond_count
;
uint
server_status
,
open_options
;
uint
server_status
,
open_options
,
system_thread
;
uint32
query_length
;
uint32
query_length
;
uint32
db_length
;
uint32
db_length
;
/* variables.transaction_isolation is reset to this after each commit */
/* variables.transaction_isolation is reset to this after each commit */
...
@@ -470,7 +470,7 @@ public:
...
@@ -470,7 +470,7 @@ public:
bool
set_query_id
,
locked
,
count_cuted_fields
,
some_tables_deleted
;
bool
set_query_id
,
locked
,
count_cuted_fields
,
some_tables_deleted
;
bool
no_errors
,
allow_sum_func
,
password
,
fatal_error
;
bool
no_errors
,
allow_sum_func
,
password
,
fatal_error
;
bool
query_start_used
,
last_insert_id_used
,
insert_id_used
,
rand_used
;
bool
query_start_used
,
last_insert_id_used
,
insert_id_used
,
rand_used
;
bool
system_thread
,
in_lock_tables
,
global_read_lock
;
bool
in_lock_tables
,
global_read_lock
;
bool
query_error
,
bootstrap
,
cleanup_done
;
bool
query_error
,
bootstrap
,
cleanup_done
;
bool
safe_to_cache_query
;
bool
safe_to_cache_query
;
bool
volatile
killed
;
bool
volatile
killed
;
...
@@ -592,6 +592,11 @@ public:
...
@@ -592,6 +592,11 @@ public:
CHANGED_TABLE_LIST
*
changed_table_dup
(
const
char
*
key
,
long
key_length
);
CHANGED_TABLE_LIST
*
changed_table_dup
(
const
char
*
key
,
long
key_length
);
};
};
/* Flags for the THD::system_thread (bitmap) variable */
#define SYSTEM_THREAD_DELAYED_INSERT 1
#define SYSTEM_THREAD_SLAVE_IO 2
#define SYSTEM_THREAD_SLAVE_SQL 4
/*
/*
Used to hold information about file and file structure in exchainge
Used to hold information about file and file structure in exchainge
via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
...
...
sql/sql_insert.cc
View file @
cce3acfa
...
@@ -550,7 +550,7 @@ public:
...
@@ -550,7 +550,7 @@ public:
thd
.
command
=
COM_DELAYED_INSERT
;
thd
.
command
=
COM_DELAYED_INSERT
;
bzero
((
char
*
)
&
thd
.
net
,
sizeof
(
thd
.
net
));
// Safety
bzero
((
char
*
)
&
thd
.
net
,
sizeof
(
thd
.
net
));
// Safety
thd
.
system_thread
=
1
;
thd
.
system_thread
=
SYSTEM_THREAD_DELAYED_INSERT
;
thd
.
host_or_ip
=
""
;
thd
.
host_or_ip
=
""
;
bzero
((
char
*
)
&
info
,
sizeof
(
info
));
bzero
((
char
*
)
&
info
,
sizeof
(
info
));
pthread_mutex_init
(
&
mutex
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
mutex
,
MY_MUTEX_INIT_FAST
);
...
...
sql/sql_parse.cc
View file @
cce3acfa
...
@@ -2902,6 +2902,12 @@ mysql_init_query(THD *thd)
...
@@ -2902,6 +2902,12 @@ mysql_init_query(THD *thd)
thd
->
lex
.
select_lex
.
table_list
.
first
=
0
;
thd
->
lex
.
select_lex
.
table_list
.
first
=
0
;
thd
->
lex
.
select_lex
.
table_list
.
next
=
(
byte
**
)
&
thd
->
lex
.
select_lex
.
table_list
.
first
;
thd
->
lex
.
select_lex
.
table_list
.
next
=
(
byte
**
)
&
thd
->
lex
.
select_lex
.
table_list
.
first
;
thd
->
lex
.
select_lex
.
next
=
0
;
thd
->
lex
.
select_lex
.
next
=
0
;
/*
select_lex.options is also inited in dispatch_command(), but for
replication (which bypasses dispatch_command() and calls mysql_parse()
directly) we must do it here.
*/
thd
->
lex
.
select_lex
.
options
=
0
;
thd
->
lex
.
olap
=
0
;
thd
->
lex
.
olap
=
0
;
thd
->
lex
.
select
->
olap
=
UNSPECIFIED_OLAP_TYPE
;
thd
->
lex
.
select
->
olap
=
UNSPECIFIED_OLAP_TYPE
;
thd
->
fatal_error
=
0
;
// Safety
thd
->
fatal_error
=
0
;
// Safety
...
...
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