Fixed MDEV-612, LP:1010759 - Valgrind error ha_maria::check_if_incompatible_data on
mysql-test/r/partition.result: Added test case mysql-test/t/partition.test: Added test case sql/ha_partition.cc: Removed printing of not initialized variable storage/maria/ha_maria.cc: Don't copy variables that are not initialized
This commit is contained in:
parent
b7ae1194e2
commit
fb90c36284
@ -2246,4 +2246,10 @@ HAVING b > geomfromtext("")
|
||||
);
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
||||
MDEV-612 Valgrind error in ha_maria::check_if_incompatible_data
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(a)) ENGINE=Aria PARTITION BY KEY(a) PARTITIONS 2;
|
||||
ALTER TABLE t1 ADD KEY (b);
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -2267,4 +2267,12 @@ SELECT 1 FROM t1 WHERE b < SOME
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo
|
||||
--echo MDEV-612 Valgrind error in ha_maria::check_if_incompatible_data
|
||||
--echo
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(a)) ENGINE=Aria PARTITION BY KEY(a) PARTITIONS 2;
|
||||
ALTER TABLE t1 ADD KEY (b);
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -4347,8 +4347,8 @@ int ha_partition::common_index_read(uchar *buf, bool have_start_key)
|
||||
DBUG_ENTER("ha_partition::common_index_read");
|
||||
LINT_INIT(key_len); /* used if have_start_key==TRUE */
|
||||
|
||||
DBUG_PRINT("info", ("m_ordered %u m_ordered_scan_ong %u have_start_key %u",
|
||||
m_ordered, m_ordered_scan_ongoing, have_start_key));
|
||||
DBUG_PRINT("info", ("m_ordered: %u have_start_key: %u",
|
||||
m_ordered, have_start_key));
|
||||
|
||||
if (have_start_key)
|
||||
{
|
||||
|
@ -2343,9 +2343,10 @@ int ha_maria::info(uint flag, my_bool lock_table_share)
|
||||
errkey= maria_info.errkey;
|
||||
my_store_ptr(dup_ref, ref_length, maria_info.dup_key_pos);
|
||||
}
|
||||
/* Faster to always update, than to do it based on flag */
|
||||
stats.update_time= maria_info.update_time;
|
||||
stats.auto_increment_value= maria_info.auto_increment;
|
||||
if (flag & HA_STATUS_TIME)
|
||||
stats.update_time= maria_info.update_time;
|
||||
if (flag & HA_STATUS_AUTO)
|
||||
stats.auto_increment_value= maria_info.auto_increment;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user