1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2002-01-16 23:02:26 +02:00
parent 40c146f6a2
commit 088582035e
15 changed files with 126 additions and 64 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;