WL#1299: Add typeof() function

Affects: Server-7.1   —   Status: Un-Assigned   —   Priority: High

Add the function, ie typeof() which would return the type information about the
given argument. 

It is especially convenient for checking bug reports - good amount of bugs come
from issues with type handling as well as wrong understanding of type conversion
rules by user.

It might be convenient for some automatic query generation programs as well


create table tbl(c char(20));

select typeof(c) from tbl1;

Result:  "char(20) null_allowed:yes,charset:latin1"

The exact return format is to be defined.

Information_schema is intended to implement this functionality for


However, it does not provide a way to fetch information about
exrpessions, function resutls, constants, etc.