-
Roy Lyseng authored
The problem is that the function get_full_info() expects a field item but is presented with an Item_func_if item. This is due to the new orthogonal data type aggregation, which handles columns from UNION and columns from CASE-type functions equally. Earlier, the IF would never return an ENUM or SET data type, but this is now possible, when e.g. the arguments are an enum field and a NULL value. We have fixed the problem by pushing the typelib retrieval to each individual Item class. A get_typelib() function for each relevant Item class has been implemented. Unfortunately, since the CASE classes do not have a common base class, an implementation function is required for each class. We have also renamed the get_full_info() function to set_typelib(), since its sole purpose is to set typelib information for enum/set types. Tests are added for most relevant Item types, including all CASE-derived classes. Notice that some of the queries generate a result column with type VARCHAR, even though they should be ENUM. Change-Id: Iabda7dc4ecf1c2755508c720481b6a871a626a71
Roy Lyseng authoredThe problem is that the function get_full_info() expects a field item but is presented with an Item_func_if item. This is due to the new orthogonal data type aggregation, which handles columns from UNION and columns from CASE-type functions equally. Earlier, the IF would never return an ENUM or SET data type, but this is now possible, when e.g. the arguments are an enum field and a NULL value. We have fixed the problem by pushing the typelib retrieval to each individual Item class. A get_typelib() function for each relevant Item class has been implemented. Unfortunately, since the CASE classes do not have a common base class, an implementation function is required for each class. We have also renamed the get_full_info() function to set_typelib(), since its sole purpose is to set typelib information for enum/set types. Tests are added for most relevant Item types, including all CASE-derived classes. Notice that some of the queries generate a result column with type VARCHAR, even though they should be ENUM. Change-Id: Iabda7dc4ecf1c2755508c720481b6a871a626a71
Loading