From 6f6d0531dca711f13842cfca761afd073c595f57 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 14 Feb 2017 11:11:47 +0100 Subject: 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. --- sql/item_create.cc | 3 --- 1 file changed, 3 deletions(-) (limited to 'sql/item_create.cc') 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); -- cgit v1.2.1