martin/mbtiles/tests/snapshots/copy__databases@norm__v2-2.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

98 lines
3.2 KiB
Plaintext

---
source: mbtiles/tests/copy.rs
expression: actual_value
---
[[]]
type = 'table'
tbl_name = 'images'
sql = '''
CREATE TABLE images (
tile_id text NOT NULL PRIMARY KEY,
tile_data blob)'''
values = [
'( "0A62AF3A2A3D38C0E8FF098A684C3EC1", blob(1F8B08000000000000FF2BCACF2F01005BF9F41604000000) )',
'( "163BE0A88C70CA629FD516DBAADAD96A", blob(1F8B08000000000000FF03000000000000000000) )',
'( "39794F1D8EEDEE7777FA89D4FD8D3154", blob(1F8B08000000000000FF4B4DC92CD12D330200C489DF2607000000) )',
'( "3CD93E79D6812F995906036D24282DBE", blob(1F8B08000000000000FF33D4CD4E4D2DD035D42DCA050026D508C30B000000) )',
'( "59A99A65DF08F16CE984BDFA6EBC95CF", blob(1F8B08000000000000FF4B4DC92CD12D334A04006367987408000000) )',
'( "94335B9F0CCBA1C1CB7F91B49EB34344", blob(1F8B08000000000000FFCBCB2FD14DCD2D28A9040086D4937609000000) )',
'( "98AD49106F1CE0AA003027C229A70F7E", blob(1F8B08000000000000FF2B4ECC4D050044F150FC04000000) )',
'( "E1A151E7B18F8B2C53F94DF4CA201026", blob(1F8B08000000000000FFCB4B2D07004544E36B03000000) )',
]
[[]]
type = 'table'
tbl_name = 'map'
sql = '''
CREATE TABLE map (
zoom_level integer NOT NULL,
tile_column integer NOT NULL,
tile_row integer NOT NULL,
tile_id text,
PRIMARY KEY(zoom_level, tile_column, tile_row))'''
values = [
'( 3, 6, 7, "0A62AF3A2A3D38C0E8FF098A684C3EC1" )',
'( 5, 0, 0, "98AD49106F1CE0AA003027C229A70F7E" )',
'( 5, 0, 1, "163BE0A88C70CA629FD516DBAADAD96A" )',
'( 5, 1, 1, "39794F1D8EEDEE7777FA89D4FD8D3154" )',
'( 5, 1, 2, "94335B9F0CCBA1C1CB7F91B49EB34344" )',
'( 5, 1, 3, "163BE0A88C70CA629FD516DBAADAD96A" )',
'( 5, 3, 7, "E1A151E7B18F8B2C53F94DF4CA201026" )',
'( 5, 3, 8, "E1A151E7B18F8B2C53F94DF4CA201026" )',
'( 6, 0, 3, "98AD49106F1CE0AA003027C229A70F7E" )',
'( 6, 0, 5, "3CD93E79D6812F995906036D24282DBE" )',
'( 6, 1, 4, "59A99A65DF08F16CE984BDFA6EBC95CF" )',
]
[[]]
type = 'table'
tbl_name = 'metadata'
sql = '''
CREATE TABLE metadata (
name text NOT NULL PRIMARY KEY,
value text)'''
values = [
'( "agg_tiles_hash", "A18D0C39730FB52E5A547F096F5C60E8" )',
'( "md-edit", "value - v2" )',
'( "md-new", "value - new" )',
'( "md-same", "value - same" )',
]
[[]]
type = 'index'
tbl_name = 'images'
[[]]
type = 'index'
tbl_name = 'map'
[[]]
type = 'index'
tbl_name = 'metadata'
[[]]
type = 'view'
tbl_name = 'tiles'
sql = '''
CREATE VIEW tiles AS
SELECT map.zoom_level AS zoom_level,
map.tile_column AS tile_column,
map.tile_row AS tile_row,
images.tile_data AS tile_data
FROM map
JOIN images ON images.tile_id = map.tile_id'''
[[]]
type = 'view'
tbl_name = 'tiles_with_hash'
sql = '''
CREATE VIEW tiles_with_hash AS
SELECT
map.zoom_level AS zoom_level,
map.tile_column AS tile_column,
map.tile_row AS tile_row,
images.tile_data AS tile_data,
images.tile_id AS tile_hash
FROM map
JOIN images ON images.tile_id = map.tile_id'''