Commit 79660e59 authored by Sergei Golubchik's avatar Sergei Golubchik

can't use Item_default_value as a field if it's an expression OR a blob

Fixed failing main.default on Windows
(to trigger an assert the test needed a debug build without
safemalloc, as 0xa5 happened to have the important bit set "correctly")
parent e9a28940
......@@ -17343,7 +17343,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item::DEFAULT_VALUE_ITEM:
{
Field *field= ((Item_default_value*) item)->field;
if (field->default_value && (field->flags & BLOB_FLAG))
if (field->default_value || (field->flags & BLOB_FLAG))
{
/*
We have to use a copy function when using a blob with default value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment