mariadb/mysql-test/r/ndb_partition_list.result
unknown cea60fb157 Many files:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
  new file


mysql-test/t/ndb_partition_error.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_key.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_list.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_range.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_blob_partition.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_dd_backuprestore.test:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_error.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_key.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_list.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_range.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_blob_partition.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_dd_backuprestore.result:
  Adding back ndb partition tests from mysql-test-extra per tomas and clavin
2006-06-27 18:35:10 +02:00

51 lines
2.3 KiB
Text

drop table if exists t1;
CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL,
f_char1 CHAR(10),
f_char2 CHAR(10), f_charbig VARCHAR(1000),
PRIMARY KEY (f_int1,f_int2))
ENGINE = NDB
PARTITION BY LIST(MOD(f_int1 + f_int2,4))
(PARTITION part_3 VALUES IN (-3),
PARTITION part_2 VALUES IN (-2),
PARTITION part_1 VALUES IN (-1),
PARTITION part0 VALUES IN (0),
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3,4,5));
INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
SELECT * FROM t1 ORDER BY f_int1;
f_int1 f_int2 f_char1 f_char2 f_charbig
-2 20 20 20 ===20===
1 1 1 1 ===1===
2 1 1 1 ===1===
3 1 1 1 ===1===
4 1 1 1 ===1===
5 1 1 1 ===1===
20 1 1 1 ===1===
DROP TABLE t1;
CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10),
f_char2 CHAR(10), f_charbig VARCHAR(1000))
ENGINE = NDB
PARTITION BY LIST(f_int1)
(PARTITION part_1 VALUES IN (-1),
PARTITION part0 VALUES IN (0,1),
PARTITION part1 VALUES IN (2));
INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
ERROR HY000: Table has no partition for value 20
SELECT * FROM t1 ORDER BY f_int1;
f_int1 f_int2 f_char1 f_char2 f_charbig
-1 20 20 20 ===20===
0 20 20 20 ===20===
1 1 1 1 ===1===
2 1 1 1 ===1===
DROP TABLE t1;