configure.in
don't define UNIV_DEBUG in CFLAGS/CXXFLAGS anymore sql/mysqld.cc hide from the user options that do nothing sql/sql_update.cc better fix for uninitialized used_index configure.in: don't define UNIV_DEBUG in CFLAGS/CXXFLAGS anymore sql/mysqld.cc: hide from the user options that do nothing sql/sql_update.cc: better fix for uninitialized used_index
This commit is contained in:
parent
f229695845
commit
c83412f705
@ -1677,8 +1677,8 @@ then
|
|||||||
elif test "$with_debug" = "full"
|
elif test "$with_debug" = "full"
|
||||||
then
|
then
|
||||||
# Full debug. Very slow in some cases
|
# Full debug. Very slow in some cases
|
||||||
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CFLAGS"
|
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
|
||||||
CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CXXFLAGS"
|
CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
|
||||||
else
|
else
|
||||||
# Optimized version. No debug
|
# Optimized version. No debug
|
||||||
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
||||||
|
@ -5215,6 +5215,7 @@ The minimum value for this variable is 4096.",
|
|||||||
(gptr*) &sync_binlog_period,
|
(gptr*) &sync_binlog_period,
|
||||||
(gptr*) &sync_binlog_period, 0, GET_ULONG, REQUIRED_ARG, 0, 0, ~0L, 0, 1,
|
(gptr*) &sync_binlog_period, 0, GET_ULONG, REQUIRED_ARG, 0, 0, ~0L, 0, 1,
|
||||||
0},
|
0},
|
||||||
|
#ifdef DOES_NOTHING_YET
|
||||||
{"sync-replication", OPT_SYNC_REPLICATION,
|
{"sync-replication", OPT_SYNC_REPLICATION,
|
||||||
"Enable synchronous replication",
|
"Enable synchronous replication",
|
||||||
(gptr*) &global_system_variables.sync_replication,
|
(gptr*) &global_system_variables.sync_replication,
|
||||||
@ -5230,6 +5231,7 @@ The minimum value for this variable is 4096.",
|
|||||||
(gptr*) &global_system_variables.sync_replication_timeout,
|
(gptr*) &global_system_variables.sync_replication_timeout,
|
||||||
(gptr*) &global_system_variables.sync_replication_timeout,
|
(gptr*) &global_system_variables.sync_replication_timeout,
|
||||||
0, GET_ULONG, REQUIRED_ARG, 10, 0, ~0L, 0, 1, 0},
|
0, GET_ULONG, REQUIRED_ARG, 10, 0, ~0L, 0, 1, 0},
|
||||||
|
#endif
|
||||||
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default",
|
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default",
|
||||||
(gptr*) &opt_sync_frm, (gptr*) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
|
(gptr*) &opt_sync_frm, (gptr*) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
|
||||||
0, 0, 0, 0},
|
0, 0, 0, 0},
|
||||||
|
@ -61,7 +61,7 @@ int mysql_update(THD *thd,
|
|||||||
bool safe_update= thd->options & OPTION_SAFE_UPDATES;
|
bool safe_update= thd->options & OPTION_SAFE_UPDATES;
|
||||||
bool used_key_is_modified, transactional_table, log_delayed;
|
bool used_key_is_modified, transactional_table, log_delayed;
|
||||||
int error=0;
|
int error=0;
|
||||||
uint used_index= MAX_KEY;
|
uint used_index;
|
||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
uint want_privilege;
|
uint want_privilege;
|
||||||
#endif
|
#endif
|
||||||
@ -159,10 +159,11 @@ int mysql_update(THD *thd,
|
|||||||
init_ftfuncs(thd, &thd->lex->select_lex, 1);
|
init_ftfuncs(thd, &thd->lex->select_lex, 1);
|
||||||
/* Check if we are modifying a key that we are used to search with */
|
/* Check if we are modifying a key that we are used to search with */
|
||||||
if (select && select->quick)
|
if (select && select->quick)
|
||||||
|
{
|
||||||
|
used_index=select->quick->index;
|
||||||
used_key_is_modified= (!select->quick->unique_key_range() &&
|
used_key_is_modified= (!select->quick->unique_key_range() &&
|
||||||
check_if_key_used(table,
|
check_if_key_used(table, used_index, fields));
|
||||||
(used_index=select->quick->index),
|
}
|
||||||
fields));
|
|
||||||
else if ((used_index=table->file->key_used_on_scan) < MAX_KEY)
|
else if ((used_index=table->file->key_used_on_scan) < MAX_KEY)
|
||||||
used_key_is_modified=check_if_key_used(table, used_index, fields);
|
used_key_is_modified=check_if_key_used(table, used_index, fields);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user