mirror of
https://github.com/MariaDB/server.git
synced 2025-09-03 20:43:11 +03:00
Use MY_MUTEX_INIT_FAST for pool mutex mysql-test/mysql-test-run.pl: Added option --staging-run Added information about --parallell=# to help message mysql-test/suite/federated/federated_server.test: Slow test, don't run with --staging-run mysql-test/suite/maria/t/maria-preload.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_optimize.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_relayrotate.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_row_001.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_row_sp003.test: Slow test, don't run with --staging-run mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Slow test, don't run with --staging-run mysql-test/t/compress.test: Slow test, don't run with --staging-run mysql-test/t/count_distinct3.test: Slow test, don't run with --staging-run mysql-test/t/index_merge_innodb.test: Slow test, don't run with --staging-run mysql-test/t/information_schema_all_engines.test: Slow test, don't run with --staging-run mysql-test/t/innodb_mysql.test: Slow test, don't run with --staging-run mysql-test/t/pool_of_threads.test: Slow test, don't run with --staging-run mysql-test/t/preload.test: Slow test, don't run with --staging-run mysql-test/t/ssl.test: Slow test, don't run with --staging-run mysql-test/t/ssl_compress.test: Slow test, don't run with --staging-run mysql-test/valgrind.supp: Suppress warnings from SuSE 11.1 on x86 sql/scheduler.cc: Use MY_MUTEX_INIT_FAST for pool mutex
63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
#
|
|
# this is a test for error 1032 in count(distinct) + group by, introduced in
|
|
# mysql-4.1
|
|
#
|
|
|
|
# Slow test
|
|
-- source include/big_test.inc
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1, t2;
|
|
--enable_warnings
|
|
|
|
CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
|
|
|
|
--disable_query_log
|
|
SET @rnd_max= 2147483647;
|
|
let $1 = 1000;
|
|
while ($1)
|
|
{
|
|
SET @rnd= RAND();
|
|
SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
|
|
SET @id_rev= @rnd_max - @id;
|
|
SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
|
|
INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
|
|
dec $1;
|
|
}
|
|
set @@read_buffer_size=2*1024*1024;
|
|
CREATE TABLE t2 SELECT * FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
|
|
INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
|
|
DROP TABLE t2;
|
|
--enable_query_log
|
|
|
|
SELECT COUNT(*) FROM t1;
|
|
|
|
# As t1 contains random numbers, results are different from test to test.
|
|
# That's okay, because we test only that select doesn't yield an
|
|
# error. Note, that --disable_result_log doesn't suppress error output.
|
|
|
|
--disable_result_log
|
|
SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
|
|
--enable_result_log
|
|
DROP TABLE t1;
|
|
|
|
set @@read_buffer_size=default;
|
|
|
|
# End of 4.1 tests
|