martin/mbtiles/tests/snapshots/copy__databases@hash__bdz.snap
Yuri Astrakhan b71c846abc
fix for mbtiles apply-patch with raw bindiff (#1384)
When applying raw (no gzip) patches, `mbtiles` was trying to un-gzip
them first. Now handles it properly.  Also adds a number of tests to catch these cases.
2024-06-26 20:37:20 +00:00

76 lines
2.1 KiB
Plaintext

---
source: mbtiles/tests/copy.rs
expression: actual_value
---
[[]]
type = 'table'
tbl_name = 'bsdiffrawgz'
sql = '''
CREATE TABLE bsdiffrawgz (
zoom_level integer NOT NULL,
tile_column integer NOT NULL,
tile_row integer NOT NULL,
patch_data blob NOT NULL,
tile_xxh3_64_hash integer NOT NULL,
PRIMARY KEY(zoom_level, tile_column, tile_row))'''
values = [
'( 5, 1, 1, blob(1B1E00F80799700B0AE100F45284A210A00708A0C03B), 479130493 )',
'( 5, 1, 2, blob(1B2000F8079970D30C62EDF2D8285E11400000BB2F01), -1097843426 )',
'( 5, 1, 3, blob(;), 953390274 )',
'( 6, 1, 4, blob(1B1F00F8077163E37063303653B324A12804E8010450E0ED01), 386481748 )',
]
[[]]
type = 'table'
tbl_name = 'metadata'
sql = '''
CREATE TABLE metadata (
name text NOT NULL PRIMARY KEY,
value text)'''
values = [
'( "agg_tiles_hash", "9AFEC3326B465CB939664C47A572D4C6" )',
'( "agg_tiles_hash_after_apply", "A18D0C39730FB52E5A547F096F5C60E8" )',
'( "agg_tiles_hash_before_apply", "C0CA886B149CE416242AB2AFE8E641AD" )',
'( "md-edit", "value - v2" )',
'( "md-new", "value - new" )',
'( "md-remove", NULL )',
]
[[]]
type = 'table'
tbl_name = 'tiles_with_hash'
sql = '''
CREATE TABLE tiles_with_hash (
zoom_level integer NOT NULL,
tile_column integer NOT NULL,
tile_row integer NOT NULL,
tile_data blob,
tile_hash text,
PRIMARY KEY(zoom_level, tile_column, tile_row))'''
values = [
'( 5, 2, 2, NULL, "" )',
'( 5, 2, 3, NULL, "" )',
'( 5, 3, 7, blob(1F8B08000000000000FFCB4B2D07004544E36B03000000), "E1A151E7B18F8B2C53F94DF4CA201026" )',
'( 5, 3, 8, blob(1F8B08000000000000FFCB4B2D07004544E36B03000000), "E1A151E7B18F8B2C53F94DF4CA201026" )',
'( 6, 2, 6, NULL, "" )',
]
[[]]
type = 'index'
tbl_name = 'bsdiffrawgz'
[[]]
type = 'index'
tbl_name = 'metadata'
[[]]
type = 'index'
tbl_name = 'tiles_with_hash'
[[]]
type = 'view'
tbl_name = 'tiles'
sql = '''
CREATE VIEW tiles AS
SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash'''