diff options
author | unknown <monty@hundin.mysql.fi> | 2002-01-16 23:02:26 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-01-16 23:02:26 +0200 |
commit | 088582035efe96857e6453a72443ae1d8049fc3a (patch) | |
tree | 018279aec359563ce57663242828891f44489682 /mysql-test | |
parent | 40c146f6a22e7397d9e5d1880b29f2c88fb39eda (diff) | |
download | mariadb-git-088582035efe96857e6453a72443ae1d8049fc3a.tar.gz |
Move HA_EXTRA_NO_READCHECK to ha_open
Fixed bug in multi-table-delete
Docs/manual.texi:
Changelog
include/mysql_com.h:
Define MAX_CHAR_WIDTH
myisam/mi_extra.c:
Cleanup
mysql-test/r/bdb.result:
Bug test
mysql-test/r/group_by.result:
Bug test
mysql-test/t/bdb.test:
Bug test
mysql-test/t/group_by.test:
Bug test
sql/ha_berkeley.cc:
More debug statements
sql/handler.cc:
Move HA_EXTRA_NO_READCHECK to ha_open
sql/records.cc:
More DBUG statements
sql/sql_analyse.cc:
Cleanup
sql/sql_base.cc:
Move HA_EXTRA_NO_READCHECK to ha_open
sql/sql_delete.cc:
Fixed bug in multi-table-delete
Cleanup
sql/sql_select.cc:
Move HA_EXTRA_NO_READCHECK to ha_open
sql/sql_update.cc:
Move HA_EXTRA_NO_READCHECK to ha_open
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/bdb.result | 22 | ||||
-rw-r--r-- | mysql-test/r/group_by.result | 27 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 16 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 17 |
4 files changed, 82 insertions, 0 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index e553105fcc7..7374e936c36 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1101,3 +1101,25 @@ INFO_NOTE select INFO_NOTE from t1 where STR_DATE > '20010610'; INFO_NOTE drop table t1; +create table t1 (a int not null, b int, primary key (a)) type =bdb; +create table t2 (a int not null, b int, primary key (a)) type =bdb; +insert into t1 values (2, 3),(1, 7),(10, 7); +insert into t2 values (2, 3),(1, 7),(10, 7); +select * from t1; +a b +1 7 +2 3 +10 7 +select * from t2; +a b +1 7 +2 3 +10 7 +delete t1, t2 from t1, t2 where t1.a = t2.a; +select * from t1; +a b +select * from t2; +a b +select * from t2; +a b +drop table t1,t2; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index a67298c73c0..9845e12ef5f 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -344,3 +344,30 @@ a 1 b 1 SET SQL_BIG_TABLES=0; drop table t1; +CREATE TABLE t1 ( +`a` char(193) default NULL, +`b` char(63) default NULL +); +INSERT INTO t1 VALUES ('abc','def'),('hij','klm'); +SELECT CONCAT(a, b) FROM t1 GROUP BY 1; +CONCAT(a, b) +abcdef +hijklm +SELECT CONCAT(a, b),count(*) FROM t1 GROUP BY 1; +CONCAT(a, b) count(*) +abcdef 1 +hijklm 1 +SELECT CONCAT(a, b),count(distinct a) FROM t1 GROUP BY 1; +CONCAT(a, b) count(distinct a) +abcdef 1 +hijklm 1 +SELECT 1 FROM t1 GROUP BY CONCAT(a, b); +1 +1 +1 +INSERT INTO t1 values ('hij','klm'); +SELECT CONCAT(a, b),count(*) FROM t1 GROUP BY 1; +CONCAT(a, b) count(*) +abcdef 1 +hijklm 2 +DROP TABLE t1; diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 50698bb8df6..0df93b5f220 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -767,3 +767,19 @@ select INFO_NOTE from t1 where STR_DATE = '20010610'; select INFO_NOTE from t1 where STR_DATE < '20010610'; select INFO_NOTE from t1 where STR_DATE > '20010610'; drop table t1; + +# +# Test problem with multi table delete which quickly shows up with bdb tables. +# + +create table t1 (a int not null, b int, primary key (a)) type =bdb; +create table t2 (a int not null, b int, primary key (a)) type =bdb; +insert into t1 values (2, 3),(1, 7),(10, 7); +insert into t2 values (2, 3),(1, 7),(10, 7); +select * from t1; +select * from t2; +delete t1, t2 from t1, t2 where t1.a = t2.a; +select * from t1; +select * from t2; +select * from t2; +drop table t1,t2; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index b98505e06b9..17ad9588f1b 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -266,3 +266,20 @@ SELECT binary a FROM t1 GROUP BY 1; SELECT binary a,count(*) FROM t1 GROUP BY 1; SET SQL_BIG_TABLES=0; drop table t1; + +# +# Test of key >= 256 bytes +# + +CREATE TABLE t1 ( + `a` char(193) default NULL, + `b` char(63) default NULL +); +INSERT INTO t1 VALUES ('abc','def'),('hij','klm'); +SELECT CONCAT(a, b) FROM t1 GROUP BY 1; +SELECT CONCAT(a, b),count(*) FROM t1 GROUP BY 1; +SELECT CONCAT(a, b),count(distinct a) FROM t1 GROUP BY 1; +SELECT 1 FROM t1 GROUP BY CONCAT(a, b); +INSERT INTO t1 values ('hij','klm'); +SELECT CONCAT(a, b),count(*) FROM t1 GROUP BY 1; +DROP TABLE t1; |