sql: always erase numeric flag after stringifying
Function which converts values to string representation (sqlVdbeMemStringify()) erase MEM_Int/MEM_Real/MEM_Bool flags only when it is specified by 'force' parameter. Hence, when 'force' argument is false, memory cell after conversion will contain string value, but flag indicating its type will be equal to combination of MEM_Str and one of mentioned flags. It seems to be remains of affinity routines, since in current state memory cell must have only one type. What is more, it can lead to unpredicted consequences, for instance assertion fault (sql_value_type() assumes that value has one specific type). Let's fix it removing 'force' argument from sqlVdbeMemStringify() and always clean up type flag.
Loading
Please register or sign in to comment