mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
LP: #459714 extend test coverage to innodb abd AriaDB backing tables
This commit is contained in:
parent
dd6225c1f6
commit
85b5cbe3e4
9 changed files with 2951 additions and 3 deletions
|
@ -1,12 +1,13 @@
|
|||
DROP TABLE IF EXISTS graph_base;
|
||||
DROP TABLE IF EXISTS graph;
|
||||
DROP TABLE IF EXISTS graph2;
|
||||
Performing OQGraph General test suite for ENGINE=Aria
|
||||
CREATE TABLE graph_base (
|
||||
from_id INT UNSIGNED NOT NULL,
|
||||
to_id INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (from_id,to_id),
|
||||
INDEX (to_id)
|
||||
) ENGINE=MyISAM;
|
||||
) ENGINE= Aria ;
|
||||
CREATE TABLE graph (
|
||||
latch VARCHAR(32) NULL,
|
||||
origid BIGINT UNSIGNED NULL,
|
3
storage/oqgraph/mysql-test/oqgraph/general-Aria.test
Normal file
3
storage/oqgraph/mysql-test/oqgraph/general-Aria.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
|
||||
--let $oqgraph_use_table_type= Aria
|
||||
--source general.inc
|
1439
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result
Normal file
1439
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result
Normal file
File diff suppressed because it is too large
Load diff
3
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.test
Normal file
3
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
|
||||
--let $oqgraph_use_table_type= MyISAM
|
||||
--source general.inc
|
1439
storage/oqgraph/mysql-test/oqgraph/general-innodb.result
Normal file
1439
storage/oqgraph/mysql-test/oqgraph/general-innodb.result
Normal file
File diff suppressed because it is too large
Load diff
4
storage/oqgraph/mysql-test/oqgraph/general-innodb.test
Normal file
4
storage/oqgraph/mysql-test/oqgraph/general-innodb.test
Normal file
|
@ -0,0 +1,4 @@
|
|||
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
|
||||
-- source include/have_innodb.inc
|
||||
--let $oqgraph_use_table_type= innodb
|
||||
--source general.inc
|
|
@ -4,13 +4,15 @@ DROP TABLE IF EXISTS graph;
|
|||
DROP TABLE IF EXISTS graph2;
|
||||
--enable_warnings
|
||||
|
||||
--echo Performing OQGraph General test suite for ENGINE=$oqgraph_use_table_type
|
||||
|
||||
# Create the backing store
|
||||
CREATE TABLE graph_base (
|
||||
eval CREATE TABLE graph_base (
|
||||
from_id INT UNSIGNED NOT NULL,
|
||||
to_id INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (from_id,to_id),
|
||||
INDEX (to_id)
|
||||
) ENGINE=MyISAM;
|
||||
) ENGINE= $oqgraph_use_table_type ;
|
||||
|
||||
|
||||
CREATE TABLE graph (
|
51
storage/oqgraph/mysql-test/oqgraph/generate_backing_table_tests_suite.sh
Executable file
51
storage/oqgraph/mysql-test/oqgraph/generate_backing_table_tests_suite.sh
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is a template fgenerator or repeating an identical suite of tests for each backing table storage engine
|
||||
# It generates a set of .test files for the following, for example:
|
||||
# general-myisam.test
|
||||
# general-memory.test
|
||||
# general-innodb.test
|
||||
# (etc)
|
||||
#
|
||||
# We generate these files, because as a general rule the coverage should be identical per backing table engine
|
||||
# but we might want to pick out and re-reun for an individual backing table engine
|
||||
# otherwise we could use an MTR loop instead.
|
||||
|
||||
# This is intended to be used by a maintainer; i.e. the resulting .test files are still committed to git.
|
||||
|
||||
# Note on known storage engines:
|
||||
# See https://mariadb.com/kb/en/information-schema-engines-table/ for a full list
|
||||
# CSV - doesn't work with OQGraph, attempting to create backing table gives 'failed: 1069: Too many keys specified; max 0 keys allowed'
|
||||
# BLACKHOLE - makes no sense... but we should make sure it doesnt crash
|
||||
# FEDERATED, ARCHIVE - consider later
|
||||
|
||||
ENGINES="MyISAM MEMORY Aria"
|
||||
|
||||
for ENGINE in $ENGINES ; do
|
||||
cat > general-$ENGINE.test <<EOF
|
||||
# This is a maintainer generated file. Generated at `date`.
|
||||
--let \$oqgraph_use_table_type= $ENGINE
|
||||
--source general.inc
|
||||
EOF
|
||||
done
|
||||
|
||||
# These engines need an extra check to see if thy are compiled
|
||||
ENGINES2="innodb xtradb"
|
||||
for ENGINE in $ENGINES2 ; do
|
||||
cat > general-$ENGINE.test <<EOF
|
||||
# This is a maintainer generated file. Generated at `date`.
|
||||
-- source include/have_$ENGINE.inc
|
||||
--let \$oqgraph_use_table_type= $ENGINE
|
||||
--source general.inc
|
||||
EOF
|
||||
done
|
||||
|
||||
# Generate a script to rerun the test suite as well
|
||||
# Intended to be run from build as ../storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
|
||||
|
||||
MGFILE=maintainer-general-record.sh
|
||||
echo '# This is a maintainer generated file. Generated at '`date`'.' > $MGFILE
|
||||
for ENGINE in $ENGINES $ENGINES2 ; do
|
||||
echo mysql-test/mysql-test-run --record oqgraph.general-$ENGINE >> $MGFILE
|
||||
done
|
||||
|
6
storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
Executable file
6
storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
|
||||
mysql-test/mysql-test-run --record oqgraph.general-MyISAM
|
||||
mysql-test/mysql-test-run --record oqgraph.general-MEMORY
|
||||
mysql-test/mysql-test-run --record oqgraph.general-Aria
|
||||
mysql-test/mysql-test-run --record oqgraph.general-innodb
|
||||
mysql-test/mysql-test-run --record oqgraph.general-xtradb
|
Loading…
Reference in a new issue