Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Merge "Remove AIcu_initializeOrDie call" am: f6f8cf5
Browse files Browse the repository at this point in the history
Original change: https://android-review.googlesource.com/c/platform/external/sqlite/+/1449416

Change-Id: I3f09b51f121f6a24e57d50a2e123110d3b0b67c6
  • Loading branch information
gvictor authored and android-build-merge-worker-robot committed Oct 20, 2020
2 parents fd9ba4f + f6f8cf5 commit c5b4050
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 6 additions & 8 deletions dist/Android.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
--- orig/shell.c 2020-06-15 19:44:34.058537056 +0100
+++ shell.c 2020-06-15 19:44:34.142536089 +0100
@@ -95,6 +95,12 @@
--- orig/shell.c 2020-07-09 13:55:18.598783417 +0100
+++ shell.c 2020-10-06 00:01:10.631859326 +0100
@@ -95,6 +95,11 @@
#endif
#include <ctype.h>
#include <stdarg.h>
+// Begin Android Add
+#ifndef NO_ANDROID_FUNCS
+#include <aicu/AIcu.h>
+#include <sqlite3_android.h>
+#endif
+// End Android Add

#if !defined(_WIN32) && !defined(WIN32)
# include <signal.h>
@@ -12957,6 +12963,23 @@
@@ -12957,6 +12962,22 @@
sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0,
editFunc, 0, 0);
#endif
+
+// Begin Android Add
+#ifndef NO_ANDROID_FUNCS
+ AIcu_initializeIcuOrDie();
+ int err = register_localized_collators(p->db, "en_US", 0);
+ if (err != SQLITE_OK) {
+ fprintf(stderr, "register_localized_collators() failed\n");
Expand All @@ -37,8 +35,8 @@
if( p->openMode==SHELL_OPEN_ZIPFILE ){
char *zSql = sqlite3_mprintf(
"CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename);
--- orig/sqlite3.c 2020-06-15 19:44:34.066536964 +0100
+++ sqlite3.c 2020-06-15 19:44:34.166535813 +0100
--- orig/sqlite3.c 2020-07-09 13:55:18.706784068 +0100
+++ sqlite3.c 2020-07-09 13:55:18.814784719 +0100
@@ -33395,6 +33395,10 @@
# include <sys/mount.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions dist/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ typedef unsigned char u8;
#include <stdarg.h>
// Begin Android Add
#ifndef NO_ANDROID_FUNCS
#include <aicu/AIcu.h>
#include <sqlite3_android.h>
#endif
// End Android Add
Expand Down Expand Up @@ -12966,7 +12965,6 @@ static void open_db(ShellState *p, int openFlags){

// Begin Android Add
#ifndef NO_ANDROID_FUNCS
AIcu_initializeIcuOrDie();
int err = register_localized_collators(p->db, "en_US", 0);
if (err != SQLITE_OK) {
fprintf(stderr, "register_localized_collators() failed\n");
Expand Down

0 comments on commit c5b4050

Please sign in to comment.