-
Igor Babaev authored
If the expression for a virtual column of table contained datetime comparison then the execution of the second query that used this virtual column caused a crash. It happened because the execution of the first query that used this virtual column inserted a cached item into the expression tree. The cached tree was allocated in the statement memory while the expression tree was allocated in the table memory. Now the cached items that are inserted into expressions for virtual columns with datetime comparisons are always allocated in the same mem_root as the expressions for virtual columns. So now the inserted cached items are valid for any queries that use these virtual columns.
1b165329