Skip to content

Commit 5963c2b

Browse files
committed
update after sync
1 parent 357b794 commit 5963c2b

File tree

5 files changed

+25
-26
lines changed

5 files changed

+25
-26
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ linux64: $(SQLITE_UNPACKED) jni-header
177177
docker run $(DOCKER_RUN_OPTS) -u "$(BUILDER_UID):$(BUILDER_GID)" -v $$PWD:/work gillena/sqlite-build-env bash -c "make clean-native native OS_NAME=Linux OS_ARCH=x86_64"
178178

179179
freebsd32: $(SQLITE_UNPACKED) jni-header
180-
docker run $(DOCKER_RUN_OPTS) -v $$PWD:/workdir empterdose/freebsd-cross-build:9.3 sh -c 'apk add bash; apk add openjdk8; apk add perl; make clean-native native OS_NAME=FreeBSD OS_ARCH=x86 CROSS_PREFIX=i386-freebsd9-'
180+
docker run $(DOCKER_RUN_OPTS) -v $$PWD:/workdir gotson/freebsd-cross-build:i686-11.4 sh -c 'make clean-native native OS_NAME=FreeBSD OS_ARCH=x86 CROSS_PREFIX=i686-unknown-freebsd11-'
181181

182182
freebsd64: $(SQLITE_UNPACKED) jni-header
183-
docker run $(DOCKER_RUN_OPTS) -v $$PWD:/workdir empterdose/freebsd-cross-build:9.3 sh -c 'apk add bash; apk add openjdk8; apk add perl; make clean-native native OS_NAME=FreeBSD OS_ARCH=x86_64 CROSS_PREFIX=x86_64-freebsd9-'
183+
docker run $(DOCKER_RUN_OPTS) -v $$PWD:/workdir gotson/freebsd-cross-build:x86_64-11.4 sh -c 'make clean-native native OS_NAME=FreeBSD OS_ARCH=x86_64 CROSS_PREFIX=x86_64-unknown-freebsd11-'
184184

185185
freebsd-arm64: $(SQLITE_UNPACKED) jni-header
186186
docker run $(DOCKER_RUN_OPTS) -v $$PWD:/workdir gotson/freebsd-cross-build:aarch64-11.4 sh -c 'make clean-native native OS_NAME=FreeBSD OS_ARCH=aarch64 CROSS_PREFIX=aarch64-unknown-freebsd11-'

src/main/java/org/sqlite/SQLiteConfig.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,17 +219,18 @@ protected void applyPassword(Connection conn, String password) throws SQLExcepti
219219
passwordPragma = "pragma key = '%s'";
220220
}
221221
stat.execute(String.format(passwordPragma, password.replace("'", "''")));
222-
stat.execute("select 1 from sqlite_schema");
222+
stat.execute("select 1 from sqlite_schema");
223223
}
224224
}
225225
}
226226

227227
/**
228228
* Applies the remaining Pragmas.
229229
*
230-
* There are some Pragmas which must be executed before any other Statements/Pragmas.
231-
* See <a href="https://www.mail-archive.com/[email protected]/msg119220.html">https://www.mail-archive.com/[email protected]/msg119220.html</a>
232-
* and <a href="https://www.sqlite.org/pragma.html#pragma_auto_vacuum">https://www.sqlite.org/pragma.html#pragma_auto_vacuum</a>
230+
* <p>There are some Pragmas which must be executed before any other Statements/Pragmas. See <a
231+
* href="https://www.mail-archive.com/[email protected]/msg119220.html">https://www.mail-archive.com/[email protected]/msg119220.html</a>
232+
* and <a
233+
* href="https://www.sqlite.org/pragma.html#pragma_auto_vacuum">https://www.sqlite.org/pragma.html#pragma_auto_vacuum</a>
233234
* Important: PAGE_SIZE must be the first one
234235
*/
235236
protected void applyRemainingPragmas(Connection conn, HashSet<String> pragmaParams)

src/test/java/org/sqlite/BackupTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void memoryToDisk() throws Exception {
100100
Statement stmt = conn.createStatement()) {
101101
stmt.executeUpdate("create table sample(id integer primary key autoincrement, name)");
102102
for (int i = 0; i < 10000; i++) {
103-
stmt.executeUpdate("insert into sample(name) values('leo')");
103+
stmt.executeUpdate("insert into sample(name) values('leo')");
104104
}
105105

106106
File tmpFile = File.createTempFile("backup-test2", ".sqlite", tempDir);

src/test/java/org/sqlite/ConnectionTest.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -476,17 +476,14 @@ public void settingsBeforeDbCreationProperties() throws Exception {
476476
SQLiteConfig.Pragma.AUTO_VACUUM.pragmaName,
477477
SQLiteConfig.AutoVacuum.INCREMENTAL.name());
478478
props.setProperty(
479-
SQLiteConfig.Pragma.ENCODING.pragmaName,
480-
SQLiteConfig.Encoding.UTF_16LE.typeName);
481-
props.setProperty(
482-
Pragma.PAGE_SIZE.pragmaName,
483-
"65536");
484-
props.setProperty(
485-
Pragma.JOURNAL_MODE.pragmaName,
486-
JournalMode.WAL.name());
479+
SQLiteConfig.Pragma.ENCODING.pragmaName, SQLiteConfig.Encoding.UTF_16LE.typeName);
480+
props.setProperty(Pragma.PAGE_SIZE.pragmaName, "65536");
481+
props.setProperty(Pragma.JOURNAL_MODE.pragmaName, JournalMode.WAL.name());
487482

488-
try (Connection conn = DriverManager.getConnection(String.format("jdbc:sqlite:%s", testDB), props);
489-
Statement stat = conn.createStatement()) {
483+
try (Connection conn =
484+
DriverManager.getConnection(
485+
String.format("jdbc:sqlite:%s", testDB), props);
486+
Statement stat = conn.createStatement()) {
490487
try (ResultSet rs = stat.executeQuery("pragma page_size")) {
491488
assertThat(rs.getString(1)).isEqualTo("65536");
492489
}
@@ -507,13 +504,14 @@ public void settingsBeforeDbCreationUrl() throws Exception {
507504
File testDB = File.createTempFile("test.db", "", new File("target"));
508505
testDB.deleteOnExit();
509506

510-
String url = "jdbc:sqlite:%s" +
511-
"?auto_vacuum=INCREMENTAL" +
512-
"&encoding=UTF16le" +
513-
"&page_size=65536" +
514-
"&journal_mode=WAL";
507+
String url =
508+
"jdbc:sqlite:%s"
509+
+ "?auto_vacuum=INCREMENTAL"
510+
+ "&encoding=UTF16le"
511+
+ "&page_size=65536"
512+
+ "&journal_mode=WAL";
515513
try (Connection conn = DriverManager.getConnection(String.format(url, testDB));
516-
Statement stat = conn.createStatement()) {
514+
Statement stat = conn.createStatement()) {
517515
try (ResultSet rs = stat.executeQuery("pragma page_size")) {
518516
assertThat(rs.getString(1)).isEqualTo("65536");
519517
}
@@ -542,7 +540,7 @@ public void settingsBeforeDbCreationConfig() throws Exception {
542540

543541
String url = String.format("jdbc:sqlite:%s", testDB);
544542
try (Connection conn = DriverManager.getConnection(url, config.toProperties());
545-
Statement stat = conn.createStatement()) {
543+
Statement stat = conn.createStatement()) {
546544
try (ResultSet rs = stat.executeQuery("pragma page_size")) {
547545
assertThat(rs.getString(1)).isEqualTo("65536");
548546
}

src/test/java/org/sqlite/mc/SQLiteMCPragmaTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public void settingsBeforeDbCreationMcConfig() throws Exception {
277277
File testDB = File.createTempFile("test.db", "", new File("target"));
278278
testDB.deleteOnExit();
279279

280-
for (boolean useSQLInterface : new boolean[] { true, false }) {
280+
for (boolean useSQLInterface : new boolean[] {true, false}) {
281281
SQLiteMCConfig config =
282282
new SQLiteMCConfig.Builder()
283283
.withKey("abc")
@@ -290,7 +290,7 @@ public void settingsBeforeDbCreationMcConfig() throws Exception {
290290

291291
String url = String.format("jdbc:sqlite:%s", testDB);
292292
try (Connection conn = DriverManager.getConnection(url, config.toProperties());
293-
Statement stat = conn.createStatement()) {
293+
Statement stat = conn.createStatement()) {
294294
try (ResultSet rs = stat.executeQuery("pragma page_size")) {
295295
assertThat(rs.getString(1)).isEqualTo("65536");
296296
}

0 commit comments

Comments
 (0)