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
7ed7fc7f
Commit
7ed7fc7f
authored
Mar 10, 2005
by
lars@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#2472: Addendum: Fixes after Mats review
parent
26787260
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 @
7ed7fc7f
...
...
@@ -35,8 +35,6 @@
#include "message.h"
#endif
extern
Table_filter
*
binlog_filter
;
MYSQL_LOG
mysql_log
,
mysql_slow_log
,
mysql_bin_log
;
ulong
sync_binlog_counter
=
0
;
...
...
sql/log_event.cc
View file @
7ed7fc7f
...
...
@@ -23,7 +23,6 @@
#include "slave.h"
#include "table_filter.h"
#include <my_dir.h>
extern
Table_filter
*
rpl_filter
;
#endif
/* MYSQL_CLIENT */
#define log_cs &my_charset_latin1
...
...
sql/repl_failsafe.cc
View file @
7ed7fc7f
...
...
@@ -24,8 +24,6 @@
#include "log_event.h"
#include <mysql.h>
extern
Table_filter
*
rpl_filter
;
#define SLAVE_LIST_CHUNK 128
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
...
...
sql/slave.cc
View file @
7ed7fc7f
...
...
@@ -28,8 +28,6 @@
#include <my_dir.h>
#include <sql_common.h>
extern
Table_filter
*
rpl_filter
;
bool
use_slave_mask
=
0
;
MY_BITMAP
slave_error_mask
;
...
...
sql/slave.h
View file @
7ed7fc7f
...
...
@@ -21,10 +21,14 @@
#include "mysql.h"
#include "my_list.h"
#include "table_filter.h"
#define SLAVE_NET_TIMEOUT 3600
#define MAX_SLAVE_ERRMSG 1024
#define MAX_SLAVE_ERROR 2000
extern
Table_filter
*
rpl_filter
;
/*****************************************************************************
MySQL Replication
...
...
sql/sql_acl.cc
View file @
7ed7fc7f
...
...
@@ -27,10 +27,6 @@
#include "mysql_priv.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 <stdarg.h>
#include "sp_head.h"
...
...
sql/sql_acl.h
View file @
7ed7fc7f
...
...
@@ -14,6 +14,9 @@
along with this program; if not, write to the Free Software
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 INSERT_ACL (1L << 1)
#define UPDATE_ACL (1L << 2)
...
...
sql/sql_parse.cc
View file @
7ed7fc7f
...
...
@@ -22,8 +22,6 @@
#include <myisam.h>
#include <my_dir.h>
extern
Table_filter
*
rpl_filter
;
#ifdef HAVE_INNOBASE_DB
#include "ha_innodb.h"
#endif
...
...
sql/sql_repl.cc
View file @
7ed7fc7f
...
...
@@ -22,8 +22,6 @@
#include "table_filter.h"
#include <my_dir.h>
extern
Table_filter
*
binlog_filter
;
int
max_binlog_dump_events
=
0
;
// unlimited
my_bool
opt_sporadic_binlog_dump_fail
=
0
;
static
int
binlog_dump_count
=
0
;
...
...
sql/sql_repl.h
View file @
7ed7fc7f
...
...
@@ -17,6 +17,9 @@
#ifdef HAVE_REPLICATION
#include "slave.h"
extern
Table_filter
*
binlog_filter
;
extern
Table_filter
*
rpl_filter
;
typedef
struct
st_slave_info
{
uint32
server_id
;
...
...
sql/table_filter.cc
View file @
7ed7fc7f
...
...
@@ -20,18 +20,13 @@
#define TABLE_RULE_HASH_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
();
ignore_db
.
empty
();
rewrite_db
.
empty
();
table_rules_on
=
0
;
}
...
...
@@ -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
->
key_len
=
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)
}
static
byte
*
get_table_key
(
TABLE_RULE_ENT
*
e
,
uint
*
len
,
my_bool
not_used
__attribute__
((
unused
)))
static
byte
*
get_table_key
(
const
byte
*
a
,
uint
*
len
,
my_bool
__attribute__
((
unused
)))
{
TABLE_RULE_ENT
*
e
=
(
TABLE_RULE_ENT
*
)
a
;
*
len
=
e
->
key_len
;
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
));
}
...
...
@@ -385,8 +384,7 @@ void
Table_filter
::
init_table_rule_hash
(
HASH
*
h
,
bool
*
h_inited
)
{
hash_init
(
h
,
system_charset_info
,
TABLE_RULE_HASH_SIZE
,
0
,
0
,
(
hash_get_key
)
get_table_key
,
(
hash_free_key
)
free_table_ent
,
0
);
get_table_key
,
free_table_ent
,
0
);
*
h_inited
=
1
;
}
...
...
@@ -517,7 +515,7 @@ Table_filter::get_rewrite_db(const char* db, uint32 *new_len)
{
if
(
!
strcmp
(
tmp
->
key
,
db
))
{
*
new_len
=
(
uint32
)
strlen
(
tmp
->
val
);
*
new_len
=
strlen
(
tmp
->
val
);
return
tmp
->
val
;
}
}
...
...
sql/table_filter.h
View file @
7ed7fc7f
...
...
@@ -39,7 +39,9 @@ class Table_filter
public:
Table_filter
();
~
Table_filter
();
Table_filter
(
Table_filter
const
&
);
Table_filter
&
operator
=
(
Table_filter
const
&
);
/* Checks - returns true if ok to replicate/log */
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