config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/ndb/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/mysql57/mysql-test/suite/ndb/t/ndb_autoinc.test

# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

-- source include/have_ndb.inc
-- source include/not_embedded.inc

--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings

USE test;

CREATE TABLE t1 (
  id INT AUTO_INCREMENT,
  PRIMARY KEY(id)
) ENGINE=NDBCLUSTER;

# Test For bug#30417
--error 1296

CREATE TABLE t2 (
  id INT AUTO_INCREMENT,
  KEY(id)
) ENGINE=NDBCLUSTER;

SHOW TABLES;

CREATE TABLE t3 (
  id INT AUTO_INCREMENT,
  KEY(id)
) ENGINE=MYISAM;

--error 1296
ALTER TABLE t3
ENGINE NDBCLUSTER;

SHOW CREATE TABLE t3;

ALTER TABLE t3
ADD PRIMARY KEY (id);

SHOW CREATE TABLE t3;

DROP TABLE t1, t3;

--echo End of 5.1 tests


set @@auto_increment_increment=4;
set @@auto_increment_offset=1;
set @@ndb_autoincrement_prefetch_sz=2;
create table t1 (a int unsigned not null primary key auto_increment)
engine ndb;
insert into t1 values ();
insert into t1 values (2);
insert into t1 values ();
insert into t1 values ();
select * from t1 order by a;
drop table t1;



set @@auto_increment_increment=2;
set @@auto_increment_offset=1;

--echo First look at default SE behaviour on manual insert unaligned with
--echo offset + step

create table t1 (a int unsigned not null primary key auto_increment);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(18);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(22);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(28);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
select * from t1 order by a;
drop table t1;

Man Man