From a9ab4f9cb850afa93cdeb42e5fc0f9aad51ab76f Mon Sep 17 00:00:00 2001 From: "pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se" <> Date: Tue, 17 Jan 2006 11:19:48 -0500 Subject: [PATCH] Fix for auto-partitioned tables and PARTITION BY KEY() tables --- sql/sql_partition.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index eec66a5553e..0fc5884447c 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1269,6 +1269,11 @@ static void check_fields_in_PF(Field **ptr, bool *all_fields, *all_fields= TRUE; *some_fields= FALSE; + if ((!ptr) || !(*ptr)) + { + *all_fields= FALSE; + DBUG_VOID_RETURN; + } do { /* Check if the field of the PF is part of the current key investigated */