diff options
author | Michael Widenius <monty@askmonty.org> | 2012-10-04 23:52:11 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-10-04 23:52:11 +0300 |
commit | ea6a4eef3a43d916d43bef24165e16906b98a8de (patch) | |
tree | 41a06315ba4c4c3237eeb9aebe4b30e4d880890b /storage | |
parent | b722aebdf4cd73be88e2ae6768dce05276f52076 (diff) | |
download | mariadb-git-ea6a4eef3a43d916d43bef24165e16906b98a8de.tar.gz |
Fixed issues found by buildbot & valgrind:
- Wrong thd uses in Item_subselect, could lead to crash
- Inititalize uninitialized variable in new autoincrement handling code
sql/handler.cc:
More DBUG_PRINT
sql/item_subselect.cc:
Wrong thd uses in Item_subselect, could lead to crash
storage/innobase/handler/ha_innodb.cc:
Initialize variable needed by upper level. This only happens when auto-increment value wraps over.
storage/xtradb/handler/ha_innodb.cc:
Initialize variable needed by upper level. This only happens when auto-increment value wraps over.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 1 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3185403c2ac..3baa02b1228 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -10284,6 +10284,7 @@ ha_innobase::get_auto_increment( take care of this */ prebuilt->autoinc_last_value = 0; dict_table_autoinc_unlock(prebuilt->table); + *nb_reserved_values= 0; return; } *nb_reserved_values = trx->n_autoinc_rows; diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index f4072082b33..a9995a5bdf8 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -11225,6 +11225,7 @@ ha_innobase::get_auto_increment( take care of this */ prebuilt->autoinc_last_value = 0; dict_table_autoinc_unlock(prebuilt->table); + *nb_reserved_values = 0; return; } *nb_reserved_values = trx->n_autoinc_rows; @@ -13019,7 +13020,7 @@ static MYSQL_SYSVAR_ENUM(corrupt_table_action, srv_pass_corrupt_table, "Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, " "when used with file_per_table. " "All file io for the datafile after detected as corrupt are disabled, " - "except for the deletion.", + "except for the deletion. Possible options are 'assert', 'warn' & 'salvage'", NULL, NULL, 0, &corrupt_table_action_typelib); static MYSQL_SYSVAR_ULINT(lazy_drop_table, srv_lazy_drop_table, |