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

Error: incomplete SQL #22

Open
dberci opened this issue Feb 20, 2020 · 2 comments
Open

Error: incomplete SQL #22

dberci opened this issue Feb 20, 2020 · 2 comments

Comments

@dberci
Copy link

dberci commented Feb 20, 2020

Hello,

When running this, i am getting a bunch of invalid SQL errors. I suspect the remaining errors are because the tables were not created. The output is:

[Wed Feb 19 21:28:34 MST 2020] Starting.
[Wed Feb 19 21:28:34 MST 2020] Stopping Plex on Server 1... Done
[Wed Feb 19 21:28:34 MST 2020] Stopping Plex on Server 2... Done
[Wed Feb 19 21:28:38 MST 2020] Checking for changes... Found
Error: incomplete SQL: CREATE TABLE "metadata_item_settings1" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "guid" varchar(255), "rating" float, "view_offset" integer, "view_count" integer, "last_viewed_at" datetime, "created_at" datetime, "updated_at" datetime, "skip_count" integer DEFAULT 0, "last_skipped_at" datetime DEFAULT NULL, "changed_at" integer(8) DEFAULT 0, 'extra_data' varchar(255), 'last_rated_at' datetime)
Error: incomplete SQL: CREATE TABLE "metadata_item_settings2" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "guid" varchar(255), "rating" float, "view_offset" integer, "view_count" integer, "last_viewed_at" datetime, "created_at" datetime, "updated_at" datetime, "skip_count" integer DEFAULT 0, "last_skipped_at" datetime DEFAULT NULL, "changed_at" integer(8) DEFAULT 0, 'extra_data' varchar(255), 'last_rated_at' datetime)
Error: incomplete SQL: CREATE TABLE "metadata_items1" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "library_section_id" integer, "parent_id" integer, "metadata_type" integer, "guid" varchar(255), "media_item_count" integer, "title" varchar(255), "title_sort" varchar(255) COLLATE NOCASE, "original_title" varchar(255), "studio" varchar(255), "rating" float, "rating_count" integer, "tagline" varchar(255), "summary" text, "trivia" text, "quotes" text, "content_rating" varchar(255), "content_rating_age" integer, "index" integer, "absolute_index" integer, "duration" integer, "user_thumb_url" varchar(255), "user_art_url" varchar(255), "user_banner_url" varchar(255), "user_music_url" varchar(255), "user_fields" varchar(255), "tags_genre" varchar(255), "tags_collection" varchar(255), "tags_director" varchar(255), "tags_writer" varchar(255), "tags_star" varchar(255), "originally_available_at" datetime, "available_at" datetime, "expires_at" datetime, "refreshed_at" datetime, "year" integer, "added_at" datetime, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, "tags_country" varchar(255), "extra_data" varchar(255), "hash" varchar(255), "audience_rating" float, "changed_at" integer(8) DEFAULT 0, "resources_changed_at" integer(8) DEFAULT 0, 'remote' integer)
Error: incomplete SQL: CREATE TABLE "metadata_items2" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "library_section_id" integer, "parent_id" integer, "metadata_type" integer, "guid" varchar(255), "media_item_count" integer, "title" varchar(255), "title_sort" varchar(255) COLLATE NOCASE, "original_title" varchar(255), "studio" varchar(255), "rating" float, "rating_count" integer, "tagline" varchar(255), "summary" text, "trivia" text, "quotes" text, "content_rating" varchar(255), "content_rating_age" integer, "index" integer, "absolute_index" integer, "duration" integer, "user_thumb_url" varchar(255), "user_art_url" varchar(255), "user_banner_url" varchar(255), "user_music_url" varchar(255), "user_fields" varchar(255), "tags_genre" varchar(255), "tags_collection" varchar(255), "tags_director" varchar(255), "tags_writer" varchar(255), "tags_star" varchar(255), "originally_available_at" datetime, "available_at" datetime, "expires_at" datetime, "refreshed_at" datetime, "year" integer, "added_at" datetime, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, "tags_country" varchar(255), "extra_data" varchar(255), "hash" varchar(255), "audience_rating" float, "changed_at" integer(8) DEFAULT 0, "resources_changed_at" integer(8) DEFAULT 0, 'remote' integer)
Error: incomplete SQL: CREATE TABLE "taggings1" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "metadata_item_id" integer, "tag_id" integer, "index" integer, "text" varchar(255), "time_offset" integer, "end_time_offset" integer, "thumb_url" varchar(255), "created_at" datetime, "extra_data" varchar(255))
Error: incomplete SQL: CREATE TABLE "taggings2" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "metadata_item_id" integer, "tag_id" integer, "index" integer, "text" varchar(255), "time_offset" integer, "end_time_offset" integer, "thumb_url" varchar(255), "created_at" datetime, "extra_data" varchar(255))
Error: incomplete SQL: CREATE TABLE "tags1" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "metadata_item_id" integer, "tag" varchar(255) COLLATE NOCASE, "tag_type" integer, "user_thumb_url" varchar(255), "user_art_url" varchar(255), "user_music_url" varchar(255), "created_at" datetime, "updated_at" datetime, "tag_value" integer, "extra_data" varchar(255), 'key' varchar(255), 'parent_id' integer)
Error: incomplete SQL: CREATE TABLE "tags2" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "metadata_item_id" integer, "tag" varchar(255) COLLATE NOCASE, "tag_type" integer, "user_thumb_url" varchar(255), "user_art_url" varchar(255), "user_music_url" varchar(255), "created_at" datetime, "updated_at" datetime, "tag_value" integer, "extra_data" varchar(255), 'key' varchar(255), 'parent_id' integer)
Error: near line 1: no such table: tmpdb.metadata_item_settings1
Error: near line 1: no such table: tmpdb.metadata_item_settings2
[Wed Feb 19 21:28:38 MST 2020] Processing tags...
Error: no such table: taggings1
Error: no such table: taggings1
Error: no such table: taggings2
Error: no such table: taggings2
[Wed Feb 19 21:28:38 MST 2020] Processing for (0)...
[Wed Feb 19 21:28:38 MST 2020] - Checking records that are in both databases
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 2
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 1
Error: no such table: metadata_item_settings2
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] Processing for REMOVED (REMOVED)...
[Wed Feb 19 21:28:38 MST 2020] - Checking records that are in both databases
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 2
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 1
Error: no such table: metadata_item_settings2
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] Processing for REMOVED (REMOVED)...
[Wed Feb 19 21:28:38 MST 2020] - Checking records that are in both databases
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 2
Error: no such table: metadata_item_settings1
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 2 status for:
[Wed Feb 19 21:28:38 MST 2020] - Checking records missing from server 1
Error: no such table: metadata_item_settings2
[Wed Feb 19 21:28:38 MST 2020] - (0/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (1/3) Setting server 1 status for:
[Wed Feb 19 21:28:38 MST 2020] - (2/3) Setting server 1 status for:
[Wed Feb 19 21:28:39 MST 2020] (DRY RUN) Applying DB changes to /mnt/sshfs/com.plexapp.plugins.library.db...
[Wed Feb 19 21:28:39 MST 2020] (DRY RUN) Applying DB changes to REMOVED/com.plexapp.plugins.library.db...
[Wed Feb 19 21:28:42 MST 2020] Starting Plex on Server 1... Done
[Wed Feb 19 21:28:42 MST 2020] Starting Plex on Server 2... Done
[Wed Feb 19 21:28:42 MST 2020] Finished.

@maxGreenblatt
Copy link

Hey @dberci I know it's been a while, but did you ever figure the issue here?

@pooley182
Copy link

I know this thread is now 2 years old, but this issue with an 'incomplete SQL' error is caused by using an out of date version of sqlite3.

To resolve this issue you can install a new version of sqlite3 from source.

wget https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
tar zxvf sqlite-autoconf-3380500.tar.gz
cd sqlite-autoconf-3380500
./configure
make
sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants