Skip to content

Commit 6b9d6bc

Browse files
authored
Merge pull request #350 from maxmind/greg/release-1.10.0
Release 1.10.0
2 parents feb088a + 008d692 commit 6b9d6bc

File tree

6 files changed

+157
-140
lines changed

6 files changed

+157
-140
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.9)
22

33
project(maxminddb
44
LANGUAGES C
5-
VERSION 1.9.1
5+
VERSION 1.10.0
66
)
77
set(MAXMINDDB_SOVERSION 0.0.7)
88
set(CMAKE_C_STANDARD 99)

Changes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
## 1.10.0
1+
## 1.10.0 - 2024-06-10
22

33
* When building with CMake, it is now possible to disable the building
44
of binaries (e.g., `mmdblookup`) with the `MAXMINDDB_BUILD_BINARIES`
55
option and the install target generation with the `MAXMINDDB_INSTALL`
66
option. Pull request by Seena Fallah. GitHub #342.
7-
* The reader can now lookup records on a database with a search tree
7+
* CMake now makes greater use of GNUInstallDirs. Pull request by Maximilian
8+
Downey Twiss. GitHub #346.
9+
* The reader can now look up records on a database with a search tree
810
that is greater than 4 gigabytes without sometimes returning erroneous
911
results due to an integer overflow.
1012

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.63])
5-
AC_INIT([libmaxminddb], [1.9.1], [[email protected]])
5+
AC_INIT([libmaxminddb], [1.10.0], [[email protected]])
66
AC_CONFIG_SRCDIR([include/maxminddb.h])
77
AC_CONFIG_HEADERS([config.h include/maxminddb_config.h])
88

t/maxmind-db

Submodule maxmind-db updated 72 files

t/metadata_t.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
void test_metadata(MMDB_s *mmdb, const char *mode_desc) {
44
cmp_ok(mmdb->metadata.node_count,
55
"==",
6-
37,
7-
"node_count is 37 - %s",
6+
163,
7+
"node_count is 163 - %s",
88
mode_desc);
99
cmp_ok(mmdb->metadata.record_size,
1010
"==",
@@ -197,7 +197,7 @@ void test_metadata_as_data_entry_list(MMDB_s *mmdb, const char *mode_desc) {
197197
if (strcmp(key_name, "node_count") == 0) {
198198
MMDB_entry_data_list_s *value = entry_data_list =
199199
entry_data_list->next;
200-
cmp_ok(value->entry_data.uint32, "==", 37, "node_count == 37");
200+
cmp_ok(value->entry_data.uint32, "==", 163, "node_count == 163");
201201
} else if (strcmp(key_name, "record_size") == 0) {
202202
MMDB_entry_data_list_s *value = entry_data_list =
203203
entry_data_list->next;

t/read_node_t.c

Lines changed: 147 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -74,50 +74,55 @@ void run_24_bit_record_tests(int mode, const char *mode_desc) {
7474
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
7575
free(path);
7676

77-
const uint32_t tests[7][5] = {
78-
{0, 1, MMDB_RECORD_TYPE_SEARCH_NODE, 242, MMDB_RECORD_TYPE_EMPTY},
79-
{
80-
80,
81-
81,
82-
MMDB_RECORD_TYPE_SEARCH_NODE,
83-
197,
84-
MMDB_RECORD_TYPE_SEARCH_NODE,
85-
},
86-
{
87-
96,
88-
97,
89-
MMDB_RECORD_TYPE_SEARCH_NODE,
90-
242,
91-
MMDB_RECORD_TYPE_EMPTY,
92-
},
93-
{
94-
103,
95-
242,
96-
MMDB_RECORD_TYPE_EMPTY,
97-
104,
98-
MMDB_RECORD_TYPE_SEARCH_NODE,
99-
},
100-
{
101-
127,
102-
242,
103-
MMDB_RECORD_TYPE_EMPTY,
104-
315,
105-
MMDB_RECORD_TYPE_DATA,
106-
},
107-
{
108-
132,
109-
329,
110-
MMDB_RECORD_TYPE_DATA,
111-
242,
112-
MMDB_RECORD_TYPE_EMPTY,
113-
},
114-
{
115-
241,
116-
96,
117-
MMDB_RECORD_TYPE_SEARCH_NODE,
118-
242,
119-
MMDB_RECORD_TYPE_EMPTY,
120-
}};
77+
const uint32_t tests[7][5] = {{
78+
0,
79+
1,
80+
MMDB_RECORD_TYPE_SEARCH_NODE,
81+
435,
82+
MMDB_RECORD_TYPE_SEARCH_NODE,
83+
},
84+
{
85+
80,
86+
81,
87+
MMDB_RECORD_TYPE_SEARCH_NODE,
88+
323,
89+
MMDB_RECORD_TYPE_SEARCH_NODE,
90+
},
91+
{
92+
96,
93+
97,
94+
MMDB_RECORD_TYPE_SEARCH_NODE,
95+
148,
96+
MMDB_RECORD_TYPE_SEARCH_NODE,
97+
},
98+
{
99+
103,
100+
444,
101+
MMDB_RECORD_TYPE_EMPTY,
102+
104,
103+
MMDB_RECORD_TYPE_SEARCH_NODE,
104+
},
105+
{
106+
127,
107+
444,
108+
MMDB_RECORD_TYPE_EMPTY,
109+
514,
110+
MMDB_RECORD_TYPE_DATA,
111+
},
112+
{
113+
132,
114+
527,
115+
MMDB_RECORD_TYPE_DATA,
116+
444,
117+
MMDB_RECORD_TYPE_EMPTY,
118+
},
119+
{
120+
241,
121+
444,
122+
MMDB_RECORD_TYPE_EMPTY,
123+
242,
124+
MMDB_RECORD_TYPE_SEARCH_NODE,
125+
}};
121126
run_read_node_tests(mmdb, tests, 7, 24);
122127

123128
MMDB_close(mmdb);
@@ -130,50 +135,55 @@ void run_28_bit_record_tests(int mode, const char *mode_desc) {
130135
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
131136
free(path);
132137

133-
const uint32_t tests[7][5] = {
134-
{0, 1, MMDB_RECORD_TYPE_SEARCH_NODE, 242, MMDB_RECORD_TYPE_EMPTY},
135-
{
136-
80,
137-
81,
138-
MMDB_RECORD_TYPE_SEARCH_NODE,
139-
197,
140-
MMDB_RECORD_TYPE_SEARCH_NODE,
141-
},
142-
{
143-
96,
144-
97,
145-
MMDB_RECORD_TYPE_SEARCH_NODE,
146-
242,
147-
MMDB_RECORD_TYPE_EMPTY,
148-
},
149-
{
150-
103,
151-
242,
152-
MMDB_RECORD_TYPE_EMPTY,
153-
104,
154-
MMDB_RECORD_TYPE_SEARCH_NODE,
155-
},
156-
{
157-
127,
158-
242,
159-
MMDB_RECORD_TYPE_EMPTY,
160-
315,
161-
MMDB_RECORD_TYPE_DATA,
162-
},
163-
{
164-
132,
165-
329,
166-
MMDB_RECORD_TYPE_DATA,
167-
242,
168-
MMDB_RECORD_TYPE_EMPTY,
169-
},
170-
{
171-
241,
172-
96,
173-
MMDB_RECORD_TYPE_SEARCH_NODE,
174-
242,
175-
MMDB_RECORD_TYPE_EMPTY,
176-
}};
138+
const uint32_t tests[7][5] = {{
139+
0,
140+
1,
141+
MMDB_RECORD_TYPE_SEARCH_NODE,
142+
435,
143+
MMDB_RECORD_TYPE_SEARCH_NODE,
144+
},
145+
{
146+
80,
147+
81,
148+
MMDB_RECORD_TYPE_SEARCH_NODE,
149+
323,
150+
MMDB_RECORD_TYPE_SEARCH_NODE,
151+
},
152+
{
153+
96,
154+
97,
155+
MMDB_RECORD_TYPE_SEARCH_NODE,
156+
148,
157+
MMDB_RECORD_TYPE_SEARCH_NODE,
158+
},
159+
{
160+
103,
161+
444,
162+
MMDB_RECORD_TYPE_EMPTY,
163+
104,
164+
MMDB_RECORD_TYPE_SEARCH_NODE,
165+
},
166+
{
167+
127,
168+
444,
169+
MMDB_RECORD_TYPE_EMPTY,
170+
514,
171+
MMDB_RECORD_TYPE_DATA,
172+
},
173+
{
174+
132,
175+
527,
176+
MMDB_RECORD_TYPE_DATA,
177+
444,
178+
MMDB_RECORD_TYPE_EMPTY,
179+
},
180+
{
181+
241,
182+
444,
183+
MMDB_RECORD_TYPE_EMPTY,
184+
242,
185+
MMDB_RECORD_TYPE_SEARCH_NODE,
186+
}};
177187
run_read_node_tests(mmdb, tests, 7, 28);
178188

179189
MMDB_close(mmdb);
@@ -186,50 +196,55 @@ void run_32_bit_record_tests(int mode, const char *mode_desc) {
186196
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
187197
free(path);
188198

189-
const uint32_t tests[7][5] = {
190-
{0, 1, MMDB_RECORD_TYPE_SEARCH_NODE, 242, MMDB_RECORD_TYPE_EMPTY},
191-
{
192-
80,
193-
81,
194-
MMDB_RECORD_TYPE_SEARCH_NODE,
195-
197,
196-
MMDB_RECORD_TYPE_SEARCH_NODE,
197-
},
198-
{
199-
96,
200-
97,
201-
MMDB_RECORD_TYPE_SEARCH_NODE,
202-
242,
203-
MMDB_RECORD_TYPE_EMPTY,
204-
},
205-
{
206-
103,
207-
242,
208-
MMDB_RECORD_TYPE_EMPTY,
209-
104,
210-
MMDB_RECORD_TYPE_SEARCH_NODE,
211-
},
212-
{
213-
127,
214-
242,
215-
MMDB_RECORD_TYPE_EMPTY,
216-
315,
217-
MMDB_RECORD_TYPE_DATA,
218-
},
219-
{
220-
132,
221-
329,
222-
MMDB_RECORD_TYPE_DATA,
223-
242,
224-
MMDB_RECORD_TYPE_EMPTY,
225-
},
226-
{
227-
241,
228-
96,
229-
MMDB_RECORD_TYPE_SEARCH_NODE,
230-
242,
231-
MMDB_RECORD_TYPE_EMPTY,
232-
}};
199+
const uint32_t tests[7][5] = {{
200+
0,
201+
1,
202+
MMDB_RECORD_TYPE_SEARCH_NODE,
203+
435,
204+
MMDB_RECORD_TYPE_SEARCH_NODE,
205+
},
206+
{
207+
80,
208+
81,
209+
MMDB_RECORD_TYPE_SEARCH_NODE,
210+
323,
211+
MMDB_RECORD_TYPE_SEARCH_NODE,
212+
},
213+
{
214+
96,
215+
97,
216+
MMDB_RECORD_TYPE_SEARCH_NODE,
217+
148,
218+
MMDB_RECORD_TYPE_SEARCH_NODE,
219+
},
220+
{
221+
103,
222+
444,
223+
MMDB_RECORD_TYPE_EMPTY,
224+
104,
225+
MMDB_RECORD_TYPE_SEARCH_NODE,
226+
},
227+
{
228+
127,
229+
444,
230+
MMDB_RECORD_TYPE_EMPTY,
231+
514,
232+
MMDB_RECORD_TYPE_DATA,
233+
},
234+
{
235+
132,
236+
527,
237+
MMDB_RECORD_TYPE_DATA,
238+
444,
239+
MMDB_RECORD_TYPE_EMPTY,
240+
},
241+
{
242+
241,
243+
444,
244+
MMDB_RECORD_TYPE_EMPTY,
245+
242,
246+
MMDB_RECORD_TYPE_SEARCH_NODE,
247+
}};
233248

234249
run_read_node_tests(mmdb, tests, 7, 32);
235250

0 commit comments

Comments
 (0)