mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
c92b9b7315
for general use. mysql-test/Makefile.am: Adding directories of additional test suites mysql-test/mysql-stress-test.pl: Adding check for additional errors checking during test run
214 lines
8.8 KiB
Text
214 lines
8.8 KiB
Text
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
CREATE TABLE t1(c1 TINYINT NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 SMALLINT NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INT NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INTEGER NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 BIGINT NOT NULL);
|
|
SELECT MAX(c1) AS value FROM t1;
|
|
SELECT MAX(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MAX(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MAX(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MAX(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 TINYINT NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 SMALLINT NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INT NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INTEGER NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 BIGINT NOT NULL);
|
|
SELECT MIN(c1) AS value FROM t1;
|
|
SELECT MIN(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT MIN(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT MIN(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT MIN(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 TINYINT NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 SMALLINT NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INT NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INTEGER NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 BIGINT NOT NULL);
|
|
SELECT AVG(c1) AS value FROM t1;
|
|
SELECT AVG(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT AVG(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT AVG(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT AVG(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 TINYINT NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 SMALLINT NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INT NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INTEGER NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 BIGINT NOT NULL);
|
|
SELECT SUM(c1) AS value FROM t1;
|
|
SELECT SUM(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT SUM(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT SUM(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT SUM(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 TINYINT NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 SMALLINT NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INT NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 INTEGER NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1(c1 BIGINT NOT NULL);
|
|
SELECT COUNT(c1) AS value FROM t1;
|
|
SELECT COUNT(c1) AS postive_value FROM t1 WHERE c1 > 0;
|
|
SELECT COUNT(c1) AS negative_value FROM t1 WHERE c1 < 0;
|
|
SELECT COUNT(c1) AS zero_value FROM t1 WHERE c1 = 0;
|
|
SELECT COUNT(c1) AS no_results FROM t1 WHERE c1 = 2;
|
|
DROP TABLE t1;
|
|
|