Commit 26dfae65 authored by unknown's avatar unknown

Remove old test suite in xml format


BitKeeper/deleted/.del-README~877d76bcd19f7193:
  Delete: mysql-test/xml/README
BitKeeper/deleted/.del-sel000001.xml~f0eb64c0346366db:
  Delete: mysql-test/xml/tests/sel000001.xml
BitKeeper/deleted/.del-sel000002.xml~8cd06da5293a7147:
  Delete: mysql-test/xml/tests/sel000002.xml
BitKeeper/deleted/.del-sel000003.xml~1a622b8d30d7ade8:
  Delete: mysql-test/xml/tests/sel000003.xml
BitKeeper/deleted/.del-sel000004.xml~515488ef221523d9:
  Delete: mysql-test/xml/tests/sel000004.xml
BitKeeper/deleted/.del-sel000005.xml~a6344e46ba572dc3:
  Delete: mysql-test/xml/tests/sel000005.xml
BitKeeper/deleted/.del-sel000006.xml~8ad8f44f49b21246:
  Delete: mysql-test/xml/tests/sel000006.xml
BitKeeper/deleted/.del-sel000007.xml~bfcb6d85276be7e8:
  Delete: mysql-test/xml/tests/sel000007.xml
BitKeeper/deleted/.del-sel000008.xml~1d6082f0905c51b6:
  Delete: mysql-test/xml/tests/sel000008.xml
BitKeeper/deleted/.del-sel000009.xml~8677613dc624cb0c:
  Delete: mysql-test/xml/tests/sel000009.xml
BitKeeper/deleted/.del-sel000010.xml~9b98c9cce8fac145:
  Delete: mysql-test/xml/tests/sel000010.xml
BitKeeper/deleted/.del-sel000011.xml~432156d127cbd22f:
  Delete: mysql-test/xml/tests/sel000011.xml
BitKeeper/deleted/.del-sel000012.xml~a410d08dc4cfee11:
  Delete: mysql-test/xml/tests/sel000012.xml
BitKeeper/deleted/.del-sel000013.xml~2717cbfbe5730174:
  Delete: mysql-test/xml/tests/sel000013.xml
BitKeeper/deleted/.del-sel000014.xml~bcf55df6a036bd8f:
  Delete: mysql-test/xml/tests/sel000014.xml
BitKeeper/deleted/.del-sel000015.xml~b72689a8f9b21372:
  Delete: mysql-test/xml/tests/sel000015.xml
BitKeeper/deleted/.del-sel000016.xml~32f1ef2e3d214be0:
  Delete: mysql-test/xml/tests/sel000016.xml
BitKeeper/deleted/.del-sel000017.xml~81423597605ff77f:
  Delete: mysql-test/xml/tests/sel000017.xml
BitKeeper/deleted/.del-sel000018.xml~82e2e7bde83f56d8:
  Delete: mysql-test/xml/tests/sel000018.xml
BitKeeper/deleted/.del-sel000019.xml~c0f0b05e481b90e7:
  Delete: mysql-test/xml/tests/sel000019.xml
BitKeeper/deleted/.del-sel000020.xml~8849bbf91a4fd5ec:
  Delete: mysql-test/xml/tests/sel000020.xml
BitKeeper/deleted/.del-sel000021.xml~2763b87c1549ba87:
  Delete: mysql-test/xml/tests/sel000021.xml
BitKeeper/deleted/.del-sel000022.xml~da2083ef423ae39a:
  Delete: mysql-test/xml/tests/sel000022.xml
BitKeeper/deleted/.del-sel000023.xml~11993b379b9838be:
  Delete: mysql-test/xml/tests/sel000023.xml
BitKeeper/deleted/.del-sel000024.xml~dd067aa28220fa4c:
  Delete: mysql-test/xml/tests/sel000024.xml
BitKeeper/deleted/.del-sel000025.xml~3e766aa1e43b303:
  Delete: mysql-test/xml/tests/sel000025.xml
BitKeeper/deleted/.del-sel000026.xml~15145e496417646f:
  Delete: mysql-test/xml/tests/sel000026.xml
BitKeeper/deleted/.del-README~cd4bb681e5a0cd10:
  Delete: mysql-test/xml/xsl/README
BitKeeper/deleted/.del-sel000027.xml~95e7de3e9934b570:
  Delete: mysql-test/xml/tests/sel000027.xml
BitKeeper/deleted/.del-sel000028.xml~c72bfec6600949b:
  Delete: mysql-test/xml/tests/sel000028.xml
BitKeeper/deleted/.del-sel000029.xml~3aba1eb23ef86c9e:
  Delete: mysql-test/xml/tests/sel000029.xml
BitKeeper/deleted/.del-sel000030.xml~c2b25781eefaee9:
  Delete: mysql-test/xml/tests/sel000030.xml
BitKeeper/deleted/.del-mysqltest.xsl~1b8f6ec4f1b5f634:
  Delete: mysql-test/xml/xsl/mysqltest.xsl
sql/opt_sum.cc:
  Fixed typo
parent 83c83a02
This directory contains all of the test cases for the MySQL Test Suite
marked up in XML.
To convert these test cases from XML into 'mysqltest' format, one needs
an XSL translator installed on their system. At MySQL, we use Sablotron
(http://www.gingerall.com/). Once installed, conversion happens with a
command like this:
sabcmd xsl/mysqltest.xsl < tests/sel000001.xml > sel000001.test
The file 'sel000001.test' contains the plain text conversion that is
to be fed into the 'mysqltest' program.
Below is an example of a test case marked up in XML; illustrating all
of the XML mark-up currently supported in our 'mysqltest.xsl' stylesheet.
----------------------------------------------------
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000001">
<version value="3.22"/>
<version value="3.23"/>
<description>This test will monkey around trying to kill mysqld.</description>
<connect name="Test_Connect1"
host="MyHostName"
user="Matt"
pass="MattPass"
db="MyDB"
port="3306"
sock="MyDB.sock"
/>
<connection name="Test_Connect1">
<resultfile name="sel000001.result">
<sql>SELECT y FROM foo WHERE bar='2'</sql>
</resultfile>
<sql>INSERT INTO foo VALUES (y='2') WHERE bar='1'</sql>
</connection>
</test>
----------------------------------------------------
The converted (mysqltest format) output of this source XML file looks
like:
----------------------------------------------------
# sel000001
#
# Versions
# --------
# 3.22
# 3.23
#
# Description
# -----------
# This test will monkey around trying to kill mysqld.
#
connect(Test_Connect1, MyHostName, Matt, MattPass, MyDB, 3306, MyDB.sock)
connection Test_Connect1
INSERT INTO foo VALUES (y='2') WHERE bar='1';
@sel000001.result SELECT y FROM foo WHERE bar='2';
----------------------------------------------------
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000001">
<version value="3.22"/>
<version value="3.23"/>
<description>This test is just a simple select.</description>
<description>Testing WHERE clause.</description>
<sql>DROP TABLE IF EXISTS t</sql>
<sql>CREATE TABLE t (s CHAR(20) PRIMARY KEY, id INT)</sql>
<sql>INSERT INTO t VALUES ('cat', 1), ('mouse', 3), ('dog', 2), ('snake', 77)</sql>
<resultfile name="r/3.23/sel000001.result">
<sql>SELECT s, id FROM t WHERE s = 'mouse'</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000002">
<version value="3.22"/>
<version value="3.23"/>
<description>This test is just a simple select.</description>
<sql>DROP TABLE IF EXISTS t</sql>
<sql>CREATE TABLE t (n INT)</sql>
<sql>INSERT INTO t VALUES (1), (2), (3)</sql>
<resultfile name="r/3.23/sel000002.result">
<sql>SELECT * FROM t</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000003">
<version value="3.22"/>
<version value="3.23"/>
<description>This test is just a simple select.</description>
<description>Testing count() function and GROUP BY clause.</description>
<sql>DROP TABLE IF EXISTS t</sql>
<sql>CREATE TABLE t (name CHAR(20) NOT NULL PRIMARY KEY, score SMALLINT NOT NULL, KEY(score))</sql>
<sql>INSERT INTO t VALUES ('Sasha', 20), ('Matt', 20), ('Monty', 10), ('David', 10), ('Tim', 10), ('Jeremy', 10)</sql>
<resultfile name="r/3.23/sel000003.result">
<sql>SELECT COUNT(*) as n, score FROM t GROUP BY score</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000004">
<version value="3.22"/>
<version value="3.23"/>
<description>Simple arithmetic.</description>
<description>Testing MOD(), SIGN(), and arithmetic grouping.</description>
<resultfile name="r/3.23/sel000004.result">
<sql>SELECT 1+1,1-1,1+1*2,8/5,8%5,MOD(8,5),MOD(8,5)|0,-(1+1)*-2,SIGN(-5)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000005">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric functions.</description>
<description>Testing FLOOR(), CEILING(), ROUND().</description>
<resultfile name="r/3.23/sel000005.result">
<sql>SELECT FLOOR(5.5),FLOOR(-5.5),CEILING(5.5),CEILING(-5.5),ROUND(5.5),ROUND(-5.5)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000006">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric functions.</description>
<description>Testing ROUND(); hundreths precision.</description>
<resultfile name="r/3.23/sel000006.result">
<sql>SELECT ROUND(5.64,1),ROUND(5.64,2),ROUND(5.64,-1),ROUND(5.64,-2)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000007">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric functions.</description>
<description>Testing TRUNCATE().</description>
<resultfile name="r/3.23/sel000007.result">
<sql>SELECT TRUNCATE(52.64,1),TRUNCATE(52.64,2),TRUNCATE(52.64,-1),TRUNCATE(52.64,-2)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000008">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric functions.</description>
<description>Testing ABS(), LOG(), LOG10(), EXP(), SQRT(), POW(), RAND(), POWER().</description>
<resultfile name="r/3.23/sel000008.result">
<sql>SELECT ABS(-10),LOG(EXP(10)),EXP(LOG(SQRT(10))*2),POW(10,LOG10(10)),RAND(999999),RAND(),POWER(2,4)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000009">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric functions.</description>
<description>Testing PI(), SIN(), COS(), TAN(), COT(), ASIN(), ACOS(), ATAN().</description>
<resultfile name="r/3.23/sel000009.result">
<sql>SELECT PI(),SIN(PI()/2),COS(PI()/2),TAN(PI()),COT(1),ASIN(1),ACOS(0),ATAN(1)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000010">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric bitwise comparisons.</description>
<description>Testing |, &amp;, BIT_COUNT().</description>
<resultfile name="r/3.23/sel000010.result">
<sql>SELECT 1 | (1+1),5 &amp; 3,BIT_COUNT(7)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000011">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric bitmoving comparisons.</description>
<description>Testing &lt;&lt;, >>.</description>
<resultfile name="r/3.23/sel000011.result">
<sql>SELECT 1 &lt;&lt; 32,1 &lt;&lt; 63, 1 &lt;&lt; 64, 4 >> 2, 4 >> 63, 1&lt;&lt; 63 >> 60</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000012">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric floating point.</description>
<resultfile name="r/3.23/sel000012.result">
<sql>SELECT 10,10.0,10.,.1e+2,100.0e-1</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000013">
<version value="3.22"/>
<version value="3.23"/>
<description>Numeric floating point.</description>
<resultfile name="r/3.23/sel000013.result">
<sql>SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000014">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing pos/neg and zero padding.</description>
<resultfile name="r/3.23/sel000014.result">
<sql>SELECT 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000015">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing big numbers.</description>
<resultfile name="r/3.23/sel000015.result">
<sql>SELECT 922337203685477580,92233720368547758000</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000016">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing big negative numbers.</description>
<resultfile name="r/3.23/sel000016.result">
<sql>SELECT -922337203685477580,-92233720368547758000</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000017">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing big pos/neg numbers.</description>
<resultfile name="r/3.23/sel000017.result">
<sql>SELECT 9223372036854775807,-009223372036854775808</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000018">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing big pos/neg numbers.</description>
<resultfile name="r/3.23/sel000018.result">
<sql>SELECT +9999999999999999999,-9999999999999999999</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000019">
<version value="3.22"/>
<version value="3.23"/>
<description>Numerics.</description>
<description>Testing DEGREES(), RADIANS().</description>
<resultfile name="r/3.23/sel000019.result">
<sql>SELECT DEGREES(PI()),RADIANS(360)</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000020">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; STRCMP(), =, >, >=, &lt;=, !=.</description>
<resultfile name="r/3.23/sel000020.result">
<sql>SELECT 0=0,1>0,1>=1,1&lt;0,1&lt;=0,1!=0,STRCMP("abc","abcd"),STRCMP("b","a"),STRCMP("a","a")</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000021">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; =, >, >=, &lt;=, &lt;>.</description>
<resultfile name="r/3.23/sel000021.result">
<sql>SELECT "a"&lt;"b","a"&lt;="b","b">="a","b">"a","a"="A","a"&lt;>"b"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000022">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; =, >, &lt;=.</description>
<resultfile name="r/3.23/sel000022.result">
<sql>SELECT "a "="A", "A "="a", "a " &lt;= "A b"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000023">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; LIKE, NOT LIKE, '%'.</description>
<resultfile name="r/3.23/sel000023.result">
<sql>SELECT "abc" LIKE "a%", "abc" NOT LIKE "%d%", "a%" LIKE "a\%","abc%" LIKE "a%\%","abcd" LIKE "a%b_%d", "a" LIKE "%%a","abcde" LIKE "a%_e","abc" LIKE "abc%"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000024">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; LIKE, '%'.</description>
<resultfile name="r/3.23/sel000024.result">
<sql>SELECT "a" LIKE "%%b","a" LIKE "%%ab","ab" LIKE "a\%", "ab" LIKE "_", "ab" LIKE "ab_", "abc" LIKE "%_d", "abc" LIKE "abc%d"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000025">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; LIKE, ESCAPE, '%'.</description>
<resultfile name="r/3.23/sel000025.result">
<sql>SELECT '?' LIKE '|%', '?' LIKE '|%' ESCAPE '|', '%' LIKE '|%', '%' LIKE '|%' ESCAPE '|', '%' LIKE '%'</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000026">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; LIKE, '%'.</description>
<resultfile name="r/3.23/sel000026.result">
<sql>SELECT 'abc' LIKE '%c','abcabc' LIKE '%c', "ab" LIKE "", "ab" LIKE "a", "ab" LIKE "ab"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000027">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; REGEXP.</description>
<resultfile name="r/3.23/sel000027.result">
<sql>SELECT "Det hr r svenska" REGEXP "h[[:alpha:]]+r", "aba" REGEXP "^(a|b)*$"</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000028">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; REGEXP, CONCAT().</description>
<resultfile name="r/3.23/sel000028.result">
<sql>SELECT "aba" REGEXP CONCAT("^","a")</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000029">
<version value="3.22"/>
<version value="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; NOT, AND, OR, !, &amp;&amp;, ||.</description>
<resultfile name="r/3.23/sel000029.result">
<sql>SELECT !0,NOT 0=1,!(0=0),1 AND 1,1 &amp;&amp; 0,0 OR 1,1 || NULL, 1=1 OR 1=1 AND 1=0</sql>
</resultfile>
</test>
<?xml version="1.0" standalone="no"?>
<!-- This file is maintained by matt@mysql.com -->
<test name="sel000030">
<version value="3.22"/>
<version value="3.23"/>
<description>Control flow.</description>
<description>Testing control flow; IF()</description>
<resultfile name="r/3.23/sel000030.result">
<sql>SELECT IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0</sql>
</resultfile>
</test>
XML Stylesheets for converting test cases in XML to other forms.
- mysqltest.xsl -> mysqltest format (text)
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/"><xsl:apply-templates /></xsl:template>
<!-- Main Template -->
<xsl:template match="/test"># <xsl:apply-templates select="@name"/>
#
# Versions
# --------<xsl:apply-templates select="version"/>
#
# Description
# -----------<xsl:apply-templates select="description"/>
#
<xsl:apply-templates select="connect"/>
<xsl:apply-templates select="connection"/>
<xsl:apply-templates select="sql"/>
<xsl:apply-templates select="resultfile"/>
</xsl:template>
<!-- End Main Template -->
<xsl:template match="version">
# <xsl:apply-templates select="@value"/>
</xsl:template>
<xsl:template match="description">
# <xsl:apply-templates />
</xsl:template>
<xsl:template match="connect">
connect(<xsl:apply-templates select="@name"/>, <xsl:apply-templates select="@host"/>, <xsl:apply-templates select="@user"/>, <xsl:apply-templates select="@pass"/>, <xsl:apply-templates select="@db"/>, <xsl:apply-templates select="@port"/>, <xsl:apply-templates select="@sock"/>)
</xsl:template>
<xsl:template match="connection">
<xsl:text>
connection </xsl:text><xsl:apply-templates select="@name"/>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="sql"/>
<xsl:apply-templates select="resultfile"/>
</xsl:template>
<xsl:template match="resultfile">@<xsl:apply-templates select="@name"/><xsl:text> </xsl:text><xsl:apply-templates select="sql"/>
</xsl:template>
<xsl:template match="sql">
<xsl:apply-templates />;
</xsl:template>
</xsl:stylesheet>
......@@ -299,7 +299,7 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
uint idx=0;
/* Check if some key has field as first key part */
if ((field->key_start & field->table->keys_in_use_for_query) &&A
if ((field->key_start & field->table->keys_in_use_for_query) &&
(! cond || ! (cond->used_tables() & table->map)))
{
for (key_map key=field->key_start ; !(key & 1) ; idx++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment