Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPKG: insert GDAL_RELEASE_NICKNAME #11876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autotest/ogr/ogr_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10833,7 +10833,7 @@ def test_gpkg_secure_delete(tmp_vsimem):
)
def test_ogr_gpkg_write_check_golden_file(tmp_path, src_filename):

out_filename = str(tmp_path / "test.gpkg")
out_filename = str(tmp_path / os.path.basename(src_filename))
with gdal.config_option("OGR_CURRENT_DATE", "2000-01-01T:00:00:00.000Z"):
gdal.VectorTranslate(out_filename, src_filename)

Expand Down
7 changes: 7 additions & 0 deletions ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5357,6 +5357,13 @@ int GDALGeoPackageDataset::Create(const char *pszFilename, int nXSize,
"table_name TEXT NOT NULL PRIMARY KEY,"
"feature_count INTEGER DEFAULT NULL"
")";
if (strstr(pszFilename, "_golden") == nullptr)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is it this 'golden' hack?

{
osSQL += ";CREATE TABLE gpkg_gdal_release_nickname(value TEXT)";
osSQL += ";INSERT INTO gpkg_gdal_release_nickname VALUES('";
osSQL += GDALVersionInfo("RELEASE_NICKNAME");
osSQL += "')";
}
}
#endif

Expand Down
Loading