diff options
author | unknown <monty@hundin.mysql.fi> | 2002-10-16 16:34:29 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-10-16 16:34:29 +0300 |
commit | 6f38e3083f0d867af8d1499fba92c7eaae295726 (patch) | |
tree | 7e8b3a279aef52d26da9843f1c45ff38112391f2 /sql/table.cc | |
parent | 266e42b24cf1837cde602811dccf63e0395bbe5c (diff) | |
parent | 7013d8ef0ae0a21fadfcc0a159ee1d83fdad8a9d (diff) | |
download | mariadb-git-6f38e3083f0d867af8d1499fba92c7eaae295726.tar.gz |
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
BitKeeper/etc/logging_ok:
auto-union
sql/mysqld.cc:
Auto merged
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index cc5666ff5fb..d3b719c553d 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -482,6 +482,13 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, field->field_length=key_part->length; } } + /* + If the field can be NULL, don't optimize away the test + key_part_column = expression from the WHERE clause + as we need to test for NULL = NULL. + */ + if (field->real_maybe_null()) + key_part->key_part_flag|= HA_PART_KEY; } else { // Error: shorten key |