Commit d99994a4 authored by Monty's avatar Monty Committed by Sergei Golubchik

Ensure we print the most importaint violating function

parent 2fe8dd0f
...@@ -1413,9 +1413,12 @@ bool mark_unsupported_function(const char *where, uchar *store, uint result) ...@@ -1413,9 +1413,12 @@ bool mark_unsupported_function(const char *where, uchar *store, uint result)
{ {
Item::vcol_func_processor_result *res= Item::vcol_func_processor_result *res=
(Item::vcol_func_processor_result*) store; (Item::vcol_func_processor_result*) store;
uint old_errors= res->errors;
mark_unsupported_func(where, "check_vcol_func_processor"); mark_unsupported_func(where, "check_vcol_func_processor");
res->errors|= result; /* Store type of expression */ res->errors|= result; /* Store type of expression */
res->name= where ? where : ""; /* Store the name to the highest violation (normally VCOL_IMPOSSIBLE) */
if (res->errors > old_errors)
res->name= where ? where : "";
return false; return false;
} }
......
...@@ -34,10 +34,10 @@ C_MODE_END ...@@ -34,10 +34,10 @@ C_MODE_END
/* Bits for type of vcol expression */ /* Bits for type of vcol expression */
#define VCOL_DETERMINISTIC 0 /* Normal (no bit set) */ #define VCOL_DETERMINISTIC 0 /* Normal (no bit set) */
#define VCOL_NON_DETERMINISTIC 1 #define VCOL_UNKNOWN 1 /* UDF used; Need fix_fields() to know */
#define VCOL_TIME_FUNC 2 #define VCOL_NON_DETERMINISTIC 2
#define VCOL_IMPOSSIBLE 4 #define VCOL_TIME_FUNC 4
#define VCOL_UNKNOWN 8 /* UDF used; Need fix_fields() to know */ #define VCOL_IMPOSSIBLE 8
class Protocol; class Protocol;
struct TABLE_LIST; struct TABLE_LIST;
......
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