1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00
Files
mariadb/mysql-test/suite/vcol/t/vcol_keys_innodb.test
Monty c9b3e4535b MDEV-11737 Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N
Issue was that the m_prebuilt array was reused without resetting a counter,
which caused a memory overrun.

Adjusted test case to 79 characters
2017-01-11 09:19:45 +02:00

64 lines
2.7 KiB
Plaintext

###############################################################################
# t/vcol_keys_innodb.test #
# #
# Purpose: #
# Testing keys, indexes defined upon virtual columns. #
# #
# InnoDB branch #
# #
#-----------------------------------------------------------------------------#
# Original Author: Andrey Zhakov #
# Original Date: 2008-09-04 #
# Change Author: #
# Change Date: #
# Change: #
###############################################################################
#
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
#-----------------------------------------------------------------------------#
# General not engine specific settings and requirements
--source suite/vcol/inc/vcol_init_vars.pre
#-----------------------------------------------------------------------------#
# Cleanup
--source suite/vcol/inc/vcol_cleanup.inc
#-----------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
#-----------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
let $with_foreign_keys = 1;
--source suite/vcol/inc/vcol_keys.inc
# Cleanup
--source suite/vcol/inc/vcol_cleanup.inc
#-----------------------------------------------------------------------------#
# Execute storage engine specific tests
#-----------------------------------------------------------------------------#
--echo #
--echo # MDEV-11737 Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N
--echo #
CREATE TABLE t1 (i INT PRIMARY KEY, vi INT AS (i*2) VIRTUAL UNIQUE)
ENGINE=InnoDB;
CREATE TABLE t2 (i INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN col INT;
SELECT * FROM t1 WHERE vi < 2;
DROP TABLE t1, t2;