summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-06-05 06:16:08 +0300
committerunknown <monty@mysql.com>2006-06-05 06:16:08 +0300
commit6c3babe52c28d28a92d242307e13723500dce969 (patch)
tree4be36749abc142ae1362b83f9053e569a7a98099 /sql/ha_partition.cc
parent555eb848f2aa3ac5eb09b251072930eb38cd8f7e (diff)
downloadmariadb-git-6c3babe52c28d28a92d242307e13723500dce969.tar.gz
After merge fixes
Remove compiler warnings mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Fixed regex to get rid of xid= in output mysql-test/r/mysqlcheck.result: Drop client_test_db if mysql_client_test fails mysql-test/t/mysqlcheck.test: Drop client_test_db if mysql_client_test fails mysql-test/t/mysqldump.test: Use --defaults-file instead of --defaults-extra-file to avoid reading my.cnf files sql/event_scheduler.cc: Remove compiler warnings sql/ha_partition.cc: Don't divide with 0 when checking current auto_increment value sql/handler.cc: After merge fix sql/mysqld.cc: Remove comiler warning sql/partition_info.cc: After merge fix Fixed memory reference overrun for some wrong partition definitions sql/sql_base.cc: After merge fix Always set *leaves in setup_tables_and_check_access() (assume argument is always given). sql/sql_select.cc: Simple optimization sql/sql_show.cc: Remove compiler warning sql/sql_table.cc: After merge fix storage/csv/ha_tina.cc: Ensure table maps are restored properly storage/ndb/include/ndbapi/Ndb.hpp: Remove compiler warning
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 11f890082e3..77a150994ad 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4146,7 +4146,8 @@ void ha_partition::info(uint flag)
ulonglong nb_reserved_values;
DBUG_PRINT("info", ("HA_STATUS_AUTO"));
/* we don't want to reserve any values, it's pure information */
- get_auto_increment(0, 0, 0, &stats.auto_increment_value, &nb_reserved_values);
+ get_auto_increment(0, 0, 0, &stats.auto_increment_value,
+ &nb_reserved_values);
release_auto_increment();
}
if (flag & HA_STATUS_VARIABLE)
@@ -4188,7 +4189,7 @@ void ha_partition::info(uint flag)
stats.deleted+= file->stats.deleted;
stats.data_file_length+= file->stats.data_file_length;
stats.index_file_length+= file->stats.index_file_length;
- stats.delete_length+= file->delete_length;
+ stats.delete_length+= file->stats.delete_length;
if (file->stats.check_time > stats.check_time)
stats.check_time= file->stats.check_time;
}
@@ -5282,7 +5283,7 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong *nb_reserved_values)
{
ulonglong first_value_part, last_value_part, nb_reserved_values_part,
- last_value;
+ last_value= ~ (ulonglong) 0;
handler **pos, **end;
DBUG_ENTER("ha_partition::get_auto_increment");
@@ -5308,8 +5309,9 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
{
*first_value= ~(ulonglong)(0);
}
- *nb_reserved_values= (last_value == ULONGLONG_MAX) ?
- ULONGLONG_MAX : ((last_value - *first_value) / increment);
+ if (increment) // If not check for values
+ *nb_reserved_values= (last_value == ULONGLONG_MAX) ?
+ ULONGLONG_MAX : ((last_value - *first_value) / increment);
DBUG_VOID_RETURN;
}