Skip to content

Commit

Permalink
Cleanups:
Browse files Browse the repository at this point in the history
- Removed some QQ markers
- Removed some rows not compatible with valgrind 3.9.0
- Made mysql_install_db.sh more silent by default. --verbose now gives more information
- Added assert that auto-increment doesn't generate 0 (safety)
- Removed thd->set_time() in some places as it's set in init_for_queries()
- Fixed some --big tests in tokudb
- Fixed a bug in mysql_client_test.cc where sql_mode was not properly reset
  • Loading branch information
montywi committed Apr 5, 2016
1 parent d0b178f commit cdd4043
Show file tree
Hide file tree
Showing 22 changed files with 2,696 additions and 2,848 deletions.
2 changes: 1 addition & 1 deletion client/mysqltest.cc
Expand Up @@ -703,7 +703,7 @@ class LogFile {
DBUG_ASSERT(ds->str);

#ifdef EXTRA_DEBUG
DBUG_PRINT("QQ", ("str: %*s", (int) ds->length, ds->str));
DBUG_PRINT("extra", ("str: %*s", (int) ds->length, ds->str));
#endif

if (fwrite(ds->str, 1, ds->length, m_file) != ds->length)
Expand Down
2 changes: 1 addition & 1 deletion libmysql/get_password.c
Expand Up @@ -46,7 +46,7 @@
#endif
#endif
#ifdef alpha_linux_port
#include <asm/ioctls.h> /* QQ; Fix this in configure */
#include <asm/ioctls.h>
#include <asm/termiobits.h>
#endif
#else
Expand Down
6 changes: 4 additions & 2 deletions scripts/mysql_install_db.sh
Expand Up @@ -29,6 +29,7 @@ args=""
defaults=""
mysqld_opt=""
user=""
silent_startup="--silent-startup"

force=0
in_rpm=0
Expand Down Expand Up @@ -124,7 +125,7 @@ parse_arguments()
# where a chown of datadir won't help)
user=`parse_arg "$arg"` ;;
--skip-name-resolve) ip_only=1 ;;
--verbose) verbose=1 ;; # Obsolete
--verbose) verbose=1 ; silent_startup="" ;;
--rpm) in_rpm=1 ;;
--help) usage ;;
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
Expand Down Expand Up @@ -418,8 +419,9 @@ fi
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line()
{
"$mysqld_bootstrap" $defaults "$mysqld_opt" --bootstrap \
"$mysqld_bootstrap" $defaults "$mysqld_opt" --bootstrap $silent_startup\
"--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \
--file-key-management=OFF \
$args --max_allowed_packet=8M \
--net_buffer_length=16K
}
Expand Down
3 changes: 2 additions & 1 deletion sql/field.cc
Expand Up @@ -1224,7 +1224,8 @@ bool Field::test_if_equality_guarantees_uniqueness(const Item *item) const
for temporal columns, so the query:
WHERE temporal_column='string'
cannot return multiple distinct temporal values.
QQ: perhaps we could allow INT/DECIMAL/DOUBLE types for temporal items.
TODO: perhaps we could allow INT/DECIMAL/DOUBLE types for temporal items.
*/
return result_type() == item->result_type();
}
Expand Down
1 change: 1 addition & 0 deletions sql/handler.cc
Expand Up @@ -3077,6 +3077,7 @@ int handler::update_auto_increment()
if (unlikely(nr == ULONGLONG_MAX))
DBUG_RETURN(HA_ERR_AUTOINC_ERANGE);

DBUG_ASSERT(nr != 0);
DBUG_PRINT("info",("auto_increment: %llu nb_reserved_values: %llu",
nr, append ? nb_reserved_values : 0));

Expand Down
1 change: 0 additions & 1 deletion sql/rpl_parallel.cc
Expand Up @@ -987,7 +987,6 @@ handle_rpl_parallel_thread(void *arg)
thd->client_capabilities = CLIENT_LOCAL_FILES;
thd->net.reading_or_writing= 0;
thd_proc_info(thd, "Waiting for work from main SQL threads");
thd->set_time();
thd->variables.lock_wait_timeout= LONG_TIMEOUT;
thd->system_thread_info.rpl_sql_info= &sql_info;
/*
Expand Down
2 changes: 0 additions & 2 deletions sql/sql_connect.cc
Expand Up @@ -1192,7 +1192,6 @@ void prepare_new_connection_state(THD* thd)
*/
thd->proc_info= 0;
thd->set_command(COM_SLEEP);
thd->set_time();
thd->init_for_queries();

if (opt_init_connect.length && !(sctx->master_access & SUPER_ACL))
Expand Down Expand Up @@ -1234,7 +1233,6 @@ void prepare_new_connection_state(THD* thd)
}

thd->proc_info=0;
thd->set_time();
thd->init_for_queries();
}
}
Expand Down
1 change: 0 additions & 1 deletion sql/sql_trigger.cc
Expand Up @@ -1581,7 +1581,6 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
DBUG_RETURN(0);

err_with_lex_cleanup:
// QQ: anything else ?
lex_end(&lex);
thd->lex= old_lex;
thd->spcont= save_spcont;
Expand Down
2 changes: 1 addition & 1 deletion storage/mroonga/mrn_table.cpp
Expand Up @@ -998,7 +998,7 @@ int mrn_free_share(MRN_SHARE *share)

TABLE_SHARE *mrn_get_table_share(TABLE_LIST *table_list, int *error)
{
uint key_length;
uint key_length __attribute__((unused));
TABLE_SHARE *share;
THD *thd = current_thd;
MRN_DBUG_ENTER_FUNCTION();
Expand Down
1 change: 1 addition & 0 deletions storage/tokudb/mysql-test/tokudb/t/change_column_all.py
Expand Up @@ -168,6 +168,7 @@ def header():
print "# generated from change_column_all.py"
print "# test random column change on wide tables"
print "source include/have_tokudb.inc;"
print "--source include/big_test.inc"
print "--disable_warnings"
print "DROP TABLE IF EXISTS t, ti;"
print "--enable_warnings"
Expand Down

0 comments on commit cdd4043

Please sign in to comment.