diff options
author | ingo@mysql.com <> | 2005-01-24 10:47:52 +0100 |
---|---|---|
committer | ingo@mysql.com <> | 2005-01-24 10:47:52 +0100 |
commit | 47c400914900a4771732362fb0b6dd05aac626f0 (patch) | |
tree | 3bfa0bc61665651aef2c0a0b16b2129556f99eb2 /mysql-test | |
parent | 8555668067b152509ee8365767f10984b3ab03dc (diff) | |
parent | a551510cfd20c6be84d29575917fc39a27250e47 (diff) | |
download | mariadb-git-47c400914900a4771732362fb0b6dd05aac626f0.tar.gz |
Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-4100
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 3 | ||||
-rw-r--r-- | mysql-test/r/ctype_mb.result | 4 | ||||
-rw-r--r-- | mysql-test/r/select_found.result | 8 | ||||
-rw-r--r-- | mysql-test/t/select_found.test | 9 |
4 files changed, 22 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 722da516d9b..5c4fe0577a2 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -537,6 +537,7 @@ if [ x$SOURCE_DIST = x1 ] ; then INSTALL_DB="./install_test_db" MYSQL_FIX_SYSTEM_TABLES="$BASEDIR/scripts/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$BASEDIR/ndb/tools" + NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm" else if test -x "$BASEDIR/libexec/mysqld" then @@ -558,6 +559,7 @@ else INSTALL_DB="./install_test_db --bin" MYSQL_FIX_SYSTEM_TABLES="$CLIENT_BINDIR/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$CLIENT_BINDIR" + NDB_MGM="$CLIENT_BINDIR/ndb_mgm" if test -d "$BASEDIR/share/mysql/english" then LANGUAGE="$BASEDIR/share/mysql/english/" @@ -607,6 +609,7 @@ MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --u export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES export CLIENT_BINDIR TESTS_BINDIR CHARSETSDIR export NDB_TOOLS_DIR +export NDB_MGM MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index 5e273b3c800..dbdb9c1343c 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -33,7 +33,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 key_a 1 a A NULL 9 NULL YES BTREE +t1 1 key_a 1 a A NULL 3 NULL YES BTREE ALTER TABLE t1 CHANGE a a CHAR(4); SHOW CREATE TABLE t1; Table Create Table @@ -53,5 +53,5 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 key_a 1 a A NULL 9 NULL YES BTREE +t1 1 key_a 1 a A NULL 3 NULL YES BTREE DROP TABLE t1; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 00dbcb54d93..665277f68f2 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -246,3 +246,11 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 0 DROP TABLE t1; +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES (1,2), (1,3), (1,4), (1,5); +SELECT SQL_CALC_FOUND_ROWS DISTINCT 'a' FROM t1 GROUP BY b LIMIT 2; +a +a +SELECT FOUND_ROWS(); +FOUND_ROWS() +1 diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index 943174462e3..d31d7d0b02e 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -166,3 +166,12 @@ INSERT INTO t1 VALUES (0), (0), (1), (2); SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = 0 GROUP BY a HAVING a > 10; SELECT FOUND_ROWS(); DROP TABLE t1; + +# +# Bug #7945: group by + distinct with constant expression + limit +# + +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES (1,2), (1,3), (1,4), (1,5); +SELECT SQL_CALC_FOUND_ROWS DISTINCT 'a' FROM t1 GROUP BY b LIMIT 2; +SELECT FOUND_ROWS(); |