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
a726fec6
Commit
a726fec6
authored
Nov 03, 2006
by
mats@romeo.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b18581-mysql-5.1-new-rpl
parents
a3864256
83f8e172
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
57 deletions
+19
-57
mysql-test/r/rpl_do_grant.result
mysql-test/r/rpl_do_grant.result
+2
-0
mysql-test/t/rpl_do_grant.test
mysql-test/t/rpl_do_grant.test
+5
-5
sql/handler.cc
sql/handler.cc
+6
-29
sql/log_event.cc
sql/log_event.cc
+0
-1
sql/rpl_rli.h
sql/rpl_rli.h
+0
-16
sql/sql_class.cc
sql/sql_class.cc
+6
-6
No files found.
mysql-test/r/rpl_do_grant.result
View file @
a726fec6
...
@@ -23,6 +23,8 @@ password<>_binary''
...
@@ -23,6 +23,8 @@ password<>_binary''
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
flush privileges;
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
flush privileges;
show grants for rpl_do_grant@localhost;
show grants for rpl_do_grant@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
...
...
mysql-test/t/rpl_do_grant.test
View file @
a726fec6
...
@@ -39,11 +39,11 @@ connection master;
...
@@ -39,11 +39,11 @@ connection master;
delete
from
mysql
.
user
where
user
=
_binary
'rpl_do_grant'
;
delete
from
mysql
.
user
where
user
=
_binary
'rpl_do_grant'
;
delete
from
mysql
.
db
where
user
=
_binary
'rpl_do_grant'
;
delete
from
mysql
.
db
where
user
=
_binary
'rpl_do_grant'
;
flush
privileges
;
flush
privileges
;
s
ave_master_pos
;
s
ync_slave_with_master
;
connection
slave
;
# The mysql database is not replicated, so we have to do the deletes
sync_with_master
;
# manually on the slave as well.
# no need to delete manually, as the DELETEs must have done some real job on
delete
from
mysql
.
user
where
user
=
_binary
'rpl_do_grant'
;
# master (updated binlog)
delete
from
mysql
.
db
where
user
=
_binary
'rpl_do_grant'
;
flush
privileges
;
flush
privileges
;
# End of 4.1 tests
# End of 4.1 tests
...
...
sql/handler.cc
View file @
a726fec6
...
@@ -3456,38 +3456,15 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
...
@@ -3456,38 +3456,15 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
declared static, but it works by putting it into an anonymous
declared static, but it works by putting it into an anonymous
namespace. */
namespace. */
namespace
{
namespace
{
struct
st_table_data
{
char
const
*
db
;
char
const
*
name
;
};
static
int
table_name_compare
(
void
const
*
a
,
void
const
*
b
)
{
st_table_data
const
*
x
=
(
st_table_data
const
*
)
a
;
st_table_data
const
*
y
=
(
st_table_data
const
*
)
b
;
/* Doing lexical compare in order (db,name) */
int
const
res
=
strcmp
(
x
->
db
,
y
->
db
);
return
res
!=
0
?
res
:
strcmp
(
x
->
name
,
y
->
name
);
}
bool
check_table_binlog_row_based
(
THD
*
thd
,
TABLE
*
table
)
bool
check_table_binlog_row_based
(
THD
*
thd
,
TABLE
*
table
)
{
{
static
st_table_data
const
ignore
[]
=
{
{
"mysql"
,
"event"
},
{
"mysql"
,
"general_log"
},
{
"mysql"
,
"slow_log"
}
};
my_size_t
const
ignore_size
=
sizeof
(
ignore
)
/
sizeof
(
*
ignore
);
st_table_data
const
item
=
{
table
->
s
->
db
.
str
,
table
->
s
->
table_name
.
str
};
if
(
table
->
s
->
cached_row_logging_check
==
-
1
)
if
(
table
->
s
->
cached_row_logging_check
==
-
1
)
table
->
s
->
cached_row_logging_check
=
{
(
table
->
s
->
tmp_table
==
NO_TMP_TABLE
)
&&
int
const
check
(
table
->
s
->
tmp_table
==
NO_TMP_TABLE
&&
binlog_filter
->
db_ok
(
table
->
s
->
db
.
str
)
&&
binlog_filter
->
db_ok
(
table
->
s
->
db
.
str
)
&&
bsearch
(
&
item
,
ignore
,
ignore_size
,
strcmp
(
"mysql"
,
table
->
s
->
db
.
str
)
!=
0
);
sizeof
(
st_table_data
),
table_name_compare
)
==
NULL
;
table
->
s
->
cached_row_logging_check
=
check
;
}
DBUG_ASSERT
(
table
->
s
->
cached_row_logging_check
==
0
||
DBUG_ASSERT
(
table
->
s
->
cached_row_logging_check
==
0
||
table
->
s
->
cached_row_logging_check
==
1
);
table
->
s
->
cached_row_logging_check
==
1
);
...
...
sql/log_event.cc
View file @
a726fec6
...
@@ -5694,7 +5694,6 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
...
@@ -5694,7 +5694,6 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
for
(
ptr
=
rli
->
tables_to_lock
;
ptr
;
ptr
=
ptr
->
next_global
)
for
(
ptr
=
rli
->
tables_to_lock
;
ptr
;
ptr
=
ptr
->
next_global
)
{
{
rli
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
rli
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
rli
->
touching_table
(
ptr
->
db
,
ptr
->
table_name
,
ptr
->
table_id
);
}
}
#ifdef HAVE_QUERY_CACHE
#ifdef HAVE_QUERY_CACHE
query_cache
.
invalidate_locked_for_write
(
rli
->
tables_to_lock
);
query_cache
.
invalidate_locked_for_write
(
rli
->
tables_to_lock
);
...
...
sql/rpl_rli.h
View file @
a726fec6
...
@@ -293,22 +293,6 @@ typedef struct st_relay_log_info
...
@@ -293,22 +293,6 @@ typedef struct st_relay_log_info
void
cached_charset_invalidate
();
void
cached_charset_invalidate
();
bool
cached_charset_compare
(
char
*
charset
);
bool
cached_charset_compare
(
char
*
charset
);
/*
To reload special tables when they are changes, we introduce a set
of functions that will mark whenever special functions need to be
called after modifying tables. Right now, the tables are either
ACL tables or grants tables.
*/
enum
enum_reload_flag
{
RELOAD_NONE_F
=
0UL
,
RELOAD_GRANT_F
=
(
1UL
<<
0
),
RELOAD_ACCESS_F
=
(
1UL
<<
1
)
};
ulong
m_reload_flags
;
void
touching_table
(
char
const
*
db
,
char
const
*
table
,
ulong
table_id
);
void
transaction_end
(
THD
*
);
void
transaction_end
(
THD
*
);
void
cleanup_context
(
THD
*
,
bool
);
void
cleanup_context
(
THD
*
,
bool
);
...
...
sql/sql_class.cc
View file @
a726fec6
...
@@ -2778,6 +2778,12 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
...
@@ -2778,6 +2778,12 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
#endif
/*HAVE_ROW_BASED_REPLICATION*/
#endif
/*HAVE_ROW_BASED_REPLICATION*/
switch
(
qtype
)
{
switch
(
qtype
)
{
case
THD
:
:
ROW_QUERY_TYPE
:
#ifdef HAVE_ROW_BASED_REPLICATION
if
(
current_stmt_binlog_row_based
)
DBUG_RETURN
(
0
);
#endif
/* Otherwise, we fall through */
case
THD
:
:
MYSQL_QUERY_TYPE
:
case
THD
:
:
MYSQL_QUERY_TYPE
:
/*
/*
Using this query type is a conveniece hack, since we have been
Using this query type is a conveniece hack, since we have been
...
@@ -2787,12 +2793,6 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
...
@@ -2787,12 +2793,6 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
Make sure to change in check_table_binlog_row_based() according
Make sure to change in check_table_binlog_row_based() according
to how you treat this.
to how you treat this.
*/
*/
case
THD
:
:
ROW_QUERY_TYPE
:
#ifdef HAVE_ROW_BASED_REPLICATION
if
(
current_stmt_binlog_row_based
)
DBUG_RETURN
(
0
);
#endif
/* Otherwise, we fall through */
case
THD
:
:
STMT_QUERY_TYPE
:
case
THD
:
:
STMT_QUERY_TYPE
:
/*
/*
The MYSQL_LOG::write() function will set the STMT_END_F flag and
The MYSQL_LOG::write() function will set the STMT_END_F flag and
...
...
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