Navigation Menu

Skip to content

Commit

Permalink
mysql56 test: split expected results for MySQL 5.5.x and 5.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Dec 26, 2012
1 parent ba77091 commit 6d9d631
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
Expand Up @@ -14,6 +14,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

--source include/have_version_55.inc
--source include/have_mroonga.inc

--disable_warnings
Expand Down
@@ -0,0 +1,18 @@
DROP TABLE IF EXISTS users;
SET NAMES utf8;
CREATE TABLE users (
name varchar(40),
age int,
KEY (age)
);
INSERT INTO users VALUES ("Alice", 20);
INSERT INTO users VALUES ("Bob", 20);
INSERT INTO users VALUES ("Charry", 29);
EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE users index NULL age 5 NULL 3 NULL
SELECT *, COUNT(*) FROM users GROUP BY age;
name age COUNT(*)
Alice 20 2
Charry 29 1
DROP TABLE users;
@@ -0,0 +1,41 @@
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

--source include/have_version_56.inc
--source include/have_mroonga.inc

--disable_warnings
DROP TABLE IF EXISTS users;
--enable_warnings

SET NAMES utf8;
CREATE TABLE users (
name varchar(40),
age int,
KEY (age)
);

INSERT INTO users VALUES ("Alice", 20);
INSERT INTO users VALUES ("Bob", 20);
INSERT INTO users VALUES ("Charry", 29);

EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age;

SELECT *, COUNT(*) FROM users GROUP BY age;

DROP TABLE users;

--source include/have_mroonga_deinit.inc

0 comments on commit 6d9d631

Please sign in to comment.