Skip to content

Commit 3a3ec74

Browse files
montywivuvova
authored andcommitted
cleanups done as part of adding encryption
- Fixed compiler warnings - Added include/wait_for_binlog_checkpoint.inc, as suggested by JonasO - Updated 'build-tags' to work with git (Patch by Serg)
1 parent 01963e5 commit 3a3ec74

File tree

9 files changed

+37
-18
lines changed

9 files changed

+37
-18
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ storage/tokudb/ft-index/ft/log_code.cc
175175
storage/tokudb/ft-index/ft/log_header.h
176176
storage/tokudb/ft-index/ft/log_print.cc
177177
storage/tokudb/ft-index/ft/logformat
178+
storage/tokudb/ft-index/ft/ftverify
179+
storage/tokudb/ft-index/ft/tdb-recover
180+
storage/tokudb/ft-index/ft/tdb_logprint
181+
storage/tokudb/ft-index/ft/tokuftdump
178182
storage/tokudb/ft-index/portability/merge_archives_tokuportability_static.cmake
179183
storage/tokudb/ft-index/portability/toku_config.h
180184
storage/tokudb/ft-index/portability/tokuportability_static_depends.cc

mysql-test/suite/binlog/t/binlog_index.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ flush tables;
3737

3838
# there must be a warning with file names
3939
replace_regex /\.[\\\/]master/master/;
40+
--source include/wait_for_binlog_checkpoint.inc
4041
purge binary logs TO 'master-bin.000004';
4142

4243
--echo *** must show a list starting from the 'TO' argument of PURGE ***
@@ -57,6 +58,7 @@ remove_file $MYSQLD_DATADIR/master-bin.000001;
5758
let $date=`select NOW() + INTERVAL 1 MINUTE`;
5859
--disable_query_log
5960
replace_regex /\.[\\\/]master/master/;
61+
--source include/wait_for_binlog_checkpoint.inc
6062
eval purge binary logs BEFORE '$date';
6163
--enable_query_log
6264

@@ -77,6 +79,7 @@ flush logs;
7779
remove_file $MYSQLD_DATADIR/master-bin.000001;
7880
mkdir $MYSQLD_DATADIR/master-bin.000001;
7981

82+
--source include/wait_for_binlog_checkpoint.inc
8083
--error ER_BINLOG_PURGE_FATAL_ERR
8184
purge binary logs TO 'master-bin.000002';
8285
replace_regex /\.[\\\/]master/master/;
@@ -91,6 +94,7 @@ flush logs;
9194

9295
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
9396
SET SESSION debug_dbug="+d,crash_purge_before_update_index";
97+
--source include/wait_for_binlog_checkpoint.inc
9498
--error 2013
9599
purge binary logs TO 'master-bin.000002';
96100

@@ -111,6 +115,7 @@ flush logs;
111115

112116
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
113117
SET SESSION debug_dbug="+d,crash_purge_non_critical_after_update_index";
118+
--source include/wait_for_binlog_checkpoint.inc
114119
--error 2013
115120
purge binary logs TO 'master-bin.000004';
116121

@@ -134,6 +139,7 @@ flush logs;
134139

135140
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
136141
SET SESSION debug_dbug="+d,crash_purge_critical_after_update_index";
142+
--source include/wait_for_binlog_checkpoint.inc
137143
--error 2013
138144
purge binary logs TO 'master-bin.000006';
139145

mysql-test/suite/rpl/t/rpl_checksum.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ source include/stop_slave.inc;
9595

9696
connection master;
9797
set @@global.binlog_checksum = CRC32;
98+
-- source include/wait_for_binlog_checkpoint.inc
9899
insert into t1 values (1) /* will not be applied on slave due to simulation */;
99100

100101
# instruction to the dump thread

mysql-test/suite/rpl/t/rpl_rotate_logs.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ source include/show_master_logs.inc;
109109
# we just tests if synonyms are accepted
110110
purge binary logs to 'master-bin.000002';
111111
source include/show_binary_logs.inc;
112+
--source include/wait_for_binlog_checkpoint.inc
112113

113114
# Set the purge time 1 second after the last modify time of master-bin.000002.
114115
perl;

mysql-test/t/mysqlbinlog.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ DROP TABLE t1;
551551
DROP DATABASE test1;
552552
let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1);
553553
FLUSH LOGS;
554+
--source include/wait_for_binlog_checkpoint.inc
554555

555556
let $MYSQLD_DATADIR= `SELECT @@datadir`;
556557
exec $MYSQL_BINLOG $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1;

sql/set_var.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond)
11521152

11531153
void mark_sys_var_value_origin(void *ptr, enum sys_var::where here)
11541154
{
1155-
bool found= false;
1155+
bool found __attribute__((unused))= false;
11561156
DBUG_ASSERT(!mysqld_server_started); // only to be used during startup
11571157

11581158
for (uint i= 0; i < system_variable_hash.records; i++)

sql/sql_acl.cc

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,12 +2763,20 @@ bool change_password(THD *thd, LEX_USER *user)
27632763
enum_binlog_format save_binlog_format;
27642764
int result=0;
27652765
const CSET_STRING query_save __attribute__((unused)) = thd->query_string;
2766-
27672766
DBUG_ENTER("change_password");
27682767
DBUG_PRINT("enter",("host: '%s' user: '%s' new_password: '%s'",
27692768
user->host.str, user->user.str, user->password.str));
27702769
DBUG_ASSERT(user->host.str != 0); // Ensured by parent
27712770

2771+
/*
2772+
This statement will be replicated as a statement, even when using
2773+
row-based replication. The flag will be reset at the end of the
2774+
statement.
2775+
This has to be handled here as it's called by set_var.cc, which is
2776+
not automaticly handled by sql_parse.cc
2777+
*/
2778+
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
2779+
27722780
if (mysql_bin_log.is_open() ||
27732781
(WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0)))
27742782
{
@@ -2788,15 +2796,6 @@ bool change_password(THD *thd, LEX_USER *user)
27882796

27892797
result= 1;
27902798

2791-
/*
2792-
This statement will be replicated as a statement, even when using
2793-
row-based replication. The flag will be reset at the end of the
2794-
statement.
2795-
This has to be handled here as it's called by set_var.cc, which is
2796-
not automaticly handled by sql_parse.cc
2797-
*/
2798-
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
2799-
28002799
mysql_mutex_lock(&acl_cache->lock);
28012800
ACL_USER *acl_user;
28022801
if (!(acl_user= find_user_exact(user->host.str, user->user.str)))
@@ -2842,7 +2841,7 @@ bool change_password(THD *thd, LEX_USER *user)
28422841
close_mysql_tables(thd);
28432842

28442843
#ifdef WITH_WSREP
2845-
error: // this label is used in WSREP_TO_ISOLATION_END
2844+
error: // this label is used in WSREP_TO_ISOLATION_BEGIN
28462845
if (WSREP(thd) && !thd->wsrep_applier)
28472846
{
28482847
WSREP_TO_ISOLATION_END;

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23786,7 +23786,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
2378623786
bool need_order, bool distinct,
2378723787
const char *message)
2378823788
{
23789-
Explain_node *explain_node;
23789+
Explain_node *explain_node= 0;
2379023790
JOIN *join= this; /* Legacy: this code used to be a non-member function */
2379123791
int error= 0;
2379223792
DBUG_ENTER("JOIN::save_explain_data_intern");

support-files/build-tags

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#! /bin/sh
22

33
rm -f TAGS
4-
filter='\.cc$\|\.c$\|\.h$\|sql_yacc\.yy$\|\.ic$\|errmsg-utf8\.txt$'
54

6-
list="find . -type f"
7-
bzr root >/dev/null 2>/dev/null && list="bzr ls --from-root -R --kind=file --versioned"
8-
9-
$list |grep $filter | xargs etags -o TAGS --append
5+
if git rev-parse HEAD >/dev/null 2>&1
6+
then
7+
cd `git rev-parse --show-toplevel`
8+
echo client storage dbug libmysql sql-common \
9+
sql extra mysys mysys_ssl strings regex pcre vio include \
10+
tools unittest plugin libmysqld | \
11+
xargs -n1 git ls-files | \
12+
xargs etags -o TAGS --append
13+
else
14+
find . -type f |
15+
xargs etags -o TAGS --append
16+
fi

0 commit comments

Comments
 (0)