summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-14 11:11:47 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-14 20:43:41 +0100
commit6f6d0531dca711f13842cfca761afd073c595f57 (patch)
treeb46a9f617e86bcca3a19d24bb2f8c5f9c31ff182 /sql/item_create.cc
parente0fa2ce40f03add01bb3d934480e74e3ee64dd6c (diff)
downloadmariadb-git-6f6d0531dca711f13842cfca761afd073c595f57.tar.gz
MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to work
Use JSON_COMPACT(X) instead of CAST(X AS JSON). Bonus - X is validated to be a valid JSON. Fix a typo in the error message.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index dee1db1ee2e..4730e187ebe 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -7228,9 +7228,6 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
res= new (thd->mem_root) Item_char_typecast(thd, a, len, real_cs);
break;
}
- case ITEM_CAST_JSON:
- res= new (thd->mem_root) Item_json_typecast(thd, a);
- break;
default:
{
DBUG_ASSERT(0);