1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Change of internal key_field=NULL handling to avoid error messages.

Optimized SELECT DISTINCT ... ORDER BY ... LIMIT
Fixed reference to uninitalized variable
This commit is contained in:
monty@hundin.mysql.fi
2002-12-03 13:08:25 +02:00
parent ce56f927fa
commit 8830eb4aa9
25 changed files with 315 additions and 119 deletions

View File

@ -1029,7 +1029,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
field->cmp_type() != value->result_type())
DBUG_RETURN(0);
if (value->save_in_field(field))
if (value->save_in_field(field, 1))
{
/* This happens when we try to insert a NULL field in a not null column */
// TODO; Check if we can we remove the following block.
@ -1038,9 +1038,9 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
/* convert column_name <=> NULL -> column_name IS NULL */
// Get local copy of key
char *str= (char*) alloc_root(param->mem_root,1);
if (!*str)
if (!str)
DBUG_RETURN(0);
*str = 1;
*str= 1;
DBUG_RETURN(new SEL_ARG(field,str,str));
}
DBUG_RETURN(&null_element); // cmp with NULL is never true