sync update

pull/41/head
Laurent Cozic 2017-07-01 13:12:00 +01:00
parent bca694afeb
commit 2ccb00b147
11 changed files with 1346 additions and 20 deletions

View File

@ -11,11 +11,16 @@ const fs = require('fs-extra');
const baseDir = '/var/www/joplin/CliClient/tests/fuzzing';
const syncDir = baseDir + '/sync';
const joplinAppPath = __dirname + '/main.js';
let syncDurations = [];
const logger = new Logger();
logger.addTarget('console');
logger.setLevel(Logger.LEVEL_DEBUG);
process.on('unhandledRejection', (reason, p) => {
console.error('Unhandled promise rejection', p, 'reason:', reason);
});
function createClient(id) {
return {
'id': id,
@ -48,14 +53,17 @@ function randomWord() {
return randomElement(words);
}
function execCommand(client, command) {
function execCommand(client, command, options = {}) {
let exePath = 'node ' + joplinAppPath;
let cmd = exePath + ' --profile ' + client.profileDir + ' ' + command;
//logger.info(cmd.substr(exePath.length + 1));
logger.info(cmd);
if (options.killAfter) {
logger.info('Kill after: ' + options.killAfter);
}
return new Promise((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
let childProcess = exec(cmd, (error, stdout, stderr) => {
if (error) {
logger.error(stderr);
reject(error);
@ -63,6 +71,14 @@ function execCommand(client, command) {
resolve(stdout);
}
});
if (options.killAfter) {
setTimeout(() => {
if (!childProcess.connected) return;
logger.info('Sending kill signal...');
childProcess.kill();
}, options.killAfter);
}
});
}
@ -77,14 +93,23 @@ async function execRandomCommand(client) {
if (!item) return;
if (item.type_ == 1) {
await execCommand(client, 'rm -f ' + item.title);
return execCommand(client, 'rm -f ' + item.title);
} else if (item.type_ == 2) {
await execCommand(client, 'rm -f ' + '../' + item.title);
return execCommand(client, 'rm -f ' + '../' + item.title);
} else {
throw new Error('Unknown type: ' + item.type_);
}
}, 40],
['sync', 10],
}, 80],
[async () => {
let avgSyncDuration = averageSyncDuration();
let options = {};
if (!isNaN(avgSyncDuration)) {
if (Math.random() >= 0.5) {
options.killAfter = avgSyncDuration * Math.random();
}
}
return execCommand(client, 'sync', options);
}, 10],
];
let cmd = null;
@ -104,12 +129,64 @@ async function execRandomCommand(client) {
}
}
function averageSyncDuration() {
return lodash.mean(syncDurations);
}
function randomNextCheckTime() {
let output = time.unixMs() + 1000 + Math.random() * 1000 * 10;
let output = time.unixMs() + 1000 + Math.random() * 1000 * 2;
logger.info('Next sync check: ' + time.unixMsToIso(output) + ' (' + (Math.round((output - time.unixMs()) / 1000)) + ' sec.)');
return output;
}
function findItem(items, itemId) {
for (let i = 0; i < items.length; i++) {
if (items[i].id == itemId) return items[i];
}
return null;
}
function compareItems(item1, item2) {
let output = [];
for (let n in item1) {
if (!item1.hasOwnProperty(n)) continue;
if (n == 'sync_time') continue;
let p1 = item1[n];
let p2 = item2[n];
if (p1 !== p2) output.push(n);
}
return output;
}
function findMissingItems_(items1, items2) {
let output = [];
for (let i = 0; i < items1.length; i++) {
let item1 = items1[i];
let found = false;
for (let j = 0; j < items2.length; j++) {
let item2 = items2[j];
if (item1.id == item2.id) {
found = true;
break;
}
}
if (!found) {
output.push(item1);
}
}
return output;
}
function findMissingItems(items1, items2) {
return [
findMissingItems_(items1, items2),
findMissingItems_(items2, items1),
];
}
async function compareClientItems(clientItems) {
let itemCounts = [];
for (let i = 0; i < clientItems.length; i++) {
@ -117,19 +194,52 @@ async function compareClientItems(clientItems) {
itemCounts.push(items.length);
}
logger.info('Item count: ' + itemCounts.join(', '));
let r = lodash.uniq(itemCounts);
if (r.length > 1) {
let missingItems = findMissingItems(clientItems[0], clientItems[1]);
if (missingItems[0].length || missingItems[1].length) {
logger.error('Item count is different');
logger.error(missingItems);
process.exit(1);
}
await time.sleep(2); // Let the logger finish writing
// let r = lodash.uniq(itemCounts);
// if (r.length > 1) {
// logger.error('Item count is different');
// process.exit(1);
// }
let differences = [];
let items = clientItems[0];
for (let i = 0; i < items.length; i++) {
let item1 = items[i];
for (let clientId = 1; clientId < clientItems.length; clientId++) {
let item2 = findItem(clientItems[clientId], item1.id);
if (!item2) {
logger.error('Item not found on client ' + clientId + ':');
logger.error(item1);
process.exit(1);
}
let diff = compareItems(item1, item2);
if (diff.length) {
differences.push({
item1: item1,
item2: item2,
});
}
}
}
if (differences.length) {
logger.error('Found differences between items:');
logger.error(differences);
process.exit(1);
}
}
async function main(argv) {
await fs.remove(syncDir);
let clients = await createClients();
let activeCommandCounts = [];
let clientId = 0;
@ -164,12 +274,18 @@ async function main(argv) {
if (state == 'syncCheck') {
state = 'waitForSyncCheck';
let clientItems = [];
// In order for all the clients to send their items and get those from the other
// clients, they need to perform 2 sync.
for (let loopCount = 0; loopCount < 2; loopCount++) {
// Up to 3 sync operations must be performed by each clients in order for them
// to be perfectly in sync - in order for each items to send their changes
// and get those from the other clients, and to also get changes that are
// made as a result of a sync operation (eg. renaming a folder that conflicts
// with another one).
for (let loopCount = 0; loopCount < 3; loopCount++) {
for (let i = 0; i < clients.length; i++) {
let beforeTime = time.unixMs();
await execCommand(clients[i], 'sync');
if (loopCount === 1) {
syncDurations.push(time.unixMs() - beforeTime);
if (syncDurations.length > 20) syncDurations.splice(0, 1);
if (loopCount === 2) {
let dump = await execCommand(clients[i], 'dump');
clientItems[i] = JSON.parse(dump);
}
@ -205,4 +321,6 @@ async function main(argv) {
}, 100);
}
main(process.argv);
main(process.argv).catch((error) => {
logger.error(error);
});

View File

@ -264,7 +264,6 @@ commands.push({
let folder = folders[i];
let notes = await Note.previews(folder.id);
items.push(folder);
console.info(folder.title);
items = items.concat(notes);
}
@ -811,7 +810,6 @@ async function main() {
let cmd = shellArgsToString(argv);
await vorpal.exec(cmd);
await vorpal.exec('exit');
await time.sleep(1); // Let loggers finish writing
return;
} else {
vorpal.delimiter(promptString()).show();

3
CliClient/fuzzing.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
set -e
./build.sh && NODE_PATH="build/" node build/fuzzing.js

View File

@ -0,0 +1,470 @@
2017-07-01 13:09:29: Database was open successfully
2017-07-01 13:09:29: Checking for database schema update...
2017-07-01 13:09:29: SELECT * FROM version LIMIT 1
2017-07-01 13:09:29: Database is new - creating the schema...
2017-07-01 13:09:29: BEGIN TRANSACTION
2017-07-01 13:09:29: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL DEFAULT 0, updated_time INT NOT NULL DEFAULT 0, sync_time INT NOT NULL DEFAULT 0);
2017-07-01 13:09:29: CREATE INDEX folders_title ON folders (title);
2017-07-01 13:09:29: CREATE INDEX folders_updated_time ON folders (updated_time);
2017-07-01 13:09:29: CREATE INDEX folders_sync_time ON folders (sync_time);
2017-07-01 13:09:29: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL DEFAULT 0, updated_time INT NOT NULL DEFAULT 0, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0);
2017-07-01 13:09:29: CREATE INDEX notes_title ON notes (title);
2017-07-01 13:09:29: CREATE INDEX notes_updated_time ON notes (updated_time);
2017-07-01 13:09:29: CREATE INDEX notes_sync_time ON notes (sync_time);
2017-07-01 13:09:29: CREATE INDEX notes_is_conflict ON notes (is_conflict);
2017-07-01 13:09:29: CREATE INDEX notes_is_todo ON notes (is_todo);
2017-07-01 13:09:29: CREATE INDEX notes_order ON notes (`order`);
2017-07-01 13:09:29: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL);
2017-07-01 13:09:29: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT, created_time INT, updated_time INT);
2017-07-01 13:09:29: CREATE TABLE note_tags ( id INTEGER PRIMARY KEY, note_id TEXT, tag_id TEXT);
2017-07-01 13:09:29: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT, mime TEXT, filename TEXT, created_time INT, updated_time INT);
2017-07-01 13:09:29: CREATE TABLE note_resources ( id INTEGER PRIMARY KEY, note_id TEXT, resource_id TEXT);
2017-07-01 13:09:29: CREATE TABLE version ( version INT);
2017-07-01 13:09:29: CREATE TABLE changes ( id INTEGER PRIMARY KEY, `type` INT, item_id TEXT, item_type INT, item_field TEXT);
2017-07-01 13:09:29: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT);
2017-07-01 13:09:29: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT);
2017-07-01 13:09:29: CREATE TABLE item_sync_times ( id INTEGER PRIMARY KEY, item_id TEXT, `time` INT);
2017-07-01 13:09:29: INSERT INTO version (version) VALUES (1);
2017-07-01 13:09:29: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "5d327ad5ac5546ad9826dd8f1d754e52", "2")
2017-07-01 13:09:29: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["68cba53569c84bfbad79eee85402160b","Notebook",1498910969401,1498910969401]
2017-07-01 13:09:29: COMMIT
2017-07-01 13:09:29: Database schema created successfully
2017-07-01 13:09:29: Initializing tables...
2017-07-01 13:09:29: SELECT name FROM sqlite_master WHERE type="table"
2017-07-01 13:09:29: PRAGMA table_info("folders")
2017-07-01 13:09:29: PRAGMA table_info("notes")
2017-07-01 13:09:29: PRAGMA table_info("deleted_items")
2017-07-01 13:09:29: PRAGMA table_info("tags")
2017-07-01 13:09:29: PRAGMA table_info("note_tags")
2017-07-01 13:09:29: PRAGMA table_info("resources")
2017-07-01 13:09:29: PRAGMA table_info("note_resources")
2017-07-01 13:09:29: PRAGMA table_info("version")
2017-07-01 13:09:29: PRAGMA table_info("changes")
2017-07-01 13:09:29: PRAGMA table_info("settings")
2017-07-01 13:09:29: PRAGMA table_info("item_sync_times")
2017-07-01 13:09:29: BEGIN TRANSACTION
2017-07-01 13:09:29: DELETE FROM table_fields
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","id",2,null]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","parent_id",2,""]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","title",2,""]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","created_time",1,"0"]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","updated_time",1,"0"]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["folders","sync_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","parent_id",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","title",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","body",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","created_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","updated_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","sync_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","is_conflict",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","latitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","longitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","altitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","author",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source_url",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","is_todo",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","todo_due",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","todo_completed",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source_application",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","application_data",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","order",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","item_type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","deleted_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","title",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","created_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","updated_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","note_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","tag_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","title",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","mime",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","filename",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","created_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","updated_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","note_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","resource_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["version","version",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_field",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","key",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","value",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","time",1,null]
2017-07-01 13:09:30: COMMIT
2017-07-01 13:09:30: Checking for database schema update...
2017-07-01 13:09:30: SELECT * FROM version LIMIT 1
2017-07-01 13:09:30: Current database version
2017-07-01 13:09:30: SELECT * FROM table_fields
2017-07-01 13:09:30: SELECT * FROM settings
2017-07-01 13:09:30: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:30: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:30: ["Notebook"]
2017-07-01 13:09:30: Saving settings...
2017-07-01 13:09:30: BEGIN TRANSACTION
2017-07-01 13:09:30: DELETE FROM settings
2017-07-01 13:09:30: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["clientId","5d327ad5ac5546ad9826dd8f1d754e52",2]
2017-07-01 13:09:30: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["68cba53569c84bfbad79eee85402160b","string","activeFolderId"]
2017-07-01 13:09:30: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["local","string","sync.target"]
2017-07-01 13:09:30: COMMIT
2017-07-01 13:09:30: Settings have been saved.
2017-07-01 13:09:31: Database was open successfully
2017-07-01 13:09:31: Checking for database schema update...
2017-07-01 13:09:32: SELECT * FROM version LIMIT 1
2017-07-01 13:09:32: Current database version
2017-07-01 13:09:32: SELECT * FROM table_fields
2017-07-01 13:09:32: SELECT * FROM settings
2017-07-01 13:09:32: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:32: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:32: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:32: ["Notebook"]
2017-07-01 13:09:32: Saving settings...
2017-07-01 13:09:32: BEGIN TRANSACTION
2017-07-01 13:09:32: DELETE FROM settings
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["clientId","5d327ad5ac5546ad9826dd8f1d754e52",2]
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["activeFolderId","68cba53569c84bfbad79eee85402160b","string"]
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["sync.target","local","string"]
2017-07-01 13:09:32: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["/var/www/joplin/CliClient/tests/fuzzing/sync","string","sync.local.path"]
2017-07-01 13:09:32: COMMIT
2017-07-01 13:09:32: Settings have been saved.
2017-07-01 13:09:33: Database was open successfully
2017-07-01 13:09:33: Checking for database schema update...
2017-07-01 13:09:33: SELECT * FROM version LIMIT 1
2017-07-01 13:09:33: Current database version
2017-07-01 13:09:33: SELECT * FROM table_fields
2017-07-01 13:09:33: SELECT * FROM settings
2017-07-01 13:09:33: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:33: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:33: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:33: ["Notebook"]
2017-07-01 13:09:33: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?)
2017-07-01 13:09:33: ["68cba53569c84bfbad79eee85402160b","smash","joplin","net.cozic.joplin-cli",1498910973758,"351b927410b541e1a6d1a2a88ef7d1c0",1498910973758]
2017-07-01 13:09:34: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:34: ["351b927410b541e1a6d1a2a88ef7d1c0"]
2017-07-01 13:09:35: Database was open successfully
2017-07-01 13:09:35: Checking for database schema update...
2017-07-01 13:09:35: SELECT * FROM version LIMIT 1
2017-07-01 13:09:35: Current database version
2017-07-01 13:09:35: SELECT * FROM table_fields
2017-07-01 13:09:35: SELECT * FROM settings
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:35: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:35: ["Notebook"]
2017-07-01 13:09:35: SELECT * FROM `folders`
2017-07-01 13:09:35: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:35: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:36: Database was open successfully
2017-07-01 13:09:36: Checking for database schema update...
2017-07-01 13:09:36: SELECT * FROM version LIMIT 1
2017-07-01 13:09:36: Current database version
2017-07-01 13:09:36: SELECT * FROM table_fields
2017-07-01 13:09:36: SELECT * FROM settings
2017-07-01 13:09:36: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:36: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:36: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:36: ["Notebook"]
2017-07-01 13:09:36: SELECT * FROM `notes` WHERE `title` = ?
2017-07-01 13:09:36: ["smash"]
2017-07-01 13:09:36: DELETE FROM notes WHERE id = ?
2017-07-01 13:09:36: ["351b927410b541e1a6d1a2a88ef7d1c0"]
2017-07-01 13:09:37: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?)
2017-07-01 13:09:37: [1,"351b927410b541e1a6d1a2a88ef7d1c0",1498910977016]
2017-07-01 13:09:38: Database was open successfully
2017-07-01 13:09:38: Checking for database schema update...
2017-07-01 13:09:38: SELECT * FROM version LIMIT 1
2017-07-01 13:09:38: Current database version
2017-07-01 13:09:38: SELECT * FROM table_fields
2017-07-01 13:09:38: SELECT * FROM settings
2017-07-01 13:09:38: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:38: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:38: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:38: ["Notebook"]
2017-07-01 13:09:38: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:38: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:38: [null]
2017-07-01 13:09:38: UPDATE `folders` SET `sync_time`=? WHERE id=?
2017-07-01 13:09:38: [1498910978678,"68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:38: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:38: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:38: SELECT * FROM deleted_items
2017-07-01 13:09:38: DELETE FROM deleted_items WHERE item_id = ?
2017-07-01 13:09:38: ["351b927410b541e1a6d1a2a88ef7d1c0"]
2017-07-01 13:09:39: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:39: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:39: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:39: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:39: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:39: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:39: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:39: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:42: Database was open successfully
2017-07-01 13:09:42: Checking for database schema update...
2017-07-01 13:09:42: SELECT * FROM version LIMIT 1
2017-07-01 13:09:42: Current database version
2017-07-01 13:09:42: SELECT * FROM table_fields
2017-07-01 13:09:42: SELECT * FROM settings
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:42: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:42: ["Notebook"]
2017-07-01 13:09:42: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:42: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:42: SELECT * FROM deleted_items
2017-07-01 13:09:42: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:42: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:42: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:42: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:42: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:42: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:42: ["Notebook"]
2017-07-01 13:09:42: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:42: ["Notebook-1498910969408-979"]
2017-07-01 13:09:42: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?)
2017-07-01 13:09:42: ["7711fd1e399e4219ba8f5f9e9eeefb16","Notebook-1498910969408-979","1498910969408",1498910982544,1498910982542]
2017-07-01 13:09:42: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:42: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:42: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:42: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:45: Database was open successfully
2017-07-01 13:09:45: Checking for database schema update...
2017-07-01 13:09:45: SELECT * FROM version LIMIT 1
2017-07-01 13:09:45: Current database version
2017-07-01 13:09:45: SELECT * FROM table_fields
2017-07-01 13:09:45: SELECT * FROM settings
2017-07-01 13:09:45: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:45: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:45: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:45: ["Notebook"]
2017-07-01 13:09:45: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:45: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:45: [null]
2017-07-01 13:09:45: UPDATE `folders` SET `sync_time`=? WHERE id=?
2017-07-01 13:09:45: [1498910985838,"7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:45: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:45: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:46: SELECT * FROM deleted_items
2017-07-01 13:09:46: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:46: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:46: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:46: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:46: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:46: ["Notebook-1498910969401-461"]
2017-07-01 13:09:46: UPDATE `folders` SET `title`=?, `created_time`=?, `updated_time`=?, `sync_time`=? WHERE id=?
2017-07-01 13:09:46: ["Notebook-1498910969401-461","1498910969401","1498910980801",1498910986033,"68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:46: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:46: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:46: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:46: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:46: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:46: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:46: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:46: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:47: Database was open successfully
2017-07-01 13:09:47: Checking for database schema update...
2017-07-01 13:09:47: SELECT * FROM version LIMIT 1
2017-07-01 13:09:47: Current database version
2017-07-01 13:09:47: SELECT * FROM table_fields
2017-07-01 13:09:47: SELECT * FROM settings
2017-07-01 13:09:47: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:47: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:47: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:47: ["Notebook-1498910969401-461"]
2017-07-01 13:09:47: SELECT * FROM `folders`
2017-07-01 13:09:47: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:47: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:47: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:47: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:52: Database was open successfully
2017-07-01 13:09:52: Checking for database schema update...
2017-07-01 13:09:52: SELECT * FROM version LIMIT 1
2017-07-01 13:09:52: Current database version
2017-07-01 13:09:52: SELECT * FROM table_fields
2017-07-01 13:09:52: SELECT * FROM settings
2017-07-01 13:09:52: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:52: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:52: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:52: ["Notebook-1498910969401-461"]
2017-07-01 13:09:52: SELECT * FROM `folders`
2017-07-01 13:09:52: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:52: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:52: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:52: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:53: Database was open successfully
2017-07-01 13:09:53: Checking for database schema update...
2017-07-01 13:09:53: SELECT * FROM version LIMIT 1
2017-07-01 13:09:53: Current database version
2017-07-01 13:09:53: SELECT * FROM table_fields
2017-07-01 13:09:53: SELECT * FROM settings
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:53: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:53: ["Notebook-1498910969401-461"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:53: ["Notebook-1498910969401-461"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:53: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:53: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:53: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ?
2017-07-01 13:09:53: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:53: DELETE FROM folders WHERE id = ?
2017-07-01 13:09:53: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:53: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?)
2017-07-01 13:09:53: [2,"68cba53569c84bfbad79eee85402160b",1498910993916]
2017-07-01 13:09:54: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:55: Database was open successfully
2017-07-01 13:09:55: Checking for database schema update...
2017-07-01 13:09:55: SELECT * FROM version LIMIT 1
2017-07-01 13:09:55: Current database version
2017-07-01 13:09:55: SELECT * FROM table_fields
2017-07-01 13:09:55: SELECT * FROM settings
2017-07-01 13:09:55: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:55: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:55: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:55: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:55: ["Notebook-1498910969408-979"]
2017-07-01 13:09:55: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:55: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:55: SELECT * FROM deleted_items
2017-07-01 13:09:55: DELETE FROM deleted_items WHERE item_id = ?
2017-07-01 13:09:55: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:55: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:55: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:55: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:55: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:55: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:55: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:55: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:55: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:58: Database was open successfully
2017-07-01 13:09:58: Checking for database schema update...
2017-07-01 13:09:58: SELECT * FROM version LIMIT 1
2017-07-01 13:09:58: Current database version
2017-07-01 13:09:58: SELECT * FROM table_fields
2017-07-01 13:09:58: SELECT * FROM settings
2017-07-01 13:09:58: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:58: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:58: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:58: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:58: ["Notebook-1498910969408-979"]
2017-07-01 13:09:58: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:58: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:58: SELECT * FROM deleted_items
2017-07-01 13:09:58: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:58: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:58: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:58: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:58: SELECT count(*) as total FROM `folders`
2017-07-01 13:10:01: Database was open successfully
2017-07-01 13:10:01: Checking for database schema update...
2017-07-01 13:10:01: SELECT * FROM version LIMIT 1
2017-07-01 13:10:01: Current database version
2017-07-01 13:10:01: SELECT * FROM table_fields
2017-07-01 13:10:01: SELECT * FROM settings
2017-07-01 13:10:01: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:01: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:10:01: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:10:01: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:10:01: ["Notebook-1498910969408-979"]
2017-07-01 13:10:01: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:10:01: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:10:01: SELECT * FROM deleted_items
2017-07-01 13:10:01: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:10:01: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:10:01: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:01: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:10:01: SELECT count(*) as total FROM `folders`
2017-07-01 13:10:02: Database was open successfully
2017-07-01 13:10:02: Checking for database schema update...
2017-07-01 13:10:02: SELECT * FROM version LIMIT 1
2017-07-01 13:10:02: Current database version
2017-07-01 13:10:02: SELECT * FROM table_fields
2017-07-01 13:10:02: SELECT * FROM settings
2017-07-01 13:10:02: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:02: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:10:02: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:10:02: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:10:02: ["Notebook-1498910969408-979"]
2017-07-01 13:10:02: SELECT * FROM `folders`
2017-07-01 13:10:02: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:10:02: ["7711fd1e399e4219ba8f5f9e9eeefb16"]

View File

@ -0,0 +1,92 @@
2017-07-01 13:09:38: Starting synchronization... [1498910978635]
2017-07-01 13:09:38: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 68cba53569c84bfbad79eee85402160b, "Notebook")
2017-07-01 13:09:38: Sync: deleteRemote: local has been deleted: (Remote 351b927410b541e1a6d1a2a88ef7d1c0)
2017-07-01 13:09:39: Synchronization complete [1498910978635]:
2017-07-01 13:09:39: remotesToUpdate: 1
2017-07-01 13:09:39: remotesToDelete: 1
2017-07-01 13:09:39: localsToUdpate: -
2017-07-01 13:09:39: localsToDelete: -
2017-07-01 13:09:39: createLocal: -
2017-07-01 13:09:39: updateLocal: -
2017-07-01 13:09:39: deleteLocal: -
2017-07-01 13:09:39: createRemote: 1
2017-07-01 13:09:39: updateRemote: -
2017-07-01 13:09:39: deleteRemote: 1
2017-07-01 13:09:39: folderConflict: -
2017-07-01 13:09:39: noteConflict: -
2017-07-01 13:09:39: Total folders: 1
2017-07-01 13:09:39: Total notes: 0
2017-07-01 13:09:42: Starting synchronization... [1498910982477]
2017-07-01 13:09:42: Sync: createLocal: remote exists but local does not: (Remote 7711fd1e399e4219ba8f5f9e9eeefb16, "Notebook")
2017-07-01 13:09:42: Synchronization complete [1498910982477]:
2017-07-01 13:09:42: remotesToUpdate: -
2017-07-01 13:09:42: remotesToDelete: -
2017-07-01 13:09:42: localsToUdpate: 1
2017-07-01 13:09:42: localsToDelete: -
2017-07-01 13:09:42: createLocal: 1
2017-07-01 13:09:42: updateLocal: -
2017-07-01 13:09:42: deleteLocal: -
2017-07-01 13:09:42: createRemote: -
2017-07-01 13:09:42: updateRemote: -
2017-07-01 13:09:42: deleteRemote: -
2017-07-01 13:09:42: folderConflict: -
2017-07-01 13:09:42: noteConflict: -
2017-07-01 13:09:42: Total folders: 2
2017-07-01 13:09:42: Total notes: 0
2017-07-01 13:09:45: Starting synchronization... [1498910985800]
2017-07-01 13:09:45: Sync: updateRemote: local has changes: (Local 7711fd1e399e4219ba8f5f9e9eeefb16, "Notebook-1498910969408-979"): (Remote )
2017-07-01 13:09:46: Sync: updateLocal: remote is more recent than local: (Local 68cba53569c84bfbad79eee85402160b, "Notebook"): (Remote 68cba53569c84bfbad79eee85402160b, "Notebook-1498910969401-461")
2017-07-01 13:09:46: Synchronization complete [1498910985800]:
2017-07-01 13:09:46: remotesToUpdate: 1
2017-07-01 13:09:46: remotesToDelete: -
2017-07-01 13:09:46: localsToUdpate: 1
2017-07-01 13:09:46: localsToDelete: -
2017-07-01 13:09:46: createLocal: -
2017-07-01 13:09:46: updateLocal: 1
2017-07-01 13:09:46: deleteLocal: -
2017-07-01 13:09:46: createRemote: -
2017-07-01 13:09:46: updateRemote: 1
2017-07-01 13:09:46: deleteRemote: -
2017-07-01 13:09:46: folderConflict: -
2017-07-01 13:09:46: noteConflict: -
2017-07-01 13:09:46: Total folders: 2
2017-07-01 13:09:46: Total notes: 0
2017-07-01 13:09:55: Starting synchronization... [1498910995526]
2017-07-01 13:09:55: Sync: deleteRemote: local has been deleted: (Remote 68cba53569c84bfbad79eee85402160b)
2017-07-01 13:09:55: Synchronization complete [1498910995526]:
2017-07-01 13:09:55: remotesToUpdate: -
2017-07-01 13:09:55: remotesToDelete: 1
2017-07-01 13:09:55: localsToUdpate: -
2017-07-01 13:09:55: localsToDelete: -
2017-07-01 13:09:55: createLocal: -
2017-07-01 13:09:55: updateLocal: -
2017-07-01 13:09:55: deleteLocal: -
2017-07-01 13:09:55: createRemote: -
2017-07-01 13:09:55: updateRemote: -
2017-07-01 13:09:55: deleteRemote: 1
2017-07-01 13:09:55: folderConflict: -
2017-07-01 13:09:55: noteConflict: -
2017-07-01 13:09:55: Total folders: 1
2017-07-01 13:09:55: Total notes: 0
2017-07-01 13:09:58: Starting synchronization... [1498910998834]
2017-07-01 13:09:58: Sync: deleteLocal: remote has been deleted: (Local 7711fd1e399e4219ba8f5f9e9eeefb16)
2017-07-01 13:09:58: Error: Cannot delete the last notebook
Error: Cannot delete the last notebook
at Function._callee$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/folder.js:59:25)
at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:109:7)
2017-07-01 13:10:01: Starting synchronization... [1498911001597]
2017-07-01 13:10:01: Sync: deleteLocal: remote has been deleted: (Local 7711fd1e399e4219ba8f5f9e9eeefb16)
2017-07-01 13:10:01: Error: Cannot delete the last notebook
Error: Cannot delete the last notebook
at Function._callee$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/folder.js:59:25)
at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:109:7)

View File

@ -0,0 +1,54 @@
2017-07-01 13:09:29: Starting joplin-cli 0.8.27...
2017-07-01 13:09:29: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:31: Starting joplin-cli 0.8.27...
2017-07-01 13:09:31: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:33: Starting joplin-cli 0.8.27...
2017-07-01 13:09:33: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:35: Starting joplin-cli 0.8.27...
2017-07-01 13:09:35: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:36: Starting joplin-cli 0.8.27...
2017-07-01 13:09:36: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:38: Starting joplin-cli 0.8.27...
2017-07-01 13:09:38: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:38: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:38: stat /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:38: put /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910978660
2017-07-01 13:09:38: setTimestamp /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910978660
2017-07-01 13:09:38: move /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910978660 => /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:38: delete /var/www/joplin/CliClient/tests/fuzzing/sync/351b927410b541e1a6d1a2a88ef7d1c0.md
2017-07-01 13:09:39: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:42: Starting joplin-cli 0.8.27...
2017-07-01 13:09:42: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:42: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:42: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:42: get /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:45: Starting joplin-cli 0.8.27...
2017-07-01 13:09:45: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:45: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:45: stat /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:45: put /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910985820
2017-07-01 13:09:45: setTimestamp /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910985820
2017-07-01 13:09:45: move /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910985820 => /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:46: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:46: get /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:47: Starting joplin-cli 0.8.27...
2017-07-01 13:09:47: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:52: Starting joplin-cli 0.8.27...
2017-07-01 13:09:52: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:53: Starting joplin-cli 0.8.27...
2017-07-01 13:09:53: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:55: Starting joplin-cli 0.8.27...
2017-07-01 13:09:55: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:55: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:55: delete /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:55: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:58: Starting joplin-cli 0.8.27...
2017-07-01 13:09:58: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:09:58: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:58: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:10:01: Starting joplin-cli 0.8.27...
2017-07-01 13:10:01: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0
2017-07-01 13:10:01: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:10:01: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:10:02: Starting joplin-cli 0.8.27...
2017-07-01 13:10:02: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client0

View File

@ -0,0 +1,454 @@
2017-07-01 13:09:29: Database was open successfully
2017-07-01 13:09:29: Checking for database schema update...
2017-07-01 13:09:29: SELECT * FROM version LIMIT 1
2017-07-01 13:09:29: Database is new - creating the schema...
2017-07-01 13:09:29: BEGIN TRANSACTION
2017-07-01 13:09:29: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL DEFAULT 0, updated_time INT NOT NULL DEFAULT 0, sync_time INT NOT NULL DEFAULT 0);
2017-07-01 13:09:29: CREATE INDEX folders_title ON folders (title);
2017-07-01 13:09:29: CREATE INDEX folders_updated_time ON folders (updated_time);
2017-07-01 13:09:29: CREATE INDEX folders_sync_time ON folders (sync_time);
2017-07-01 13:09:29: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL DEFAULT 0, updated_time INT NOT NULL DEFAULT 0, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0);
2017-07-01 13:09:29: CREATE INDEX notes_title ON notes (title);
2017-07-01 13:09:29: CREATE INDEX notes_updated_time ON notes (updated_time);
2017-07-01 13:09:29: CREATE INDEX notes_sync_time ON notes (sync_time);
2017-07-01 13:09:29: CREATE INDEX notes_is_conflict ON notes (is_conflict);
2017-07-01 13:09:29: CREATE INDEX notes_is_todo ON notes (is_todo);
2017-07-01 13:09:29: CREATE INDEX notes_order ON notes (`order`);
2017-07-01 13:09:29: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL);
2017-07-01 13:09:29: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT, created_time INT, updated_time INT);
2017-07-01 13:09:29: CREATE TABLE note_tags ( id INTEGER PRIMARY KEY, note_id TEXT, tag_id TEXT);
2017-07-01 13:09:29: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT, mime TEXT, filename TEXT, created_time INT, updated_time INT);
2017-07-01 13:09:29: CREATE TABLE note_resources ( id INTEGER PRIMARY KEY, note_id TEXT, resource_id TEXT);
2017-07-01 13:09:29: CREATE TABLE version ( version INT);
2017-07-01 13:09:29: CREATE TABLE changes ( id INTEGER PRIMARY KEY, `type` INT, item_id TEXT, item_type INT, item_field TEXT);
2017-07-01 13:09:29: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT);
2017-07-01 13:09:29: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT);
2017-07-01 13:09:29: CREATE TABLE item_sync_times ( id INTEGER PRIMARY KEY, item_id TEXT, `time` INT);
2017-07-01 13:09:29: INSERT INTO version (version) VALUES (1);
2017-07-01 13:09:29: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "7b3e8c87485342b48080ef4c71bc3deb", "2")
2017-07-01 13:09:29: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["7711fd1e399e4219ba8f5f9e9eeefb16","Notebook",1498910969408,1498910969408]
2017-07-01 13:09:29: COMMIT
2017-07-01 13:09:29: Database schema created successfully
2017-07-01 13:09:29: Initializing tables...
2017-07-01 13:09:29: SELECT name FROM sqlite_master WHERE type="table"
2017-07-01 13:09:29: PRAGMA table_info("folders")
2017-07-01 13:09:29: PRAGMA table_info("notes")
2017-07-01 13:09:29: PRAGMA table_info("deleted_items")
2017-07-01 13:09:29: PRAGMA table_info("tags")
2017-07-01 13:09:29: PRAGMA table_info("note_tags")
2017-07-01 13:09:29: PRAGMA table_info("resources")
2017-07-01 13:09:29: PRAGMA table_info("note_resources")
2017-07-01 13:09:29: PRAGMA table_info("version")
2017-07-01 13:09:29: PRAGMA table_info("changes")
2017-07-01 13:09:29: PRAGMA table_info("settings")
2017-07-01 13:09:29: PRAGMA table_info("item_sync_times")
2017-07-01 13:09:29: BEGIN TRANSACTION
2017-07-01 13:09:29: DELETE FROM table_fields
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","id",2,null]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:29: ["folders","parent_id",2,""]
2017-07-01 13:09:29: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["folders","title",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["folders","created_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["folders","updated_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["folders","sync_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","parent_id",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","title",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","body",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","created_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","updated_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","sync_time",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","is_conflict",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","latitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","longitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","altitude",3,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","author",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source_url",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","is_todo",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","todo_due",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","todo_completed",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","source_application",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","application_data",2,""]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["notes","order",1,"0"]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","item_type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["deleted_items","deleted_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","title",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","created_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["tags","updated_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","note_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_tags","tag_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","title",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","mime",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","filename",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","created_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["resources","updated_time",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","note_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["note_resources","resource_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["version","version",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["changes","item_field",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","key",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","value",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["settings","type",1,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","id",null,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","item_id",2,null]
2017-07-01 13:09:30: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?)
2017-07-01 13:09:30: ["item_sync_times","time",1,null]
2017-07-01 13:09:30: COMMIT
2017-07-01 13:09:30: Checking for database schema update...
2017-07-01 13:09:30: SELECT * FROM version LIMIT 1
2017-07-01 13:09:30: Current database version
2017-07-01 13:09:30: SELECT * FROM table_fields
2017-07-01 13:09:30: SELECT * FROM settings
2017-07-01 13:09:30: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:30: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:30: ["Notebook"]
2017-07-01 13:09:30: Saving settings...
2017-07-01 13:09:30: BEGIN TRANSACTION
2017-07-01 13:09:30: DELETE FROM settings
2017-07-01 13:09:30: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["clientId","7b3e8c87485342b48080ef4c71bc3deb",2]
2017-07-01 13:09:30: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["7711fd1e399e4219ba8f5f9e9eeefb16","string","activeFolderId"]
2017-07-01 13:09:30: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:30: ["local","string","sync.target"]
2017-07-01 13:09:30: COMMIT
2017-07-01 13:09:30: Settings have been saved.
2017-07-01 13:09:32: Database was open successfully
2017-07-01 13:09:32: Checking for database schema update...
2017-07-01 13:09:32: SELECT * FROM version LIMIT 1
2017-07-01 13:09:32: Current database version
2017-07-01 13:09:32: SELECT * FROM table_fields
2017-07-01 13:09:32: SELECT * FROM settings
2017-07-01 13:09:32: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:32: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:32: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:32: ["Notebook"]
2017-07-01 13:09:32: Saving settings...
2017-07-01 13:09:32: BEGIN TRANSACTION
2017-07-01 13:09:32: DELETE FROM settings
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["clientId","7b3e8c87485342b48080ef4c71bc3deb",2]
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["activeFolderId","7711fd1e399e4219ba8f5f9e9eeefb16","string"]
2017-07-01 13:09:32: INSERT INTO `settings` (`key`, `value`, `type`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["sync.target","local","string"]
2017-07-01 13:09:32: INSERT INTO `settings` (`value`, `type`, `key`) VALUES (?, ?, ?)
2017-07-01 13:09:32: ["/var/www/joplin/CliClient/tests/fuzzing/sync","string","sync.local.path"]
2017-07-01 13:09:32: COMMIT
2017-07-01 13:09:32: Settings have been saved.
2017-07-01 13:09:33: Database was open successfully
2017-07-01 13:09:33: Checking for database schema update...
2017-07-01 13:09:33: SELECT * FROM version LIMIT 1
2017-07-01 13:09:33: Current database version
2017-07-01 13:09:33: SELECT * FROM table_fields
2017-07-01 13:09:33: SELECT * FROM settings
2017-07-01 13:09:33: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:33: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:33: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:33: ["Notebook"]
2017-07-01 13:09:33: SELECT * FROM `folders`
2017-07-01 13:09:33: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:33: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:35: Database was open successfully
2017-07-01 13:09:35: Checking for database schema update...
2017-07-01 13:09:35: SELECT * FROM version LIMIT 1
2017-07-01 13:09:35: Current database version
2017-07-01 13:09:35: SELECT * FROM table_fields
2017-07-01 13:09:35: SELECT * FROM settings
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:35: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:35: ["Notebook"]
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:35: ["Notebook"]
2017-07-01 13:09:35: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:35: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:35: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:40: Database was open successfully
2017-07-01 13:09:40: Checking for database schema update...
2017-07-01 13:09:40: SELECT * FROM version LIMIT 1
2017-07-01 13:09:40: Current database version
2017-07-01 13:09:40: SELECT * FROM table_fields
2017-07-01 13:09:40: SELECT * FROM settings
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:40: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:40: ["Notebook"]
2017-07-01 13:09:40: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:40: [null]
2017-07-01 13:09:40: UPDATE `folders` SET `sync_time`=? WHERE id=?
2017-07-01 13:09:40: [1498910980584,"7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:40: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:40: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:40: SELECT * FROM deleted_items
2017-07-01 13:09:40: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:40: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:40: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:40: ["Notebook"]
2017-07-01 13:09:40: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:40: ["Notebook-1498910969401-461"]
2017-07-01 13:09:40: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?)
2017-07-01 13:09:40: ["68cba53569c84bfbad79eee85402160b","Notebook-1498910969401-461","1498910969401",1498910980801,1498910980799]
2017-07-01 13:09:41: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:41: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:41: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:41: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:41: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:41: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:41: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:41: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:43: Database was open successfully
2017-07-01 13:09:43: Checking for database schema update...
2017-07-01 13:09:44: SELECT * FROM version LIMIT 1
2017-07-01 13:09:44: Current database version
2017-07-01 13:09:44: SELECT * FROM table_fields
2017-07-01 13:09:44: SELECT * FROM settings
2017-07-01 13:09:44: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:44: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:44: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:44: ["Notebook"]
2017-07-01 13:09:44: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:44: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:44: [null]
2017-07-01 13:09:44: UPDATE `folders` SET `sync_time`=? WHERE id=?
2017-07-01 13:09:44: [1498910984142,"68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:44: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:44: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:44: SELECT * FROM deleted_items
2017-07-01 13:09:44: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:44: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:44: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:44: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:44: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:44: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:44: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:44: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:44: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:44: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:44: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:44: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:48: Database was open successfully
2017-07-01 13:09:48: Checking for database schema update...
2017-07-01 13:09:48: SELECT * FROM version LIMIT 1
2017-07-01 13:09:48: Current database version
2017-07-01 13:09:48: SELECT * FROM table_fields
2017-07-01 13:09:48: SELECT * FROM settings
2017-07-01 13:09:48: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:48: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:48: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:48: ["Notebook"]
2017-07-01 13:09:48: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:48: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:48: SELECT * FROM deleted_items
2017-07-01 13:09:49: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:49: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:49: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:49: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:49: SELECT * FROM `notes` WHERE `id` = ?
2017-07-01 13:09:49: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:49: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:49: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:49: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:49: ["Notebook-1498910969408-979"]
2017-07-01 13:09:49: UPDATE `folders` SET `title`=?, `created_time`=?, `updated_time`=?, `sync_time`=? WHERE id=?
2017-07-01 13:09:49: ["Notebook-1498910969408-979","1498910969408","1498910982544",1498910989054,"7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:49: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:49: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:49: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:49: SELECT count(*) as total FROM `notes`
2017-07-01 13:09:50: Database was open successfully
2017-07-01 13:09:50: Checking for database schema update...
2017-07-01 13:09:50: SELECT * FROM version LIMIT 1
2017-07-01 13:09:50: Current database version
2017-07-01 13:09:50: SELECT * FROM table_fields
2017-07-01 13:09:50: SELECT * FROM settings
2017-07-01 13:09:50: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:50: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:50: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:50: ["Notebook-1498910969408-979"]
2017-07-01 13:09:50: SELECT * FROM `folders`
2017-07-01 13:09:50: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:50: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:50: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:50: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:52: Database was open successfully
2017-07-01 13:09:52: Checking for database schema update...
2017-07-01 13:09:52: SELECT * FROM version LIMIT 1
2017-07-01 13:09:52: Current database version
2017-07-01 13:09:52: SELECT * FROM table_fields
2017-07-01 13:09:52: SELECT * FROM settings
2017-07-01 13:09:52: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:52: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:52: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:52: ["Notebook-1498910969408-979"]
2017-07-01 13:09:52: SELECT * FROM `folders`
2017-07-01 13:09:52: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:52: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:52: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:09:52: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:53: Database was open successfully
2017-07-01 13:09:53: Checking for database schema update...
2017-07-01 13:09:53: SELECT * FROM version LIMIT 1
2017-07-01 13:09:53: Current database version
2017-07-01 13:09:53: SELECT * FROM table_fields
2017-07-01 13:09:53: SELECT * FROM settings
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:53: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:53: ["Notebook-1498910969408-979"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:53: ["Notebook-1498910969408-979"]
2017-07-01 13:09:53: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:53: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:53: SELECT count(*) as total FROM `folders`
2017-07-01 13:09:53: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ?
2017-07-01 13:09:53: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:53: DELETE FROM folders WHERE id = ?
2017-07-01 13:09:53: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:53: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?)
2017-07-01 13:09:53: [2,"7711fd1e399e4219ba8f5f9e9eeefb16",1498910993660]
2017-07-01 13:09:53: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:57: Database was open successfully
2017-07-01 13:09:57: Checking for database schema update...
2017-07-01 13:09:57: SELECT * FROM version LIMIT 1
2017-07-01 13:09:57: Current database version
2017-07-01 13:09:57: SELECT * FROM table_fields
2017-07-01 13:09:57: SELECT * FROM settings
2017-07-01 13:09:57: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:57: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:57: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:09:57: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:09:57: ["Notebook-1498910969401-461"]
2017-07-01 13:09:57: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:09:57: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:09:57: SELECT * FROM deleted_items
2017-07-01 13:09:57: DELETE FROM deleted_items WHERE item_id = ?
2017-07-01 13:09:57: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:09:57: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:09:57: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:09:57: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:09:57: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:09:57: SELECT count(*) as total FROM `folders`
2017-07-01 13:10:00: Database was open successfully
2017-07-01 13:10:00: Checking for database schema update...
2017-07-01 13:10:00: SELECT * FROM version LIMIT 1
2017-07-01 13:10:00: Current database version
2017-07-01 13:10:00: SELECT * FROM table_fields
2017-07-01 13:10:00: SELECT * FROM settings
2017-07-01 13:10:00: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:00: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:10:00: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:10:00: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:10:00: ["Notebook-1498910969401-461"]
2017-07-01 13:10:00: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:10:00: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:10:00: SELECT * FROM deleted_items
2017-07-01 13:10:00: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:10:00: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:10:00: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:00: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:10:00: SELECT count(*) as total FROM `folders`
2017-07-01 13:10:04: Database was open successfully
2017-07-01 13:10:04: Checking for database schema update...
2017-07-01 13:10:04: SELECT * FROM version LIMIT 1
2017-07-01 13:10:04: Current database version
2017-07-01 13:10:04: SELECT * FROM table_fields
2017-07-01 13:10:04: SELECT * FROM settings
2017-07-01 13:10:04: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:04: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:10:04: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:10:04: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:10:04: ["Notebook-1498910969401-461"]
2017-07-01 13:10:04: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100
2017-07-01 13:10:04: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100
2017-07-01 13:10:04: SELECT * FROM deleted_items
2017-07-01 13:10:04: SELECT id FROM folders WHERE sync_time > 0
2017-07-01 13:10:04: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0
2017-07-01 13:10:04: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:04: ["68cba53569c84bfbad79eee85402160b"]
2017-07-01 13:10:04: SELECT count(*) as total FROM `folders`
2017-07-01 13:10:05: Database was open successfully
2017-07-01 13:10:05: Checking for database schema update...
2017-07-01 13:10:05: SELECT * FROM version LIMIT 1
2017-07-01 13:10:05: Current database version
2017-07-01 13:10:05: SELECT * FROM table_fields
2017-07-01 13:10:05: SELECT * FROM settings
2017-07-01 13:10:05: SELECT * FROM `folders` WHERE `id` = ?
2017-07-01 13:10:05: ["7711fd1e399e4219ba8f5f9e9eeefb16"]
2017-07-01 13:10:05: SELECT * FROM folders ORDER BY created_time DESC LIMIT 1
2017-07-01 13:10:05: SELECT * FROM `folders` WHERE `title` = ?
2017-07-01 13:10:05: ["Notebook-1498910969401-461"]
2017-07-01 13:10:05: SELECT * FROM `folders`
2017-07-01 13:10:05: SELECT `id`,`title`,`body`,`is_todo`,`todo_completed`,`parent_id`,`updated_time` FROM notes WHERE is_conflict = 0 AND parent_id = ? ORDER BY updated_time DESC
2017-07-01 13:10:05: ["68cba53569c84bfbad79eee85402160b"]

View File

@ -0,0 +1,86 @@
2017-07-01 13:09:40: Starting synchronization... [1498910980547]
2017-07-01 13:09:40: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 7711fd1e399e4219ba8f5f9e9eeefb16, "Notebook")
2017-07-01 13:09:40: Sync: createLocal: remote exists but local does not: (Remote 68cba53569c84bfbad79eee85402160b, "Notebook")
2017-07-01 13:09:41: Synchronization complete [1498910980547]:
2017-07-01 13:09:41: remotesToUpdate: 1
2017-07-01 13:09:41: remotesToDelete: -
2017-07-01 13:09:41: localsToUdpate: 1
2017-07-01 13:09:41: localsToDelete: -
2017-07-01 13:09:41: createLocal: 1
2017-07-01 13:09:41: updateLocal: -
2017-07-01 13:09:41: deleteLocal: -
2017-07-01 13:09:41: createRemote: 1
2017-07-01 13:09:41: updateRemote: -
2017-07-01 13:09:41: deleteRemote: -
2017-07-01 13:09:41: folderConflict: -
2017-07-01 13:09:41: noteConflict: -
2017-07-01 13:09:41: Total folders: 2
2017-07-01 13:09:41: Total notes: 0
2017-07-01 13:09:44: Starting synchronization... [1498910984088]
2017-07-01 13:09:44: Sync: updateRemote: local has changes: (Local 68cba53569c84bfbad79eee85402160b, "Notebook-1498910969401-461"): (Remote )
2017-07-01 13:09:44: Synchronization complete [1498910984088]:
2017-07-01 13:09:44: remotesToUpdate: 1
2017-07-01 13:09:44: remotesToDelete: -
2017-07-01 13:09:44: localsToUdpate: -
2017-07-01 13:09:44: localsToDelete: -
2017-07-01 13:09:44: createLocal: -
2017-07-01 13:09:44: updateLocal: -
2017-07-01 13:09:44: deleteLocal: -
2017-07-01 13:09:44: createRemote: -
2017-07-01 13:09:44: updateRemote: 1
2017-07-01 13:09:44: deleteRemote: -
2017-07-01 13:09:44: folderConflict: -
2017-07-01 13:09:44: noteConflict: -
2017-07-01 13:09:44: Total folders: 2
2017-07-01 13:09:44: Total notes: 0
2017-07-01 13:09:48: Starting synchronization... [1498910988979]
2017-07-01 13:09:49: Sync: updateLocal: remote is more recent than local: (Local 7711fd1e399e4219ba8f5f9e9eeefb16, "Notebook"): (Remote 7711fd1e399e4219ba8f5f9e9eeefb16, "Notebook-1498910969408-979")
2017-07-01 13:09:49: Synchronization complete [1498910988979]:
2017-07-01 13:09:49: remotesToUpdate: -
2017-07-01 13:09:49: remotesToDelete: -
2017-07-01 13:09:49: localsToUdpate: 1
2017-07-01 13:09:49: localsToDelete: -
2017-07-01 13:09:49: createLocal: -
2017-07-01 13:09:49: updateLocal: 1
2017-07-01 13:09:49: deleteLocal: -
2017-07-01 13:09:49: createRemote: -
2017-07-01 13:09:49: updateRemote: -
2017-07-01 13:09:49: deleteRemote: -
2017-07-01 13:09:49: folderConflict: -
2017-07-01 13:09:49: noteConflict: -
2017-07-01 13:09:49: Total folders: 2
2017-07-01 13:09:49: Total notes: 0
2017-07-01 13:09:57: Starting synchronization... [1498910997207]
2017-07-01 13:09:57: Sync: deleteRemote: local has been deleted: (Remote 7711fd1e399e4219ba8f5f9e9eeefb16)
2017-07-01 13:09:57: Sync: deleteLocal: remote has been deleted: (Local 68cba53569c84bfbad79eee85402160b)
2017-07-01 13:09:57: Error: Cannot delete the last notebook
Error: Cannot delete the last notebook
at Function._callee$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/folder.js:59:25)
at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:109:7)
2017-07-01 13:10:00: Starting synchronization... [1498911000231]
2017-07-01 13:10:00: Sync: deleteLocal: remote has been deleted: (Local 68cba53569c84bfbad79eee85402160b)
2017-07-01 13:10:00: Error: Cannot delete the last notebook
Error: Cannot delete the last notebook
at Function._callee$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/folder.js:59:25)
at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:109:7)
2017-07-01 13:10:04: Starting synchronization... [1498911004265]
2017-07-01 13:10:04: Sync: deleteLocal: remote has been deleted: (Local 68cba53569c84bfbad79eee85402160b)
2017-07-01 13:10:04: Error: Cannot delete the last notebook
Error: Cannot delete the last notebook
at Function._callee$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/folder.js:59:25)
at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:109:7)

View File

@ -0,0 +1,51 @@
2017-07-01 13:09:29: Starting joplin-cli 0.8.27...
2017-07-01 13:09:29: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:32: Starting joplin-cli 0.8.27...
2017-07-01 13:09:32: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:33: Starting joplin-cli 0.8.27...
2017-07-01 13:09:33: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:35: Starting joplin-cli 0.8.27...
2017-07-01 13:09:35: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:40: Starting joplin-cli 0.8.27...
2017-07-01 13:09:40: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:40: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:40: stat /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:40: put /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910980567
2017-07-01 13:09:40: setTimestamp /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910980567
2017-07-01 13:09:40: move /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/7711fd1e399e4219ba8f5f9e9eeefb16.md_1498910980567 => /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:40: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:40: get /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:43: Starting joplin-cli 0.8.27...
2017-07-01 13:09:43: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:44: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:44: stat /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:44: put /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910984114
2017-07-01 13:09:44: setTimestamp /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910984114
2017-07-01 13:09:44: move /var/www/joplin/CliClient/tests/fuzzing/sync/.sync/68cba53569c84bfbad79eee85402160b.md_1498910984114 => /var/www/joplin/CliClient/tests/fuzzing/sync/68cba53569c84bfbad79eee85402160b.md
2017-07-01 13:09:44: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:48: Starting joplin-cli 0.8.27...
2017-07-01 13:09:48: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:48: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:49: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:09:49: get /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:50: Starting joplin-cli 0.8.27...
2017-07-01 13:09:50: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:52: Starting joplin-cli 0.8.27...
2017-07-01 13:09:52: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:53: Starting joplin-cli 0.8.27...
2017-07-01 13:09:53: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:57: Starting joplin-cli 0.8.27...
2017-07-01 13:09:57: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:09:57: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:09:57: delete /var/www/joplin/CliClient/tests/fuzzing/sync/7711fd1e399e4219ba8f5f9e9eeefb16.md
2017-07-01 13:09:57: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:10:00: Starting joplin-cli 0.8.27...
2017-07-01 13:10:00: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:10:00: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:10:00: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:10:04: Starting joplin-cli 0.8.27...
2017-07-01 13:10:04: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1
2017-07-01 13:10:04: mkdir /var/www/joplin/CliClient/tests/fuzzing/sync/.sync
2017-07-01 13:10:04: list /var/www/joplin/CliClient/tests/fuzzing/sync
2017-07-01 13:10:05: Starting joplin-cli 0.8.27...
2017-07-01 13:10:05: Profile directory: /var/www/joplin/CliClient/tests/fuzzing/client1