Description:
Crash is occuring in Query_cache::invalidate (). A small test case below. If query
cache size is set to 0 then the crash does not occur.
How to repeat:
######
DROP DATABASE IF EXISTS `test`;
CREATE DATABASE `test`;
USE `test`;
DROP PROCEDURE IF EXISTS `p1`;
DELIMITER //
CREATE PROCEDURE `p1`()
BEGIN
start transaction;
SET @sqlstr="INSERT INTO t1(`c1`) SELECT `c1` FROM v1";
PREPARE stmt FROM @sqlstr;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END//
DELIMITER ;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1`(`c1` int) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2`(`c1` INT) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `t3`;
CREATE TABLE `t3`(`c1` INT) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `v1`;
DROP VIEW IF EXISTS `v1`;
CREATE VIEW `v1` AS select `t3`.`c1` AS `c1` FROM `t3`,`t2` WHERE `t3`.`c1` = `t2`.`c1`;
call `p1`();
########