summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_pruning.result
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-06-21 13:00:19 +0500
committerunknown <bar@mysql.com>2006-06-21 13:00:19 +0500
commit4e138572a01afc7e88f1b3040d3c4a81012e298f (patch)
tree7c85af3bc9c8dc533856bb892be54c3448879a77 /mysql-test/r/partition_pruning.result
parent9addb8fd7bc47c186805eeefa51bb69805fd59a6 (diff)
downloadmariadb-git-4e138572a01afc7e88f1b3040d3c4a81012e298f.tar.gz
Bug#20086: Can't get data from key partitioned tables with VARCHAR key
The problem appeared because the same values produced different hash during INSERT and SELECT for VARCHAR data type. Fix: VARCHAR required special treatment to avoid hashing of length bytes (leftmost one or two bytes) as well as trailing bytes beyond real length, which could contain garbage. Fix is done by introducing hash() - new method in the Field class. mysql-test/r/partition_innodb.result: Adding test case mysql-test/r/partition_pruning.result: Fixing test results (results differ due to changes in hash function) mysql-test/t/partition_innodb.test: Adding test case sql/field.cc: Adding generic hash() method, and a special method for VARCHAR. sql/field.h: Adding prototypes for new methods sql/key.cc: Mark columns for write before executinf of set_key_image(). Thanks for Mikael for suggesting this fix. sql/sql_partition.cc: Removing old hash code. Using new methid field->hash() instead.
Diffstat (limited to 'mysql-test/r/partition_pruning.result')
-rw-r--r--mysql-test/r/partition_pruning.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 950a83c6d4f..ee294242bf7 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -31,7 +31,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1 ALL NULL NULL NULL NULL 3 Using where
explain partitions select * from t2 where a=1 and b=1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 p0 ALL NULL NULL NULL NULL 3 Using where
+1 SIMPLE t2 p0 ALL NULL NULL NULL NULL 2 Using where
create table t3 (
a int
)