summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-08 13:00:35 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-08 13:00:35 +0200
commit79660e59ee8fcd23f928c72dc77682b875bd58ce (patch)
treefd054039c6d15506938ecf6446e73b611d5879ab
parente9a28940c5124aaeb0715718251b8802d2ee2c59 (diff)
downloadmariadb-git-79660e59ee8fcd23f928c72dc77682b875bd58ce.tar.gz
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")
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 23e69b32e39..6d8d389b81d 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -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