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
425dc6d2
Commit
425dc6d2
authored
Sep 28, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup
parent
7aabc2de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
32 deletions
+35
-32
sql/events.cc
sql/events.cc
+0
-27
sql/mysqld.cc
sql/mysqld.cc
+5
-5
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+30
-0
No files found.
sql/events.cc
View file @
425dc6d2
...
...
@@ -1202,33 +1202,6 @@ int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len)
}
return
wsrep_to_buf_helper
(
thd
,
log_query
.
ptr
(),
log_query
.
length
(),
buf
,
buf_len
);
}
static
int
wsrep_alter_query_string
(
THD
*
thd
,
String
*
buf
)
{
/* Append the "ALTER" part of the query */
if
(
buf
->
append
(
STRING_WITH_LEN
(
"ALTER "
)))
return
1
;
/* Append definer */
append_definer
(
thd
,
buf
,
&
(
thd
->
lex
->
definer
->
user
),
&
(
thd
->
lex
->
definer
->
host
));
/* Append the left part of thd->query after event name part */
if
(
buf
->
append
(
thd
->
lex
->
stmt_definition_begin
,
thd
->
lex
->
stmt_definition_end
-
thd
->
lex
->
stmt_definition_begin
))
return
1
;
return
0
;
}
int
wsrep_alter_event_query
(
THD
*
thd
,
uchar
**
buf
,
size_t
*
buf_len
)
{
String
log_query
;
if
(
wsrep_alter_query_string
(
thd
,
&
log_query
))
{
WSREP_WARN
(
"events alter string failed: %s"
,
thd
->
query
());
return
1
;
}
return
wsrep_to_buf_helper
(
thd
,
log_query
.
ptr
(),
log_query
.
length
(),
buf
,
buf_len
);
}
#endif
/* WITH_WSREP */
/**
@} (End of group Event_Scheduler)
...
...
sql/mysqld.cc
View file @
425dc6d2
...
...
@@ -4841,12 +4841,12 @@ static int init_server_components()
unireg_abort
(
1
);
/* need to configure logging before initializing storage engines */
if
(
!
opt_bin_log_used
)
if
(
!
opt_bin_log_used
&&
!
WSREP_ON
)
{
if
(
!
WSREP_ON
&&
opt_log_slave_updates
)
if
(
opt_log_slave_updates
)
sql_print_warning
(
"You need to use --log-bin to make "
"--log-slave-updates work."
);
if
(
!
WSREP_ON
&&
binlog_format_used
)
if
(
binlog_format_used
)
sql_print_warning
(
"You need to use --log-bin to make "
"--binlog-format work."
);
}
...
...
@@ -9214,8 +9214,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
(Yes, this is a hack, but it's required as the definition of
max_relay_log_size allows it to be set to 0).
*/
max_relay_log_size_var
=
intern_find_sys_var
(
"max_relay_log_size"
,
0
);
max_binlog_size_var
=
intern_find_sys_var
(
"max_binlog_size"
,
0
);
max_relay_log_size_var
=
intern_find_sys_var
(
STRING_WITH_LEN
(
"max_relay_log_size"
)
);
max_binlog_size_var
=
intern_find_sys_var
(
STRING_WITH_LEN
(
"max_binlog_size"
)
);
if
(
max_binlog_size_var
&&
max_relay_log_size_var
)
{
max_relay_log_size_var
->
option
.
min_value
=
...
...
sql/wsrep_mysqld.cc
View file @
425dc6d2
...
...
@@ -22,6 +22,7 @@
#include "rpl_filter.h"
#include "sql_callback.h"
#include "sp_head.h"
#include "sql_show.h"
#include "sp.h"
#include "wsrep_priv.h"
#include "wsrep_thd.h"
...
...
@@ -1271,6 +1272,35 @@ int wsrep_to_buf_helper(
return
ret
;
}
static
int
wsrep_alter_query_string
(
THD
*
thd
,
String
*
buf
)
{
/* Append the "ALTER" part of the query */
if
(
buf
->
append
(
STRING_WITH_LEN
(
"ALTER "
)))
return
1
;
/* Append definer */
append_definer
(
thd
,
buf
,
&
(
thd
->
lex
->
definer
->
user
),
&
(
thd
->
lex
->
definer
->
host
));
/* Append the left part of thd->query after event name part */
if
(
buf
->
append
(
thd
->
lex
->
stmt_definition_begin
,
thd
->
lex
->
stmt_definition_end
-
thd
->
lex
->
stmt_definition_begin
))
return
1
;
return
0
;
}
int
wsrep_alter_event_query
(
THD
*
thd
,
uchar
**
buf
,
size_t
*
buf_len
)
{
String
log_query
;
if
(
wsrep_alter_query_string
(
thd
,
&
log_query
))
{
WSREP_WARN
(
"events alter string failed: %s"
,
thd
->
query
());
return
1
;
}
return
wsrep_to_buf_helper
(
thd
,
log_query
.
ptr
(),
log_query
.
length
(),
buf
,
buf_len
);
}
#include "sql_show.h"
static
int
create_view_query
(
THD
*
thd
,
uchar
**
buf
,
size_t
*
buf_len
)
...
...
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