litesuits / litesuits/android-lite-orm
我在魅族m2 note上面发现一个很严重的问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
只有在此机型的最新系统上面有,flyme 5.1.6,其它机型没有问题,报错如下:
android.database.sqlite.SQLiteException: near ",": syntax error (code 1): , while compiling: CREATE TABLE IF NOT EXISTS address(id INTEGER PRIMARY KEY AUTOINCREMENT ,city TEXT NOT NULL DEFAULT ,isDefault TEXT NOT NULL DEFAULT false ,locationInfo TEXT NOT NULL ,mobile TEXT NOT NULL ,name TEXT NOT NULL )
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:898)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:509)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31)
06-16 18:08:11.192 20224-21214/? W/System.err: at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1024)
06-16 18:08:11.192 20224-21214/? W/System.err: at com
.....
android.database.sqlite.SQLiteException: no such table: address (code 1): , while compiling: REPLACE INTO address(id,city,isDefault,locationInfo,mobile,name)VALUES(?,?,?,?,?,?)
06-16 18:08:11.194 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
06-16 18:08:11.194 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:898)
06-16 18:08:11.195 20224-21214/? W/System.err: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:509)
06-16 18:08:11.195 20224-21214/? W/System.err: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
06-16 18:08:11.195 20224-21214/? W/System.err: at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
06-16 18:08:11.195 20224-21214/? W/System.err: at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31)
06-16 18:08:11.195 20224-21214/? W/System.err: at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1024)
06-16 18:08:11.195 20224-21214/? W/System.err: at com.litesuits.orm.db.assit.SQLStatement.execInsertWithMapping(SQLStatement.java:102)
06-16 18:08:11.195 20224-21214/? W/System.err: at com.litesuits.orm.db.assit.SQLStatement.execInsert(SQLStatement.java:93)
06-16 18:08:11.195 20224-21214/? W/System.err: at com.litesuits.orm.db.impl.SingleSQLiteImpl.save(SingleSQLiteImpl.java:58)
06-16 18:08:11.195 20224-21214/? W/System.err: at me.liutaw.data.repository.UserRepostitoryImpl$3.call(UserRepostitoryImpl.java:105)
06-16 18:08:11.195 20224-21214/? W/System.err: at me.liutaw.data.repository.UserRepostitoryImpl$3.call(UserRepostitoryImpl.java:93)
06-16 18:08:11.195 20224-21214/? W/System.err: at rx.Observable.unsafeSubscribe(Observable.java:8098)
06-16 18:08:11.195 20224-21214/? W/System.err: at rx.internal.operators.OperatorSubscribeOn$1$1.call(OperatorSubscribeOn.java:62)
06-16 18:08:11.195 20224-21214/? W/System.err: at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
06-16 18:08:11.195 20224-21214/? W/System.err: at rx.schedulers.ExecutorScheduler$ExecutorSchedulerWorker.run(ExecutorScheduler.java:98)
06-16 18:08:11.195 20224-21214/? W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-16 18:08:11.195 20224-21214/? W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-16 18:08:11.195 20224-21214/? W/System.err: at java.lang.Thread.run(Thread.java:818)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SQLStatement.java at execInsertWithMapping and the table-creation SQL shown in the report; compare the generated CREATE TABLE statement with the failing SQLite syntax on Flyme 5.1.6. Trace the call through SingleSQLiteImpl.java and UserRepostitoryImpl.java, then verify that the address table is created successfully before the REPLACE operation runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sqlite
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100