mariadb/mysql-test/t/limit.test
unknown 2a18a762e1 Patch for netBSD
Added warning for tables where the auto_increment key is 0
Fixed DELETE ... LIMIT 0
Fixed UPDATE ..LIMIT 0


Docs/manual.texi:
  Changelog + Update to CHECK TABLE
configure.in:
  Patch for netBSD
mit-pthreads/gen/ctime.c:
  Patch for netBSD
mit-pthreads/machdep/netbsd-1.1/__signal.h:
  Patch for netBSD
mit-pthreads/stdio/strerror.c:
  Patch for netBSD
myisam/mi_check.c:
  Added warning for tables where the auto_increment key is 0
myisam/myisamchk.c:
  Added warning for tables where the auto_increment key is 0
mysql-test/r/auto_increment.result:
  Added warning for tables where the auto_increment key is 0
mysql-test/r/limit.result:
  Test of DELETE ... LIMIT 0
mysql-test/t/auto_increment.test:
  Added warning for tables where the auto_increment key is 0
mysql-test/t/limit.test:
  Test of DELETE ... LIMIT 0
sql/Makefile.am:
  Don't add mysqld_LDADD to mysqlbinlog (portability patch)
sql/ha_gemini.cc:
  Changed copyright (have got ok from NuSphere previously)
sql/ha_gemini.h:
  Changed copyright (have got ok from NuSphere previously)
sql/sql_delete.cc:
  Fixed DELETE ... LIMIT 0
sql/sql_update.cc:
  Fixed UPDATE ..LIMIT 0
2001-07-16 03:04:30 +03:00

30 lines
736 B
Text

#
# Test of update and delete with limit
#
drop table if exists t1;
create table t1 (a int primary key, b int not null);
insert into t1 () values (); -- Testing default values
insert into t1 values (1,1),(2,1),(3,1);
update t1 set a=4 where b=1 limit 1;
select * from t1;
update t1 set b=2 where b=1 limit 2;
select * from t1;
update t1 set b=4 where b=1;
select * from t1;
delete from t1 where b=2 limit 1;
select * from t1;
delete from t1 limit 1;
select * from t1;
drop table t1;
create table t1 (i int);
insert into t1 (i) values(1);
insert into t1 (i) values(1);
insert into t1 (i) values(1);
delete from t1 limit 1;
update t1 set i=2 limit 1;
delete from t1 limit 0;
update t1 set i=3 limit 0;
select * from t1;
drop table t1;