Commit 477e0e44 authored by Julien Muchembled's avatar Julien Muchembled

qa: update testStorageUpgrade data for what is not automatically upgraded

Some changes in the storage format are minor and applying them automatically
would cost too much for big databases.

Here, we apply them manually so that testStorageUpgrade will be able to
compare dumps.

We hope however that with improvements like
  https://jira.mariadb.org/browse/MDEV-12836
we'll be able to implement more migration steps
and revert parts of this commit.
parent 933579f5
...@@ -10,14 +10,13 @@ CREATE TABLE `config` ( ...@@ -10,14 +10,13 @@ CREATE TABLE `config` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','1'),('partitions','3'),('ptid','9'),('replicas','1'); INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','1'),('partitions','3'),('ptid','9'),('replicas','1');
CREATE TABLE `data` ( CREATE TABLE `data` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `id` bigint(20) unsigned NOT NULL,
`hash` binary(20) NOT NULL, `hash` binary(20) NOT NULL,
`compression` tinyint(3) unsigned DEFAULT NULL, `compression` tinyint(3) unsigned DEFAULT NULL,
`value` mediumblob NOT NULL, `value` mediumblob NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`)
UNIQUE KEY `hash` (`hash`,`compression`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `data` VALUES (0,0x0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33,0,0x666F6F);
INSERT INTO `data` VALUES (1,0x0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33,0,0x666F6F);
CREATE TABLE `obj` ( CREATE TABLE `obj` (
`partition` smallint(5) unsigned NOT NULL, `partition` smallint(5) unsigned NOT NULL,
`oid` bigint(20) unsigned NOT NULL, `oid` bigint(20) unsigned NOT NULL,
...@@ -28,7 +27,7 @@ CREATE TABLE `obj` ( ...@@ -28,7 +27,7 @@ CREATE TABLE `obj` (
KEY `partition` (`partition`,`oid`,`tid`), KEY `partition` (`partition`,`oid`,`tid`),
KEY `data_id` (`data_id`) KEY `data_id` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `obj` VALUES (0,0,231616946283203125,1,NULL); INSERT INTO `obj` VALUES (0,0,231616946283203125,0,NULL);
CREATE TABLE `pt` ( CREATE TABLE `pt` (
`rid` int(10) unsigned NOT NULL, `rid` int(10) unsigned NOT NULL,
`nid` int(11) NOT NULL, `nid` int(11) NOT NULL,
...@@ -55,7 +54,7 @@ CREATE TABLE `trans` ( ...@@ -55,7 +54,7 @@ CREATE TABLE `trans` (
`ttid` bigint(20) unsigned NOT NULL, `ttid` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`partition`,`tid`) PRIMARY KEY (`partition`,`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `trans` VALUES (1,231616946283203125,0,'\0\0\0\0\0\0\0\0','','','(dp1\n.',231616946283203125); INSERT INTO `trans` VALUES (1,231616946283203125,0,'\0\0\0\0\0\0\0\0','','','',231616946283203125);
CREATE TABLE `ttrans` ( CREATE TABLE `ttrans` (
`partition` smallint(5) unsigned NOT NULL, `partition` smallint(5) unsigned NOT NULL,
`tid` bigint(20) unsigned NOT NULL, `tid` bigint(20) unsigned NOT NULL,
......
...@@ -10,14 +10,13 @@ CREATE TABLE `config` ( ...@@ -10,14 +10,13 @@ CREATE TABLE `config` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','2'),('partitions','3'),('ptid','9'),('replicas','1'); INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','2'),('partitions','3'),('ptid','9'),('replicas','1');
CREATE TABLE `data` ( CREATE TABLE `data` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `id` bigint(20) unsigned NOT NULL,
`hash` binary(20) NOT NULL, `hash` binary(20) NOT NULL,
`compression` tinyint(3) unsigned DEFAULT NULL, `compression` tinyint(3) unsigned DEFAULT NULL,
`value` mediumblob NOT NULL, `value` mediumblob NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`)
UNIQUE KEY `hash` (`hash`,`compression`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `data` VALUES (0,0x0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33,0,0x666F6F);
INSERT INTO `data` VALUES (1,0x0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33,0,0x666F6F);
CREATE TABLE `obj` ( CREATE TABLE `obj` (
`partition` smallint(5) unsigned NOT NULL, `partition` smallint(5) unsigned NOT NULL,
`oid` bigint(20) unsigned NOT NULL, `oid` bigint(20) unsigned NOT NULL,
...@@ -28,7 +27,7 @@ CREATE TABLE `obj` ( ...@@ -28,7 +27,7 @@ CREATE TABLE `obj` (
KEY `partition` (`partition`,`oid`,`tid`), KEY `partition` (`partition`,`oid`,`tid`),
KEY `data_id` (`data_id`) KEY `data_id` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `obj` VALUES (0,0,231616946283203125,1,NULL); INSERT INTO `obj` VALUES (0,0,231616946283203125,0,NULL);
CREATE TABLE `pt` ( CREATE TABLE `pt` (
`rid` int(10) unsigned NOT NULL, `rid` int(10) unsigned NOT NULL,
`nid` int(11) NOT NULL, `nid` int(11) NOT NULL,
......
...@@ -10,12 +10,11 @@ CREATE TABLE `config` ( ...@@ -10,12 +10,11 @@ CREATE TABLE `config` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','3'),('partitions','3'),('ptid','8'),('replicas','1'); INSERT INTO `config` VALUES ('name','testStorageUpgrade'),('nid','3'),('partitions','3'),('ptid','8'),('replicas','1');
CREATE TABLE `data` ( CREATE TABLE `data` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `id` bigint(20) unsigned NOT NULL,
`hash` binary(20) NOT NULL, `hash` binary(20) NOT NULL,
`compression` tinyint(3) unsigned DEFAULT NULL, `compression` tinyint(3) unsigned DEFAULT NULL,
`value` mediumblob NOT NULL, `value` mediumblob NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`)
UNIQUE KEY `hash` (`hash`,`compression`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `obj` ( CREATE TABLE `obj` (
`partition` smallint(5) unsigned NOT NULL, `partition` smallint(5) unsigned NOT NULL,
......
...@@ -8,11 +8,11 @@ INSERT INTO "config" VALUES('partitions','3'); ...@@ -8,11 +8,11 @@ INSERT INTO "config" VALUES('partitions','3');
INSERT INTO "config" VALUES('replicas','1'); INSERT INTO "config" VALUES('replicas','1');
INSERT INTO "config" VALUES('ptid','9'); INSERT INTO "config" VALUES('ptid','9');
CREATE TABLE data ( CREATE TABLE data (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY,
hash BLOB NOT NULL, hash BLOB NOT NULL,
compression INTEGER NOT NULL, compression INTEGER NOT NULL,
value BLOB NOT NULL); value BLOB NOT NULL);
INSERT INTO "data" VALUES(1,X'0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33',0,X'666F6F'); INSERT INTO "data" VALUES(0,X'0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33',0,X'666F6F');
CREATE TABLE obj ( CREATE TABLE obj (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
oid INTEGER NOT NULL, oid INTEGER NOT NULL,
...@@ -20,7 +20,7 @@ CREATE TABLE obj ( ...@@ -20,7 +20,7 @@ CREATE TABLE obj (
data_id INTEGER, data_id INTEGER,
value_tid INTEGER, value_tid INTEGER,
PRIMARY KEY (partition, tid, oid)); PRIMARY KEY (partition, tid, oid));
INSERT INTO "obj" VALUES(0,0,231616946283203125,1,NULL); INSERT INTO "obj" VALUES(0,0,231616946283203125,0,NULL);
CREATE TABLE pt ( CREATE TABLE pt (
rid INTEGER NOT NULL, rid INTEGER NOT NULL,
nid INTEGER NOT NULL, nid INTEGER NOT NULL,
...@@ -32,8 +32,6 @@ INSERT INTO "pt" VALUES(0,2,0); ...@@ -32,8 +32,6 @@ INSERT INTO "pt" VALUES(0,2,0);
INSERT INTO "pt" VALUES(2,2,0); INSERT INTO "pt" VALUES(2,2,0);
INSERT INTO "pt" VALUES(1,3,1); INSERT INTO "pt" VALUES(1,3,1);
INSERT INTO "pt" VALUES(2,3,1); INSERT INTO "pt" VALUES(2,3,1);
DELETE FROM "sqlite_sequence";
INSERT INTO "sqlite_sequence" VALUES('data',1);
CREATE TABLE tobj ( CREATE TABLE tobj (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
oid INTEGER NOT NULL, oid INTEGER NOT NULL,
...@@ -51,7 +49,7 @@ CREATE TABLE trans ( ...@@ -51,7 +49,7 @@ CREATE TABLE trans (
ext BLOB NOT NULL, ext BLOB NOT NULL,
ttid INTEGER NOT NULL, ttid INTEGER NOT NULL,
PRIMARY KEY (partition, tid)); PRIMARY KEY (partition, tid));
INSERT INTO "trans" VALUES(1,231616946283203125,0,X'0000000000000000',X'',X'',X'286470310A2E',231616946283203125); INSERT INTO "trans" VALUES(1,231616946283203125,0,X'0000000000000000',X'',X'',X'',231616946283203125);
CREATE TABLE ttrans ( CREATE TABLE ttrans (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
tid INTEGER NOT NULL, tid INTEGER NOT NULL,
...@@ -67,7 +65,4 @@ CREATE INDEX _obj_i1 ON ...@@ -67,7 +65,4 @@ CREATE INDEX _obj_i1 ON
CREATE INDEX _obj_i2 ON CREATE INDEX _obj_i2 ON
obj(data_id) obj(data_id)
; ;
CREATE UNIQUE INDEX _data_i1 ON
data(hash, compression)
;
COMMIT; COMMIT;
...@@ -8,11 +8,11 @@ INSERT INTO "config" VALUES('partitions','3'); ...@@ -8,11 +8,11 @@ INSERT INTO "config" VALUES('partitions','3');
INSERT INTO "config" VALUES('replicas','1'); INSERT INTO "config" VALUES('replicas','1');
INSERT INTO "config" VALUES('ptid','9'); INSERT INTO "config" VALUES('ptid','9');
CREATE TABLE data ( CREATE TABLE data (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY,
hash BLOB NOT NULL, hash BLOB NOT NULL,
compression INTEGER NOT NULL, compression INTEGER NOT NULL,
value BLOB NOT NULL); value BLOB NOT NULL);
INSERT INTO "data" VALUES(1,X'0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33',0,X'666F6F'); INSERT INTO "data" VALUES(0,X'0BEEC7B5EA3F0FDBC95D0DD47F3C5BC275DA8A33',0,X'666F6F');
CREATE TABLE obj ( CREATE TABLE obj (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
oid INTEGER NOT NULL, oid INTEGER NOT NULL,
...@@ -20,7 +20,7 @@ CREATE TABLE obj ( ...@@ -20,7 +20,7 @@ CREATE TABLE obj (
data_id INTEGER, data_id INTEGER,
value_tid INTEGER, value_tid INTEGER,
PRIMARY KEY (partition, tid, oid)); PRIMARY KEY (partition, tid, oid));
INSERT INTO "obj" VALUES(0,0,231616946283203125,1,NULL); INSERT INTO "obj" VALUES(0,0,231616946283203125,0,NULL);
CREATE TABLE pt ( CREATE TABLE pt (
rid INTEGER NOT NULL, rid INTEGER NOT NULL,
nid INTEGER NOT NULL, nid INTEGER NOT NULL,
...@@ -32,8 +32,6 @@ INSERT INTO "pt" VALUES(0,2,0); ...@@ -32,8 +32,6 @@ INSERT INTO "pt" VALUES(0,2,0);
INSERT INTO "pt" VALUES(2,2,0); INSERT INTO "pt" VALUES(2,2,0);
INSERT INTO "pt" VALUES(1,3,1); INSERT INTO "pt" VALUES(1,3,1);
INSERT INTO "pt" VALUES(2,3,1); INSERT INTO "pt" VALUES(2,3,1);
DELETE FROM "sqlite_sequence";
INSERT INTO "sqlite_sequence" VALUES('data',1);
CREATE TABLE tobj ( CREATE TABLE tobj (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
oid INTEGER NOT NULL, oid INTEGER NOT NULL,
...@@ -66,7 +64,4 @@ CREATE INDEX _obj_i1 ON ...@@ -66,7 +64,4 @@ CREATE INDEX _obj_i1 ON
CREATE INDEX _obj_i2 ON CREATE INDEX _obj_i2 ON
obj(data_id) obj(data_id)
; ;
CREATE UNIQUE INDEX _data_i1 ON
data(hash, compression)
;
COMMIT; COMMIT;
...@@ -8,7 +8,7 @@ INSERT INTO "config" VALUES('partitions','3'); ...@@ -8,7 +8,7 @@ INSERT INTO "config" VALUES('partitions','3');
INSERT INTO "config" VALUES('replicas','1'); INSERT INTO "config" VALUES('replicas','1');
INSERT INTO "config" VALUES('ptid','8'); INSERT INTO "config" VALUES('ptid','8');
CREATE TABLE data ( CREATE TABLE data (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY,
hash BLOB NOT NULL, hash BLOB NOT NULL,
compression INTEGER NOT NULL, compression INTEGER NOT NULL,
value BLOB NOT NULL); value BLOB NOT NULL);
...@@ -30,7 +30,6 @@ INSERT INTO "pt" VALUES(1,1,0); ...@@ -30,7 +30,6 @@ INSERT INTO "pt" VALUES(1,1,0);
INSERT INTO "pt" VALUES(2,2,0); INSERT INTO "pt" VALUES(2,2,0);
INSERT INTO "pt" VALUES(1,3,0); INSERT INTO "pt" VALUES(1,3,0);
INSERT INTO "pt" VALUES(2,3,0); INSERT INTO "pt" VALUES(2,3,0);
DELETE FROM "sqlite_sequence";
CREATE TABLE tobj ( CREATE TABLE tobj (
partition INTEGER NOT NULL, partition INTEGER NOT NULL,
oid INTEGER NOT NULL, oid INTEGER NOT NULL,
...@@ -63,7 +62,4 @@ CREATE INDEX _obj_i1 ON ...@@ -63,7 +62,4 @@ CREATE INDEX _obj_i1 ON
CREATE INDEX _obj_i2 ON CREATE INDEX _obj_i2 ON
obj(data_id) obj(data_id)
; ;
CREATE UNIQUE INDEX _data_i1 ON
data(hash, compression)
;
COMMIT; COMMIT;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment