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
f532a8f0
Commit
f532a8f0
authored
Mar 10, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#2472: Addendum: Fixes after Mats review
parent
4b3caa85
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
32 deletions
+27
-32
sql/log.cc
sql/log.cc
+0
-2
sql/log_event.cc
sql/log_event.cc
+0
-1
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+0
-2
sql/slave.cc
sql/slave.cc
+0
-2
sql/slave.h
sql/slave.h
+4
-0
sql/sql_acl.cc
sql/sql_acl.cc
+0
-4
sql/sql_acl.h
sql/sql_acl.h
+3
-0
sql/sql_parse.cc
sql/sql_parse.cc
+0
-2
sql/sql_repl.cc
sql/sql_repl.cc
+0
-2
sql/sql_repl.h
sql/sql_repl.h
+3
-0
sql/table_filter.cc
sql/table_filter.cc
+14
-16
sql/table_filter.h
sql/table_filter.h
+3
-1
No files found.
sql/log.cc
View file @
f532a8f0
...
@@ -35,8 +35,6 @@
...
@@ -35,8 +35,6 @@
#include "message.h"
#include "message.h"
#endif
#endif
extern
Table_filter
*
binlog_filter
;
MYSQL_LOG
mysql_log
,
mysql_slow_log
,
mysql_bin_log
;
MYSQL_LOG
mysql_log
,
mysql_slow_log
,
mysql_bin_log
;
ulong
sync_binlog_counter
=
0
;
ulong
sync_binlog_counter
=
0
;
...
...
sql/log_event.cc
View file @
f532a8f0
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include "slave.h"
#include "slave.h"
#include "table_filter.h"
#include "table_filter.h"
#include <my_dir.h>
#include <my_dir.h>
extern
Table_filter
*
rpl_filter
;
#endif
/* MYSQL_CLIENT */
#endif
/* MYSQL_CLIENT */
#define log_cs &my_charset_latin1
#define log_cs &my_charset_latin1
...
...
sql/repl_failsafe.cc
View file @
f532a8f0
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include "log_event.h"
#include "log_event.h"
#include <mysql.h>
#include <mysql.h>
extern
Table_filter
*
rpl_filter
;
#define SLAVE_LIST_CHUNK 128
#define SLAVE_LIST_CHUNK 128
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
...
...
sql/slave.cc
View file @
f532a8f0
...
@@ -28,8 +28,6 @@
...
@@ -28,8 +28,6 @@
#include <my_dir.h>
#include <my_dir.h>
#include <sql_common.h>
#include <sql_common.h>
extern
Table_filter
*
rpl_filter
;
bool
use_slave_mask
=
0
;
bool
use_slave_mask
=
0
;
MY_BITMAP
slave_error_mask
;
MY_BITMAP
slave_error_mask
;
...
...
sql/slave.h
View file @
f532a8f0
...
@@ -21,10 +21,14 @@
...
@@ -21,10 +21,14 @@
#include "mysql.h"
#include "mysql.h"
#include "my_list.h"
#include "my_list.h"
#include "table_filter.h"
#define SLAVE_NET_TIMEOUT 3600
#define SLAVE_NET_TIMEOUT 3600
#define MAX_SLAVE_ERRMSG 1024
#define MAX_SLAVE_ERRMSG 1024
#define MAX_SLAVE_ERROR 2000
#define MAX_SLAVE_ERROR 2000
extern
Table_filter
*
rpl_filter
;
/*****************************************************************************
/*****************************************************************************
MySQL Replication
MySQL Replication
...
...
sql/sql_acl.cc
View file @
f532a8f0
...
@@ -27,10 +27,6 @@
...
@@ -27,10 +27,6 @@
#include "mysql_priv.h"
#include "mysql_priv.h"
#include "hash_filo.h"
#include "hash_filo.h"
#ifdef HAVE_REPLICATION
#include "table_filter.h" //for tables_ok()
extern
Table_filter
*
rpl_filter
;
#endif
#include <m_ctype.h>
#include <m_ctype.h>
#include <stdarg.h>
#include <stdarg.h>
#include "sp_head.h"
#include "sp_head.h"
...
...
sql/sql_acl.h
View file @
f532a8f0
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "slave.h" // for tables_ok(), rpl_filter
extern
Table_filter
*
rpl_filter
;
#define SELECT_ACL (1L << 0)
#define SELECT_ACL (1L << 0)
#define INSERT_ACL (1L << 1)
#define INSERT_ACL (1L << 1)
#define UPDATE_ACL (1L << 2)
#define UPDATE_ACL (1L << 2)
...
...
sql/sql_parse.cc
View file @
f532a8f0
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <myisam.h>
#include <myisam.h>
#include <my_dir.h>
#include <my_dir.h>
extern
Table_filter
*
rpl_filter
;
#ifdef HAVE_INNOBASE_DB
#ifdef HAVE_INNOBASE_DB
#include "ha_innodb.h"
#include "ha_innodb.h"
#endif
#endif
...
...
sql/sql_repl.cc
View file @
f532a8f0
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include "table_filter.h"
#include "table_filter.h"
#include <my_dir.h>
#include <my_dir.h>
extern
Table_filter
*
binlog_filter
;
int
max_binlog_dump_events
=
0
;
// unlimited
int
max_binlog_dump_events
=
0
;
// unlimited
my_bool
opt_sporadic_binlog_dump_fail
=
0
;
my_bool
opt_sporadic_binlog_dump_fail
=
0
;
static
int
binlog_dump_count
=
0
;
static
int
binlog_dump_count
=
0
;
...
...
sql/sql_repl.h
View file @
f532a8f0
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
#include "slave.h"
#include "slave.h"
extern
Table_filter
*
binlog_filter
;
extern
Table_filter
*
rpl_filter
;
typedef
struct
st_slave_info
typedef
struct
st_slave_info
{
{
uint32
server_id
;
uint32
server_id
;
...
...
sql/table_filter.cc
View file @
f532a8f0
...
@@ -20,18 +20,13 @@
...
@@ -20,18 +20,13 @@
#define TABLE_RULE_HASH_SIZE 16
#define TABLE_RULE_HASH_SIZE 16
#define TABLE_RULE_ARR_SIZE 16
#define TABLE_RULE_ARR_SIZE 16
Table_filter
::
Table_filter
()
Table_filter
::
Table_filter
()
:
table_rules_on
(
0
),
do_table_inited
(
0
),
ignore_table_inited
(
0
),
wild_do_table_inited
(
0
),
wild_ignore_table_inited
(
0
)
{
{
do_table_inited
=
0
;
ignore_table_inited
=
0
;
wild_do_table_inited
=
0
;
wild_ignore_table_inited
=
0
;
do_db
.
empty
();
do_db
.
empty
();
ignore_db
.
empty
();
ignore_db
.
empty
();
rewrite_db
.
empty
();
rewrite_db
.
empty
();
table_rules_on
=
0
;
}
}
...
@@ -324,8 +319,8 @@ Table_filter::add_table_rule(HASH* h, const char* table_spec)
...
@@ -324,8 +319,8 @@ Table_filter::add_table_rule(HASH* h, const char* table_spec)
e
->
tbl_name
=
e
->
db
+
(
dot
-
table_spec
)
+
1
;
e
->
tbl_name
=
e
->
db
+
(
dot
-
table_spec
)
+
1
;
e
->
key_len
=
len
;
e
->
key_len
=
len
;
memcpy
(
e
->
db
,
table_spec
,
len
);
memcpy
(
e
->
db
,
table_spec
,
len
);
(
void
)
my_hash_insert
(
h
,
(
byte
*
)
e
);
return
0
;
return
my_hash_insert
(
h
,
(
byte
*
)
e
)
;
}
}
...
@@ -367,16 +362,20 @@ Table_filter::add_ignore_db(const char* table_spec)
...
@@ -367,16 +362,20 @@ Table_filter::add_ignore_db(const char* table_spec)
}
}
static
byte
*
get_table_key
(
TABLE_RULE_ENT
*
e
,
uint
*
len
,
static
byte
*
get_table_key
(
const
byte
*
a
,
uint
*
len
,
my_bool
not_used
__attribute__
((
unused
)))
my_bool
__attribute__
((
unused
)))
{
{
TABLE_RULE_ENT
*
e
=
(
TABLE_RULE_ENT
*
)
a
;
*
len
=
e
->
key_len
;
*
len
=
e
->
key_len
;
return
(
byte
*
)
e
->
db
;
return
(
byte
*
)
e
->
db
;
}
}
static
void
free_table_ent
(
TABLE_RULE_ENT
*
e
)
static
void
free_table_ent
(
void
*
a
)
{
{
TABLE_RULE_ENT
*
e
=
(
TABLE_RULE_ENT
*
)
a
;
my_free
((
gptr
)
e
,
MYF
(
0
));
my_free
((
gptr
)
e
,
MYF
(
0
));
}
}
...
@@ -385,8 +384,7 @@ void
...
@@ -385,8 +384,7 @@ void
Table_filter
::
init_table_rule_hash
(
HASH
*
h
,
bool
*
h_inited
)
Table_filter
::
init_table_rule_hash
(
HASH
*
h
,
bool
*
h_inited
)
{
{
hash_init
(
h
,
system_charset_info
,
TABLE_RULE_HASH_SIZE
,
0
,
0
,
hash_init
(
h
,
system_charset_info
,
TABLE_RULE_HASH_SIZE
,
0
,
0
,
(
hash_get_key
)
get_table_key
,
get_table_key
,
free_table_ent
,
0
);
(
hash_free_key
)
free_table_ent
,
0
);
*
h_inited
=
1
;
*
h_inited
=
1
;
}
}
...
@@ -517,7 +515,7 @@ Table_filter::get_rewrite_db(const char* db, uint32 *new_len)
...
@@ -517,7 +515,7 @@ Table_filter::get_rewrite_db(const char* db, uint32 *new_len)
{
{
if
(
!
strcmp
(
tmp
->
key
,
db
))
if
(
!
strcmp
(
tmp
->
key
,
db
))
{
{
*
new_len
=
(
uint32
)
strlen
(
tmp
->
val
);
*
new_len
=
strlen
(
tmp
->
val
);
return
tmp
->
val
;
return
tmp
->
val
;
}
}
}
}
...
...
sql/table_filter.h
View file @
f532a8f0
...
@@ -39,7 +39,9 @@ class Table_filter
...
@@ -39,7 +39,9 @@ class Table_filter
public:
public:
Table_filter
();
Table_filter
();
~
Table_filter
();
~
Table_filter
();
Table_filter
(
Table_filter
const
&
);
Table_filter
&
operator
=
(
Table_filter
const
&
);
/* Checks - returns true if ok to replicate/log */
/* Checks - returns true if ok to replicate/log */
bool
tables_ok
(
const
char
*
db
,
TABLE_LIST
*
tables
);
bool
tables_ok
(
const
char
*
db
,
TABLE_LIST
*
tables
);
...
...
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