From ee2a67e332d0c87fbf7cbe5667e81a47833d6300 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Thu, 25 Aug 2016 02:18:31 +0200 Subject: [PATCH 01/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_zh_CN.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 13e3f79a9..d5b559709 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -292,6 +292,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_zh_CN.ts b/translations/client_zh_CN.ts index 8c45fedf0..65a781761 100644 --- a/translations/client_zh_CN.ts +++ b/translations/client_zh_CN.ts @@ -3573,32 +3573,32 @@ It is not advisable to use it. %n year(s) - + %n 年 %n month(s) - + %n 月 %n day(s) - + %n 天 %n hour(s) - + %n 小时 %n minute(s) - + %n 分 %n second(s) - + %n 秒 From d1a1b9592604bf21b2e102bea50a8e2bd56db041 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Fri, 26 Aug 2016 02:18:32 +0200 Subject: [PATCH 02/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_ja.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index d5b559709..663373007 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -295,6 +295,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_ja.ts b/translations/client_ja.ts index 80b8783a8..ebce5e01a 100644 --- a/translations/client_ja.ts +++ b/translations/client_ja.ts @@ -834,12 +834,12 @@ Continuing the sync as normal will cause all your files to be overwritten by an The local folder %1 already contains a folder used in a folder sync connection. Please pick another one! - ローカルフォルダー %1 にはすでに同期フォルダーとして利用されてるフォルダを含んでいます。他のフォルダーを選択してください。 + ローカルフォルダー %1 にはすでに同期フォルダーとして利用されてるフォルダーを含んでいます。他のフォルダーを選択してください。 The local folder %1 is a symbolic link. The link target already contains a folder used in a folder sync connection. Please pick another one! - ローカルフォルダー %1 はシンボリックリンクです。リンク先のフォルダにはすでに同期フォルダーとして利用されているフォルダーを含みます。他のフォルダーを選択してください。 + ローカルフォルダー %1 はシンボリックリンクです。リンク先のフォルダーにはすでに同期フォルダーとして利用されているフォルダーを含みます。他のフォルダーを選択してください。 @@ -2217,7 +2217,7 @@ It is not advisable to use it. The proxy server needs a username and password. - プロキシサーバーにユーザー名とパスワードが必要です。 + プロキシサーバーにはユーザー名とパスワードが必要です。 From d5fa8faa9137c0bd715bfce72e0054d15a1d9982 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sat, 27 Aug 2016 02:18:32 +0200 Subject: [PATCH 03/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 663373007..dd7e38395 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -298,6 +298,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From d8f9bf3a0b561ef87a86a6c558a9bf668396ba2d Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sun, 28 Aug 2016 02:18:32 +0200 Subject: [PATCH 04/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index dd7e38395..5bc766a3a 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -301,6 +301,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From f2c6669224bb15858941fcf3c67bf7732c4ececb Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Mon, 29 Aug 2016 02:18:30 +0200 Subject: [PATCH 05/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_ja.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 5bc766a3a..d89e6850f 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -304,6 +304,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_ja.ts b/translations/client_ja.ts index ebce5e01a..aff1a25e3 100644 --- a/translations/client_ja.ts +++ b/translations/client_ja.ts @@ -2550,7 +2550,7 @@ It is not advisable to use it. SSL Chipher Debug View - + SSL暗号デバッグ表示 From 85b5fdb3d3478ddfdb2f30e4a5f6997ca9bdb0fa Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Tue, 30 Aug 2016 02:18:35 +0200 Subject: [PATCH 06/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index d89e6850f..39a86fa86 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -307,6 +307,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 9c0ecad4208bdabd08266902d77b72a1bffbacf6 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Wed, 31 Aug 2016 02:18:30 +0200 Subject: [PATCH 07/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 39a86fa86..81589cf2a 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -310,6 +310,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 14457e93e6699c0be5678d13ef8423eae00241b0 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Thu, 1 Sep 2016 02:18:31 +0200 Subject: [PATCH 08/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 81589cf2a..82149339b 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -313,6 +313,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From b75f50d62c0fba8f86916669cc1d2f49c31b19d5 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Fri, 2 Sep 2016 02:18:31 +0200 Subject: [PATCH 09/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 82149339b..186a5cf02 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -316,6 +316,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 584b205bd51bc8f4fbc48e5e7f60f830e43da1f1 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sat, 3 Sep 2016 02:18:31 +0200 Subject: [PATCH 10/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 186a5cf02..321fc4282 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -319,6 +319,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From c33abd468ddbebad0d18dd86816abc011b9a4122 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sun, 4 Sep 2016 02:18:30 +0200 Subject: [PATCH 11/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 321fc4282..dde68e646 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -322,6 +322,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 65110f7a911178ebcaa01cf904db172dad30246d Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Mon, 5 Sep 2016 02:18:30 +0200 Subject: [PATCH 12/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index dde68e646..851912b99 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -325,6 +325,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From c97d8aa8fd710e4077de21a8e1a11dbc54b189de Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 5 Sep 2016 13:26:49 +0200 Subject: [PATCH 13/93] Show the rename target in the client log file. (#5149) --- src/gui/syncrunfilelog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp index 04d1763ad..944679426 100644 --- a/src/gui/syncrunfilelog.cpp +++ b/src/gui/syncrunfilelog.cpp @@ -145,7 +145,11 @@ void SyncRunFileLog::logItem( const SyncFileItem& item ) const QChar L = QLatin1Char('|'); _out << ts << L; _out << QString::number(item._requestDuration) << L; - _out << item._file << L; + if( item.log._instruction != CSYNC_INSTRUCTION_RENAME ) { + _out << item._file << L; + } else { + _out << item._file << QLatin1String(" -> ") << item._renameTarget << L; + } _out << instructionToStr( item.log._instruction ) << L; _out << directionToStr( item._direction ) << L; _out << QString::number(item.log._modtime) << L; From 7c24ed769e8de931a0b6b722c6345397bf50300d Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Tue, 6 Sep 2016 02:18:30 +0200 Subject: [PATCH 14/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 851912b99..ac5b149d3 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -328,6 +328,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From af9c4d0e2fe1a42e1faf14779ca5ef1088bd1314 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 6 Sep 2016 10:42:59 +0200 Subject: [PATCH 15/93] Recall: Copy instead of move recalled file #5150 That was an unintentional change in 2662203fb7277d5d1a57cef556279f8cd3b974f5 Also expand the test case to cover this. --- csync/tests/ownCloud/t_recall.pl | 4 ++++ src/libsync/propagatedownload.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/csync/tests/ownCloud/t_recall.pl b/csync/tests/ownCloud/t_recall.pl index 008cad8fd..244618cf8 100755 --- a/csync/tests/ownCloud/t_recall.pl +++ b/csync/tests/ownCloud/t_recall.pl @@ -64,6 +64,10 @@ csync(); assert( -e glob(localDir().'dir/file2_.sys.admin#recall#-*.dat' ) ); assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) ); +# verify that the original files still exist +assert( -e glob(localDir().'dir/file2.dat' ) ); +assert( -e glob(localDir().'dir/file3.dat' ) ); + #Remove the recall file unlink(localDir() . ".sys.admin#recall#"); diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 0a8377159..2b46ff781 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -637,8 +637,9 @@ static void handleRecallFile(const QString &fn) QString rpath = makeRecallFileName(fpath); qDebug() << "Copy recall file: " << fpath << " -> " << rpath; - QString error; - FileSystem::uncheckedRenameReplace(fpath, rpath, &error); + // Remove the target first, QFile::copy will not overwrite it. + FileSystem::remove(rpath); + QFile::copy(fpath, rpath); } } From 524220d0907713408298a36df18bd04635ce5563 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 6 Sep 2016 11:11:03 +0200 Subject: [PATCH 16/93] Selective Sync: Fix request loop and show error in view (#5154) I got into a situation where the model would endlessly request the directory contents from the server because we did not notice yet that the server is actually in maintenance mode while we were expanding the tree view when changing the tab to the account or when just expanding it by clicking. --- src/gui/folderstatusmodel.cpp | 11 ++++++++++- src/gui/folderstatusmodel.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 71717e2c0..ab6db51f2 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -164,7 +164,8 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const switch(role) { case Qt::DisplayRole: if (x->_hasError) { - return tr("Error while loading the list of folders from the server."); + return QVariant(tr("Error while loading the list of folders from the server.") + + QString("\n") + x->_lastErrorString); } else { return tr("Fetching folder list from server..."); } @@ -498,6 +499,10 @@ bool FolderStatusModel::canFetchMore(const QModelIndex& parent) const auto info = infoForIndex(parent); if (!info || info->_fetched || info->_fetching) return false; + if (info->_hasError) { + // Keep showing the error to the user, it will be hidden when the account reconnects + return false; + } return true; } @@ -548,6 +553,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list) if (parentInfo->hasLabel()) { beginRemoveRows(idx, 0 ,0); + parentInfo->_lastErrorString.clear(); parentInfo->_hasError = false; parentInfo->_fetchingLabel = false; endRemoveRows(); @@ -675,6 +681,9 @@ void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply* r) } auto parentInfo = infoForIndex(idx); if (parentInfo) { + qDebug() << r->errorString(); + parentInfo->_lastErrorString = r->errorString(); + if (r->error() == QNetworkReply::ContentNotFoundError) { parentInfo->_fetched = true; } else { diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index f12de0227..312e978ae 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -63,6 +63,7 @@ public: bool _fetched; // If we did the LSCOL for this folder already bool _fetching; // Whether a LSCOL job is currently running bool _hasError; // If the last fetching job ended in an error + QString _lastErrorString; bool _fetchingLabel; // Whether a 'fetching in progress' label is shown. bool _isUndecided; // undecided folders are the big folders that the user has not accepted yet From 9e895a6ecc2732d2f4004631e2f0469fadb4777b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 31 Aug 2016 10:16:25 +0200 Subject: [PATCH 17/93] FolderStatusModel: Fix beginInsertRow/endInsertRow We need to do the change between the begin and the end call so the selection don't get broken --- src/gui/folderstatusmodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index ab6db51f2..a850824d7 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -1076,11 +1076,14 @@ void FolderStatusModel::slotShowFetchProgress() auto idx = it.key(); auto* info = infoForIndex(idx); if (info && info->_fetching) { - if (!info->hasLabel()) { + bool add = !info->hasLabel(); + if (add) { beginInsertRows(idx, 0, 0); - endInsertRows(); } info->_fetchingLabel = true; + if (add) { + endInsertRows(); + } } it.remove(); } From 98268d102fb343c103cbb4fb28dedd390f3c9ecf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 10 Sep 2016 17:08:52 +0200 Subject: [PATCH 18/93] ExcludeFiles: Fix when the folder casing is not the same in the settings and in the FS If the folder has different case in the settings and in the FS, we should not ignore all the files. This is important for the files system watcher. --- src/libsync/excludedfiles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsync/excludedfiles.cpp b/src/libsync/excludedfiles.cpp index 6e1ee326e..e3afd1ed4 100644 --- a/src/libsync/excludedfiles.cpp +++ b/src/libsync/excludedfiles.cpp @@ -12,6 +12,7 @@ */ #include "excludedfiles.h" +#include "utility.h" #include @@ -70,7 +71,7 @@ bool ExcludedFiles::isExcluded( const QString& basePath, bool excludeHidden) const { - if (!filePath.startsWith(basePath)) { + if (!filePath.startsWith(basePath, Utility::fsCasePreserving() ? Qt::CaseInsensitive : Qt::CaseSensitive)) { // Mark paths we're not responsible for as excluded... return true; } From 1d09f6b60fa1a56e9e42f28cc20bf305e4d327f2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 11 Sep 2016 16:14:08 +0200 Subject: [PATCH 19/93] Allow to disable Shiboleth to build without QtWebkit (#5166) --- CMakeLists.txt | 7 +++++++ cmake/modules/QtVersionAbstraction.cmake | 10 ++++++++-- src/gui/CMakeLists.txt | 19 +++++++++++++------ src/gui/creds/credentialsfactory.cpp | 4 ++++ src/gui/owncloudsetupwizard.cpp | 5 ++++- src/gui/wizard/owncloudwizard.cpp | 15 ++++++++++++++- src/gui/wizard/owncloudwizard.h | 4 ++++ 7 files changed, 54 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3eb08bd3..c7429278f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,6 +136,13 @@ if(OWNCLOUD_RESTORE_RENAME) add_definitions(-DOWNCLOUD_RESTORE_RENAME=1) endif() +# Disable shibboleth. +# So the client can be built without QtWebKit +option(NO_SHIBBOLETH "Build without Shibboleth support. Allow to build the client without QtWebKit" OFF) +if(NO_SHIBBOLETH) + message("Compiling without shibboleth") + add_definitions(-DNO_SHIBBOLETH=1) +endif() if(APPLE) set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" ) diff --git a/cmake/modules/QtVersionAbstraction.cmake b/cmake/modules/QtVersionAbstraction.cmake index b6b48e3d7..5bd853c84 100644 --- a/cmake/modules/QtVersionAbstraction.cmake +++ b/cmake/modules/QtVersionAbstraction.cmake @@ -22,12 +22,18 @@ if( Qt5Core_FOUND ) find_package(Qt5Test REQUIRED) endif() if(NOT TOKEN_AUTH_ONLY) - find_package(Qt5WebKitWidgets REQUIRED) - find_package(Qt5WebKit REQUIRED) find_package(Qt5Widgets REQUIRED) if(APPLE) find_package(Qt5MacExtras REQUIRED) endif(APPLE) + + if(NOT NO_SHIBBOLETH) + find_package(Qt5WebKitWidgets) + find_package(Qt5WebKit) + if(NOT Qt5WebKitWidgets_FOUND) + message(FATAL_ERROR "Qt5WebKit required for Shibboleth. Use -DNO_SHIBBOLETH=1 to disable it.") + endif() + endif() endif() else( Qt5Core_FOUND ) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 1bb50b864..5fc319b6f 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -94,22 +94,26 @@ set(client_SRCS servernotificationhandler.cpp creds/credentialsfactory.cpp creds/httpcredentialsgui.cpp - creds/shibbolethcredentials.cpp - creds/shibboleth/shibbolethwebview.cpp - creds/shibboleth/shibbolethuserjob.cpp wizard/postfixlineedit.cpp wizard/abstractcredswizardpage.cpp wizard/owncloudadvancedsetuppage.cpp wizard/owncloudconnectionmethoddialog.cpp wizard/owncloudhttpcredspage.cpp wizard/owncloudsetuppage.cpp - wizard/owncloudshibbolethcredspage.cpp wizard/owncloudwizardcommon.cpp wizard/owncloudwizard.cpp wizard/owncloudwizardresultpage.cpp ../3rdparty/qjson/json.cpp ) +IF(NOT NO_SHIBBOLETH) + list(APPEND client_SRCS + creds/shibbolethcredentials.cpp + creds/shibboleth/shibbolethwebview.cpp + creds/shibboleth/shibbolethuserjob.cpp + wizard/owncloudshibbolethcredspage.cpp + ) +endif() set(updater_SRCS updater/ocupdater.cpp @@ -232,6 +236,9 @@ set(ownCloud ${ownCloud_old}) if (WITH_DBUS) set(ADDITIONAL_APP_MODULES DBus) endif(WITH_DBUS) +if (NOT NO_SHIBBOLETH) + list(APPEND ADDITIONAL_APP_MODULES WebKitWidgets) +endif() if(NOT BUILD_OWNCLOUD_OSX_BUNDLE) @@ -250,14 +257,14 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE) # add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src}) add_executable( ${APPLICATION_EXECUTABLE} WIN32 main.cpp ${final_src}) - qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml WebKitWidgets Sql ${ADDITIONAL_APP_MODULES}) + qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml Sql ${ADDITIONAL_APP_MODULES}) else() # set(CMAKE_INSTALL_PREFIX ".") # Examples use /Applications. hurmpf. set(MACOSX_BUNDLE_ICON_FILE "ownCloud.icns") # we must add MACOSX_BUNDLE only if building a bundle add_executable( ${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${final_src}) - qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml WebKitWidgets Sql ${ADDITIONAL_APP_MODULES}) + qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml Sql ${ADDITIONAL_APP_MODULES}) set (QM_DIR ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/Translations) install(FILES ${client_I18N} DESTINATION ${QM_DIR}) diff --git a/src/gui/creds/credentialsfactory.cpp b/src/gui/creds/credentialsfactory.cpp index c7c4ef3b2..ac979596b 100644 --- a/src/gui/creds/credentialsfactory.cpp +++ b/src/gui/creds/credentialsfactory.cpp @@ -16,7 +16,9 @@ #include "creds/credentialsfactory.h" #include "creds/httpcredentialsgui.h" #include "creds/dummycredentials.h" +#ifndef NO_SHIBBOLETH #include "creds/shibbolethcredentials.h" +#endif namespace OCC { @@ -31,8 +33,10 @@ AbstractCredentials* create(const QString& type) return new HttpCredentialsGui; } else if (type == "dummy") { return new DummyCredentials; +#ifndef NO_SHIBBOLETH } else if (type == "shibboleth") { return new ShibbolethCredentials; +#endif } else { qWarning("Unknown credentials type: %s", qPrintable(type)); return new DummyCredentials; diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index c3deac6f5..0f4637845 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -539,12 +539,15 @@ bool DetermineAuthTypeJob::finished() setupConnections(reply()); return false; // don't discard } else { +#ifndef NO_SHIBBOLETH QRegExp shibbolethyWords("SAML|wayf"); shibbolethyWords.setCaseSensitivity(Qt::CaseInsensitive); if (redirection.toString().contains(shibbolethyWords)) { emit authType(WizardCommon::Shibboleth); - } else { + } else +#endif + { // TODO: Send an error. // eh? emit authType(WizardCommon::HttpCreds); diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 2baa8c488..28faaa933 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -20,7 +20,9 @@ #include "wizard/owncloudwizard.h" #include "wizard/owncloudsetuppage.h" #include "wizard/owncloudhttpcredspage.h" +#ifndef NO_SHIBBOLETH #include "wizard/owncloudshibbolethcredspage.h" +#endif #include "wizard/owncloudadvancedsetuppage.h" #include "wizard/owncloudwizardresultpage.h" @@ -39,7 +41,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) _account(0), _setupPage(new OwncloudSetupPage(this)), _httpCredsPage(new OwncloudHttpCredsPage(this)), +#ifndef NO_SHIBBOLETH _shibbolethCredsPage(new OwncloudShibbolethCredsPage), +#endif _advancedSetupPage(new OwncloudAdvancedSetupPage), _resultPage(new OwncloudWizardResultPage), _credentialsPage(0), @@ -48,7 +52,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setPage(WizardCommon::Page_ServerSetup, _setupPage); setPage(WizardCommon::Page_HttpCreds, _httpCredsPage); +#ifndef NO_SHIBBOLETH setPage(WizardCommon::Page_ShibbolethCreds, _shibbolethCredsPage); +#endif setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage); setPage(WizardCommon::Page_Result, _resultPage); @@ -61,7 +67,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) connect( this, SIGNAL(currentIdChanged(int)), SLOT(slotCurrentPageChanged(int))); connect( _setupPage, SIGNAL(determineAuthType(QString)), SIGNAL(determineAuthType(QString))); connect( _httpCredsPage, SIGNAL(connectToOCUrl(QString)), SIGNAL(connectToOCUrl(QString))); +#ifndef NO_SHIBBOLETH connect( _shibbolethCredsPage, SIGNAL(connectToOCUrl(QString)), SIGNAL(connectToOCUrl(QString))); +#endif connect( _advancedSetupPage, SIGNAL(createLocalAndRemoteFolders(QString, QString)), SIGNAL(createLocalAndRemoteFolders(QString, QString))); connect(this, SIGNAL(customButtonClicked(int)), this, SIGNAL(skipFolderConfiguration())); @@ -128,9 +136,11 @@ void OwncloudWizard::successfulStep() _httpCredsPage->setConnected(); break; +#ifndef NO_SHIBBOLETH case WizardCommon::Page_ShibbolethCreds: _shibbolethCredsPage->setConnected(); break; +#endif case WizardCommon::Page_AdvancedSetup: _advancedSetupPage->directoriesCreated(); @@ -148,9 +158,12 @@ void OwncloudWizard::successfulStep() void OwncloudWizard::setAuthType(WizardCommon::AuthType type) { _setupPage->setAuthType(type); +#ifndef NO_SHIBBOLETH if (type == WizardCommon::Shibboleth) { _credentialsPage = _shibbolethCredsPage; - } else { + } else +#endif + { _credentialsPage = _httpCredsPage; } next(); diff --git a/src/gui/wizard/owncloudwizard.h b/src/gui/wizard/owncloudwizard.h index 401bfc83b..1f2e79739 100644 --- a/src/gui/wizard/owncloudwizard.h +++ b/src/gui/wizard/owncloudwizard.h @@ -25,7 +25,9 @@ namespace OCC { class OwncloudSetupPage; class OwncloudHttpCredsPage; +#ifndef NO_SHIBBOLETH class OwncloudShibbolethCredsPage; +#endif class OwncloudAdvancedSetupPage; class OwncloudWizardResultPage; class AbstractCredentials; @@ -88,7 +90,9 @@ private: AccountPtr _account; OwncloudSetupPage* _setupPage; OwncloudHttpCredsPage* _httpCredsPage; +#ifndef NO_SHIBBOLETH OwncloudShibbolethCredsPage* _shibbolethCredsPage; +#endif OwncloudAdvancedSetupPage* _advancedSetupPage; OwncloudWizardResultPage* _resultPage; AbstractCredentialsWizardPage* _credentialsPage; From d5a481f13240b50ff3993184152d3d4145ebfde0 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 12 Sep 2016 14:03:11 +0200 Subject: [PATCH 20/93] FolderWatcher: Act on relative paths #5116 (#5153) --- src/gui/folder.cpp | 5 ----- src/gui/folder.h | 5 ----- src/gui/folderwatcher.cpp | 17 +++++++++++++---- src/gui/folderwatcher.h | 1 + 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index f94ba71b4..532c38de5 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -621,11 +621,6 @@ void Folder::removeFromSettings() const settings->remove(FolderMan::escapeAlias(_definition.alias)); } -bool Folder::isFileExcludedAbsolute(const QString& fullPath) const -{ - return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles); -} - bool Folder::isFileExcludedRelative(const QString& relativePath) const { return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles); diff --git a/src/gui/folder.h b/src/gui/folder.h index 40ff6deb1..762ea52b1 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -184,11 +184,6 @@ public: /// Removes the folder from the account's settings. void removeFromSettings() const; - /** - * Returns whether a file inside this folder should be excluded. - */ - bool isFileExcludedAbsolute(const QString& fullPath) const; - /** * Returns whether a file inside this folder should be excluded. */ diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp index 30809c82f..c115611bb 100644 --- a/src/gui/folderwatcher.cpp +++ b/src/gui/folderwatcher.cpp @@ -41,7 +41,9 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder) : QObject(folder), _folder(folder) { - _d.reset(new FolderWatcherPrivate(this, root)); + _canonicalFolderPath = QFileInfo(root).canonicalFilePath(); + + _d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath)); _timer.start(); } @@ -55,10 +57,17 @@ bool FolderWatcher::pathIsIgnored( const QString& path ) if( !_folder ) return false; #ifndef OWNCLOUD_TEST - if (_folder->isFileExcludedAbsolute(path)) { - qDebug() << "* Ignoring file" << path; - return true; + QString relPath = path; + if (relPath.startsWith(_canonicalFolderPath)) { + relPath = relPath.remove(0, _canonicalFolderPath.length()+1); + if (_folder->isFileExcludedRelative(relPath)) { + qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath; + return true; + } } + // there could be an odd watch event not being inside the _canonicalFolderPath + // We will just not ignore it then, who knows. + #endif return false; } diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index 15fe223a4..9b0d17471 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -89,6 +89,7 @@ private: QTime _timer; QSet _lastPaths; Folder* _folder; + QString _canonicalFolderPath; friend class FolderWatcherPrivate; }; From 9d93afb2a1a5d4f554e6eff3297b0612b3cbf5be Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 12 Sep 2016 14:07:33 +0200 Subject: [PATCH 21/93] Switch target version of this branch to 2.2.4 --- VERSION.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.cmake b/VERSION.cmake index 522ed26b9..ed25cd247 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ set( MIRALL_VERSION_MAJOR 2 ) set( MIRALL_VERSION_MINOR 2 ) -set( MIRALL_VERSION_PATCH 3 ) +set( MIRALL_VERSION_PATCH 4 ) set( MIRALL_VERSION_YEAR 2016 ) set( MIRALL_SOVERSION 0 ) From 37adaa7872fa31179e13b3496b957d5c60478678 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 26 Jul 2016 16:47:44 +0200 Subject: [PATCH 22/93] Update owner to be ownCloud GmbH Fixes #5079 (cherry picked from commit a83c5598e850730c277f365e38a2348b825351a9) --- src/libsync/owncloudtheme.cpp | 2 +- src/libsync/theme.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsync/owncloudtheme.cpp b/src/libsync/owncloudtheme.cpp index 0916fa88d..f5fcbd945 100644 --- a/src/libsync/owncloudtheme.cpp +++ b/src/libsync/owncloudtheme.cpp @@ -47,7 +47,7 @@ QString ownCloudTheme::about() const devString = trUtf8("

Version %2. For more information visit %4

" "

By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, " "Olivier Goffart, Markus Götz and others.

" - "

Copyright ownCloud, Inc.

" + "

Copyright ownCloud GmbH

" "

Licensed under the GNU General Public License (GPL) Version 2.0
" "ownCloud and the ownCloud Logo are registered trademarks of ownCloud, " "Inc. in the United States, other countries, or both.

" diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 572cceca3..5dfecc94b 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -286,7 +286,7 @@ QString Theme::about() const .arg(MIRALL_VERSION_STRING).arg("http://" MIRALL_STRINGIFY(APPLICATION_DOMAIN)) .arg(MIRALL_STRINGIFY(APPLICATION_DOMAIN)); - re += tr("

Copyright ownCloud, Incorporated

"); + re += tr("

Copyright ownCloud GmbH

"); re += tr("

Distributed by %1 and licensed under the GNU General Public License (GPL) Version 2.0.
" "%2 and the %2 logo are registered trademarks of %1 in the " "United States, other countries, or both.

") From cb19ebc9e3926be632bafc52119d7eea1c3863bb Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 17 Aug 2016 15:48:25 +0200 Subject: [PATCH 23/93] ShareLink: Ensure the password line edit is enabled #5117 (cherry picked from commit b541fea793a1249d6833474765e2b7a6574e492c) --- src/gui/sharelinkwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index 86a4b1d27..d8a84f8ad 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -366,6 +366,7 @@ void ShareLinkWidget::slotCheckBoxShareLinkClicked() _ui->checkBox_password->setText(tr("Public shå requires a password")); _ui->checkBox_expire->setEnabled(false); _ui->checkBox_editing->setEnabled(false); + _ui->lineEdit_password->setEnabled(true); _ui->lineEdit_password->setFocus(); _ui->pushButton_copy->hide(); _ui->widget_shareLink->show(); @@ -432,6 +433,7 @@ void ShareLinkWidget::slotCheckBoxPasswordClicked() _ui->lineEdit_password->show(); _ui->pushButton_setPassword->show(); _ui->lineEdit_password->setPlaceholderText(tr("Please Set Password")); + _ui->lineEdit_password->setEnabled(true); _ui->lineEdit_password->setFocus(); } else { setPassword(QString()); From 3cdcd8dea0cc5eaf62f474b51529a9ec5cf7a136 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 6 Sep 2016 11:11:03 +0200 Subject: [PATCH 24/93] Selective Sync: Fix request loop and show error in view (#5154) I got into a situation where the model would endlessly request the directory contents from the server because we did not notice yet that the server is actually in maintenance mode while we were expanding the tree view when changing the tab to the account or when just expanding it by clicking. (cherry picked from commit 524220d0907713408298a36df18bd04635ce5563) --- src/gui/folderstatusmodel.cpp | 11 ++++++++++- src/gui/folderstatusmodel.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 746708b15..6fab1095e 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -164,7 +164,8 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const switch(role) { case Qt::DisplayRole: if (x->_hasError) { - return tr("Error while loading the list of folders from the server."); + return QVariant(tr("Error while loading the list of folders from the server.") + + QString("\n") + x->_lastErrorString); } else { return tr("Fetching folder list from server..."); } @@ -498,6 +499,10 @@ bool FolderStatusModel::canFetchMore(const QModelIndex& parent) const auto info = infoForIndex(parent); if (!info || info->_fetched || info->_fetching) return false; + if (info->_hasError) { + // Keep showing the error to the user, it will be hidden when the account reconnects + return false; + } return true; } @@ -548,6 +553,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list) if (parentInfo->hasLabel()) { beginRemoveRows(idx, 0 ,0); + parentInfo->_lastErrorString.clear(); parentInfo->_hasError = false; parentInfo->_fetchingLabel = false; endRemoveRows(); @@ -675,6 +681,9 @@ void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply* r) } auto parentInfo = infoForIndex(idx); if (parentInfo) { + qDebug() << r->errorString(); + parentInfo->_lastErrorString = r->errorString(); + if (r->error() == QNetworkReply::ContentNotFoundError) { parentInfo->_fetched = true; } else { diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index f12de0227..312e978ae 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -63,6 +63,7 @@ public: bool _fetched; // If we did the LSCOL for this folder already bool _fetching; // Whether a LSCOL job is currently running bool _hasError; // If the last fetching job ended in an error + QString _lastErrorString; bool _fetchingLabel; // Whether a 'fetching in progress' label is shown. bool _isUndecided; // undecided folders are the big folders that the user has not accepted yet From 4abaee7736bb2ecdbe2d5c357120910130dcf4a3 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 6 Sep 2016 10:42:59 +0200 Subject: [PATCH 25/93] Recall: Copy instead of move recalled file #5150 That was an unintentional change in 2662203fb7277d5d1a57cef556279f8cd3b974f5 Also expand the test case to cover this. (cherry picked from commit af9c4d0e2fe1a42e1faf14779ca5ef1088bd1314) --- csync/tests/ownCloud/t_recall.pl | 4 ++++ src/libsync/propagatedownload.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/csync/tests/ownCloud/t_recall.pl b/csync/tests/ownCloud/t_recall.pl index 008cad8fd..244618cf8 100755 --- a/csync/tests/ownCloud/t_recall.pl +++ b/csync/tests/ownCloud/t_recall.pl @@ -64,6 +64,10 @@ csync(); assert( -e glob(localDir().'dir/file2_.sys.admin#recall#-*.dat' ) ); assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) ); +# verify that the original files still exist +assert( -e glob(localDir().'dir/file2.dat' ) ); +assert( -e glob(localDir().'dir/file3.dat' ) ); + #Remove the recall file unlink(localDir() . ".sys.admin#recall#"); diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 306788388..27a214d75 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -638,8 +638,9 @@ static void handleRecallFile(const QString &fn) QString rpath = makeRecallFileName(fpath); qDebug() << "Copy recall file: " << fpath << " -> " << rpath; - QString error; - FileSystem::uncheckedRenameReplace(fpath, rpath, &error); + // Remove the target first, QFile::copy will not overwrite it. + FileSystem::remove(rpath); + QFile::copy(fpath, rpath); } } From 65c49e1de6b5810136753cf359eefe7ccd49dc0e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 14 Jul 2016 09:21:28 +0200 Subject: [PATCH 26/93] CleanupPollsJob: Fix possible leak Missing deleteLater when the CleanupPollsJob aborts. This is only a problem if the SyncEngine is kept alive a long time. Which is usually not the case in the configuration where poll jobs are used. (cherry picked from commit 34650248985914523f0684c597f0c366b703f8d7) --- src/libsync/owncloudpropagator.cpp | 2 ++ src/libsync/owncloudpropagator.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index dce440391..72046fccf 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -762,6 +762,7 @@ void CleanupPollsJob::slotPollFinished() Q_ASSERT(job); if (job->_item->_status == SyncFileItem::FatalError) { emit aborted(job->_item->_errorString); + deleteLater(); return; } else if (job->_item->_status != SyncFileItem::Success) { qDebug() << "There was an error with file " << job->_item->_file << job->_item->_errorString; @@ -771,6 +772,7 @@ void CleanupPollsJob::slotPollFinished() job->_item->_status = SyncFileItem::FatalError; job->_item->_errorString = tr("Error writing metadata to the database"); emit aborted(job->_item->_errorString); + deleteLater(); return; } } diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 7c0a03a2b..8e2ce89c3 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -410,6 +410,10 @@ public: ~CleanupPollsJob(); + /** + * Start the job. After the job is completed, it will emit either finished or aborted, and it + * will destroy itself. + */ void start(); signals: void finished(); From 1040e7b57b2355b75882d48e2179fa612653857b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 10 Sep 2016 17:08:52 +0200 Subject: [PATCH 27/93] ExcludeFiles: Fix when the folder casing is not the same in the settings and in the FS If the folder has different case in the settings and in the FS, we should not ignore all the files. This is important for the files system watcher. (cherry picked from commit 98268d102fb343c103cbb4fb28dedd390f3c9ecf) --- src/libsync/excludedfiles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsync/excludedfiles.cpp b/src/libsync/excludedfiles.cpp index b2839d05d..6af6d8a00 100644 --- a/src/libsync/excludedfiles.cpp +++ b/src/libsync/excludedfiles.cpp @@ -12,6 +12,7 @@ */ #include "excludedfiles.h" +#include "utility.h" #include @@ -63,7 +64,7 @@ bool ExcludedFiles::isExcluded( const QString& basePath, bool excludeHidden) const { - if (!filePath.startsWith(basePath)) { + if (!filePath.startsWith(basePath, Utility::fsCasePreserving() ? Qt::CaseInsensitive : Qt::CaseSensitive)) { // Mark paths we're not responsible for as excluded... return true; } From 5ffaf3a90f85e0295e1c3b9269e54c37695d3bbf Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 5 Jul 2016 13:53:57 +0200 Subject: [PATCH 28/93] Set discovery thread priority to low #5017 (cherry picked from commit bd7ec196443202501d76f12db5f243e1efb7cf57) --- src/libsync/syncengine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 85d7e9b92..a9f9701de 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -765,7 +765,11 @@ void SyncEngine::startSync() qDebug() << "#### Discovery start #################################################### >>"; - _thread.start(); + // Usually the discovery runs in the background: We want to avoid + // stealing too much time from other processes that the user might + // be interacting with at the time. + _thread.start(QThread::LowPriority); + _discoveryMainThread = new DiscoveryMainThread(account()); _discoveryMainThread->setParent(this); connect(this, SIGNAL(finished(bool)), _discoveryMainThread, SLOT(deleteLater())); From 907918dca35b2e4153963d9ab8690511c7a80710 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 12 Sep 2016 14:03:11 +0200 Subject: [PATCH 29/93] FolderWatcher: Act on relative paths #5116 (#5153) (cherry picked from commit d5a481f13240b50ff3993184152d3d4145ebfde0) --- src/gui/folder.cpp | 5 ----- src/gui/folder.h | 5 ----- src/gui/folderwatcher.cpp | 17 +++++++++++++---- src/gui/folderwatcher.h | 1 + 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index a4f2e25fa..738fe7f11 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -628,11 +628,6 @@ void Folder::removeFromSettings() const settings->remove(FolderMan::escapeAlias(_definition.alias)); } -bool Folder::isFileExcludedAbsolute(const QString& fullPath) const -{ - return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles); -} - bool Folder::isFileExcludedRelative(const QString& relativePath) const { return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles); diff --git a/src/gui/folder.h b/src/gui/folder.h index 79a27ad62..bfd4de4d7 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -183,11 +183,6 @@ public: /// Removes the folder from the account's settings. void removeFromSettings() const; - /** - * Returns whether a file inside this folder should be excluded. - */ - bool isFileExcludedAbsolute(const QString& fullPath) const; - /** * Returns whether a file inside this folder should be excluded. */ diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp index 30809c82f..c115611bb 100644 --- a/src/gui/folderwatcher.cpp +++ b/src/gui/folderwatcher.cpp @@ -41,7 +41,9 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder) : QObject(folder), _folder(folder) { - _d.reset(new FolderWatcherPrivate(this, root)); + _canonicalFolderPath = QFileInfo(root).canonicalFilePath(); + + _d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath)); _timer.start(); } @@ -55,10 +57,17 @@ bool FolderWatcher::pathIsIgnored( const QString& path ) if( !_folder ) return false; #ifndef OWNCLOUD_TEST - if (_folder->isFileExcludedAbsolute(path)) { - qDebug() << "* Ignoring file" << path; - return true; + QString relPath = path; + if (relPath.startsWith(_canonicalFolderPath)) { + relPath = relPath.remove(0, _canonicalFolderPath.length()+1); + if (_folder->isFileExcludedRelative(relPath)) { + qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath; + return true; + } } + // there could be an odd watch event not being inside the _canonicalFolderPath + // We will just not ignore it then, who knows. + #endif return false; } diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index 15fe223a4..9b0d17471 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -89,6 +89,7 @@ private: QTime _timer; QSet _lastPaths; Folder* _folder; + QString _canonicalFolderPath; friend class FolderWatcherPrivate; }; From 2d110540ee5a67d2c014fcf4258840d3aaf538ac Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 12 Sep 2016 14:12:33 +0200 Subject: [PATCH 30/93] Dolphin Plugin: Use the Application name for the socket path (#5172) do not hardcode. This should fix #5165 --- shell_integration/dolphin/ownclouddolphinpluginhelper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp index 027e0e68e..68c2a9c29 100644 --- a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp +++ b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp @@ -21,6 +21,7 @@ #include #include #include "ownclouddolphinpluginhelper.h" +#include "config.h" OwncloudDolphinPluginHelper* OwncloudDolphinPluginHelper::instance() { @@ -67,7 +68,10 @@ void OwncloudDolphinPluginHelper::tryConnect() return; } QString runtimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR")); - QString socketPath = runtimeDir + QLatin1String("/ownCloud/socket"); + runtimeDir.append( QChar('/')); + runtimeDir.append( QLatin1String(APPLICATION_SHORTNAME) ); + + const QString socketPath = runtimeDir + QLatin1String("/socket"); _socket.connectToServer(socketPath); } From 7fd00b2cd529ff0cdbf69acda7f0566e78c762cf Mon Sep 17 00:00:00 2001 From: Piotr M Date: Mon, 12 Sep 2016 13:20:19 +0200 Subject: [PATCH 31/93] add server capabilities to owncloudcmd --- src/cmd/cmd.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index fcfea2c7e..715f293bb 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -29,6 +29,7 @@ #include "syncengine.h" #include "syncjournaldb.h" #include "config.h" +#include "connectionvalidator.h" #include "cmd.h" @@ -68,6 +69,8 @@ struct CmdOptions { // So we have to use a global variable CmdOptions *opts = 0; +const qint64 timeoutToUseMsec = qMax(1000, ConnectionValidator::DefaultCallingIntervalMsec - 5*1000); + class EchoDisabler { public: @@ -388,6 +391,23 @@ int main(int argc, char **argv) { account->setCredentials(cred); account->setSslErrorHandler(sslErrorHandler); +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + //obtain capabilities using event loop + QEventLoop loop; + + JsonApiJob *job = new JsonApiJob(account, QLatin1String("ocs/v1.php/cloud/capabilities")); + job->setTimeout(timeoutToUseMsec); + QObject::connect(job, &JsonApiJob::jsonReceived, [&](const QVariantMap &json) { + auto caps = json.value("ocs").toMap().value("data").toMap().value("capabilities"); + qDebug() << "Server capabilities" << caps; + account->setCapabilities(caps.toMap()); + loop.quit(); + }); + job->start(); + + loop.exec(); +#endif + // much lower age than the default since this utility is usually made to be run right after a change in the tests SyncEngine::minimumFileAgeForUpload = 0; From 904cd46f757bf329b719bd815394ff986be99aaf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 12 Sep 2016 15:02:54 +0200 Subject: [PATCH 32/93] Revert "FolderWatcher: Act on relative paths #5116 (#5153)" This is not sufficient as it is not working for the Socket API. Next commit will fix it in another layer. Also, not ignoring paths that are not inside the folder is wrong as it might still happen if the name has a different casing This reverts commit d5a481f13240b50ff3993184152d3d4145ebfde0. --- src/gui/folder.cpp | 5 +++++ src/gui/folder.h | 5 +++++ src/gui/folderwatcher.cpp | 17 ++++------------- src/gui/folderwatcher.h | 1 - 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 532c38de5..f94ba71b4 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -621,6 +621,11 @@ void Folder::removeFromSettings() const settings->remove(FolderMan::escapeAlias(_definition.alias)); } +bool Folder::isFileExcludedAbsolute(const QString& fullPath) const +{ + return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles); +} + bool Folder::isFileExcludedRelative(const QString& relativePath) const { return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles); diff --git a/src/gui/folder.h b/src/gui/folder.h index 762ea52b1..40ff6deb1 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -184,6 +184,11 @@ public: /// Removes the folder from the account's settings. void removeFromSettings() const; + /** + * Returns whether a file inside this folder should be excluded. + */ + bool isFileExcludedAbsolute(const QString& fullPath) const; + /** * Returns whether a file inside this folder should be excluded. */ diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp index c115611bb..30809c82f 100644 --- a/src/gui/folderwatcher.cpp +++ b/src/gui/folderwatcher.cpp @@ -41,9 +41,7 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder) : QObject(folder), _folder(folder) { - _canonicalFolderPath = QFileInfo(root).canonicalFilePath(); - - _d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath)); + _d.reset(new FolderWatcherPrivate(this, root)); _timer.start(); } @@ -57,17 +55,10 @@ bool FolderWatcher::pathIsIgnored( const QString& path ) if( !_folder ) return false; #ifndef OWNCLOUD_TEST - QString relPath = path; - if (relPath.startsWith(_canonicalFolderPath)) { - relPath = relPath.remove(0, _canonicalFolderPath.length()+1); - if (_folder->isFileExcludedRelative(relPath)) { - qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath; - return true; - } + if (_folder->isFileExcludedAbsolute(path)) { + qDebug() << "* Ignoring file" << path; + return true; } - // there could be an odd watch event not being inside the _canonicalFolderPath - // We will just not ignore it then, who knows. - #endif return false; } diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index 9b0d17471..15fe223a4 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -89,7 +89,6 @@ private: QTime _timer; QSet _lastPaths; Folder* _folder; - QString _canonicalFolderPath; friend class FolderWatcherPrivate; }; From c2cb729fee51d9d45888c6fdb781e4a1a7b28edf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 12 Sep 2016 15:17:21 +0200 Subject: [PATCH 33/93] Folder: Cannonicalize the path This is important because we compare the paths from the file system watcher if it starts with this path. Same in the SocketAPI where we need to use cannonical paths in the REGISTER_PATH command, as the plugin themself will do this comparison. Issue #5116 --- src/gui/folder.cpp | 13 +++++++------ src/gui/folder.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index f94ba71b4..b1112e13a 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -124,6 +124,11 @@ void Folder::checkLocalPath() { const QFileInfo fi(_definition.localPath); + _canonicalLocalPath = fi.canonicalFilePath(); + if( !_canonicalLocalPath.endsWith('/') ) { + _canonicalLocalPath.append('/'); + } + if( fi.isDir() && fi.isReadable() ) { qDebug() << "Checked local path ok"; } else { @@ -161,11 +166,7 @@ QString Folder::alias() const QString Folder::path() const { - QString p(_definition.localPath); - if( ! p.endsWith('/') ) { - p.append('/'); - } - return p; + return _canonicalLocalPath; } QString Folder::shortGuiLocalPath() const @@ -198,7 +199,7 @@ void Folder::setIgnoreHiddenFiles(bool ignore) QString Folder::cleanPath() { - QString cleanedPath = QDir::cleanPath(_definition.localPath); + QString cleanedPath = QDir::cleanPath(_canonicalLocalPath); if(cleanedPath.length() == 3 && cleanedPath.endsWith(":/")) cleanedPath.remove(2,1); diff --git a/src/gui/folder.h b/src/gui/folder.h index 40ff6deb1..f5967c9b6 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -288,6 +288,7 @@ private: AccountStatePtr _accountState; FolderDefinition _definition; + QString _canonicalLocalPath; // As returned with QFileInfo:canonicalFilePath. Always ends with "/" SyncResult _syncResult; QScopedPointer _engine; From dfb121236cd198fb0b1ef2c4ed7ef78fed70f123 Mon Sep 17 00:00:00 2001 From: ckamm Date: Tue, 13 Sep 2016 14:14:27 +0200 Subject: [PATCH 34/93] Excludes: Consider files in hidden folders excluded #5163 (#5173) Previously, we only checked the hiddenness of the target file and ignored the hiddenness of the containing folders. This lead to undesired behavior when people synced their home folders and there was a folder watcher notification for a non-hidden file in one of the hidden folders. I'm not fully sure why, but sometimes notifications for .foo/bar were already ignored, but notifications for .foo/bar/car were not. This may be because of how we set up the FolderWatchers on Linux. The new behavior is to check all path components for hiddenness, up until the base path (but excluding the base path, so using a hidden folder as a sync folder will work). --- src/libsync/excludedfiles.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libsync/excludedfiles.cpp b/src/libsync/excludedfiles.cpp index e3afd1ed4..023e6da63 100644 --- a/src/libsync/excludedfiles.cpp +++ b/src/libsync/excludedfiles.cpp @@ -76,13 +76,22 @@ bool ExcludedFiles::isExcluded( return true; } - QFileInfo fi(filePath); if( excludeHidden ) { - if( fi.isHidden() || fi.fileName().startsWith(QLatin1Char('.')) ) { - return true; + QString path = filePath; + // Check all path subcomponents, but to *not* check the base path: + // We do want to be able to sync with a hidden folder as the target. + while (path.size() > basePath.size()) { + QFileInfo fi(path); + if( fi.isHidden() || fi.fileName().startsWith(QLatin1Char('.')) ) { + return true; + } + + // Get the parent path + path = fi.absolutePath(); } } + QFileInfo fi(filePath); csync_ftw_type_e type = CSYNC_FTW_TYPE_FILE; if (fi.isDir()) { type = CSYNC_FTW_TYPE_DIR; From b7809ded23fdba6aa50b6d834b5bd5fc16865eea Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 13 Sep 2016 14:34:22 +0200 Subject: [PATCH 35/93] OS X: Try to fix tray menu not updating correctly #5158 (#5177) I even had this issue long before 2.3 that submenus suddenly disappeared. Now we refrain from updating while visible. --- src/gui/owncloudgui.cpp | 38 ++++++++++++++++++++++++++++++++++++-- src/gui/owncloudgui.h | 4 ++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index e98ae1cc6..60be57f24 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -56,6 +56,7 @@ ownCloudGui::ownCloudGui(Application *parent) : _settingsDialog(new SettingsDialog(this)), #endif _logBrowser(0), + _contextMenuVisible(false), _recentActionsMenu(0), _qdbusmenuWorkaround(false), _folderOpenActionMapper(new QSignalMapper(this)), @@ -405,6 +406,21 @@ static bool minimalTrayMenu() return !var.isEmpty(); } + +void ownCloudGui::slotContextMenuAboutToShow() +{ + // For some reason on OS X _contextMenu->isVisible returns always false + qDebug() << ""; + _contextMenuVisible = true; +} + +void ownCloudGui::slotContextMenuAboutToHide() +{ + // For some reason on OS X _contextMenu->isVisible returns always false + qDebug() << ""; + _contextMenuVisible = false; +} + void ownCloudGui::setupContextMenu() { // The tray menu is surprisingly problematic. Being able to switch to @@ -455,7 +471,14 @@ void ownCloudGui::setupContextMenu() // Update the context menu whenever we're about to show it // to the user. +#ifdef Q_OS_MAC + // https://bugreports.qt.io/browse/QTBUG-54633 +#else connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(setupContextMenu())); +#endif + connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(slotContextMenuAboutToShow())); + connect(_contextMenu.data(), SIGNAL(aboutToHide()), SLOT(slotContextMenuAboutToHide())); + _recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data()); // this must be called only once after creating the context menu, or @@ -560,8 +583,15 @@ void ownCloudGui::setupContextMenu() void ownCloudGui::setupContextMenuIfVisible() { - if (_contextMenu && _contextMenu->isVisible()) +#ifdef Q_OS_MAC + // https://bugreports.qt.io/browse/QTBUG-54845 + if (!_contextMenuVisible) { setupContextMenu(); + } +#else + if (_contextMenuVisible) + setupContextMenu(); +#endif } void ownCloudGui::slotShowTrayMessage(const QString &title, const QString &msg) @@ -724,9 +754,13 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo& // Update the "Recent" menu if the context menu is being shown, // otherwise it'll be updated later, when the context menu is opened. - if (_contextMenu && _contextMenu->isVisible()) { +#ifdef Q_OS_MAC + // https://bugreports.qt.io/browse/QTBUG-54845 +#else + if (_contextMenuVisible) { slotRebuildRecentMenus(); } +#endif } if (progress.isUpdatingEstimates() diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 982b4825b..682944cb5 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -58,6 +58,8 @@ signals: public slots: void setupContextMenu(); void setupContextMenuIfVisible(); + void slotContextMenuAboutToShow(); + void slotContextMenuAboutToHide(); void slotComputeOverallSyncStatus(); void slotShowTrayMessage(const QString &title, const QString &msg); void slotShowOptionalTrayMessage(const QString &title, const QString &msg); @@ -102,6 +104,8 @@ private: QPointer_logBrowser; // tray's menu QScopedPointer _contextMenu; + bool _contextMenuVisible; + QMenu *_recentActionsMenu; QVector _accountMenus; bool _qdbusmenuWorkaround; From b228488eb7a4631da34086b2fd211fe13a6b9be2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 12 Sep 2016 15:02:54 +0200 Subject: [PATCH 36/93] Revert "FolderWatcher: Act on relative paths #5116 (#5153)" This is not sufficient as it is not working for the Socket API. Next commit will fix it in another layer. Also, not ignoring paths that are not inside the folder is wrong as it might still happen if the name has a different casing This reverts commit d5a481f13240b50ff3993184152d3d4145ebfde0. (cherry picked from commit 904cd46f757bf329b719bd815394ff986be99aaf) --- src/gui/folder.cpp | 5 +++++ src/gui/folder.h | 5 +++++ src/gui/folderwatcher.cpp | 17 ++++------------- src/gui/folderwatcher.h | 1 - 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 738fe7f11..a4f2e25fa 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -628,6 +628,11 @@ void Folder::removeFromSettings() const settings->remove(FolderMan::escapeAlias(_definition.alias)); } +bool Folder::isFileExcludedAbsolute(const QString& fullPath) const +{ + return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles); +} + bool Folder::isFileExcludedRelative(const QString& relativePath) const { return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles); diff --git a/src/gui/folder.h b/src/gui/folder.h index bfd4de4d7..79a27ad62 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -183,6 +183,11 @@ public: /// Removes the folder from the account's settings. void removeFromSettings() const; + /** + * Returns whether a file inside this folder should be excluded. + */ + bool isFileExcludedAbsolute(const QString& fullPath) const; + /** * Returns whether a file inside this folder should be excluded. */ diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp index c115611bb..30809c82f 100644 --- a/src/gui/folderwatcher.cpp +++ b/src/gui/folderwatcher.cpp @@ -41,9 +41,7 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder) : QObject(folder), _folder(folder) { - _canonicalFolderPath = QFileInfo(root).canonicalFilePath(); - - _d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath)); + _d.reset(new FolderWatcherPrivate(this, root)); _timer.start(); } @@ -57,17 +55,10 @@ bool FolderWatcher::pathIsIgnored( const QString& path ) if( !_folder ) return false; #ifndef OWNCLOUD_TEST - QString relPath = path; - if (relPath.startsWith(_canonicalFolderPath)) { - relPath = relPath.remove(0, _canonicalFolderPath.length()+1); - if (_folder->isFileExcludedRelative(relPath)) { - qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath; - return true; - } + if (_folder->isFileExcludedAbsolute(path)) { + qDebug() << "* Ignoring file" << path; + return true; } - // there could be an odd watch event not being inside the _canonicalFolderPath - // We will just not ignore it then, who knows. - #endif return false; } diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index 9b0d17471..15fe223a4 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -89,7 +89,6 @@ private: QTime _timer; QSet _lastPaths; Folder* _folder; - QString _canonicalFolderPath; friend class FolderWatcherPrivate; }; From 3d06f4b7c92b32f4e4a430ae5395ba224230cdbb Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Tue, 20 Sep 2016 09:12:39 +0200 Subject: [PATCH 37/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 + translations/client_ca.ts | 92 ++++++++++---------- translations/client_cs.ts | 94 ++++++++++---------- translations/client_de.ts | 94 ++++++++++---------- translations/client_el.ts | 160 +++++++++++++++++------------------ translations/client_en.ts | 90 ++++++++++---------- translations/client_es.ts | 94 ++++++++++---------- translations/client_es_AR.ts | 90 ++++++++++---------- translations/client_et.ts | 90 ++++++++++---------- translations/client_eu.ts | 92 ++++++++++---------- translations/client_fa.ts | 90 ++++++++++---------- translations/client_fi.ts | 94 ++++++++++---------- translations/client_fr.ts | 94 ++++++++++---------- translations/client_gl.ts | 94 ++++++++++---------- translations/client_hu.ts | 94 ++++++++++---------- translations/client_it.ts | 94 ++++++++++---------- translations/client_ja.ts | 96 ++++++++++----------- translations/client_nb_NO.ts | 94 ++++++++++---------- translations/client_nl.ts | 94 ++++++++++---------- translations/client_pl.ts | 94 ++++++++++---------- translations/client_pt.ts | 94 ++++++++++---------- translations/client_pt_BR.ts | 94 ++++++++++---------- translations/client_ru.ts | 94 ++++++++++---------- translations/client_sk.ts | 94 ++++++++++---------- translations/client_sl.ts | 94 ++++++++++---------- translations/client_sr.ts | 94 ++++++++++---------- translations/client_sv.ts | 96 ++++++++++----------- translations/client_th.ts | 94 ++++++++++---------- translations/client_tr.ts | 94 ++++++++++---------- translations/client_uk.ts | 94 ++++++++++---------- translations/client_zh_CN.ts | 94 ++++++++++---------- translations/client_zh_TW.ts | 92 ++++++++++---------- 32 files changed, 1484 insertions(+), 1481 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index ac5b149d3..12cdd29d8 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -331,6 +331,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_ca.ts b/translations/client_ca.ts index 94c7e8b93..ee87c1502 100644 --- a/translations/client_ca.ts +++ b/translations/client_ca.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Error en escriure les metadades a la base de dades @@ -892,7 +892,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Error en carregar la llista de carpetes del servidor.
- + Signed out S'ha desconnectat @@ -902,96 +902,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an
- + Fetching folder list from server... - + Checking for changes in '%1' S'està comprovant els canvis a '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" S'està sincronitzant %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) descarrega %1/s - + u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) pujada %1/s - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 pendent, %1 de %2, fitxer %3 de %4 - + file %1 of %2 fitxer %1 de %2 - + Waiting... S'està esperant... - + Waiting for %n other folder(s)... S'està esperant %n altra carpeta...S'està esperant %n altres carpetes - + Preparing to sync... S'està preparant per sincronitzar... @@ -1954,17 +1954,17 @@ No és aconsellada usar-la.
- + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery El fitxer ha canviat des de que es va descobrir - + Error writing metadata to the database Error en escriure les metadades a la base de dades @@ -2450,18 +2450,18 @@ No és aconsellada usar-la.
- + Public sh&aring requires a password La comp&artició pública requereix una contrasenya - + Please Set Password Establiu la contrasenya - - + + &Share link Com&parteix l'enllaç @@ -2871,12 +2871,12 @@ No és aconsellada usar-la. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2981,64 +2981,64 @@ No és aconsellada usar-la. - + Unable to read from the sync journal. - + Cannot open the sync journal No es pot obrir el diari de sincronització - + File name contains at least one invalid character El nom del fitxer conté al menys un caràcter invàlid - - + + Ignored because of the "choose what to sync" blacklist S'ignora degut al filtre a «Trieu què sincronitzar» - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring No es permet pujar aquest fitxer perquè només és de lectura en el servidor, es restaura - - + + Not allowed to remove, restoring No es permet l'eliminació, es restaura - + Local files and share folder removed. Fitxers locals i carpeta compartida esborrats. - + Move not allowed, item restored No es permet moure'l, l'element es restaura - + Move not allowed because %1 is read-only No es permet moure perquè %1 només és de lectura - + the destination el destí - + the source l'origen @@ -3068,7 +3068,7 @@ No és aconsellada usar-la. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3293,8 +3293,8 @@ No és aconsellada usar-la. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versió %2. Per més informació visiteu <a href="%3">%4</a></p><p><small>Per Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz i altres.</small></p><p>Copyright ownCloud, Inc.</p><p>amb llicència GNU General Public License (GPL) versió 2.0<br/>ownCloud i el logo d'ownCloud són marques registrades d'ownCloud, Inc. als Estats Units, altres països, o ambdós.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_cs.ts b/translations/client_cs.ts index b7a79f0c1..7f7d54c2e 100644 --- a/translations/client_cs.ts +++ b/translations/client_cs.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Chyba zápisu metadat do databáze @@ -894,7 +894,7 @@ Pokračováním v synchronizaci způsobí přepsání všech vašich souborů st Chyba při načítání seznamu adresářů ze serveru. - + Signed out Odhlášeno @@ -904,96 +904,96 @@ Pokračováním v synchronizaci způsobí přepsání všech vašich souborů st Přidání adresáře je vypnuto, protože již synchronizujete všechny své soubory. Pokud chcete synchronizovat pouze některé adresáře, odstraňte aktuálně nastavený kořenový adresář. - + Fetching folder list from server... Načítání seznamu adresářů ze serveru... - + Checking for changes in '%1' Kontrola změn v '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchronizuji %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) stahování %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) nahrávání %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 ze %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 zbývá, %1 ze %2, soubor %3 z %4 - + file %1 of %2 soubor %1 z %2 - + Waiting... Chvíli strpení... - + Waiting for %n other folder(s)... Čeká se na %n další adresář...Čeká se na %n další adresáře...Čeká se na %n dalších adresářů... - + Preparing to sync... Synchronizace se připravuje... @@ -1956,17 +1956,17 @@ Nedoporučuje se jí používat. Stažený soubor je prázdný, přestože server oznámil, že měl být %1. - + File %1 cannot be saved because of a local file name clash! Soubor %1 nemohl být uložen z důvodu kolize názvu se souborem v místním systému! - + File has changed since discovery Soubor se mezitím změnil - + Error writing metadata to the database Chyba zápisu metadat do databáze @@ -2452,18 +2452,18 @@ Nedoporučuje se jí používat. - + Public sh&aring requires a password Veřejné s&dílení vyžaduje heslo - + Please Set Password Nastavte prosím heslo - - + + &Share link &Sdílet odkaz @@ -2873,12 +2873,12 @@ Nedoporučuje se jí používat. Je dostupných pouze %1, pro spuštění je potřeba alespoň %2 - + Not allowed because you don't have permission to add parent folder Není povoleno, protože nemáte oprávnění vytvořit nadřazený adresář - + Not allowed because you don't have permission to add files in that folder Není povoleno, protože nemáte oprávnění přidávat soubory do tohoto adresáře @@ -2983,64 +2983,64 @@ Nedoporučuje se jí používat. Nelze načíst blacklist z místní databáze - + Unable to read from the sync journal. Nelze číst ze žurnálu synchronizace. - + Cannot open the sync journal Nelze otevřít synchronizační žurnál - + File name contains at least one invalid character Jméno souboru obsahuje aelspoň jeden neplatný znak - - + + Ignored because of the "choose what to sync" blacklist Ignorováno podle nastavení "vybrat co synchronizovat" - + Not allowed because you don't have permission to add subfolders to that folder Není povoleno, protože nemáte oprávnění přidávat podadresáře do tohoto adresáře - + Not allowed to upload this file because it is read-only on the server, restoring Není povoleno nahrát tento soubor, protože je na serveru uložen pouze pro čtení, obnovuji - - + + Not allowed to remove, restoring Odstranění není povoleno, obnovuji - + Local files and share folder removed. Místní soubory a sdílený adresář byly odstraněny. - + Move not allowed, item restored Přesun není povolen, položka obnovena - + Move not allowed because %1 is read-only Přesun není povolen, protože %1 je pouze pro čtení - + the destination cílové umístění - + the source zdroj @@ -3070,8 +3070,8 @@ Nedoporučuje se jí používat. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Nedoporučuje se jí používat. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Verze %2. Pro další informace navštivte <a href="%3">%4</a></p><p><small>Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz a další.</small></p><p>Copyright ownCloud, Inc.</p><p>Licencováno pod GNU General Public License (GPL) Version 2.0<br/>ownCloud a ownCloud logo jsou registrované obchodní známky ownCloud, Inc. ve Spojených státech, ostatních zemích nebo obojí</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_de.ts b/translations/client_de.ts index be64da107..fd9c38f36 100644 --- a/translations/client_de.ts +++ b/translations/client_de.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fehler beim Schreiben der Metadaten in die Datenbank @@ -893,7 +893,7 @@ Wenn diese Synchronisation fortgesetzt wird, werden Dateien eventuell von älter Fehler beim Empfang der Ordnerliste vom Server. - + Signed out Abgemeldet @@ -903,96 +903,96 @@ Wenn diese Synchronisation fortgesetzt wird, werden Dateien eventuell von älter Sie können keinen weiteren Ordner hinzufügen, da Sie bereits alle Dateien synchronisieren. Falls sie mehrere Ordner synchronisieren wollen, entferen Sie zunächst den konfigurierten Wurzel-Ordner. - + Fetching folder list from server... Empfange Orderliste vom Server... - + Checking for changes in '%1' Nach Änderungen suchen in '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchronisiere %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) Download %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) Upload %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 von %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 übrig, %1 von %2, Datei %3 von %4 - + file %1 of %2 Datei %1 von %2 - + Waiting... Warte... - + Waiting for %n other folder(s)... Warte auf einen anderen OrdnerWarte auf %n andere Ordner - + Preparing to sync... Bereite Synchronisation vor... @@ -1954,17 +1954,17 @@ Es ist nicht ratsam, diese zu benutzen. Die heruntergeladene Datei ist leer, obwohl der Server %1 als Größe übermittelt hat. - + File %1 cannot be saved because of a local file name clash! Die Datei %1 kann aufgrund eines Konfliktes mit dem lokalen Dateinamen nicht gespeichert geladen werden! - + File has changed since discovery Datei ist seit der Entdeckung geändert worden - + Error writing metadata to the database Fehler beim Schreiben der Metadaten in die Datenbank @@ -2450,18 +2450,18 @@ Es ist nicht ratsam, diese zu benutzen. - + Public sh&aring requires a password Öffentliches Teilen erfordert ein P&asswort - + Please Set Password Bitte wählen Sie ein Passwort: - - + + &Share link &Link teilen @@ -2871,12 +2871,12 @@ Es ist nicht ratsam, diese zu benutzen. Nur %1 sind verfügbar. Zum Beginnen werden mindestens %2 benötigt. - + Not allowed because you don't have permission to add parent folder Nicht erlaubt, da Sie keine Rechte zur Erstellung von Unterordnern haben - + Not allowed because you don't have permission to add files in that folder Nicht erlaubt, da Sie keine Rechte zum Hinzufügen von Dateien in diesen Ordner haben @@ -2981,64 +2981,64 @@ Es ist nicht ratsam, diese zu benutzen. Fehler beim Einlesen der Blacklist aus der lokalen Datenbank - + Unable to read from the sync journal. Fehler beim Einlesen des Synchronisierungsprotokolls. - + Cannot open the sync journal Synchronisationsbericht kann nicht geöffnet werden - + File name contains at least one invalid character Der Dateiname enthält mindestens ein ungültiges Zeichen - - + + Ignored because of the "choose what to sync" blacklist Aufgrund der »Zu synchronisierende Elemente auswählen«-Sperrliste ignoriert - + Not allowed because you don't have permission to add subfolders to that folder Nicht erlaubt, da Sie keine Rechte zur Erstellung von Unterordnern haben - + Not allowed to upload this file because it is read-only on the server, restoring Das Hochladen dieser Datei ist nicht erlaubt, da die Datei auf dem Server schreibgeschützt ist, Wiederherstellung - - + + Not allowed to remove, restoring Löschen nicht erlaubt, Wiederherstellung - + Local files and share folder removed. Lokale Dateien und Freigabeordner wurden entfernt. - + Move not allowed, item restored Verschieben nicht erlaubt, Element wiederhergestellt - + Move not allowed because %1 is read-only Verschieben nicht erlaubt, da %1 schreibgeschützt ist - + the destination Das Ziel - + the source Die Quelle @@ -3068,8 +3068,8 @@ Es ist nicht ratsam, diese zu benutzen. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,8 +3293,8 @@ Es ist nicht ratsam, diese zu benutzen. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Version %2. Weitere Informationen unter <a href="%3">%4</a></p><p><small>Von Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz und anderen.</small></p><p>Copyright ownCloud, Inc.</p><p>Lizensiert unter den Bedingungen der GNU General Public License (GPL) Version 2.0<br/>ownCloud und das ownCloud Logo sind eingetragene Warenzeichen der ownCloud Inc. in den USA, anderen Ländern, oder beidem.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_el.ts b/translations/client_el.ts index 738b87ed5..ddb849201 100644 --- a/translations/client_el.ts +++ b/translations/client_el.ts @@ -522,9 +522,9 @@ OCC::CleanupPollsJob - + Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -724,7 +724,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Backup detected - + Ανιχνεύθηκε αντίγραφο ασφαλείας @@ -860,7 +860,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Synchronizing with local folder - + Συγχρονισμός με τοπικό φάκελο @@ -892,7 +892,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Σφάλμα κατά τη φόρτωση της λίστας φακέλων από το διακομιστή. - + Signed out Αποσύνδεση @@ -902,96 +902,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an Η επιλογή προσθήκης φακέλου δεν είναι διαθέσιμη καθώς συγχρονίζονται ήδη όλα τα αρχεία. Για να επιλέξετε συγχρονισμό φακέλων, αφαιρέστε τον αρχικό φάκελο που έχει ρυθμιστεί. - + Fetching folder list from server... Λήψη λίστας φακέλων από το διακομιστή... - + Checking for changes in '%1' Έλεγχος αλλαγών στο '%1'. - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Συγχρονισμός %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) λήψη %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) μεταφόρτωση %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 από %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 αρχείο %1 από %2 - + Waiting... Αναμονή... - + Waiting for %n other folder(s)... Αναμονή για %n άλλο φάκελο...Αναμονή για %n άλλους φακέλους... - + Preparing to sync... Προετοιμασία για συγχρονισμό... @@ -1526,7 +1526,7 @@ Items where deletion is allowed will be deleted if they prevent a directory from Closing in a few seconds... - + Κλείσιμο σε λίγα δευτερόλεπτα... @@ -1918,7 +1918,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -1954,19 +1954,19 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Το αρχείο %1 δεν είναι δυνατό να αποθηκευτεί λόγω διένεξης με το όνομα ενός τοπικού ονόματος αρχείου! - + File has changed since discovery Το αρχείο έχει αλλάξει από όταν ανακαλύφθηκε - + Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -1992,7 +1992,7 @@ It is not advisable to use it. could not delete file %1, error: %2 - + αδυναμία διαγραφής αρχείου %1, σφάλμα: %2 @@ -2007,7 +2007,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2038,7 +2038,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2064,7 +2064,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2092,7 +2092,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2141,7 +2141,7 @@ It is not advisable to use it. Error writing metadata to the database - + Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2184,7 +2184,7 @@ It is not advisable to use it. Local sync protocol - + Πρωτόκολλο τοπικού συγχρονισμού @@ -2279,7 +2279,7 @@ It is not advisable to use it. An error occurred while loading the list of sub folders. - + Παρουσιάστηκε σφάλμα κατά την φόρτωση της λίστας των υπο-φακέλων @@ -2378,7 +2378,7 @@ It is not advisable to use it. The server does not allow sharing - + Ο διακομιστής δεν επιτρέπει τον διαμοιρασμό @@ -2450,18 +2450,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Ο δημόσιος &διαμοιρασμός απαιτεί κωδικό πρόσβασης - + Please Set Password Παρακαλούμε ορίστε Κωδικό - - + + &Share link Δ&ιαμοιρασμός συνδέσμου @@ -2481,7 +2481,7 @@ It is not advisable to use it. No results for '%1' - + Κανένα αποτέλεσμα για '%1' @@ -2862,7 +2862,7 @@ It is not advisable to use it. File/Folder is ignored because it's hidden. - + Το Αρχείο/ο Φάκελος αγνοήθηκε επειδή είναι κρυφό. @@ -2871,12 +2871,12 @@ It is not advisable to use it. Μόνο %1 είναι διαθέσιμα, απαιτούνται τουλάχιστον %2 για την εκκίνηση - + Not allowed because you don't have permission to add parent folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε γονικό κατάλογο - + Not allowed because you don't have permission to add files in that folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε αρχεία σε αυτόν τον φάκελο @@ -2928,7 +2928,7 @@ It is not advisable to use it. Access is forbidden - + Δεν επιτρέπεται η πρόσβαση @@ -2978,67 +2978,67 @@ It is not advisable to use it. Unable to read the blacklist from the local database - + Αδυναμία ανάγνωσης της μαύρης λίστας από την τοπική βάση δεδομένων - + Unable to read from the sync journal. - + Cannot open the sync journal Αδυναμία ανοίγματος του αρχείου συγχρονισμού - + File name contains at least one invalid character Το όνομα αρχείου περιέχει έναν τουλάχιστον μη έγκυρο χαρακτήρα - - + + Ignored because of the "choose what to sync" blacklist Αγνοήθηκε εξαιτίας της μαύρης λίστας "διάλεξε τι να συγχρονιστεί" - + Not allowed because you don't have permission to add subfolders to that folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε υποφακέλους σε αυτό τον φάκελο - + Not allowed to upload this file because it is read-only on the server, restoring Δεν επιτρέπεται να μεταφορτώσετε αυτό το αρχείο επειδή είναι μόνο για ανάγνωση στο διακομιστή, αποκατάσταση σε εξέλιξη - - + + Not allowed to remove, restoring Δεν επιτρέπεται η αφαίρεση, αποκατάσταση σε εξέλιξη - + Local files and share folder removed. Οι τοπικοί φάκελοι και ο φάκελος κοινής χρήσης αφαιρέθηκαν. - + Move not allowed, item restored Η μετακίνηση δεν επιτρέπεται, το αντικείμενο αποκαταστάθηκε - + Move not allowed because %1 is read-only Η μετακίνηση δεν επιτρέπεται επειδή το %1 είναι μόνο για ανάγνωση - + the destination ο προορισμός - + the source η προέλευση @@ -3048,7 +3048,7 @@ It is not advisable to use it. Synchronisation Log - + Ιστορικό συγχρονισμού @@ -3068,8 +3068,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Πνευματικά δικαιώματα ownCloud, Ανώνυμη Εταιρία</p> + <p>Copyright ownCloud GmbH</p> + @@ -3195,7 +3195,7 @@ It is not advisable to use it. Unsupported Server Version - + Μη υποστηριζόμενη έκδοση διακομιστή @@ -3215,37 +3215,37 @@ It is not advisable to use it. Account synchronization is disabled - + Ο λογαριασμός συγχρονισμού έχει απενεργοποιηθεί Unpause all folders - + Αναίρεση παύσης όλων των φακέλων Pause all folders - + Παύση όλων των φακέλων Unpause all synchronization - + Αναίρεση παύσης όλων των συγχρονισμών Unpause synchronization - + Αναίρεση παύσης συγχρονσμού Pause all synchronization - + Παύση όλων των συγχρονισμών Pause synchronization - + Παύση συγχρονισμού @@ -3293,8 +3293,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Έκδοση %2. Για περισσότερες πληροφορίες επισκεφθείτε <a href="%3">%4</a></p><p><small>Των Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz και άλλων.</small></p><p>Πνευματικά δικαιώματα ownCloud, Inc.</p><p>Αδειοδότηση υπό την GNU General Public License (GPL) Έκδοση 2.0<br/>το ownCloud και το λογότυπο ownCloud είναι σήματα κατατεθέντα της ownCloud, Inc. στις Η.Π.Α., σε άλλες χώρες ή και στα δύο</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + @@ -3507,7 +3507,7 @@ It is not advisable to use it. QT_LAYOUT_DIRECTION - + QT_LAYOUT_DIRECTION @@ -3515,7 +3515,7 @@ It is not advisable to use it. in the future - + στο μέλλον @@ -3530,12 +3530,12 @@ It is not advisable to use it. now - + τώρα Less than a minute ago - + Λιγότερο από ένα λεπτό πριν @@ -3573,7 +3573,7 @@ It is not advisable to use it. %n year(s) - + %n χρόνος%n χρόνια diff --git a/translations/client_en.ts b/translations/client_en.ts index 18f8e8d6b..29c98315c 100644 --- a/translations/client_en.ts +++ b/translations/client_en.ts @@ -530,7 +530,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -918,7 +918,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out @@ -928,91 +928,91 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" - - + + , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" - + %1 %2 Example text: "uploading foobar.png" - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 - + Waiting... - + Waiting for %n other folder(s)... @@ -1020,7 +1020,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Preparing to sync... @@ -1975,17 +1975,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database @@ -2471,18 +2471,18 @@ It is not advisable to use it. - + Public sh&aring requires a password - + Please Set Password - - + + &Share link @@ -2890,12 +2890,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -3000,64 +3000,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal - + File name contains at least one invalid character - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination - + the source @@ -3087,7 +3087,7 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3312,7 +3312,7 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> diff --git a/translations/client_es.ts b/translations/client_es.ts index 9becfaca6..5ac942f17 100644 --- a/translations/client_es.ts +++ b/translations/client_es.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Error al escribir los metadatos en la base de datos @@ -894,7 +894,7 @@ Continuar con la sincronización hará que todos los archivos sean sobreescritos Error mientras se cargaba la lista de carpetas desde el servidor. - + Signed out Cerrar sesión @@ -904,96 +904,96 @@ Continuar con la sincronización hará que todos los archivos sean sobreescritos Añadir carpetas está deshabilitado debido a que ya están sincronizándose todos sus archivos. Si desea sincronizar múltiples carpeta, elimine la carpeta raíz actualmente configurada. - + Fetching folder list from server... Obtención de lista de carpetas del servidor... - + Checking for changes in '%1' Buscando cambios en '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sincronizando %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) descargando: %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) cargar %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 restantes, %1 de %2, archivo %3 de %4 - + file %1 of %2 archivo %1 de %2 - + Waiting... Esperando... - + Waiting for %n other folder(s)... Esperando por %n carpeta...Esperando por %n otras carpetas... - + Preparing to sync... Preparando para sincronizar... @@ -1955,17 +1955,17 @@ No se recomienda usarla. El archivo descargado está vacio aunque el servidor dice que deberia haber sido %1. - + File %1 cannot be saved because of a local file name clash! ¡El fichero %1 no puede guardarse debido a un conflicto con el nombre de otro fichero local! - + File has changed since discovery El archivo ha cambiado desde que fue descubierto - + Error writing metadata to the database Error al escribir los metadatos en la base de datos @@ -2451,18 +2451,18 @@ No se recomienda usarla. - + Public sh&aring requires a password Compartir public&amente requiere contraseña - + Please Set Password Por favor establece una contraseña - - + + &Share link &Compartir enlace @@ -2872,12 +2872,12 @@ No se recomienda usarla. Solo %1 disponible, se necesita por lo menos %2 para comenzar - + Not allowed because you don't have permission to add parent folder No permitido porque no tienes permiso para añadir un directorio padre - + Not allowed because you don't have permission to add files in that folder No permitido porque no tienes permiso para añadir archivos a ese directorio @@ -2982,64 +2982,64 @@ No se recomienda usarla. No se pudo leer la lista de bloqueo de la base de datos local - + Unable to read from the sync journal. No se ha podido leer desde el registro de sincronización - + Cannot open the sync journal No es posible abrir el diario de sincronización - + File name contains at least one invalid character Nombre de archivo contiene al menos un caracter no válido - - + + Ignored because of the "choose what to sync" blacklist Ignorado porque se encuentra en la lista negra de "elija qué va a sincronizar" - + Not allowed because you don't have permission to add subfolders to that folder No permitido porque no tienes permiso para añadir subdirectorios a ese directorio - + Not allowed to upload this file because it is read-only on the server, restoring No está permitido subir este archivo porque es de solo lectura en el servidor, restaurando. - - + + Not allowed to remove, restoring No está permitido borrar, restaurando. - + Local files and share folder removed. Se han eliminado los archivos locales y la carpeta compartida. - + Move not allowed, item restored No está permitido mover, elemento restaurado. - + Move not allowed because %1 is read-only No está permitido mover, porque %1 es de sólo lectura. - + the destination destino - + the source origen @@ -3069,8 +3069,8 @@ No se recomienda usarla. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, incorporado</p> + <p>Copyright ownCloud GmbH</p> + @@ -3294,8 +3294,8 @@ No se recomienda usarla. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versión %2. Para más información, visite <a href="%3">%4</a></p><p><small>Creado por Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz y otros.</small></p><p>Copyright ownCloud, Inc.</p><p>Está bajo la Licencia General Pública (GPL, en inglés) GNU Versión 2.0<br/>ownCloud y el logo de ownCloud son marcas registradas de ownCloud, Inc. en los Estados Unidos, otros países, o ambos.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_es_AR.ts b/translations/client_es_AR.ts index e1425e32c..6b99ecb63 100644 --- a/translations/client_es_AR.ts +++ b/translations/client_es_AR.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Desautentificado @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sincronizando %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) Cargado %1/s - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 Archivo %1 de %2 - + Waiting... Esperando... - + Waiting for %n other folder(s)... - + Preparing to sync... Preparando para sincronizar... @@ -1943,17 +1943,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database @@ -2439,18 +2439,18 @@ It is not advisable to use it. - + Public sh&aring requires a password - + Please Set Password - - + + &Share link @@ -2858,12 +2858,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2968,64 +2968,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal - + File name contains at least one invalid character - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination - + the source @@ -3055,7 +3055,7 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3280,7 +3280,7 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> diff --git a/translations/client_et.ts b/translations/client_et.ts index c8cc26380..0af9990dc 100644 --- a/translations/client_et.ts +++ b/translations/client_et.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Välja logitud @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' Kontrollitakse muudatusi kaustas '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sünkroniseerimine %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) allalaadimine %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) üleslaadimine %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 / %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 fail %1 / %2-st - + Waiting... Ootamine... - + Waiting for %n other folder(s)... - + Preparing to sync... Sünkroniseerimiseks valmistumine... @@ -1944,17 +1944,17 @@ Selle kasutamine pole soovitatav. - + File %1 cannot be saved because of a local file name clash! Faili %1 ei saa salvestada kuna on nime konflikt kohaliku failiga! - + File has changed since discovery Faili on pärast avastamist muudetud - + Error writing metadata to the database @@ -2440,18 +2440,18 @@ Selle kasutamine pole soovitatav. - + Public sh&aring requires a password Avalik j&agamine nõuab parooli - + Please Set Password Palun määra parool - - + + &Share link &Jaga linki @@ -2861,12 +2861,12 @@ Selle kasutamine pole soovitatav. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2971,64 +2971,64 @@ Selle kasutamine pole soovitatav. - + Unable to read from the sync journal. - + Cannot open the sync journal Ei suuda avada sünkroniseeringu zurnaali - + File name contains at least one invalid character Faili nimesonvähemalt üks keelatud märk - - + + Ignored because of the "choose what to sync" blacklist "Vali, mida sünkroniseerida" musta nimekirja tõttu vahele jäetud - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Pole lubatud üles laadida, kuna tegemist on ainult-loetava serveriga, taastan - - + + Not allowed to remove, restoring Eemaldamine pole lubatud, taastan - + Local files and share folder removed. Kohalikud failid ja jagatud kaustad eemaldatud. - + Move not allowed, item restored Liigutamine pole lubatud, üksus taastatud - + Move not allowed because %1 is read-only Liigutamien pole võimalik kuna %1 on ainult lugemiseks - + the destination sihtkoht - + the source allikas @@ -3058,7 +3058,7 @@ Selle kasutamine pole soovitatav. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3283,7 +3283,7 @@ Selle kasutamine pole soovitatav. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> diff --git a/translations/client_eu.ts b/translations/client_eu.ts index e7602ec46..335f2a98b 100644 --- a/translations/client_eu.ts +++ b/translations/client_eu.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Errorea zerbitzaritik karpeten zerrenda eskuratzean. - + Signed out Saioa bukatuta @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... Zerbitzaritik karpeta zerrenda eskuratzen... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" %1 Sinkronizatzen - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) Deskargatu %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) igo %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%4 - %3tik) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 %1. fitxategia %2tik - + Waiting... Itxoiten... - + Waiting for %n other folder(s)... Itxoiten beste karpeta %n...Itxoiten beste %n karpeta... - + Preparing to sync... Sinkronizatzeko prestatzen... @@ -1950,17 +1950,17 @@ Ez da gomendagarria erabltzea. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database @@ -2446,18 +2446,18 @@ Ez da gomendagarria erabltzea. - + Public sh&aring requires a password - + Please Set Password Mesedez Ezarri Pasahitza - - + + &Share link @@ -2865,12 +2865,12 @@ Ez da gomendagarria erabltzea. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2975,64 +2975,64 @@ Ez da gomendagarria erabltzea. - + Unable to read from the sync journal. - + Cannot open the sync journal Ezin da sinkronizazio egunerokoa ireki - + File name contains at least one invalid character Fitxategi izenak behintzat baliogabeko karaktere bat du - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring Ezabatzeko baimenik gabe, berrezartzen - + Local files and share folder removed. - + Move not allowed, item restored Mugitzea ez dago baimenduta, elementua berrezarri da - + Move not allowed because %1 is read-only Mugitzea ez dago baimenduta %1 irakurtzeko bakarrik delako - + the destination helburua - + the source jatorria @@ -3062,7 +3062,7 @@ Ez da gomendagarria erabltzea. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3287,8 +3287,8 @@ Ez da gomendagarria erabltzea. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>%2 Bertsioa. Informazio gehiago eskuratzeko ikusi <a href="%3">%4</a></p><p><small>Egileak: Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz eta bestea batzuk.</small></p><p>Copyright ownCloud, Inc.</p><p>GNU General Public License (GPL) 2.0 bertsioaren lizentziapean banatuta.<br/>ownCloud eta ownCloud-en Logoa ownCloud, Inc. enpresaren marka erregistratuak dira Estatu Batuetan, beste herrialdeetan edo bietan.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_fa.ts b/translations/client_fa.ts index 07afa3d01..395d864e1 100644 --- a/translations/client_fa.ts +++ b/translations/client_fa.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out خارج شد @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" همگام‌سازی %1 - - + + , رشته های ترجمه نشده - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) دانلود %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) آپلود %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 از %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 فایل %1 از %2 - + Waiting... درحال انتظار... - + Waiting for %n other folder(s)... در انتظار برای %n پوشه‌‎ی دیگر ... - + Preparing to sync... آماده‌سازی همگام‌سازی ... @@ -1943,17 +1943,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database @@ -2439,18 +2439,18 @@ It is not advisable to use it. - + Public sh&aring requires a password - + Please Set Password لطفا رمزعبور را تعیین کنید - - + + &Share link &اشتراک‌گذاری لینک @@ -2858,12 +2858,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2968,64 +2968,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal - + File name contains at least one invalid character نام فایل دارای حداقل یک کاراکتر نامعتبر است - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder با توجه به عدم اجازه‌ی شما به ایجاد زیرپوشه به پوشه مجاز نیست - + Not allowed to upload this file because it is read-only on the server, restoring آپلود این فایل با توجه به فقط-خواندنی بودن آن در سرور مجاز نیست، در حال بازگرداندن - - + + Not allowed to remove, restoring حذف مجاز نیست، در حال بازگردادن - + Local files and share folder removed. فایل‌های محلی و پوشه‌ی اشتراک حذف شد. - + Move not allowed, item restored انتقال مجاز نیست، مورد بازگردانده شد - + Move not allowed because %1 is read-only - + the destination مقصد - + the source مبدا @@ -3055,7 +3055,7 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> @@ -3280,7 +3280,7 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> diff --git a/translations/client_fi.ts b/translations/client_fi.ts index 535e535a9..98711254c 100644 --- a/translations/client_fi.ts +++ b/translations/client_fi.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Virhe kirjoittaessa metadataa tietokantaan @@ -890,7 +890,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Virhe ladatessa kansiolistausta palvelimelta. - + Signed out Kirjauduttu ulos @@ -900,96 +900,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an Kansion lisääminen on poistettu käytöstä, koska synkronoit jo kaikki tiedostot. Jos haluat synkronoida useita kansioita, poista nykyisen juurikansion synkronointiyhteys. - + Fetching folder list from server... Haetaan kansioluetteloa palvelimelta... - + Checking for changes in '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synkronoidaan %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3/%4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 tiedosto %1/%2 - + Waiting... Odotetaan... - + Waiting for %n other folder(s)... Odotetaan %n muuta kansiota...Odotetaan %n muuta kansiota... - + Preparing to sync... Valmistaudutaan synkronointiin... @@ -1951,17 +1951,17 @@ Osoitteen käyttäminen ei ole suositeltavaa. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery Tiedosto on muuttunut löytymisen jälkeen - + Error writing metadata to the database Virhe kirjoittaessa metadataa tietokantaan @@ -2447,18 +2447,18 @@ Osoitteen käyttäminen ei ole suositeltavaa. - + Public sh&aring requires a password &Julkinen jakaminen vaatii salasanan - + Please Set Password Aseta salasana - - + + &Share link &Jaa linkki @@ -2868,12 +2868,12 @@ Osoitteen käyttäminen ei ole suositeltavaa. Vain %1 on käytettävissä, käynnistymiseen tarvitaan %2 - + Not allowed because you don't have permission to add parent folder Ei sallittu, koska käyttöoikeutesi eivät riitä ylätason kansion lisäämiseen - + Not allowed because you don't have permission to add files in that folder Ei sallittu, koska käyttöoikeutesi eivät riitä tiedostojen lisäämiseen kyseiseen kansioon @@ -2978,64 +2978,64 @@ Osoitteen käyttäminen ei ole suositeltavaa. - + Unable to read from the sync journal. - + Cannot open the sync journal - + File name contains at least one invalid character Tiedoston nimi sisältää ainakin yhden virheellisen merkin - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder Ei sallittu, koska oikeutesi eivät riitä alikansioiden lisäämiseen kyseiseen kansioon - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring Poistaminen ei ole sallittua, palautetaan - + Local files and share folder removed. Paikalliset tiedostot ja jakokansio poistettu. - + Move not allowed, item restored Siirtäminen ei ole sallittua, kohde palautettu - + Move not allowed because %1 is read-only Siirto ei ole sallittu, koska %1 on "vain luku"-tilassa - + the destination kohde - + the source lähde @@ -3065,8 +3065,8 @@ Osoitteen käyttäminen ei ole suositeltavaa. - <p>Copyright ownCloud, Incorporated</p> - <p>Tekijänoikeus ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3290,8 +3290,8 @@ Osoitteen käyttäminen ei ole suositeltavaa. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versio %2. Lisätietoja osoitteessa <a href="%3">%4</a></p><p><small>Tehnyt Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz ja muut.</small></p><p>Tekijänoikeus ownCloud, Inc.</p><p>Lisensoitu GNU General Public License (GPL), versio 2.0 -lisenssillä<br/>ownCloud ja ownCloudin logo ovat ownCloud, Incin rekisteröimiä tavaramerkkejä Yhdysvalloissa ja muissa maissa.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_fr.ts b/translations/client_fr.ts index 5044ef287..ff699b9e6 100644 --- a/translations/client_fr.ts +++ b/translations/client_fr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Erreur à l'écriture des métadonnées dans la base de données @@ -894,7 +894,7 @@ Continuer la synchronisation comme d'habitude fera en sorte que tous les fi Une erreur est survenue lors du chargement de la liste des dossiers depuis le serveur. - + Signed out Session fermée @@ -904,96 +904,96 @@ Continuer la synchronisation comme d'habitude fera en sorte que tous les fi L'ajout de dossier est désactivé car vous synchronisez déjà tous vos fichiers. Si vous voulez synchroniser plusieurs dossiers, supprimez d'abord le dossier racine configuré actuellement. - + Fetching folder list from server... Récupération de la liste des dossiers depuis le serveur... - + Checking for changes in '%1' Recherche de modifications dans '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchronisation de %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) réception %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) envoi %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 restant, %1 sur %2, fichier %3 sur %4 - + file %1 of %2 fichier %1 de %2 - + Waiting... En attente ... - + Waiting for %n other folder(s)... En attente de %n autre(s) dossier(s)En attente de %n autre(s) dossier(s) - + Preparing to sync... Préparation à la synchronisation @@ -1956,17 +1956,17 @@ Il est déconseillé de l'utiliser. Le fichier téléchargé est vide malgré que le serveur a annoncé qu'il aurait dû être %1. - + File %1 cannot be saved because of a local file name clash! Le fichier %1 n'a pas pu être sauvegardé en raison d'un conflit sur le nom du fichier local ! - + File has changed since discovery Le fichier a changé depuis sa découverte - + Error writing metadata to the database Erreur à l'écriture des métadonnées dans la base de données @@ -2452,18 +2452,18 @@ Il est déconseillé de l'utiliser. - + Public sh&aring requires a password Le p&artage public nécessite un mot de passe - + Please Set Password Veuillez choisir un mot de passe - - + + &Share link Partager par &lien public @@ -2873,12 +2873,12 @@ Il est déconseillé de l'utiliser. Seulement %1 disponibles, il faut au moins %2 pour démarrer - + Not allowed because you don't have permission to add parent folder Non autorisé car vous n'avez pas la permission d'ajouter un dossier parent - + Not allowed because you don't have permission to add files in that folder Non autorisé car vous n'avez pas la permission d'ajouter des fichiers dans ce dossier @@ -2983,64 +2983,64 @@ Il est déconseillé de l'utiliser. Impossible de lire la liste noire de la base de données locale - + Unable to read from the sync journal. Impossible de lire le journal de synchronisation. - + Cannot open the sync journal Impossible d'ouvrir le journal de synchronisation - + File name contains at least one invalid character Le nom de fichier contient au moins un caractère non valable - - + + Ignored because of the "choose what to sync" blacklist Ignoré à cause de la liste noire "Choisir le contenu à synchroniser". - + Not allowed because you don't have permission to add subfolders to that folder Non autorisé car vous n'avez pas la permission d'ajouter des sous-dossiers dans ce dossier - + Not allowed to upload this file because it is read-only on the server, restoring Non autorisé à envoyer ce fichier car il est en lecture seule sur le serveur. Restauration - - + + Not allowed to remove, restoring Non autorisé à supprimer. Restauration - + Local files and share folder removed. Fichiers locaux et répertoire de partage supprimés. - + Move not allowed, item restored Déplacement non autorisé, élément restauré - + Move not allowed because %1 is read-only Déplacement non autorisé car %1 est en mode lecture seule - + the destination la destination - + the source la source @@ -3070,8 +3070,8 @@ Il est déconseillé de l'utiliser. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Il est déconseillé de l'utiliser. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Version %2. Pour plus d'informations, consultez <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_gl.ts b/translations/client_gl.ts index 9baecf892..9051b172d 100644 --- a/translations/client_gl.ts +++ b/translations/client_gl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -890,7 +890,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Desconectado @@ -900,96 +900,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sincronizando %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) descargar %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) enviar %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 ficheiro %1 de %2 - + Waiting... - + Waiting for %n other folder(s)... - + Preparing to sync... @@ -1950,17 +1950,17 @@ Recomendámoslle que non o use. - + File %1 cannot be saved because of a local file name clash! Non foi posíbel gardar o ficheiro %1 por mor dunha colisión co nome dun ficheiro local! - + File has changed since discovery O ficheiro cambiou após seren atopado - + Error writing metadata to the database @@ -2446,18 +2446,18 @@ Recomendámoslle que non o use. - + Public sh&aring requires a password A comp&artición pública precisa de contrasinal - + Please Set Password Estabeleza o contrasinal - - + + &Share link &Ligazón para compartir @@ -2867,12 +2867,12 @@ Recomendámoslle que non o use. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2977,64 +2977,64 @@ Recomendámoslle que non o use. - + Unable to read from the sync journal. - + Cannot open the sync journal Non foi posíbel abrir o rexistro de sincronización - + File name contains at least one invalid character O nome de ficheiro contén algún carácter incorrecto - - + + Ignored because of the "choose what to sync" blacklist Ignorado por mor da lista negra de «escolla que sincronizar» - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Non está permitido o envío xa que o ficheiro é só de lectura no servidor, restaurando - - + + Not allowed to remove, restoring Non está permitido retiralo, restaurando - + Local files and share folder removed. Retirados os ficheiros locais e o cartafol compartido. - + Move not allowed, item restored Nos está permitido movelo, elemento restaurado - + Move not allowed because %1 is read-only Bon está permitido movelo xa que %1 é só de lectura - + the destination o destino - + the source a orixe @@ -3064,8 +3064,8 @@ Recomendámoslle que non o use. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3289,8 +3289,8 @@ Recomendámoslle que non o use. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versión %2. Para obter máis información visite <a href="%3">%4</a></p><p><small>Por Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e outros.</small></p><p>Copyright ownCloud, Inc.</p><p>Licenciado baixo a Licenza Publica Xeral (GPL) GNU Version 2.0<br/>ownCloud e o logotipo ownCloud son marcas rexistradas da ownCloud, Inc. nos EE.UU de Norte América, noutros países ou en ambos.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_hu.ts b/translations/client_hu.ts index c28b0b463..6dfa24945 100644 --- a/translations/client_hu.ts +++ b/translations/client_hu.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Kijelentkezve @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" %1 szinkronizálása - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) letöltés: %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) feltöltés: %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 / %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 maradt, %1 / %2, %3 / %4 fájl - + file %1 of %2 %1 / %2 fájl - + Waiting... Várakozás... - + Waiting for %n other folder(s)... Várakozás %n további könyvtárra...Várakozás %n további könyvtárra... - + Preparing to sync... Felkészülés szinkronizálásra... @@ -1947,17 +1947,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database @@ -2443,18 +2443,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Nyilvános me&gosztáshoz szükség van jelszóra - + Please Set Password Kérjük, állíts be egy jelszót - - + + &Share link Hivatkozás &megosztása @@ -2863,12 +2863,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2973,64 +2973,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal - + File name contains at least one invalid character A fájlnév legalább egy érvénytelen karaktert tartalmaz! - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination a cél - + the source a forrás @@ -3060,8 +3060,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Szerzői jog: ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3285,8 +3285,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Verzió: %2. Bővebb információért látogass el ide: <a href="%3">%4</a></p><p><small>Készítők: Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz és még mások.</small></p><p>Minden jog fenntartva. ownCloud, Inc.</p><p>A GNU General Public License (GPL) 2.0-ás verziója alatt licencelve<br/>A ownCloud és a ownCloud logó a ownCloud, Inc. bejegyzett védjegye az Egyesült Államokban és más országokban.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_it.ts b/translations/client_it.ts index 82233a353..49f839939 100644 --- a/translations/client_it.ts +++ b/translations/client_it.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Errore durante la scrittura dei metadati nel database @@ -894,7 +894,7 @@ Se continui normalmente la sincronizzazione provocherai la sovrascrittura di tut Errore durante il caricamento dell'elenco delle cartelle dal server. - + Signed out Disconnesso @@ -904,96 +904,96 @@ Se continui normalmente la sincronizzazione provocherai la sovrascrittura di tut L'aggiunta di una cartella è disabilitata perché stai già sincronizzando tutti i tuoi file. Se desideri sincronizzare più cartelle, rimuovi la cartella radice attualmente configurata. - + Fetching folder list from server... Recupero dell'elenco delle cartelle dal server... - + Checking for changes in '%1' Controllo delle modifiche in '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sincronizzazione di %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) ricezione %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) invio %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 di %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 rimanenti, %1 di %2, file %3 di %4 - + file %1 of %2 file %1 di %2 - + Waiting... Attendere... - + Waiting for %n other folder(s)... In attesa di %n altra cartella...In attesa di %n altre cartelle... - + Preparing to sync... Preparazione della sincronizzazione... @@ -1955,17 +1955,17 @@ Non è consigliabile utilizzarlo. Il file scaricato è vuoto nonostante il server indicasse una dimensione di %1. - + File %1 cannot be saved because of a local file name clash! Il file %1 non può essere salvato a causa di un conflitto con un file locale. - + File has changed since discovery Il file è stato modificato dal suo rilevamento - + Error writing metadata to the database Errore durante la scrittura dei metadati nel database @@ -2451,18 +2451,18 @@ Non è consigliabile utilizzarlo. - + Public sh&aring requires a password La condivisione pubblic&a richiede una password - + Please Set Password imposta la password - - + + &Share link Condividi colle&gamento @@ -2872,12 +2872,12 @@ Non è consigliabile utilizzarlo. Sono disponibili solo %1, servono almeno %2 per iniziare - + Not allowed because you don't have permission to add parent folder Non consentito poiché non disponi dei permessi per aggiungere la cartella superiore - + Not allowed because you don't have permission to add files in that folder Non consentito poiché non disponi dei permessi per aggiungere file in quella cartella @@ -2982,64 +2982,64 @@ Non è consigliabile utilizzarlo. Impossibile leggere la lista nera dal database locale - + Unable to read from the sync journal. Impossibile leggere dal registro di sincronizzazione. - + Cannot open the sync journal Impossibile aprire il registro di sincronizzazione - + File name contains at least one invalid character Il nome del file contiene almeno un carattere non valido - - + + Ignored because of the "choose what to sync" blacklist Ignorato in base alla lista nera per la scelta di cosa sincronizzare - + Not allowed because you don't have permission to add subfolders to that folder Non consentito poiché non disponi dei permessi per aggiungere sottocartelle in quella cartella - + Not allowed to upload this file because it is read-only on the server, restoring Il caricamento di questo file non è consentito poiché è in sola lettura sul server, ripristino - - + + Not allowed to remove, restoring Rimozione non consentita, ripristino - + Local files and share folder removed. I file locali e la cartella condivisa sono stati rimossi. - + Move not allowed, item restored Spostamento non consentito, elemento ripristinato - + Move not allowed because %1 is read-only Spostamento non consentito poiché %1 è in sola lettura - + the destination la destinazione - + the source l'origine @@ -3069,8 +3069,8 @@ Non è consigliabile utilizzarlo. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3294,8 +3294,8 @@ Non è consigliabile utilizzarlo. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versione %2. Per ulteriori informazioni, visita <a href="%3">%4</a></p><p><small>Di Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e altri.</small></p><p>Copyright ownCloud, Inc.</p><p>Sotto licenza GNU General Public License (GPL) versione 2.0<br/>ownCloud e il logo di ownCloud sono marchi registrati di ownCloud, Inc. negli Stati Uniti, in altri paesi o entrambi</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_ja.ts b/translations/client_ja.ts index aff1a25e3..1cba3eb25 100644 --- a/translations/client_ja.ts +++ b/translations/client_ja.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database メタデータのデータベースへの書き込みに失敗 @@ -894,7 +894,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an サーバーからフォルダーのリスト取得時にエラー - + Signed out サインアウト @@ -904,96 +904,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an すでに同期対象のフォルダーのため、追加したフォルダーを無効にしました。複数のフォルダーを同期したい場合は、現在設定されているルートフォルダーの同期設定を削除してください。 - + Fetching folder list from server... サーバーからフォルダーリストを取得中... - + Checking for changes in '%1' '%1' の更新を確認しています - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" 同期中 %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) ダウンロード %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) アップロード %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%4 中 %3 完了) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - 残り %5分、%2中 %1完了 、%4中 %3 ファイル完了 + 残り %5、%2中 %1完了 、%4中 %3 ファイル完了 - + file %1 of %2 %1 / %2 ファイル - + Waiting... 待機中... - + Waiting for %n other folder(s)... %n 他のフォルダーの完了待ち... - + Preparing to sync... 同期の準備中... @@ -1954,17 +1954,17 @@ It is not advisable to use it. サーバーが通知しているファイルは %1 であるべきですが、ダウンロードファイルは空でした。 - + File %1 cannot be saved because of a local file name clash! %1 はローカルファイル名が衝突しているため保存できません! - + File has changed since discovery ファイルは発見以降に変更されました - + Error writing metadata to the database メタデータのデータベースへの書き込みに失敗 @@ -2450,18 +2450,18 @@ It is not advisable to use it. - + Public sh&aring requires a password 共有するにはパスワードが必要(&A) - + Please Set Password パスワードを入力してください - - + + &Share link リンク共有(&S) @@ -2871,12 +2871,12 @@ It is not advisable to use it. %1 しか空き容量がありません、開始するためには少なくとも %2 は必要です。 - + Not allowed because you don't have permission to add parent folder 親フォルダーを追加する権限がありません - + Not allowed because you don't have permission to add files in that folder そのフォルダーにファイルを追加する権限がありません @@ -2981,64 +2981,64 @@ It is not advisable to use it. ローカルデータベースからブラックリストを読み込みできません - + Unable to read from the sync journal. 同期ジャーナルから読み込みできません - + Cannot open the sync journal 同期ジャーナルを開くことができません - + File name contains at least one invalid character ファイル名に1文字以上の無効な文字が含まれています - - + + Ignored because of the "choose what to sync" blacklist "同期対象先" ブラックリストにより無視されました。 - + Not allowed because you don't have permission to add subfolders to that folder そのフォルダーにサブフォルダーを追加する権限がありません - + Not allowed to upload this file because it is read-only on the server, restoring サーバーでは読み取り専用となっているため、このファイルをアップロードすることはできません、復元しています - - + + Not allowed to remove, restoring 削除できないので復元しています - + Local files and share folder removed. ローカルファイルと共有フォルダーを削除しました。 - + Move not allowed, item restored 移動できないので項目を復元しました - + Move not allowed because %1 is read-only %1 は読み取り専用のため移動できません - + the destination 移動先 - + the source 移動元 @@ -3068,8 +3068,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,8 +3293,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>バージョン %2 詳細については、<a href="%3">%4</a>をご覧ください。By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.<br/>Based on Mirall by Duncan Mac-Vicar P.</small></p><p>著作権 ownCloud, Inc.<p><p>%4 が配布し、 GNU General Public License (GPL) バージョン2.0 の下でライセンスされています。<br>ownCloud 及び ownCloud のロゴはアメリカ合衆国またはその他の国、あるいはその両方における<br> ownCloud, Inc.の登録商標です。</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_nb_NO.ts b/translations/client_nb_NO.ts index 59dd9f43f..c2963fea1 100644 --- a/translations/client_nb_NO.ts +++ b/translations/client_nb_NO.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Feil ved skriving av metadata til databasen @@ -894,7 +894,7 @@ Hvis synkroniseringen fortsetter som normalt, vil alle filene dine bli overskrev Feil ved innlasting av listen av mapper fra serveren. - + Signed out Logget ut @@ -904,96 +904,96 @@ Hvis synkroniseringen fortsetter som normalt, vil alle filene dine bli overskrev Du kan ikke legge til en mappe fordi du allerede synkroniserer alle filene dine. Hvis du ønsker å synkronisere individuelle mapper, må du fjerne synkroniseringen av rotmappen som er konfigurert. - + Fetching folder list from server... Henter mappeliste fra server.. - + Checking for changes in '%1' Ser etter endringer i '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synkroniserer %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) nedlasting %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) opplasting %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 av %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 igjen, %1 av %2, fil %3 of %4 - + file %1 of %2 fil %1 av %2 - + Waiting... Venter.. - + Waiting for %n other folder(s)... Venter på %n annen mappe...Venter på %n andre mappe(r)... - + Preparing to sync... Forbereder synkronisering... @@ -1956,17 +1956,17 @@ Det er ikke tilrådelig å bruke den. Nedlastet fil er tom, selv om serveren annonserte at den skulle være %1. - + File %1 cannot be saved because of a local file name clash! Fil %1 kan ikke lagres på grunn av lokal konflikt med filnavn. - + File has changed since discovery Filen er endret siden den ble oppdaget - + Error writing metadata to the database Feil ved skriving av metadata til databasen @@ -2452,18 +2452,18 @@ Det er ikke tilrådelig å bruke den. - + Public sh&aring requires a password Offentlig d&eling krever et passord - + Please Set Password Sett passord - - + + &Share link &Del lenke @@ -2873,12 +2873,12 @@ Det er ikke tilrådelig å bruke den. Bare %1 er tilgjengelig, trenger minst %2 for å begynne - + Not allowed because you don't have permission to add parent folder Ikke tillatt fordi du ikke har lov til å legge til foreldremappe - + Not allowed because you don't have permission to add files in that folder Ikke tillatt fordi du ikke har lov til å opprette filer i den mappen @@ -2983,64 +2983,64 @@ Det er ikke tilrådelig å bruke den. Kan ikke lese svartelisten fra den lokale databasen - + Unable to read from the sync journal. Kan ikke lese fra synkroniseringsjournalen - + Cannot open the sync journal Kan ikke åpne synkroniseringsjournalen - + File name contains at least one invalid character Filnavnet inneholder minst ett ulovlig tegn - - + + Ignored because of the "choose what to sync" blacklist Ignorert på grunn av svartelisten "velg hva som skal synkroniseres" - + Not allowed because you don't have permission to add subfolders to that folder Ikke tillatt fordi du ikke har lov til å lage undermapper i den mappen - + Not allowed to upload this file because it is read-only on the server, restoring Ikke tillatt å laste opp denne filenfordi den er skrivebeskyttet på serveren, gjenoppretter - - + + Not allowed to remove, restoring Ikke tillatt å fjerne, gjenoppretter - + Local files and share folder removed. Lokale filer og delingsmappe fjernet. - + Move not allowed, item restored Flytting ikke tillatt, element gjenopprettet - + Move not allowed because %1 is read-only Flytting ikke tillatt fordi %1 er skrivebeskyttet - + the destination målet - + the source kilden @@ -3070,8 +3070,8 @@ Det er ikke tilrådelig å bruke den. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Det er ikke tilrådelig å bruke den. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versjon %2. For mer informasjon gå til <a href="%3">%4</a></p><p><small>Av Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz med flere.</small></p><p>Copyright ownCloud, Inc.</p><p>Lisensiert under GNU General Public License (GPL) Version 2.0<br/>ownCloud og ownCloud-logo er registrerte varemerker for ownCloud, Inc. i USA, andre land, eller begge deler.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_nl.ts b/translations/client_nl.ts index 52175d823..005f576af 100644 --- a/translations/client_nl.ts +++ b/translations/client_nl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fout bij schrijven van Metadata naar de database @@ -895,7 +895,7 @@ Doorgaan met deze synchronisatie overschrijft al uw bestandend door een eerdere Fout bij ophalen mappenlijst van de server. - + Signed out Afgemeld @@ -905,96 +905,96 @@ Doorgaan met deze synchronisatie overschrijft al uw bestandend door een eerdere Het toevoegen van een map is uitgeschakeld, omdat u reeds al uw bestanden synchroniseert. Als u meerdere mappen wilt synchroniseren moet u de nu geconfigureerde hoofdmap verwijderen. - + Fetching folder list from server... Mappenlijst ophalen van de server... - + Checking for changes in '%1' Controleren op wijzigingen in '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchroniseren %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) download %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) upload %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 van %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 over, %1 van %2, bestand %3 van %4 - + file %1 of %2 bestand %1 van %2 - + Waiting... Aan het wachten... - + Waiting for %n other folder(s)... Wacht op %n andere map...Wacht op %n andere mappen... - + Preparing to sync... Voorbereiden op sync... @@ -1957,17 +1957,17 @@ We adviseren deze site niet te gebruiken. Het gedownloade bestand is leeg, hoewel de server meldde dat het %1 zou moeten zijn. - + File %1 cannot be saved because of a local file name clash! Bestand %1 kan niet worden opgeslagen wegens een lokaal bestandsnaam conflict! - + File has changed since discovery Het bestand is gewijzigd sinds het is gevonden - + Error writing metadata to the database Fout bij schrijven van Metadata naar de database @@ -2453,18 +2453,18 @@ We adviseren deze site niet te gebruiken. - + Public sh&aring requires a password Openbaar de&len vereist een wachtwoord - + Please Set Password Stel uw wachtwoord in - - + + &Share link &Deel link @@ -2874,12 +2874,12 @@ We adviseren deze site niet te gebruiken. Slechts %1 beschikbaar, maar heeft minimaal %2 nodig om te starten - + Not allowed because you don't have permission to add parent folder Niet toegestaan omdat u geen rechten hebt om een bovenliggende map toe te voegen - + Not allowed because you don't have permission to add files in that folder Niet toegestaan omdat u geen rechten hebt om bestanden in die map toe te voegen @@ -2984,64 +2984,64 @@ We adviseren deze site niet te gebruiken. Kan de blacklist niet lezen uit de lokale database - + Unable to read from the sync journal. Niet mogelijk om te lezen uit het synchronisatie verslag. - + Cannot open the sync journal Kan het sync transactielog niet openen - + File name contains at least one invalid character De bestandsnaam bevat ten minste één ongeldig teken - - + + Ignored because of the "choose what to sync" blacklist Genegeerd vanwege de "wat synchroniseren" zwarte lijst - + Not allowed because you don't have permission to add subfolders to that folder Niet toegestaan, omdat je geen permissies hebt om submappen aan die map toe te voegen - + Not allowed to upload this file because it is read-only on the server, restoring Niet toegestaan om dit bestand te uploaden, omdat het alleen-lezen is op de server, herstellen - - + + Not allowed to remove, restoring Niet toegestaan om te verwijderen, herstellen - + Local files and share folder removed. Lokale bestanden en share-map verwijderd. - + Move not allowed, item restored Verplaatsen niet toegestaan, object hersteld - + Move not allowed because %1 is read-only Verplaatsen niet toegestaan, omdat %1 alleen-lezen is - + the destination bestemming - + the source bron @@ -3071,8 +3071,8 @@ We adviseren deze site niet te gebruiken. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3296,8 +3296,8 @@ We adviseren deze site niet te gebruiken. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versie %2. Bezoek voor meer informatie bezoek <a href="%3">%4</a>.</p><p><small>Door Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz en anderen.</small></p><p>Copyright ownCloud, Inc.</p><p>Gelicenseerd onder de GNU Genertal Public License (GPL) Versie 2.0<br>ownCloud en het ownCloud logo zijn geregistreerde handelsmerken van ownCloud, Inc. in de Verenigde Staten, andere landen, of beide.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_pl.ts b/translations/client_pl.ts index f653b6dca..969658bc0 100644 --- a/translations/client_pl.ts +++ b/translations/client_pl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Błąd podczas zapisu metadanych do bazy @@ -894,7 +894,7 @@ Jeśli kontynuujesz synchronizację, pliki zostaną nadpisane przez swój pierwo Wystąpił błąd podczas pobierania listy folderów z serwera. - + Signed out Odłączony @@ -904,96 +904,96 @@ Jeśli kontynuujesz synchronizację, pliki zostaną nadpisane przez swój pierwo Dodawanie folderu jest zablokowane, ponieważ już synchronizujesz wszystkie swoje pliki. Jeśli chcesz zsynchronizować wiele folderów, usuń folder aktualnie skonfigurowany. - + Fetching folder list from server... Pobieranie listy folderów z serwera. - + Checking for changes in '%1' Sprawdzanie zmian na '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchronizowanie %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) pobieranie %1/s - + u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) wysyłanie %1/s - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 z %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" Plik %3 z %4, pozostało czasu %5 (%1 z %2) - + file %1 of %2 plik %1 z %2 - + Waiting... Czekaj... - + Waiting for %n other folder(s)... - + Preparing to sync... Przygotowanie do synchronizacji ... @@ -1956,17 +1956,17 @@ Niezalecane jest jego użycie. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database Błąd podczas zapisu metadanych do bazy @@ -2452,18 +2452,18 @@ Niezalecane jest jego użycie. - + Public sh&aring requires a password - + Please Set Password Proszę podać hasło - - + + &Share link @@ -2873,12 +2873,12 @@ Niezalecane jest jego użycie. - + Not allowed because you don't have permission to add parent folder Niedozwolone, ponieważ nie masz uprawnień do dodawania katalogu nadrzędnego - + Not allowed because you don't have permission to add files in that folder Niedozwolone, ponieważ nie masz uprawnień do dodawania plików w tym katalogu @@ -2983,64 +2983,64 @@ Niezalecane jest jego użycie. - + Unable to read from the sync journal. Nie można czytać z dziennika synchronizacji. - + Cannot open the sync journal Nie można otworzyć dziennika synchronizacji - + File name contains at least one invalid character Nazwa pliku zawiera co najmniej jeden nieprawidłowy znak - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder Niedozwolone, ponieważ nie masz uprawnień do dodawania podkatalogów w tym katalogu - + Not allowed to upload this file because it is read-only on the server, restoring Wgrywanie niedozwolone, ponieważ plik jest tylko do odczytu na serwerze, przywracanie - - + + Not allowed to remove, restoring Brak uprawnień by usunąć, przywracanie - + Local files and share folder removed. Lokalne pliki i udostępniane foldery zostały usunięte. - + Move not allowed, item restored Przenoszenie niedozwolone, obiekt przywrócony - + Move not allowed because %1 is read-only Przenoszenie niedozwolone, ponieważ %1 jest tylko do odczytu - + the destination docelowy - + the source źródło @@ -3070,8 +3070,8 @@ Niezalecane jest jego użycie. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Niezalecane jest jego użycie. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Wersja%2. Aby uzyskać więcej informacji prosimy odwiedzić <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_pt.ts b/translations/client_pt.ts index 8b0a36cdb..6668b9fbb 100644 --- a/translations/client_pt.ts +++ b/translations/client_pt.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Erro ao gravar os metadados para a base de dados @@ -894,7 +894,7 @@ Continuando a sincronização fará com que todos os seus ficheiros sejam substi Erro durante o carregamento da lista de pastas a partir do servidor. - + Signed out Sessão terminada @@ -904,96 +904,96 @@ Continuando a sincronização fará com que todos os seus ficheiros sejam substi Adicionar pasta está desativada porque já está a sincronizar todos os seus ficheiros. Se deseja sincronizar múltiplas pastas, por favor, remova a pasta raiz atualmente configurada. - + Fetching folder list from server... A obter a lista de pastas do servidor... - + Checking for changes in '%1' A procurar por alterações em '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" A sincronizar %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) transferir %s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) enviar %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 restante, %1 de %2, ficheiro %3 de %4 - + file %1 of %2 ficheiro %1 de %2 - + Waiting... A aguardar... - + Waiting for %n other folder(s)... A aguardar por %n outra pasta...A aguardar por %n outra(s) pasta(s)... - + Preparing to sync... A preparar para sincronizar... @@ -1956,17 +1956,17 @@ Não é aconselhada a sua utilização. O ficheiro transferido está vazio, apesar do servidor indicar que este deveria ter %1. - + File %1 cannot be saved because of a local file name clash! Ficheiro %1 não pode ser guardado devido à existência de um ficheiro local com o mesmo nome. - + File has changed since discovery O ficheiro alterou-se desde a sua descoberta - + Error writing metadata to the database Erro ao escrever a meta-informação par a base de dados @@ -2452,18 +2452,18 @@ Não é aconselhada a sua utilização. - + Public sh&aring requires a password A pa&rtilha pública requer uma palavra-passe: - + Please Set Password Por favor, Definir Senha - - + + &Share link &Compartilhe a hiperligação @@ -2873,12 +2873,12 @@ Não é aconselhada a sua utilização. Apenas %1 estão disponíveis, é preciso um mínimo de %2 para começar - + Not allowed because you don't have permission to add parent folder Não permitido, porque não tem permissão para adicionar a pasta fonte - + Not allowed because you don't have permission to add files in that folder Não permitido, porque não tem permissão para adicionar os ficheiros nessa pasta @@ -2983,64 +2983,64 @@ Não é aconselhada a sua utilização. Não foi possível ler a lista negra a partir da base de dados local - + Unable to read from the sync journal. Não foi possível ler a partir do jornal de sincronização. - + Cannot open the sync journal Impossível abrir o jornal de sincronismo - + File name contains at least one invalid character O nome de ficheiro contém pelo menos um caráter inválido - - + + Ignored because of the "choose what to sync" blacklist Ignorado devido à blacklist de escolha para sincronização - + Not allowed because you don't have permission to add subfolders to that folder Não permitido, porque não tem permissão para adicionar as subpastas nessa pasta - + Not allowed to upload this file because it is read-only on the server, restoring Não é permitido enviar este ficheiro porque este é só de leitura no servidor, a restaurar - - + + Not allowed to remove, restoring Não autorizado para remoção, restaurando - + Local files and share folder removed. Ficheiros locais e pasta partilhada removidos. - + Move not allowed, item restored Mover não foi permitido, item restaurado - + Move not allowed because %1 is read-only Mover não foi autorizado porque %1 é só de leitura - + the destination o destino - + the source a origem @@ -3070,8 +3070,8 @@ Não é aconselhada a sua utilização. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporado</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Não é aconselhada a sua utilização. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versão %2. Para mais informação visite <a href="%3">%4</a></p><p><small>Por Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e outros.</small></p><p>Copyright ownCloud, Inc.</p><p>Licenciado sob a GNU General Public License (GPL) Versão 2.0<br/>ownCloud e o logótipo ownCloud são marcas registadas de ownCloud, Inc. nos Estados Unidos da América, outros países, ou ambos.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_pt_BR.ts b/translations/client_pt_BR.ts index aa8e76255..d7e1b8691 100644 --- a/translations/client_pt_BR.ts +++ b/translations/client_pt_BR.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Ocorreu um erro ao escrever metadados ao banco de dados @@ -894,7 +894,7 @@ Continuando a sincronização como normal fará com que todos os seus arquivos s Erro enquanto carregava a lista de pastas do servidor. - + Signed out Desconectado @@ -904,96 +904,96 @@ Continuando a sincronização como normal fará com que todos os seus arquivos s Adição de pasta está desativado porque você já está sincronizando todos os seus arquivos. Se você deseja sincronizar várias pastas, por favor, remova a pasta raiz configurada atualmente. - + Fetching folder list from server... Obtendo lista de pastas do servidor... - + Checking for changes in '%1' Verificando alterações em '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Sincronizando %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) baixar %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) enviar %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 de %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 restando, %1 de %2, arquivo %3 de %4 - + file %1 of %2 arquivo %1 de %2 - + Waiting... Esperando... - + Waiting for %n other folder(s)... Esperando por %n outra pasta...Esperando por %n outras pastas... - + Preparing to sync... Preparando para sincronizar... @@ -1955,17 +1955,17 @@ It is not advisable to use it. O arquivo baixado está vazio apesar do servidor anunciou que deveria ter %1. - + File %1 cannot be saved because of a local file name clash! O arquivo %1 não pode ser salvo por causa de um confronto com um nome de arquivo local! - + File has changed since discovery Arquivo foi alterado desde a descoberta - + Error writing metadata to the database Ocorreu um erro ao escrever metadados ao banco de dados @@ -2451,18 +2451,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Comp&artilhamento público requer uma senha - + Please Set Password Por favor, Definir senha - - + + &Share link Link de &Compartilhamento @@ -2872,12 +2872,12 @@ It is not advisable to use it. Apenas %1 estão disponíveis, precisamos de pelo menos %2 para começar - + Not allowed because you don't have permission to add parent folder Não permitido porque você não tem permissão para adicionar pasta mãe - + Not allowed because you don't have permission to add files in that folder Não permitido porque você não tem permissão para adicionar arquivos na pasta @@ -2982,64 +2982,64 @@ It is not advisable to use it. Não é possível ler a lista negra a partir do banco de dados local - + Unable to read from the sync journal. Não é possível ler a partir do relatório de sincronização. - + Cannot open the sync journal Não é possível abrir o arquivo de sincronização - + File name contains at least one invalid character O nome do arquivo contem pelo menos um caractere inválido - - + + Ignored because of the "choose what to sync" blacklist Ignorado por causa da lista negra "escolher o que sincronizar" - + Not allowed because you don't have permission to add subfolders to that folder Não permitido porque você não tem permissão para adicionar subpastas para essa pasta - + Not allowed to upload this file because it is read-only on the server, restoring Não é permitido fazer o upload deste arquivo porque ele é somente leitura no servidor, restaurando - - + + Not allowed to remove, restoring Não é permitido remover, restaurando - + Local files and share folder removed. Arquivos locais e pasta compartilhada removida. - + Move not allowed, item restored Não é permitido mover, item restaurado - + Move not allowed because %1 is read-only Não é permitido mover porque %1 é somente para leitura - + the destination o destino - + the source a fonte @@ -3069,8 +3069,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3294,8 +3294,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Versão %2. Para mais informações visite<a href="%3">%4</a></p><p><small>Por Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e outros.</small></p><p>Copyright ownCloud, Inc.</p><p>Licenciado sob a GNU General Public License (GPL) Versão 2.0<br/>ownCloud e o logotipo ownCloud são marcas registradas da ownCloud, Inc. nos Estados Unidos, outros países, ou ambos.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_ru.ts b/translations/client_ru.ts index 119d0d572..574825ee9 100644 --- a/translations/client_ru.ts +++ b/translations/client_ru.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Ошибка записи метаданных в базу данных @@ -894,7 +894,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an Ошибка загрузки списка папок с сервера. - + Signed out Вышли из аккаунта @@ -904,96 +904,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an Добавление папки отключена, потому что вы уже синхронизированы все файлы. Если вы хотите синхронизировать несколько папок, пожалуйста, удалите текущую корневую папку. - + Fetching folder list from server... Извлечение списка папок с сервера... - + Checking for changes in '%1' Проверка изменений в '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Синхронизация %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) скачать %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) выгрузка %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 из %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" Осталось %5, %1 из %2, файл %3 из %4 - + file %1 of %2 файл %1 из %2 - + Waiting... Ожидание... - + Waiting for %n other folder(s)... Ожидание %n папки...Ожидание %s папок...Ожидание %s папок...Ожидание %s папок... - + Preparing to sync... Подготовка к синхронизации... @@ -1955,17 +1955,17 @@ It is not advisable to use it. Скачанный файл пуст, хотя сервер заявил, что он должен быть %1. - + File %1 cannot be saved because of a local file name clash! Файл %1 не может быть сохранён из-за локального конфликта имен! - + File has changed since discovery После обнаружения файл был изменен - + Error writing metadata to the database Ошибка записи метаданных в базу данных @@ -2451,18 +2451,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Публичные ссылки требуют пароля - + Please Set Password Пожалуйста, установите пароль - - + + &Share link Поделиться ссылкой @@ -2872,12 +2872,12 @@ It is not advisable to use it. Только %1 доступно, нужно как минимум %2 чтобы начать - + Not allowed because you don't have permission to add parent folder Не разрешается, так как у вас нет полномочий на добавление родительской папки - + Not allowed because you don't have permission to add files in that folder Не разрешается, так как у вас нет полномочий на добавление файлов в эту папку @@ -2982,64 +2982,64 @@ It is not advisable to use it. Не удалось прочитать файл чёрного списка из локальной базы данных. - + Unable to read from the sync journal. Не удалось прочитать из журнала синхронизации. - + Cannot open the sync journal Не удаётся открыть журнал синхронизации - + File name contains at least one invalid character Имя файла содержит по крайней мере один некорректный символ - - + + Ignored because of the "choose what to sync" blacklist Игнорируется из-за черного списка в "что синхронизировать" - + Not allowed because you don't have permission to add subfolders to that folder Не разрешается, так как у вас нет полномочий на добавление подпапок в папку. - + Not allowed to upload this file because it is read-only on the server, restoring Не допускается загрузка этого файла, так как на сервере он помечен только для чтения, восстанавливаем - - + + Not allowed to remove, restoring Не допускается удаление, восстанавливаем - + Local files and share folder removed. Локальные файлы и общий каталог удалены. - + Move not allowed, item restored Перемещение не допускается, элемент восстановлен - + Move not allowed because %1 is read-only Перемещение не допускается, поскольку %1 помечен только для чтения - + the destination назначение - + the source источник @@ -3069,8 +3069,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Все права принадлежат ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3294,8 +3294,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Версия %2. Для более подробной информации посетите <a href="%3">%4</a></p><p><small>Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz и другие.</small></p><p>Права принадлежат ownCloud, Inc.</p><p>Под лицензией GNU General Public License (GPL) Version 2.0<br/>ownCloud и логотип ownCloud являются зарегистрированными товарными знаками ownCloud, Inc. в США и других странах.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_sk.ts b/translations/client_sk.ts index cb1360acd..2a8193677 100644 --- a/translations/client_sk.ts +++ b/translations/client_sk.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Chyba pri zápise metadát do databázy @@ -894,7 +894,7 @@ Ak by ste normálne pokračovali v synchronizácii, skôzobilo by to prepísanie - + Signed out Odhlásený @@ -904,96 +904,96 @@ Ak by ste normálne pokračovali v synchronizácii, skôzobilo by to prepísanie - + Fetching folder list from server... Načítavam zoznam priečinkov zo servera... - + Checking for changes in '%1' Kontrolujú sa zmeny v „%1“ - + , '%1' Build a list of file names - + '%1' Argument is a file name - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synchronizuje sa %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) stiahnuť %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) nahrať %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 of %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 súbor %1 z %2 - + Waiting... Čakajte... - + Waiting for %n other folder(s)... - + Preparing to sync... Príprava na synchronizáciu... @@ -1950,17 +1950,17 @@ Nie je vhodné ju používať. - + File %1 cannot be saved because of a local file name clash! Súbor %1 nie je možné uložiť, pretože jeho názov koliduje s názvom lokálneho súboru! - + File has changed since discovery Súbor sa medzitým zmenil - + Error writing metadata to the database Chyba pri zápise metadát do databázy @@ -2446,18 +2446,18 @@ Nie je vhodné ju používať. - + Public sh&aring requires a password Verejné z&dieľanie vyžaduje heslo - + Please Set Password Prosím nastavte si heslo - - + + &Share link &Zdieľať odkaz @@ -2867,12 +2867,12 @@ Nie je vhodné ju používať. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2977,64 +2977,64 @@ Nie je vhodné ju používať. - + Unable to read from the sync journal. Nemožno čítať zo synchronizačného žurnálu - + Cannot open the sync journal Nemožno otvoriť sync žurnál - + File name contains at least one invalid character Názov súboru obsahuje nevhodný znak - - + + Ignored because of the "choose what to sync" blacklist Ignorované podľa nastavenia "vybrať čo synchronizovať" - + Not allowed because you don't have permission to add subfolders to that folder Nie je dovolené, lebo nemáte oprávnenie pridávať podpriečinky do tohto priečinka - + Not allowed to upload this file because it is read-only on the server, restoring Nie je dovolené tento súbor nahrať, pretože je na serveri iba na čítanie. Obnovuje sa. - - + + Not allowed to remove, restoring Nie je dovolené odstrániť. Obnovuje sa. - + Local files and share folder removed. Lokálne súbory a zdieľaný priečinok boli odstránené. - + Move not allowed, item restored Presunutie nie je dovolené. Položka obnovená. - + Move not allowed because %1 is read-only Presunutie nie je dovolené, pretože %1 je na serveri iba na čítanie - + the destination cieľ - + the source zdroj @@ -3064,8 +3064,8 @@ Nie je vhodné ju používať. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3289,8 +3289,8 @@ Nie je vhodné ju používať. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Verzia %2. Ďalšie informácie získate na adrese <a href="%3">%4</a></p><p><small>Autori Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz a ďalší.</small></p><p>Copyright ownCloud, Inc.</p><p>Licencované za podmienok GNU General Public License (GPL) Version 2.0<br/>ownCloud a ownCloud Logo sú registrované obchodné známky ownCloud, Inc. v USA, ďalších krajinách, alebo oboje.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_sl.ts b/translations/client_sl.ts index 7dd5e8e75..af30cecf6 100644 --- a/translations/client_sl.ts +++ b/translations/client_sl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Napaka zapisovanja metapodatkov v podatkovno zbirko @@ -894,7 +894,7 @@ Z nadaljevanjem usklajevanja bodo vse trenutne datoteke prepisane s starejšimi Prišlo je do napake med nalaganjem datotek s strežnika. - + Signed out Odjavljeno @@ -904,96 +904,96 @@ Z nadaljevanjem usklajevanja bodo vse trenutne datoteke prepisane s starejšimi Dodajanje mape je onemogočeno, ker se usklajojejo vse vaše datoteke. Če želite usklajevati več map, odstranite trenutno nastavljeno korensko mapo. - + Fetching folder list from server... Poteka pridobivanje seznama map s strežnika ... - + Checking for changes in '%1' Preverjanje za spremembe v '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Usklajevanje %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) prejemanje %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) pošiljanje %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 od %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" Preostalo še %5, %1 od %2, datoteka %3 od %4 - + file %1 of %2 datoteka %1 od %2 - + Waiting... Čakanje na povezavo ... - + Waiting for %n other folder(s)... V pripravi je %n druga map ...V pripravi sta %n drugi mapi ...V pripravi so %n druge mape ...V pripravi je %n drugih map ... - + Preparing to sync... Priprava na usklajevanje ... @@ -1955,17 +1955,17 @@ Uporaba ni priporočljiva. Prejeta datoteka je prazna, čeprav je na strežniku objavljena z %1. - + File %1 cannot be saved because of a local file name clash! Datoteke %1 ni mogoče shraniti zaradi neskladja z imenom obstoječe datoteke! - + File has changed since discovery Datoteka je bila po spremenjena po usklajevanju seznama datotek. - + Error writing metadata to the database Napaka zapisovanja metapodatkov v podatkovno zbirko @@ -2451,18 +2451,18 @@ Uporaba ni priporočljiva. - + Public sh&aring requires a password Javna omogočanje &souporabe zahteva geslo - + Please Set Password Določite geslo - - + + &Share link Povezava za &souporabo @@ -2872,12 +2872,12 @@ Uporaba ni priporočljiva. Le %1 je na voljo, zahtevanih pa je vaj %2 za zagon - + Not allowed because you don't have permission to add parent folder Dejanje ni dovoljeno, ker ni ustreznih dovoljenj za dodajanje starševske mape - + Not allowed because you don't have permission to add files in that folder Dejanje ni dovoljeno, ker ni ustreznih dovoljenj za dodajanje datotek v to mapo @@ -2982,64 +2982,64 @@ Uporaba ni priporočljiva. Ni mogoče prebrati črnega seznama iz krajevne mape - + Unable to read from the sync journal. Ni mogoče brati iz dnevnika usklajevanja - + Cannot open the sync journal Ni mogoče odpreti dnevnika usklajevanja - + File name contains at least one invalid character Ime datoteke vsebuje vsaj en neveljaven znak. - - + + Ignored because of the "choose what to sync" blacklist Prezrto, ker je predmet označen na črni listi za usklajevanje - + Not allowed because you don't have permission to add subfolders to that folder Dejanje ni dovoljeno! Ni ustreznih dovoljenj za dodajanje podmap v to mapo. - + Not allowed to upload this file because it is read-only on the server, restoring Ni dovoljeno pošiljati te datoteke, ker ima določena dovoljenja le za branje. Datoteka bo obnovljena na izvorno različico. - - + + Not allowed to remove, restoring Odstranitev ni dovoljena, datoteka bo obnovljena. - + Local files and share folder removed. Krajevne datoteke in mape v souporabi so odstranjene. - + Move not allowed, item restored Premikanje ni dovoljeno, datoteka bo obnovljena. - + Move not allowed because %1 is read-only Premikanje ni dovoljeno, ker je nastavljeno določilo %1 le za branje. - + the destination cilj - + the source vir @@ -3069,8 +3069,8 @@ Uporaba ni priporočljiva. - <p>Copyright ownCloud, Incorporated</p> - <p>Avtorske pravice ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3294,8 +3294,8 @@ Uporaba ni priporočljiva. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Različica %2. Več podrobnosti je zabeleženih na <a href='%3'>%4</a>.</p><p><small>Avtorstvo: Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz in drugi.</small></p><p>Avtorske pravice ownCloud, Inc.</p><p>Programski paket je objavljen z dovoljenjem GNU General Public License (GPL) Version 2.0.<br/>ownCloud in logotip ownCloud sta blagovni znamki ownCloud v Združenih državah, drugih državah ali oboje.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_sr.ts b/translations/client_sr.ts index 23fbd28f6..9b2084053 100644 --- a/translations/client_sr.ts +++ b/translations/client_sr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Одјављен @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... Добављам списак фасцикли са сервера... - + Checking for changes in '%1' Проверавам измене у „%1“ - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name „%1“ - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Синхронизујем %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) преузми %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) отпреми %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 од %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 фајл %1 од %2 - + Waiting... Чекам... - + Waiting for %n other folder(s)... - + Preparing to sync... Припремам синхронизацију... @@ -1949,17 +1949,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Фајл %1 се не може сачувати јер се судара са називом локалног фајла! - + File has changed since discovery Фајл је измењен у међувремену - + Error writing metadata to the database @@ -2445,18 +2445,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Јавно дељење з&хтева лозинку - + Please Set Password Поставите лозинку - - + + &Share link &Веза дељења @@ -2866,12 +2866,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2976,64 +2976,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal Не могу да отворим дневник синхронизације - + File name contains at least one invalid character Назив садржи бар један недозвољен карактер - - + + Ignored because of the "choose what to sync" blacklist Игнорисано јер се не налази на листи за синхронизацију - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Није могуће отпремити овај фајл јер је на серверу само за читање. Враћам - - + + Not allowed to remove, restoring Није могуће уклањање. Враћам - + Local files and share folder removed. Локални фајлови и дељена фасцикла су уклоњени. - + Move not allowed, item restored Премештање није дозвољено. Ставка је враћена - + Move not allowed because %1 is read-only Премештање није дозвољено јер %1 је само за читање - + the destination одредиште - + the source извор @@ -3063,8 +3063,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>Ауторска права оунКлауд (ownCloud), корпорација</p> + <p>Copyright ownCloud GmbH</p> + @@ -3288,8 +3288,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Верзија %2. За више информација посетите <a href="%3">%4</a></p><p><small>Клас Фрајтаг (Klaas Freitag), Данијел Мелкентин (Daniel Molkentin), Жан-Кристоф Боршар (Jan-Christoph Borchardt), Оливије Гофар (Olivier Goffart), Маркус Гец (Markus Götz) и остали.</small></p><p>Ауторска права ownCloud, Inc.</p><p>Лиценцирано под ГНУ Општом јавном лиценцом ОЈЛ (GPL) верзије 2.0<br/>оунКлауд и оунКлауд логотип су регистроване робне марке ownCloud, Inc. у САД, другим земљама, или обоје.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_sv.ts b/translations/client_sv.ts index 62493627e..36ea91206 100644 --- a/translations/client_sv.ts +++ b/translations/client_sv.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fel vid skrivning av metadata till databasen @@ -894,7 +894,7 @@ Om du fortsätter synkningen leder till att dina filer skrivs över av äldre fi Ett fel uppstod när mapplistan försökte laddas från servern. - + Signed out Utloggad @@ -904,96 +904,96 @@ Om du fortsätter synkningen leder till att dina filer skrivs över av äldre fi Tillägg av mappar är avstängt eftersom du redan synkar alla dina filer. Om du vill synka fler mappar, var god ta bort den nuvarande rotmappen. - + Fetching folder list from server... Hämtar mapplistan från servern... - + Checking for changes in '%1' Kollar efter ändringar i '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" Synkroniserar %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) ladda ner %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) ladda upp %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 av %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" %5 kvar, %1 av %2, fil %3 av %4 - + file %1 of %2 fil %1 av %2 - + Waiting... Väntar... - + Waiting for %n other folder(s)... Väntat på %n annan mapp...Väntat på %n andra mappar... - + Preparing to sync... Förbereder för att synkronisera... @@ -1956,17 +1956,17 @@ Det är inte lämpligt använda den. Den nedladdade filen är tom men servern sa att den skulle vara %1. - + File %1 cannot be saved because of a local file name clash! Fil %1 kan inte sparas eftersom namnet krockar med en lokal fil! - + File has changed since discovery Filen har ändrats sedan upptäckten - + Error writing metadata to the database Fel vid skrivning av metadata till databasen @@ -2452,18 +2452,18 @@ Det är inte lämpligt använda den. - + Public sh&aring requires a password Publik d&elning kräver lösenord - + Please Set Password Var vänlig sätt lösenord - - + + &Share link &Dela länk @@ -2552,7 +2552,7 @@ Det är inte lämpligt använda den. SSL Chipher Debug View - + Debugvy SSL-kryptering @@ -2873,12 +2873,12 @@ Det är inte lämpligt använda den. Endast %1 tillgängligt, behöver minst %2 för att starta - + Not allowed because you don't have permission to add parent folder Otillåtet eftersom du inte har rättigheter att lägga till övermappar - + Not allowed because you don't have permission to add files in that folder Otillåtet eftersom du inte har rättigheter att lägga till filer i den mappen. @@ -2983,64 +2983,64 @@ Det är inte lämpligt använda den. Kunde inte läsa svartlistan från den lokala databasen - + Unable to read from the sync journal. Kunde inte läsa från synk-journalen. - + Cannot open the sync journal Kunde inte öppna synk journalen - + File name contains at least one invalid character Filnamnet innehåller minst ett ogiltigt tecken - - + + Ignored because of the "choose what to sync" blacklist Ignorerad eftersom den är svartlistad i "välj vad som ska synkas" - + Not allowed because you don't have permission to add subfolders to that folder Otillåtet eftersom du inte har rättigheter att lägga till undermappar i den mappen. - + Not allowed to upload this file because it is read-only on the server, restoring Inte behörig att ladda upp denna fil då den är skrivskyddad på servern, återställer - - + + Not allowed to remove, restoring Inte behörig att radera, återställer - + Local files and share folder removed. Lokala filer och mappar som är delade är borttagna. - + Move not allowed, item restored Det gick inte att genomföra flytten, objektet återställs - + Move not allowed because %1 is read-only Det gick inte att genomföra flytten då %1 är skrivskyddad - + the destination destinationen - + the source källan @@ -3070,8 +3070,8 @@ Det är inte lämpligt använda den. - <p>Copyright ownCloud, Incorporated</p> - <p>Copyright ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3295,8 +3295,8 @@ Det är inte lämpligt använda den. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Version %2. För mer information, gå till <a href="%3">%4</a></p><p><small>Av Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz med flera.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensierad under GNU General Public License (GPL) Version 2.0<br/>ownCloud och ownClouds logo är registrerade varumärken av ownCloud, Inc. i USA, andra länder eller både och.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_th.ts b/translations/client_th.ts index 2aae6b7e2..161fc752a 100644 --- a/translations/client_th.ts +++ b/translations/client_th.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database ข้อผิดพลาดในการเขียนข้อมูลเมตาไปยังฐานข้อมูล @@ -895,7 +895,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an ข้อผิดพลาดในขณะที่โหลดรายชื่อโฟลเดอร์จากเซิร์ฟเวอร์ - + Signed out ออกจากระบบ @@ -905,96 +905,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an การเพิ่มโฟลเดอร์ถูกยกเลิกเพราะคุณได้ประสานไฟล์ทั้งหมดของคุณอยู่แล้ว หากคุณต้องการประสานข้อมูลหลายโฟลเดอร์โปรดลบโฟลเดอร์รากกำหนดค่าในปัจจุบัน - + Fetching folder list from server... กำลังดึงรายการโฟลเดอร์จากเซิร์ฟเวอร์ ... - + Checking for changes in '%1' กำลังตรวจสอบการเปลี่ยนแปลงใน '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" กำลังประสานข้อมูล %1 - - + + , หรือ - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) ดาวน์โหลด %1/วินาที - + u2193 %1/s u2193 %1/วินาที - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) อัปโหลด - + u2191 %1/s u2191 %1/วินาที - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 ของ %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" เหลืออีก %5 ไฟล์, %1 ไฟล์จาก %2, %3 ไฟล์จาก %4 - + file %1 of %2 ไฟล์ %1 จาก %2 - + Waiting... กรุณารอซักครู่... - + Waiting for %n other folder(s)... กำลังรออีก (%n) โฟลเดอร์... - + Preparing to sync... กำลังเตรียมพร้อมในการประสานข้อมูล @@ -1956,17 +1956,17 @@ It is not advisable to use it. ไฟล์ที่ดาวน์โหลดว่างเปล่าแม้ว่าเซิร์ฟเวอร์ประกาศว่าควรจะเป็น %1 - + File %1 cannot be saved because of a local file name clash! ไฟล์ %1 ไม่สามารถบันทึกได้เพราะชื่อไฟล์ต้นทางเหมือนกัน! - + File has changed since discovery ไฟล์มีการเปลี่ยนแปลงตั้งแต่ถูกพบ - + Error writing metadata to the database ข้อผิดพลาดในการเขียนข้อมูลเมตาไปยังฐานข้อมูล @@ -2452,18 +2452,18 @@ It is not advisable to use it. - + Public sh&aring requires a password การแชร์สาธารณะจำเป็นต้องมีรหัสผ่าน - + Please Set Password กรุณาตั้งรหัสผ่าน - - + + &Share link &แชร์ลิงค์ @@ -2871,12 +2871,12 @@ It is not advisable to use it. มีเพียง %1 ที่พร้อมใช้งาน คุณจำเป็นต้องมีไม่น้อยกว่า %2 เพื่อเริ่มใช้งาน - + Not allowed because you don't have permission to add parent folder ไม่ได้รับอนุญาต เพราะคุณไม่มีสิทธิ์ที่จะเพิ่มโฟลเดอร์หลัก - + Not allowed because you don't have permission to add files in that folder ไม่ได้รับอนุญาต เพราะคุณไม่มีสิทธิ์ที่จะเพิ่มไฟล์ในโฟลเดอร์นั้น @@ -2981,64 +2981,64 @@ It is not advisable to use it. ไม่สามารถอ่านบัญชีดำจากฐานข้อมูลต้นทาง - + Unable to read from the sync journal. ไม่สามารถอ่านจากบันทึกการประสานข้อมูล - + Cannot open the sync journal ไม่สามารถเปิดการผสานข้อมูลเจอร์นัล - + File name contains at least one invalid character มีชื่อแฟ้มอย่างน้อยหนึ่งตัวอักษรที่ไม่ถูกต้อง - - + + Ignored because of the "choose what to sync" blacklist ถูกละเว้นเพราะ "ข้อมูลที่เลือกประสาน" ติดบัญชีดำ - + Not allowed because you don't have permission to add subfolders to that folder ไม่อนุญาติเพราะคุณไม่มีสิทธิ์ที่จะเพิ่มโฟลเดอร์ย่อยของโฟลเดอร์นั้น - + Not allowed to upload this file because it is read-only on the server, restoring ไม่อนุญาตให้อัพโหลดไฟล์นี้เพราะมันจะอ่านได้เพียงอย่างเดียวบนเซิร์ฟเวอร์ กำลังฟื้นฟู - - + + Not allowed to remove, restoring ไม่อนุญาตให้ลบเพราะกำลังฟื้นฟู - + Local files and share folder removed. ไฟล์ต้นทางและโฟลเดอร์ที่แชร์ถูกลบออก - + Move not allowed, item restored ไม่ได้รับอนุญาตให้ย้าย เพราะกำลังกู้คืนรายการ - + Move not allowed because %1 is read-only ไม่อนุญาตให้ย้ายเพราะ %1 จะอ่านได้เพียงอย่างเดียว - + the destination ปลายทาง - + the source แหล่งที่มา @@ -3068,8 +3068,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>จดทะเบียนภายใต้ลิขสิทธิ์ของ ownCloud</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,8 +3293,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>รุ่น %2 สำหรับข้อมูลเพิ่มเติมดูได้ที่<a href="%3">%4</a></p><p><small> โดย Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz และอีกหลายคนที่ไม่ได้เอ่ยนาม </small></p><p> สงวนลิขสิทธิ์ ownCloud, Inc.</p><p>ได้รับใบอนุญาตภายใต้ GNU General Public License (GPL) รุ่น 2.0<br/> ownCloud และโลโก้ ownCloud เป็นเครื่องหมายจดทะเบียนการค้าของ ownCloud ในประเทศสหรัฐอเมริกา ประเทศอื่นๆ หรือทั้งสองอย่าง</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_tr.ts b/translations/client_tr.ts index 9af684eb9..a83c43918 100644 --- a/translations/client_tr.ts +++ b/translations/client_tr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Veritabanına üstveri yazma hatası @@ -893,7 +893,7 @@ Bunun nedeni sunucuda bir yedeğin geri yüklenmesinden dolayı olabilir. Eşitl Sunucudan klasörlerin listesi yüklenirken hata oluştu. - + Signed out Oturum sonlandırıldı @@ -903,96 +903,96 @@ Bunun nedeni sunucuda bir yedeğin geri yüklenmesinden dolayı olabilir. Eşitl Klasör ekleme devre dışı, çünkü şu anda bütün dosyalarınızı eşitliyorsunuz. Çoklu klasör eşitlemesi yapmak istiyorsanız, lütfen geçerli yapılandırılmış kök klasörünü silin. - + Fetching folder list from server... Sunucudan klasör listesi alınıyor... - + Checking for changes in '%1' %1 üzerindeki değişiklikler denetleniyor - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" %1 eşitleniyor - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) indirme %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) gönderme %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3/%4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" Kalan %5, %1/%2, dosya %3/%4 - + file %1 of %2 dosya %1/%2 - + Waiting... Bekleniyor... - + Waiting for %n other folder(s)... Diğer %n klasör bekleniyor...Diğer %n klasör bekleniyor... - + Preparing to sync... Eşitleme için hazırlanıyor... @@ -1954,17 +1954,17 @@ Kullanmanız önerilmez. Sunucu boyutunu %1 olarak duyurmasına rağmen indirilen dosya boş. - + File %1 cannot be saved because of a local file name clash! Yerel bir dosya ismi ile çakıştığından, %1 dosyası kaydedilemedi! - + File has changed since discovery Dosya, bulunduğundan itibaren değişmiş - + Error writing metadata to the database Veritabanına üstveri yazma hatası @@ -2450,18 +2450,18 @@ Kullanmanız önerilmez. - + Public sh&aring requires a password Herkese &açık paylaşım için parola gerekir - + Please Set Password Lütfen Parola Atayın - - + + &Share link &Paylaşma bağlantısı @@ -2871,12 +2871,12 @@ Kullanmanız önerilmez. Sadece %1 mevcut, Çalıştırmak için en az %2 gerekmektedir - + Not allowed because you don't have permission to add parent folder Üst dizin ekleme yetkiniz olmadığından izin verilmedi - + Not allowed because you don't have permission to add files in that folder Bu klasöre dosya ekleme yetkiniz olmadığından izin verilmedi @@ -2981,64 +2981,64 @@ Kullanmanız önerilmez. Yerel veritabanından kara liste okunamadı - + Unable to read from the sync journal. Eşitleme günlüğünden okunamadı. - + Cannot open the sync journal Eşitleme günlüğü açılamıyor - + File name contains at least one invalid character Dosya adı en az bir geçersiz karakter içeriyor - - + + Ignored because of the "choose what to sync" blacklist "Eşitlenecekleri seçin" kara listesinde olduğundan yoksayıldı. - + Not allowed because you don't have permission to add subfolders to that folder Bu dizine alt dizin ekleme yetkiniz olmadığından izin verilmedi - + Not allowed to upload this file because it is read-only on the server, restoring Sunucuda salt okunur olduğundan, bu dosya yüklenemedi, geri alınıyor - - + + Not allowed to remove, restoring Kaldırmaya izin verilmedi, geri alınıyor - + Local files and share folder removed. Yerel dosyalar ve paylaşım klasörü kaldırıldı. - + Move not allowed, item restored Taşımaya izin verilmedi, öge geri alındı - + Move not allowed because %1 is read-only %1 salt okunur olduğundan taşımaya izin verilmedi - + the destination hedef - + the source kaynak @@ -3068,8 +3068,8 @@ Kullanmanız önerilmez. - <p>Copyright ownCloud, Incorporated</p> - <p>Telif Hakkı ownCloud Anonim Şirketi</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,8 +3293,8 @@ Kullanmanız önerilmez. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Sürüm %2. Daha fazla bilgi için lütfen <a href="%3">%4</a> adresini ziyaret edin.</p><p><small>Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz ve diğerleri tarafından yazıldı.</small></p><p>Telif hakkı ownCloud, Anonim Şirketi.</p><p>GNU Genel Kamu Lisansı (GPL) Sürüm 2.0 ile lisanslanmıştır.<br>ownCloud ve ownCloud logoları <br>ABD ve/veya diğer ülkelerde ownCloud, Anonim Şirketi'nin tescili markalarıdır.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_uk.ts b/translations/client_uk.ts index b86c3e4cc..794d17164 100644 --- a/translations/client_uk.ts +++ b/translations/client_uk.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -889,7 +889,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Signed out Вийшов @@ -899,96 +899,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an - + Fetching folder list from server... - + Checking for changes in '%1' - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) - + u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 of %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 файл %1 з %2 - + Waiting... Очікування... - + Waiting for %n other folder(s)... - + Preparing to sync... @@ -1944,17 +1944,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Файл %1 не збережено через локальний конфлікт назви файлу! - + File has changed since discovery Файл змінився з моменту знаходження - + Error writing metadata to the database @@ -2440,18 +2440,18 @@ It is not advisable to use it. - + Public sh&aring requires a password Публічне по&ширення вимагає пароль - + Please Set Password - - + + &Share link По&ділитись посиланням @@ -2861,12 +2861,12 @@ It is not advisable to use it. Доступно лише %1, для початку необхідно хоча б %2 - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2971,64 +2971,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal Не вдається відкрити протокол синхронізації - + File name contains at least one invalid character Ім’я файлу містить принаймні один некоректний символ - - + + Ignored because of the "choose what to sync" blacklist Ігнорується через чорний список в "обрати що синхронізувати" - + Not allowed because you don't have permission to add subfolders to that folder Заборонено через відсутність прав додавання підкаталогів в цю теку. - + Not allowed to upload this file because it is read-only on the server, restoring Не дозволено завантажувати цей файл, оскільки він має дозвіл лише на перегляд, відновлюємо - - + + Not allowed to remove, restoring Не дозволено видаляти, відновлюємо - + Local files and share folder removed. Локальні файли та теки в загальному доступі було видалено. - + Move not allowed, item restored Переміщення не дозволено, елемент відновлено - + Move not allowed because %1 is read-only Переміщення не дозволено, оскільки %1 помічений тільки для перегляду - + the destination призначення - + the source джерело @@ -3058,8 +3058,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p> Права належать ownCloud, Incorporated </p> + <p>Copyright ownCloud GmbH</p> + @@ -3283,8 +3283,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>Версія %2. Для більш детальної інформації відвідайте <a href="%3">%4</a></p> <p><small> Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz та інші.</ small></p> <p> Права належать ownCloud, Inc. </p> <p> Під ліцензією GNU General Public License (GPL) Version 2.0 <br/> ownCloud і логотип ownCloud є зареєстрованими товарними знаками ownCloud, Inc. в США та інших країнах. </p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_zh_CN.ts b/translations/client_zh_CN.ts index 65a781761..be9bedff9 100644 --- a/translations/client_zh_CN.ts +++ b/translations/client_zh_CN.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database 向数据库写入元数据错误 @@ -894,7 +894,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an 载入文件夹列表时发生错误。 - + Signed out 已登出 @@ -904,96 +904,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an 你已经设置同步了你的所有文件,无法同步另一文件夹。要同步多个文件夹,请取消当前设置的根文件夹同步。 - + Fetching folder list from server... 获取文件夹列表... - + Checking for changes in '%1' 在 %1 检查更改 - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" 正在同步 %1 - - + + , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) 下载 %1/s - + u2193 %1/s u2193 %1/秒 - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) 上传 %1/s - + u2191 %1/s u2191 %1/秒 - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 / %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" 剩余: %5,%1 / %2, 文件数量 %3 / %4 - + file %1 of %2 第 %1 个文件,共 %2 个 - + Waiting... 请稍等... - + Waiting for %n other folder(s)... 等待 %n 个其他文件(文件夹) - + Preparing to sync... 准备同步... @@ -1954,17 +1954,17 @@ It is not advisable to use it. 虽然服务器宣称已完成 %1,但实际下载文件为空。 - + File %1 cannot be saved because of a local file name clash! 由于本地文件名冲突,文件 %1 无法保存。 - + File has changed since discovery 自从发现文件以来,它已经被改变了 - + Error writing metadata to the database 向数据库写入元数据错误 @@ -2450,18 +2450,18 @@ It is not advisable to use it. - + Public sh&aring requires a password 公开分享需要密码 - + Please Set Password 请设置密码 - - + + &Share link 分享链接(&s) @@ -2871,12 +2871,12 @@ It is not advisable to use it. 仅有 %1 有效,至少需要 %2 才能开始 - + Not allowed because you don't have permission to add parent folder 你没有权限增加父目录 - + Not allowed because you don't have permission to add files in that folder 你没有权限增加文件 @@ -2981,64 +2981,64 @@ It is not advisable to use it. 无法从本地数据库读取黑名单 - + Unable to read from the sync journal. 无法读取同步日志。 - + Cannot open the sync journal 无法打开同步日志 - + File name contains at least one invalid character 文件名中存在至少一个非法字符 - - + + Ignored because of the "choose what to sync" blacklist 已忽略(“选择同步内容”黑名单) - + Not allowed because you don't have permission to add subfolders to that folder 你没有权限增加子目录 - + Not allowed to upload this file because it is read-only on the server, restoring 无法上传文件,因为服务器端此文件为只读,正在回退 - - + + Not allowed to remove, restoring 无法删除,正在回退 - + Local files and share folder removed. 本地文件和共享文件夹已被删除。 - + Move not allowed, item restored 无法移动,正在回退 - + Move not allowed because %1 is read-only 无法移动,%1为是只读的 - + the destination 目标 - + the source @@ -3068,8 +3068,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>版权所有 ownCloud, Incorporated</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,8 +3293,8 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - <p>版本 %2,更多信息请访问<a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>版权所有 ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + diff --git a/translations/client_zh_TW.ts b/translations/client_zh_TW.ts index c98aaad49..e09bc854b 100644 --- a/translations/client_zh_TW.ts +++ b/translations/client_zh_TW.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -892,7 +892,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an 從伺服器端同步資料夾清單時發生錯誤。 - + Signed out 已登出 @@ -902,96 +902,96 @@ Continuing the sync as normal will cause all your files to be overwritten by an 新增資料夾失敗,您已經同步您擁有的所有檔案,如果您想要同步多個資料夾,請移除當前設定的根目錄資料夾。 - + Fetching folder list from server... 從伺服器抓取資料夾清單中... - + Checking for changes in '%1' 檢查 '%1' 的變動 - + , '%1' Build a list of file names , '%1' - + '%1' Argument is a file name '%1' - + Syncing %1 Example text: "Syncing 'foo.txt', 'bar.txt'" 同步 %1 - - + + , , - + download %1/s Example text: "download 24Kb/s" (%1 is replaced by 24Kb (translated)) 下載 %1/s - + u2193 %1/s u2193 %1/s - + upload %1/s Example text: "upload 24Kb/s" (%1 is replaced by 24Kb (translated)) 上傳 %1/s - + u2191 %1/s u2191 %1/s - + %1 %2 (%3 of %4) Example text: "uploading foobar.png (2MB of 2MB)" %1 %2 (%3 的 %4) - + %1 %2 Example text: "uploading foobar.png" %1 %2 - + %5 left, %1 of %2, file %3 of %4 Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7" - + file %1 of %2 檔案 %1 的 %2 - + Waiting... 等待中... - + Waiting for %n other folder(s)... 正在等候 %n 的資料夾(可能不只一個) - + Preparing to sync... 正在準備同步... @@ -1954,17 +1954,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! 檔案 %1 無法存檔,因為本地端的檔案名稱已毀損! - + File has changed since discovery 尋找的過程中檔案已經被更改 - + Error writing metadata to the database @@ -2450,18 +2450,18 @@ It is not advisable to use it. - + Public sh&aring requires a password 公開&共享需要密碼 - + Please Set Password 請設定密碼 - - + + &Share link &分享連結 @@ -2871,12 +2871,12 @@ It is not advisable to use it. 目前僅有 %1 可以使用,至少需要 %2 才能開始 - + Not allowed because you don't have permission to add parent folder 拒絕此操作,您沒有新增母資料夾的權限。 - + Not allowed because you don't have permission to add files in that folder 拒絕此操作,您沒有新增檔案在此資料夾的權限。 @@ -2981,64 +2981,64 @@ It is not advisable to use it. - + Unable to read from the sync journal. - + Cannot open the sync journal 同步處理日誌無法開啟 - + File name contains at least one invalid character 檔案名稱含有不合法的字元 - - + + Ignored because of the "choose what to sync" blacklist 已忽略。根據 "選擇要同步的項目"的黑名單 - + Not allowed because you don't have permission to add subfolders to that folder 拒絕此操作,您沒有在此新增子資料夾的權限。 - + Not allowed to upload this file because it is read-only on the server, restoring 拒絕上傳此檔案,此檔案在伺服器是唯讀檔,復原中 - - + + Not allowed to remove, restoring 不允許刪除,復原中 - + Local files and share folder removed. 本地端檔案和共享資料夾已被刪除。 - + Move not allowed, item restored 不允許移動,物件復原中 - + Move not allowed because %1 is read-only 不允許移動,因為 %1 是唯讀的 - + the destination 目標 - + the source 來源 @@ -3068,8 +3068,8 @@ It is not advisable to use it. - <p>Copyright ownCloud, Incorporated</p> - <p>著作權 ownCloud, 組織</p> + <p>Copyright ownCloud GmbH</p> + @@ -3293,7 +3293,7 @@ It is not advisable to use it. OCC::ownCloudTheme - <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud, Inc.</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> + <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> From 8496817db261c9776fd14452985b0d1fb4b89eaf Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Wed, 21 Sep 2016 02:18:30 +0200 Subject: [PATCH 38/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_de.ts | 4 ++-- translations/client_nl.ts | 4 ++-- translations/client_pt_BR.ts | 4 ++-- translations/client_sl.ts | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 12cdd29d8..93778831d 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -334,6 +334,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_de.ts b/translations/client_de.ts index fd9c38f36..255308c5a 100644 --- a/translations/client_de.ts +++ b/translations/client_de.ts @@ -3069,7 +3069,7 @@ Es ist nicht ratsam, diese zu benutzen. <p>Copyright ownCloud GmbH</p> - + <p>Copyright ownCloud GmbH</p> @@ -3294,7 +3294,7 @@ Es ist nicht ratsam, diese zu benutzen. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Version %2. Weitere Informationen unter <a href="%3">%4</a></p><p><small>Von Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz und anderen.</small></p><p>Copyright ownCloud GmbH</p><p>Lizensiert unter den Bedingungen der GNU General Public License (GPL) Version 2.0<br/>ownCloud und das ownCloud Logo sind eingetragene Warenzeichen der ownCloud Inc. in den USA, anderen Ländern, oder beidem.</p> diff --git a/translations/client_nl.ts b/translations/client_nl.ts index 005f576af..78320f933 100644 --- a/translations/client_nl.ts +++ b/translations/client_nl.ts @@ -3072,7 +3072,7 @@ We adviseren deze site niet te gebruiken. <p>Copyright ownCloud GmbH</p> - + <p>Copyright ownCloud GmbH</p> @@ -3297,7 +3297,7 @@ We adviseren deze site niet te gebruiken. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Versie %2. Bezoek voor meer informatie bezoek <a href="%3">%4</a>.</p><p><small>Door Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz en anderen.</small></p><p>Copyright ownCloud, GmbH</p><p>Gelicenseerd onder de GNU General Public License (GPL) Versie 2.0<br>ownCloud en het ownCloud logo zijn geregistreerde handelsmerken van ownCloud, Inc. in de Verenigde Staten, andere landen, of beide.</p> diff --git a/translations/client_pt_BR.ts b/translations/client_pt_BR.ts index d7e1b8691..1fc891716 100644 --- a/translations/client_pt_BR.ts +++ b/translations/client_pt_BR.ts @@ -3070,7 +3070,7 @@ It is not advisable to use it. <p>Copyright ownCloud GmbH</p> - + <p>Direitos autorais ownCloud GmbH</p> @@ -3295,7 +3295,7 @@ It is not advisable to use it. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Versão %2. Para mais informações visite <a href="%3">%4</a></p><p><small>Por Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e outros.</small></p><p>Direitos autorais ownCloud GmbH</p><p>Licenciado sob a GNU General Public License (GPL) Versão 2.0<br/>ownCloud e o logo ownCloud são marcas registradas da ownCloud, Inc. nos Estados Unidos e, em outros países, ou ambos.</p> diff --git a/translations/client_sl.ts b/translations/client_sl.ts index af30cecf6..69c36e3f7 100644 --- a/translations/client_sl.ts +++ b/translations/client_sl.ts @@ -3070,7 +3070,7 @@ Uporaba ni priporočljiva. <p>Copyright ownCloud GmbH</p> - + <p>Avtorske pravice ownCloud, GmbH</p> From a810d69daa1174d13ab7594f9d6989a9596d2efe Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 20 Sep 2016 11:55:43 +0200 Subject: [PATCH 39/93] ConnectionValidator: properly handle error in status.php (#5188) We wwer enot connecting to the right signal from the check server job, and therefore we were not catching the condition in which the json was invalid. We would then never terminate the ConnectionValidator job. Note that instanceNotFound is also emited if there is a network error. The log looked like this: 10:25:51.247 OCC::CheckServerJob::finished: status.php from server is not valid JSON! 10:25:51.248 OCC::CheckServerJob::finished: status.php returns: QMap() QNetworkReply::NetworkError(NoError) Reply: QNetworkReplyHttpImpl(0x2b6a790) 10:25:51.248 OCC::CheckServerJob::finished: No proper answer on QUrl("http://localhost/~owncloud/status.php") 10:26:23.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost" 10:26:55.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost" [...] (cherry picked from commit ff701bd473242b417e8ef9b987d4593e1495020c) --- src/libsync/connectionvalidator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp index 2a955a521..a1eead282 100644 --- a/src/libsync/connectionvalidator.cpp +++ b/src/libsync/connectionvalidator.cpp @@ -106,7 +106,7 @@ void ConnectionValidator::slotCheckServerAndAuth() checkJob->setTimeout(timeoutToUseMsec); checkJob->setIgnoreCredentialFailure(true); connect(checkJob, SIGNAL(instanceFound(QUrl,QVariantMap)), SLOT(slotStatusFound(QUrl,QVariantMap))); - connect(checkJob, SIGNAL(networkError(QNetworkReply*)), SLOT(slotNoStatusFound(QNetworkReply*))); + connect(checkJob, SIGNAL(instanceNotFound(QNetworkReply*)), SLOT(slotNoStatusFound(QNetworkReply*))); connect(checkJob, SIGNAL(timeout(QUrl)), SLOT(slotJobTimeout(QUrl))); checkJob->start(); } From 3bd3ffb8e2a3a1a966ae88d1c4ce45fed14451d5 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Thu, 22 Sep 2016 02:18:32 +0200 Subject: [PATCH 40/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_it.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 93778831d..2e0f7f681 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -337,6 +337,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_it.ts b/translations/client_it.ts index 49f839939..415a5bdde 100644 --- a/translations/client_it.ts +++ b/translations/client_it.ts @@ -3070,7 +3070,7 @@ Non è consigliabile utilizzarlo. <p>Copyright ownCloud GmbH</p> - + <p>Copyright ownCloud GmbH</p> @@ -3295,7 +3295,7 @@ Non è consigliabile utilizzarlo. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Versione %2. Per ulteriori informazioni, visita <a href="%3">%4</a></p><p><small>Di Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz e altri.</small></p><p>Copyright ownCloud GmbH</p><p>Sotto licenza GNU General Public License (GPL) versione 2.0<br/>ownCloud e il logo di ownCloud sono marchi registrati di ownCloud, Inc. negli Stati Uniti, in altri paesi o entrambi.</p> From 6f1b03c5603784556fd439f5c6d8c614265226d8 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 09:02:47 +0200 Subject: [PATCH 41/93] SyncEngine: Fix renaming of folder when file are changed (#5195) Two bugs: - The change filed are not considered as move, they are re-downloaded but the old file was not removed from the database. The change in owncloudpropagator.cpp takes care of removing the old entries. - Next sync would then remove the file in the server in the old folder This was not a problem until we start reusing the sync engine, and that the _renamedFolders map is not cleared. We were before deleting a non-existing file. But now we delete the actual file. Also improve the tests to be able to do move on the server. This include support for file id. Issue #5192 (cherry picked from commit 85b8ab178e21cf4dcaf792f68c15e55f6e0ee3c2) --- src/libsync/owncloudpropagator.cpp | 6 ++++++ src/libsync/syncengine.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 72046fccf..998160c1c 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -695,6 +695,12 @@ void PropagateDirectory::finalize() bool ok = true; if (!_item->isEmpty() && _hasError == SyncFileItem::NoStatus) { if( !_item->_renameTarget.isEmpty() ) { + if(_item->_instruction == CSYNC_INSTRUCTION_RENAME + && _item->_originalFile != _item->_renameTarget) { + // Remove the stale entries from the database. + _propagator->_journal->deleteFileRecord(_item->_originalFile, true); + } + _item->_file = _item->_renameTarget; } diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index a9f9701de..636ffb1c8 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -856,6 +856,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult) bool walkOk = true; _seenFiles.clear(); _temporarilyUnavailablePaths.clear(); + _renamedFolders.clear(); if( csync_walk_local_tree(_csync_ctx, &treewalkLocal, 0) < 0 ) { qDebug() << "Error in local treewalk."; From 8b9ca63eeb82812c7d6138d277b2602edbc6a0ef Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 12 Sep 2016 14:12:33 +0200 Subject: [PATCH 42/93] Dolphin Plugin: Use the Application name for the socket path (#5172) do not hardcode. This should fix #5165 (cherry picked from commit 2d110540ee5a67d2c014fcf4258840d3aaf538ac) --- shell_integration/dolphin/ownclouddolphinpluginhelper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp index 027e0e68e..68c2a9c29 100644 --- a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp +++ b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp @@ -21,6 +21,7 @@ #include #include #include "ownclouddolphinpluginhelper.h" +#include "config.h" OwncloudDolphinPluginHelper* OwncloudDolphinPluginHelper::instance() { @@ -67,7 +68,10 @@ void OwncloudDolphinPluginHelper::tryConnect() return; } QString runtimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR")); - QString socketPath = runtimeDir + QLatin1String("/ownCloud/socket"); + runtimeDir.append( QChar('/')); + runtimeDir.append( QLatin1String(APPLICATION_SHORTNAME) ); + + const QString socketPath = runtimeDir + QLatin1String("/socket"); _socket.connectToServer(socketPath); } From 29bd8658bb0d1f5e50f5911cf641324aa41e69ac Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 22 Sep 2016 15:41:30 +0200 Subject: [PATCH 43/93] ChangeLog: 2.2.4 --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 202099593..ee4f0d43e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ ChangeLog ========= +version 2.2.4 (release 2016-09-xx) +* Dolphin Plugin: Use the Application name for the socket path (#5172) +* SyncEngine: Fix renaming of folder when file are changed (#5195) +* Selective Sync: Fix HTTP request loop and show error in view (#5154) +* ConnectionValidator: properly handle error in status.php request (#5188) +* Discovery: Set thread priority to low (#5017) +* ExcludeFiles: Fix when the folder casing is not the same in the settings and in the FS +* ShareLink: Ensure the password line edit is enabled (#5117) + version 2.2.3 (release 2016-08-08) * SyncEngine: Fix detection of backup (#5104) * Fix bug with overriding URL in config (#5016) From f2721aff1d005b985d4d274747b446c393c0e765 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sat, 24 Sep 2016 02:18:33 +0200 Subject: [PATCH 44/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_ca.ts | 32 ++++++++++++++++---------------- translations/client_cs.ts | 32 ++++++++++++++++---------------- translations/client_de.ts | 32 ++++++++++++++++---------------- translations/client_el.ts | 32 ++++++++++++++++---------------- translations/client_en.ts | 32 ++++++++++++++++---------------- translations/client_es.ts | 36 ++++++++++++++++++------------------ translations/client_es_AR.ts | 32 ++++++++++++++++---------------- translations/client_et.ts | 32 ++++++++++++++++---------------- translations/client_eu.ts | 32 ++++++++++++++++---------------- translations/client_fa.ts | 32 ++++++++++++++++---------------- translations/client_fi.ts | 32 ++++++++++++++++---------------- translations/client_fr.ts | 32 ++++++++++++++++---------------- translations/client_gl.ts | 32 ++++++++++++++++---------------- translations/client_hu.ts | 32 ++++++++++++++++---------------- translations/client_it.ts | 32 ++++++++++++++++---------------- translations/client_ja.ts | 32 ++++++++++++++++---------------- translations/client_nb_NO.ts | 32 ++++++++++++++++---------------- translations/client_nl.ts | 32 ++++++++++++++++---------------- translations/client_pl.ts | 32 ++++++++++++++++---------------- translations/client_pt.ts | 32 ++++++++++++++++---------------- translations/client_pt_BR.ts | 32 ++++++++++++++++---------------- translations/client_ru.ts | 32 ++++++++++++++++---------------- translations/client_sk.ts | 32 ++++++++++++++++---------------- translations/client_sl.ts | 32 ++++++++++++++++---------------- translations/client_sr.ts | 32 ++++++++++++++++---------------- translations/client_sv.ts | 32 ++++++++++++++++---------------- translations/client_th.ts | 32 ++++++++++++++++---------------- translations/client_tr.ts | 32 ++++++++++++++++---------------- translations/client_uk.ts | 32 ++++++++++++++++---------------- translations/client_zh_CN.ts | 32 ++++++++++++++++---------------- translations/client_zh_TW.ts | 32 ++++++++++++++++---------------- 32 files changed, 501 insertions(+), 498 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 2e0f7f681..b0afba626 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -340,6 +340,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_ca.ts b/translations/client_ca.ts index ee87c1502..7fc17f7bd 100644 --- a/translations/client_ca.ts +++ b/translations/client_ca.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Error en escriure les metadades a la base de dades @@ -1916,7 +1916,7 @@ No és aconsellada usar-la. OCC::PropagateDirectory - + Error writing metadata to the database Error en escriure les metadades a la base de dades @@ -2871,12 +2871,12 @@ No és aconsellada usar-la. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2991,54 +2991,54 @@ No és aconsellada usar-la. No es pot obrir el diari de sincronització - + File name contains at least one invalid character El nom del fitxer conté al menys un caràcter invàlid - - + + Ignored because of the "choose what to sync" blacklist S'ignora degut al filtre a «Trieu què sincronitzar» - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring No es permet pujar aquest fitxer perquè només és de lectura en el servidor, es restaura - - + + Not allowed to remove, restoring No es permet l'eliminació, es restaura - + Local files and share folder removed. Fitxers locals i carpeta compartida esborrats. - + Move not allowed, item restored No es permet moure'l, l'element es restaura - + Move not allowed because %1 is read-only No es permet moure perquè %1 només és de lectura - + the destination el destí - + the source l'origen diff --git a/translations/client_cs.ts b/translations/client_cs.ts index 7f7d54c2e..930ea1857 100644 --- a/translations/client_cs.ts +++ b/translations/client_cs.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Chyba zápisu metadat do databáze @@ -1918,7 +1918,7 @@ Nedoporučuje se jí používat. OCC::PropagateDirectory - + Error writing metadata to the database Chyba zápisu metadat do databáze @@ -2873,12 +2873,12 @@ Nedoporučuje se jí používat. Je dostupných pouze %1, pro spuštění je potřeba alespoň %2 - + Not allowed because you don't have permission to add parent folder Není povoleno, protože nemáte oprávnění vytvořit nadřazený adresář - + Not allowed because you don't have permission to add files in that folder Není povoleno, protože nemáte oprávnění přidávat soubory do tohoto adresáře @@ -2993,54 +2993,54 @@ Nedoporučuje se jí používat. Nelze otevřít synchronizační žurnál - + File name contains at least one invalid character Jméno souboru obsahuje aelspoň jeden neplatný znak - - + + Ignored because of the "choose what to sync" blacklist Ignorováno podle nastavení "vybrat co synchronizovat" - + Not allowed because you don't have permission to add subfolders to that folder Není povoleno, protože nemáte oprávnění přidávat podadresáře do tohoto adresáře - + Not allowed to upload this file because it is read-only on the server, restoring Není povoleno nahrát tento soubor, protože je na serveru uložen pouze pro čtení, obnovuji - - + + Not allowed to remove, restoring Odstranění není povoleno, obnovuji - + Local files and share folder removed. Místní soubory a sdílený adresář byly odstraněny. - + Move not allowed, item restored Přesun není povolen, položka obnovena - + Move not allowed because %1 is read-only Přesun není povolen, protože %1 je pouze pro čtení - + the destination cílové umístění - + the source zdroj diff --git a/translations/client_de.ts b/translations/client_de.ts index 255308c5a..18edf083c 100644 --- a/translations/client_de.ts +++ b/translations/client_de.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fehler beim Schreiben der Metadaten in die Datenbank @@ -1916,7 +1916,7 @@ Es ist nicht ratsam, diese zu benutzen. OCC::PropagateDirectory - + Error writing metadata to the database Fehler beim Schreiben der Metadaten in die Datenbank @@ -2871,12 +2871,12 @@ Es ist nicht ratsam, diese zu benutzen. Nur %1 sind verfügbar. Zum Beginnen werden mindestens %2 benötigt. - + Not allowed because you don't have permission to add parent folder Nicht erlaubt, da Sie keine Rechte zur Erstellung von Unterordnern haben - + Not allowed because you don't have permission to add files in that folder Nicht erlaubt, da Sie keine Rechte zum Hinzufügen von Dateien in diesen Ordner haben @@ -2991,54 +2991,54 @@ Es ist nicht ratsam, diese zu benutzen. Synchronisationsbericht kann nicht geöffnet werden - + File name contains at least one invalid character Der Dateiname enthält mindestens ein ungültiges Zeichen - - + + Ignored because of the "choose what to sync" blacklist Aufgrund der »Zu synchronisierende Elemente auswählen«-Sperrliste ignoriert - + Not allowed because you don't have permission to add subfolders to that folder Nicht erlaubt, da Sie keine Rechte zur Erstellung von Unterordnern haben - + Not allowed to upload this file because it is read-only on the server, restoring Das Hochladen dieser Datei ist nicht erlaubt, da die Datei auf dem Server schreibgeschützt ist, Wiederherstellung - - + + Not allowed to remove, restoring Löschen nicht erlaubt, Wiederherstellung - + Local files and share folder removed. Lokale Dateien und Freigabeordner wurden entfernt. - + Move not allowed, item restored Verschieben nicht erlaubt, Element wiederhergestellt - + Move not allowed because %1 is read-only Verschieben nicht erlaubt, da %1 schreibgeschützt ist - + the destination Das Ziel - + the source Die Quelle diff --git a/translations/client_el.ts b/translations/client_el.ts index ddb849201..138796167 100644 --- a/translations/client_el.ts +++ b/translations/client_el.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -1916,7 +1916,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων @@ -2871,12 +2871,12 @@ It is not advisable to use it. Μόνο %1 είναι διαθέσιμα, απαιτούνται τουλάχιστον %2 για την εκκίνηση - + Not allowed because you don't have permission to add parent folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε γονικό κατάλογο - + Not allowed because you don't have permission to add files in that folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε αρχεία σε αυτόν τον φάκελο @@ -2991,54 +2991,54 @@ It is not advisable to use it. Αδυναμία ανοίγματος του αρχείου συγχρονισμού - + File name contains at least one invalid character Το όνομα αρχείου περιέχει έναν τουλάχιστον μη έγκυρο χαρακτήρα - - + + Ignored because of the "choose what to sync" blacklist Αγνοήθηκε εξαιτίας της μαύρης λίστας "διάλεξε τι να συγχρονιστεί" - + Not allowed because you don't have permission to add subfolders to that folder Δεν επιτρέπεται επειδή δεν έχετε δικαιώματα να προσθέσετε υποφακέλους σε αυτό τον φάκελο - + Not allowed to upload this file because it is read-only on the server, restoring Δεν επιτρέπεται να μεταφορτώσετε αυτό το αρχείο επειδή είναι μόνο για ανάγνωση στο διακομιστή, αποκατάσταση σε εξέλιξη - - + + Not allowed to remove, restoring Δεν επιτρέπεται η αφαίρεση, αποκατάσταση σε εξέλιξη - + Local files and share folder removed. Οι τοπικοί φάκελοι και ο φάκελος κοινής χρήσης αφαιρέθηκαν. - + Move not allowed, item restored Η μετακίνηση δεν επιτρέπεται, το αντικείμενο αποκαταστάθηκε - + Move not allowed because %1 is read-only Η μετακίνηση δεν επιτρέπεται επειδή το %1 είναι μόνο για ανάγνωση - + the destination ο προορισμός - + the source η προέλευση diff --git a/translations/client_en.ts b/translations/client_en.ts index 29c98315c..fd183c26e 100644 --- a/translations/client_en.ts +++ b/translations/client_en.ts @@ -530,7 +530,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1937,7 +1937,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2890,12 +2890,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -3010,54 +3010,54 @@ It is not advisable to use it. - + File name contains at least one invalid character - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination - + the source diff --git a/translations/client_es.ts b/translations/client_es.ts index 5ac942f17..c576301bf 100644 --- a/translations/client_es.ts +++ b/translations/client_es.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Error al escribir los metadatos en la base de datos @@ -1917,7 +1917,7 @@ No se recomienda usarla. OCC::PropagateDirectory - + Error writing metadata to the database Error al escribir los metadatos en la base de datos @@ -2872,12 +2872,12 @@ No se recomienda usarla. Solo %1 disponible, se necesita por lo menos %2 para comenzar - + Not allowed because you don't have permission to add parent folder No permitido porque no tienes permiso para añadir un directorio padre - + Not allowed because you don't have permission to add files in that folder No permitido porque no tienes permiso para añadir archivos a ese directorio @@ -2992,54 +2992,54 @@ No se recomienda usarla. No es posible abrir el diario de sincronización - + File name contains at least one invalid character Nombre de archivo contiene al menos un caracter no válido - - + + Ignored because of the "choose what to sync" blacklist Ignorado porque se encuentra en la lista negra de "elija qué va a sincronizar" - + Not allowed because you don't have permission to add subfolders to that folder No permitido porque no tienes permiso para añadir subdirectorios a ese directorio - + Not allowed to upload this file because it is read-only on the server, restoring No está permitido subir este archivo porque es de solo lectura en el servidor, restaurando. - - + + Not allowed to remove, restoring No está permitido borrar, restaurando. - + Local files and share folder removed. Se han eliminado los archivos locales y la carpeta compartida. - + Move not allowed, item restored No está permitido mover, elemento restaurado. - + Move not allowed because %1 is read-only No está permitido mover, porque %1 es de sólo lectura. - + the destination destino - + the source origen @@ -3070,7 +3070,7 @@ No se recomienda usarla. <p>Copyright ownCloud GmbH</p> - + <p>Copyright ownCloud GmbH</p> @@ -3295,7 +3295,7 @@ No se recomienda usarla. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Version %2. Para más información visita <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> diff --git a/translations/client_es_AR.ts b/translations/client_es_AR.ts index 6b99ecb63..ef9829d38 100644 --- a/translations/client_es_AR.ts +++ b/translations/client_es_AR.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1905,7 +1905,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2858,12 +2858,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2978,54 +2978,54 @@ It is not advisable to use it. - + File name contains at least one invalid character - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination - + the source diff --git a/translations/client_et.ts b/translations/client_et.ts index 0af9990dc..8d0e7a385 100644 --- a/translations/client_et.ts +++ b/translations/client_et.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1906,7 +1906,7 @@ Selle kasutamine pole soovitatav. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2861,12 +2861,12 @@ Selle kasutamine pole soovitatav. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2981,54 +2981,54 @@ Selle kasutamine pole soovitatav. Ei suuda avada sünkroniseeringu zurnaali - + File name contains at least one invalid character Faili nimesonvähemalt üks keelatud märk - - + + Ignored because of the "choose what to sync" blacklist "Vali, mida sünkroniseerida" musta nimekirja tõttu vahele jäetud - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Pole lubatud üles laadida, kuna tegemist on ainult-loetava serveriga, taastan - - + + Not allowed to remove, restoring Eemaldamine pole lubatud, taastan - + Local files and share folder removed. Kohalikud failid ja jagatud kaustad eemaldatud. - + Move not allowed, item restored Liigutamine pole lubatud, üksus taastatud - + Move not allowed because %1 is read-only Liigutamien pole võimalik kuna %1 on ainult lugemiseks - + the destination sihtkoht - + the source allikas diff --git a/translations/client_eu.ts b/translations/client_eu.ts index 335f2a98b..ec5f55c15 100644 --- a/translations/client_eu.ts +++ b/translations/client_eu.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1912,7 +1912,7 @@ Ez da gomendagarria erabltzea. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2865,12 +2865,12 @@ Ez da gomendagarria erabltzea. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2985,54 +2985,54 @@ Ez da gomendagarria erabltzea. Ezin da sinkronizazio egunerokoa ireki - + File name contains at least one invalid character Fitxategi izenak behintzat baliogabeko karaktere bat du - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring Ezabatzeko baimenik gabe, berrezartzen - + Local files and share folder removed. - + Move not allowed, item restored Mugitzea ez dago baimenduta, elementua berrezarri da - + Move not allowed because %1 is read-only Mugitzea ez dago baimenduta %1 irakurtzeko bakarrik delako - + the destination helburua - + the source jatorria diff --git a/translations/client_fa.ts b/translations/client_fa.ts index 395d864e1..f3d1ac134 100644 --- a/translations/client_fa.ts +++ b/translations/client_fa.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1905,7 +1905,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2858,12 +2858,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2978,54 +2978,54 @@ It is not advisable to use it. - + File name contains at least one invalid character نام فایل دارای حداقل یک کاراکتر نامعتبر است - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder با توجه به عدم اجازه‌ی شما به ایجاد زیرپوشه به پوشه مجاز نیست - + Not allowed to upload this file because it is read-only on the server, restoring آپلود این فایل با توجه به فقط-خواندنی بودن آن در سرور مجاز نیست، در حال بازگرداندن - - + + Not allowed to remove, restoring حذف مجاز نیست، در حال بازگردادن - + Local files and share folder removed. فایل‌های محلی و پوشه‌ی اشتراک حذف شد. - + Move not allowed, item restored انتقال مجاز نیست، مورد بازگردانده شد - + Move not allowed because %1 is read-only - + the destination مقصد - + the source مبدا diff --git a/translations/client_fi.ts b/translations/client_fi.ts index 98711254c..3c006df3b 100644 --- a/translations/client_fi.ts +++ b/translations/client_fi.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Virhe kirjoittaessa metadataa tietokantaan @@ -1913,7 +1913,7 @@ Osoitteen käyttäminen ei ole suositeltavaa. OCC::PropagateDirectory - + Error writing metadata to the database Virhe kirjoittaessa metadataa tietokantaan @@ -2868,12 +2868,12 @@ Osoitteen käyttäminen ei ole suositeltavaa. Vain %1 on käytettävissä, käynnistymiseen tarvitaan %2 - + Not allowed because you don't have permission to add parent folder Ei sallittu, koska käyttöoikeutesi eivät riitä ylätason kansion lisäämiseen - + Not allowed because you don't have permission to add files in that folder Ei sallittu, koska käyttöoikeutesi eivät riitä tiedostojen lisäämiseen kyseiseen kansioon @@ -2988,54 +2988,54 @@ Osoitteen käyttäminen ei ole suositeltavaa. - + File name contains at least one invalid character Tiedoston nimi sisältää ainakin yhden virheellisen merkin - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder Ei sallittu, koska oikeutesi eivät riitä alikansioiden lisäämiseen kyseiseen kansioon - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring Poistaminen ei ole sallittua, palautetaan - + Local files and share folder removed. Paikalliset tiedostot ja jakokansio poistettu. - + Move not allowed, item restored Siirtäminen ei ole sallittua, kohde palautettu - + Move not allowed because %1 is read-only Siirto ei ole sallittu, koska %1 on "vain luku"-tilassa - + the destination kohde - + the source lähde diff --git a/translations/client_fr.ts b/translations/client_fr.ts index ff699b9e6..cf6cf9656 100644 --- a/translations/client_fr.ts +++ b/translations/client_fr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Erreur à l'écriture des métadonnées dans la base de données @@ -1918,7 +1918,7 @@ Il est déconseillé de l'utiliser. OCC::PropagateDirectory - + Error writing metadata to the database Erreur à l'écriture des métadonnées dans la base de données @@ -2873,12 +2873,12 @@ Il est déconseillé de l'utiliser. Seulement %1 disponibles, il faut au moins %2 pour démarrer - + Not allowed because you don't have permission to add parent folder Non autorisé car vous n'avez pas la permission d'ajouter un dossier parent - + Not allowed because you don't have permission to add files in that folder Non autorisé car vous n'avez pas la permission d'ajouter des fichiers dans ce dossier @@ -2993,54 +2993,54 @@ Il est déconseillé de l'utiliser. Impossible d'ouvrir le journal de synchronisation - + File name contains at least one invalid character Le nom de fichier contient au moins un caractère non valable - - + + Ignored because of the "choose what to sync" blacklist Ignoré à cause de la liste noire "Choisir le contenu à synchroniser". - + Not allowed because you don't have permission to add subfolders to that folder Non autorisé car vous n'avez pas la permission d'ajouter des sous-dossiers dans ce dossier - + Not allowed to upload this file because it is read-only on the server, restoring Non autorisé à envoyer ce fichier car il est en lecture seule sur le serveur. Restauration - - + + Not allowed to remove, restoring Non autorisé à supprimer. Restauration - + Local files and share folder removed. Fichiers locaux et répertoire de partage supprimés. - + Move not allowed, item restored Déplacement non autorisé, élément restauré - + Move not allowed because %1 is read-only Déplacement non autorisé car %1 est en mode lecture seule - + the destination la destination - + the source la source diff --git a/translations/client_gl.ts b/translations/client_gl.ts index 9051b172d..f298eff8f 100644 --- a/translations/client_gl.ts +++ b/translations/client_gl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1912,7 +1912,7 @@ Recomendámoslle que non o use. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2867,12 +2867,12 @@ Recomendámoslle que non o use. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2987,54 +2987,54 @@ Recomendámoslle que non o use. Non foi posíbel abrir o rexistro de sincronización - + File name contains at least one invalid character O nome de ficheiro contén algún carácter incorrecto - - + + Ignored because of the "choose what to sync" blacklist Ignorado por mor da lista negra de «escolla que sincronizar» - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Non está permitido o envío xa que o ficheiro é só de lectura no servidor, restaurando - - + + Not allowed to remove, restoring Non está permitido retiralo, restaurando - + Local files and share folder removed. Retirados os ficheiros locais e o cartafol compartido. - + Move not allowed, item restored Nos está permitido movelo, elemento restaurado - + Move not allowed because %1 is read-only Bon está permitido movelo xa que %1 é só de lectura - + the destination o destino - + the source a orixe diff --git a/translations/client_hu.ts b/translations/client_hu.ts index 6dfa24945..1e1a3111e 100644 --- a/translations/client_hu.ts +++ b/translations/client_hu.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1909,7 +1909,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2863,12 +2863,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2983,54 +2983,54 @@ It is not advisable to use it. - + File name contains at least one invalid character A fájlnév legalább egy érvénytelen karaktert tartalmaz! - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring - - + + Not allowed to remove, restoring - + Local files and share folder removed. - + Move not allowed, item restored - + Move not allowed because %1 is read-only - + the destination a cél - + the source a forrás diff --git a/translations/client_it.ts b/translations/client_it.ts index 415a5bdde..0b704ecee 100644 --- a/translations/client_it.ts +++ b/translations/client_it.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Errore durante la scrittura dei metadati nel database @@ -1917,7 +1917,7 @@ Non è consigliabile utilizzarlo. OCC::PropagateDirectory - + Error writing metadata to the database Errore durante la scrittura dei metadati nel database @@ -2872,12 +2872,12 @@ Non è consigliabile utilizzarlo. Sono disponibili solo %1, servono almeno %2 per iniziare - + Not allowed because you don't have permission to add parent folder Non consentito poiché non disponi dei permessi per aggiungere la cartella superiore - + Not allowed because you don't have permission to add files in that folder Non consentito poiché non disponi dei permessi per aggiungere file in quella cartella @@ -2992,54 +2992,54 @@ Non è consigliabile utilizzarlo. Impossibile aprire il registro di sincronizzazione - + File name contains at least one invalid character Il nome del file contiene almeno un carattere non valido - - + + Ignored because of the "choose what to sync" blacklist Ignorato in base alla lista nera per la scelta di cosa sincronizzare - + Not allowed because you don't have permission to add subfolders to that folder Non consentito poiché non disponi dei permessi per aggiungere sottocartelle in quella cartella - + Not allowed to upload this file because it is read-only on the server, restoring Il caricamento di questo file non è consentito poiché è in sola lettura sul server, ripristino - - + + Not allowed to remove, restoring Rimozione non consentita, ripristino - + Local files and share folder removed. I file locali e la cartella condivisa sono stati rimossi. - + Move not allowed, item restored Spostamento non consentito, elemento ripristinato - + Move not allowed because %1 is read-only Spostamento non consentito poiché %1 è in sola lettura - + the destination la destinazione - + the source l'origine diff --git a/translations/client_ja.ts b/translations/client_ja.ts index 1cba3eb25..b53803b21 100644 --- a/translations/client_ja.ts +++ b/translations/client_ja.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database メタデータのデータベースへの書き込みに失敗 @@ -1916,7 +1916,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database メタデータのデータベースへの書き込みに失敗 @@ -2871,12 +2871,12 @@ It is not advisable to use it. %1 しか空き容量がありません、開始するためには少なくとも %2 は必要です。 - + Not allowed because you don't have permission to add parent folder 親フォルダーを追加する権限がありません - + Not allowed because you don't have permission to add files in that folder そのフォルダーにファイルを追加する権限がありません @@ -2991,54 +2991,54 @@ It is not advisable to use it. 同期ジャーナルを開くことができません - + File name contains at least one invalid character ファイル名に1文字以上の無効な文字が含まれています - - + + Ignored because of the "choose what to sync" blacklist "同期対象先" ブラックリストにより無視されました。 - + Not allowed because you don't have permission to add subfolders to that folder そのフォルダーにサブフォルダーを追加する権限がありません - + Not allowed to upload this file because it is read-only on the server, restoring サーバーでは読み取り専用となっているため、このファイルをアップロードすることはできません、復元しています - - + + Not allowed to remove, restoring 削除できないので復元しています - + Local files and share folder removed. ローカルファイルと共有フォルダーを削除しました。 - + Move not allowed, item restored 移動できないので項目を復元しました - + Move not allowed because %1 is read-only %1 は読み取り専用のため移動できません - + the destination 移動先 - + the source 移動元 diff --git a/translations/client_nb_NO.ts b/translations/client_nb_NO.ts index c2963fea1..bdfa025bd 100644 --- a/translations/client_nb_NO.ts +++ b/translations/client_nb_NO.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Feil ved skriving av metadata til databasen @@ -1918,7 +1918,7 @@ Det er ikke tilrådelig å bruke den. OCC::PropagateDirectory - + Error writing metadata to the database Feil ved skriving av metadata til databasen @@ -2873,12 +2873,12 @@ Det er ikke tilrådelig å bruke den. Bare %1 er tilgjengelig, trenger minst %2 for å begynne - + Not allowed because you don't have permission to add parent folder Ikke tillatt fordi du ikke har lov til å legge til foreldremappe - + Not allowed because you don't have permission to add files in that folder Ikke tillatt fordi du ikke har lov til å opprette filer i den mappen @@ -2993,54 +2993,54 @@ Det er ikke tilrådelig å bruke den. Kan ikke åpne synkroniseringsjournalen - + File name contains at least one invalid character Filnavnet inneholder minst ett ulovlig tegn - - + + Ignored because of the "choose what to sync" blacklist Ignorert på grunn av svartelisten "velg hva som skal synkroniseres" - + Not allowed because you don't have permission to add subfolders to that folder Ikke tillatt fordi du ikke har lov til å lage undermapper i den mappen - + Not allowed to upload this file because it is read-only on the server, restoring Ikke tillatt å laste opp denne filenfordi den er skrivebeskyttet på serveren, gjenoppretter - - + + Not allowed to remove, restoring Ikke tillatt å fjerne, gjenoppretter - + Local files and share folder removed. Lokale filer og delingsmappe fjernet. - + Move not allowed, item restored Flytting ikke tillatt, element gjenopprettet - + Move not allowed because %1 is read-only Flytting ikke tillatt fordi %1 er skrivebeskyttet - + the destination målet - + the source kilden diff --git a/translations/client_nl.ts b/translations/client_nl.ts index 78320f933..6757347ed 100644 --- a/translations/client_nl.ts +++ b/translations/client_nl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fout bij schrijven van Metadata naar de database @@ -1919,7 +1919,7 @@ We adviseren deze site niet te gebruiken. OCC::PropagateDirectory - + Error writing metadata to the database Fout bij schrijven van Metadata naar de database @@ -2874,12 +2874,12 @@ We adviseren deze site niet te gebruiken. Slechts %1 beschikbaar, maar heeft minimaal %2 nodig om te starten - + Not allowed because you don't have permission to add parent folder Niet toegestaan omdat u geen rechten hebt om een bovenliggende map toe te voegen - + Not allowed because you don't have permission to add files in that folder Niet toegestaan omdat u geen rechten hebt om bestanden in die map toe te voegen @@ -2994,54 +2994,54 @@ We adviseren deze site niet te gebruiken. Kan het sync transactielog niet openen - + File name contains at least one invalid character De bestandsnaam bevat ten minste één ongeldig teken - - + + Ignored because of the "choose what to sync" blacklist Genegeerd vanwege de "wat synchroniseren" zwarte lijst - + Not allowed because you don't have permission to add subfolders to that folder Niet toegestaan, omdat je geen permissies hebt om submappen aan die map toe te voegen - + Not allowed to upload this file because it is read-only on the server, restoring Niet toegestaan om dit bestand te uploaden, omdat het alleen-lezen is op de server, herstellen - - + + Not allowed to remove, restoring Niet toegestaan om te verwijderen, herstellen - + Local files and share folder removed. Lokale bestanden en share-map verwijderd. - + Move not allowed, item restored Verplaatsen niet toegestaan, object hersteld - + Move not allowed because %1 is read-only Verplaatsen niet toegestaan, omdat %1 alleen-lezen is - + the destination bestemming - + the source bron diff --git a/translations/client_pl.ts b/translations/client_pl.ts index 969658bc0..015cf1d77 100644 --- a/translations/client_pl.ts +++ b/translations/client_pl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Błąd podczas zapisu metadanych do bazy @@ -1918,7 +1918,7 @@ Niezalecane jest jego użycie. OCC::PropagateDirectory - + Error writing metadata to the database Błąd podczas zapisu metadanych do bazy @@ -2873,12 +2873,12 @@ Niezalecane jest jego użycie. - + Not allowed because you don't have permission to add parent folder Niedozwolone, ponieważ nie masz uprawnień do dodawania katalogu nadrzędnego - + Not allowed because you don't have permission to add files in that folder Niedozwolone, ponieważ nie masz uprawnień do dodawania plików w tym katalogu @@ -2993,54 +2993,54 @@ Niezalecane jest jego użycie. Nie można otworzyć dziennika synchronizacji - + File name contains at least one invalid character Nazwa pliku zawiera co najmniej jeden nieprawidłowy znak - - + + Ignored because of the "choose what to sync" blacklist - + Not allowed because you don't have permission to add subfolders to that folder Niedozwolone, ponieważ nie masz uprawnień do dodawania podkatalogów w tym katalogu - + Not allowed to upload this file because it is read-only on the server, restoring Wgrywanie niedozwolone, ponieważ plik jest tylko do odczytu na serwerze, przywracanie - - + + Not allowed to remove, restoring Brak uprawnień by usunąć, przywracanie - + Local files and share folder removed. Lokalne pliki i udostępniane foldery zostały usunięte. - + Move not allowed, item restored Przenoszenie niedozwolone, obiekt przywrócony - + Move not allowed because %1 is read-only Przenoszenie niedozwolone, ponieważ %1 jest tylko do odczytu - + the destination docelowy - + the source źródło diff --git a/translations/client_pt.ts b/translations/client_pt.ts index 6668b9fbb..622708599 100644 --- a/translations/client_pt.ts +++ b/translations/client_pt.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Erro ao gravar os metadados para a base de dados @@ -1918,7 +1918,7 @@ Não é aconselhada a sua utilização. OCC::PropagateDirectory - + Error writing metadata to the database Erro ao escrever a meta-informação par a base de dados @@ -2873,12 +2873,12 @@ Não é aconselhada a sua utilização. Apenas %1 estão disponíveis, é preciso um mínimo de %2 para começar - + Not allowed because you don't have permission to add parent folder Não permitido, porque não tem permissão para adicionar a pasta fonte - + Not allowed because you don't have permission to add files in that folder Não permitido, porque não tem permissão para adicionar os ficheiros nessa pasta @@ -2993,54 +2993,54 @@ Não é aconselhada a sua utilização. Impossível abrir o jornal de sincronismo - + File name contains at least one invalid character O nome de ficheiro contém pelo menos um caráter inválido - - + + Ignored because of the "choose what to sync" blacklist Ignorado devido à blacklist de escolha para sincronização - + Not allowed because you don't have permission to add subfolders to that folder Não permitido, porque não tem permissão para adicionar as subpastas nessa pasta - + Not allowed to upload this file because it is read-only on the server, restoring Não é permitido enviar este ficheiro porque este é só de leitura no servidor, a restaurar - - + + Not allowed to remove, restoring Não autorizado para remoção, restaurando - + Local files and share folder removed. Ficheiros locais e pasta partilhada removidos. - + Move not allowed, item restored Mover não foi permitido, item restaurado - + Move not allowed because %1 is read-only Mover não foi autorizado porque %1 é só de leitura - + the destination o destino - + the source a origem diff --git a/translations/client_pt_BR.ts b/translations/client_pt_BR.ts index 1fc891716..ffeaf8ee4 100644 --- a/translations/client_pt_BR.ts +++ b/translations/client_pt_BR.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Ocorreu um erro ao escrever metadados ao banco de dados @@ -1917,7 +1917,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database Ocorreu um erro ao escrever metadados ao banco de dados @@ -2872,12 +2872,12 @@ It is not advisable to use it. Apenas %1 estão disponíveis, precisamos de pelo menos %2 para começar - + Not allowed because you don't have permission to add parent folder Não permitido porque você não tem permissão para adicionar pasta mãe - + Not allowed because you don't have permission to add files in that folder Não permitido porque você não tem permissão para adicionar arquivos na pasta @@ -2992,54 +2992,54 @@ It is not advisable to use it. Não é possível abrir o arquivo de sincronização - + File name contains at least one invalid character O nome do arquivo contem pelo menos um caractere inválido - - + + Ignored because of the "choose what to sync" blacklist Ignorado por causa da lista negra "escolher o que sincronizar" - + Not allowed because you don't have permission to add subfolders to that folder Não permitido porque você não tem permissão para adicionar subpastas para essa pasta - + Not allowed to upload this file because it is read-only on the server, restoring Não é permitido fazer o upload deste arquivo porque ele é somente leitura no servidor, restaurando - - + + Not allowed to remove, restoring Não é permitido remover, restaurando - + Local files and share folder removed. Arquivos locais e pasta compartilhada removida. - + Move not allowed, item restored Não é permitido mover, item restaurado - + Move not allowed because %1 is read-only Não é permitido mover porque %1 é somente para leitura - + the destination o destino - + the source a fonte diff --git a/translations/client_ru.ts b/translations/client_ru.ts index 574825ee9..428955195 100644 --- a/translations/client_ru.ts +++ b/translations/client_ru.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Ошибка записи метаданных в базу данных @@ -1917,7 +1917,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database Ошибка записи метаданных в базу данных @@ -2872,12 +2872,12 @@ It is not advisable to use it. Только %1 доступно, нужно как минимум %2 чтобы начать - + Not allowed because you don't have permission to add parent folder Не разрешается, так как у вас нет полномочий на добавление родительской папки - + Not allowed because you don't have permission to add files in that folder Не разрешается, так как у вас нет полномочий на добавление файлов в эту папку @@ -2992,54 +2992,54 @@ It is not advisable to use it. Не удаётся открыть журнал синхронизации - + File name contains at least one invalid character Имя файла содержит по крайней мере один некорректный символ - - + + Ignored because of the "choose what to sync" blacklist Игнорируется из-за черного списка в "что синхронизировать" - + Not allowed because you don't have permission to add subfolders to that folder Не разрешается, так как у вас нет полномочий на добавление подпапок в папку. - + Not allowed to upload this file because it is read-only on the server, restoring Не допускается загрузка этого файла, так как на сервере он помечен только для чтения, восстанавливаем - - + + Not allowed to remove, restoring Не допускается удаление, восстанавливаем - + Local files and share folder removed. Локальные файлы и общий каталог удалены. - + Move not allowed, item restored Перемещение не допускается, элемент восстановлен - + Move not allowed because %1 is read-only Перемещение не допускается, поскольку %1 помечен только для чтения - + the destination назначение - + the source источник diff --git a/translations/client_sk.ts b/translations/client_sk.ts index 2a8193677..018293758 100644 --- a/translations/client_sk.ts +++ b/translations/client_sk.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Chyba pri zápise metadát do databázy @@ -1912,7 +1912,7 @@ Nie je vhodné ju používať. OCC::PropagateDirectory - + Error writing metadata to the database Chyba pri zápise metadát do databázy @@ -2867,12 +2867,12 @@ Nie je vhodné ju používať. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2987,54 +2987,54 @@ Nie je vhodné ju používať. Nemožno otvoriť sync žurnál - + File name contains at least one invalid character Názov súboru obsahuje nevhodný znak - - + + Ignored because of the "choose what to sync" blacklist Ignorované podľa nastavenia "vybrať čo synchronizovať" - + Not allowed because you don't have permission to add subfolders to that folder Nie je dovolené, lebo nemáte oprávnenie pridávať podpriečinky do tohto priečinka - + Not allowed to upload this file because it is read-only on the server, restoring Nie je dovolené tento súbor nahrať, pretože je na serveri iba na čítanie. Obnovuje sa. - - + + Not allowed to remove, restoring Nie je dovolené odstrániť. Obnovuje sa. - + Local files and share folder removed. Lokálne súbory a zdieľaný priečinok boli odstránené. - + Move not allowed, item restored Presunutie nie je dovolené. Položka obnovená. - + Move not allowed because %1 is read-only Presunutie nie je dovolené, pretože %1 je na serveri iba na čítanie - + the destination cieľ - + the source zdroj diff --git a/translations/client_sl.ts b/translations/client_sl.ts index 69c36e3f7..c4043a332 100644 --- a/translations/client_sl.ts +++ b/translations/client_sl.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Napaka zapisovanja metapodatkov v podatkovno zbirko @@ -1917,7 +1917,7 @@ Uporaba ni priporočljiva. OCC::PropagateDirectory - + Error writing metadata to the database Napaka zapisovanja metapodatkov v podatkovno zbirko @@ -2872,12 +2872,12 @@ Uporaba ni priporočljiva. Le %1 je na voljo, zahtevanih pa je vaj %2 za zagon - + Not allowed because you don't have permission to add parent folder Dejanje ni dovoljeno, ker ni ustreznih dovoljenj za dodajanje starševske mape - + Not allowed because you don't have permission to add files in that folder Dejanje ni dovoljeno, ker ni ustreznih dovoljenj za dodajanje datotek v to mapo @@ -2992,54 +2992,54 @@ Uporaba ni priporočljiva. Ni mogoče odpreti dnevnika usklajevanja - + File name contains at least one invalid character Ime datoteke vsebuje vsaj en neveljaven znak. - - + + Ignored because of the "choose what to sync" blacklist Prezrto, ker je predmet označen na črni listi za usklajevanje - + Not allowed because you don't have permission to add subfolders to that folder Dejanje ni dovoljeno! Ni ustreznih dovoljenj za dodajanje podmap v to mapo. - + Not allowed to upload this file because it is read-only on the server, restoring Ni dovoljeno pošiljati te datoteke, ker ima določena dovoljenja le za branje. Datoteka bo obnovljena na izvorno različico. - - + + Not allowed to remove, restoring Odstranitev ni dovoljena, datoteka bo obnovljena. - + Local files and share folder removed. Krajevne datoteke in mape v souporabi so odstranjene. - + Move not allowed, item restored Premikanje ni dovoljeno, datoteka bo obnovljena. - + Move not allowed because %1 is read-only Premikanje ni dovoljeno, ker je nastavljeno določilo %1 le za branje. - + the destination cilj - + the source vir diff --git a/translations/client_sr.ts b/translations/client_sr.ts index 9b2084053..8b68bff78 100644 --- a/translations/client_sr.ts +++ b/translations/client_sr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1911,7 +1911,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2866,12 +2866,12 @@ It is not advisable to use it. - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2986,54 +2986,54 @@ It is not advisable to use it. Не могу да отворим дневник синхронизације - + File name contains at least one invalid character Назив садржи бар један недозвољен карактер - - + + Ignored because of the "choose what to sync" blacklist Игнорисано јер се не налази на листи за синхронизацију - + Not allowed because you don't have permission to add subfolders to that folder - + Not allowed to upload this file because it is read-only on the server, restoring Није могуће отпремити овај фајл јер је на серверу само за читање. Враћам - - + + Not allowed to remove, restoring Није могуће уклањање. Враћам - + Local files and share folder removed. Локални фајлови и дељена фасцикла су уклоњени. - + Move not allowed, item restored Премештање није дозвољено. Ставка је враћена - + Move not allowed because %1 is read-only Премештање није дозвољено јер %1 је само за читање - + the destination одредиште - + the source извор diff --git a/translations/client_sv.ts b/translations/client_sv.ts index 36ea91206..b5508c2d8 100644 --- a/translations/client_sv.ts +++ b/translations/client_sv.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Fel vid skrivning av metadata till databasen @@ -1918,7 +1918,7 @@ Det är inte lämpligt använda den. OCC::PropagateDirectory - + Error writing metadata to the database Fel vid skrivning av metadata till databasen @@ -2873,12 +2873,12 @@ Det är inte lämpligt använda den. Endast %1 tillgängligt, behöver minst %2 för att starta - + Not allowed because you don't have permission to add parent folder Otillåtet eftersom du inte har rättigheter att lägga till övermappar - + Not allowed because you don't have permission to add files in that folder Otillåtet eftersom du inte har rättigheter att lägga till filer i den mappen. @@ -2993,54 +2993,54 @@ Det är inte lämpligt använda den. Kunde inte öppna synk journalen - + File name contains at least one invalid character Filnamnet innehåller minst ett ogiltigt tecken - - + + Ignored because of the "choose what to sync" blacklist Ignorerad eftersom den är svartlistad i "välj vad som ska synkas" - + Not allowed because you don't have permission to add subfolders to that folder Otillåtet eftersom du inte har rättigheter att lägga till undermappar i den mappen. - + Not allowed to upload this file because it is read-only on the server, restoring Inte behörig att ladda upp denna fil då den är skrivskyddad på servern, återställer - - + + Not allowed to remove, restoring Inte behörig att radera, återställer - + Local files and share folder removed. Lokala filer och mappar som är delade är borttagna. - + Move not allowed, item restored Det gick inte att genomföra flytten, objektet återställs - + Move not allowed because %1 is read-only Det gick inte att genomföra flytten då %1 är skrivskyddad - + the destination destinationen - + the source källan diff --git a/translations/client_th.ts b/translations/client_th.ts index 161fc752a..96e797cff 100644 --- a/translations/client_th.ts +++ b/translations/client_th.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database ข้อผิดพลาดในการเขียนข้อมูลเมตาไปยังฐานข้อมูล @@ -1918,7 +1918,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database ข้อผิดพลาดในการเขียนข้อมูลเมตาไปยังฐานข้อมูล @@ -2871,12 +2871,12 @@ It is not advisable to use it. มีเพียง %1 ที่พร้อมใช้งาน คุณจำเป็นต้องมีไม่น้อยกว่า %2 เพื่อเริ่มใช้งาน - + Not allowed because you don't have permission to add parent folder ไม่ได้รับอนุญาต เพราะคุณไม่มีสิทธิ์ที่จะเพิ่มโฟลเดอร์หลัก - + Not allowed because you don't have permission to add files in that folder ไม่ได้รับอนุญาต เพราะคุณไม่มีสิทธิ์ที่จะเพิ่มไฟล์ในโฟลเดอร์นั้น @@ -2991,54 +2991,54 @@ It is not advisable to use it. ไม่สามารถเปิดการผสานข้อมูลเจอร์นัล - + File name contains at least one invalid character มีชื่อแฟ้มอย่างน้อยหนึ่งตัวอักษรที่ไม่ถูกต้อง - - + + Ignored because of the "choose what to sync" blacklist ถูกละเว้นเพราะ "ข้อมูลที่เลือกประสาน" ติดบัญชีดำ - + Not allowed because you don't have permission to add subfolders to that folder ไม่อนุญาติเพราะคุณไม่มีสิทธิ์ที่จะเพิ่มโฟลเดอร์ย่อยของโฟลเดอร์นั้น - + Not allowed to upload this file because it is read-only on the server, restoring ไม่อนุญาตให้อัพโหลดไฟล์นี้เพราะมันจะอ่านได้เพียงอย่างเดียวบนเซิร์ฟเวอร์ กำลังฟื้นฟู - - + + Not allowed to remove, restoring ไม่อนุญาตให้ลบเพราะกำลังฟื้นฟู - + Local files and share folder removed. ไฟล์ต้นทางและโฟลเดอร์ที่แชร์ถูกลบออก - + Move not allowed, item restored ไม่ได้รับอนุญาตให้ย้าย เพราะกำลังกู้คืนรายการ - + Move not allowed because %1 is read-only ไม่อนุญาตให้ย้ายเพราะ %1 จะอ่านได้เพียงอย่างเดียว - + the destination ปลายทาง - + the source แหล่งที่มา diff --git a/translations/client_tr.ts b/translations/client_tr.ts index a83c43918..c3758557b 100644 --- a/translations/client_tr.ts +++ b/translations/client_tr.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database Veritabanına üstveri yazma hatası @@ -1916,7 +1916,7 @@ Kullanmanız önerilmez. OCC::PropagateDirectory - + Error writing metadata to the database Veritabanına üstveri yazma hatası @@ -2871,12 +2871,12 @@ Kullanmanız önerilmez. Sadece %1 mevcut, Çalıştırmak için en az %2 gerekmektedir - + Not allowed because you don't have permission to add parent folder Üst dizin ekleme yetkiniz olmadığından izin verilmedi - + Not allowed because you don't have permission to add files in that folder Bu klasöre dosya ekleme yetkiniz olmadığından izin verilmedi @@ -2991,54 +2991,54 @@ Kullanmanız önerilmez. Eşitleme günlüğü açılamıyor - + File name contains at least one invalid character Dosya adı en az bir geçersiz karakter içeriyor - - + + Ignored because of the "choose what to sync" blacklist "Eşitlenecekleri seçin" kara listesinde olduğundan yoksayıldı. - + Not allowed because you don't have permission to add subfolders to that folder Bu dizine alt dizin ekleme yetkiniz olmadığından izin verilmedi - + Not allowed to upload this file because it is read-only on the server, restoring Sunucuda salt okunur olduğundan, bu dosya yüklenemedi, geri alınıyor - - + + Not allowed to remove, restoring Kaldırmaya izin verilmedi, geri alınıyor - + Local files and share folder removed. Yerel dosyalar ve paylaşım klasörü kaldırıldı. - + Move not allowed, item restored Taşımaya izin verilmedi, öge geri alındı - + Move not allowed because %1 is read-only %1 salt okunur olduğundan taşımaya izin verilmedi - + the destination hedef - + the source kaynak diff --git a/translations/client_uk.ts b/translations/client_uk.ts index 794d17164..b7408f8f1 100644 --- a/translations/client_uk.ts +++ b/translations/client_uk.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1906,7 +1906,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2861,12 +2861,12 @@ It is not advisable to use it. Доступно лише %1, для початку необхідно хоча б %2 - + Not allowed because you don't have permission to add parent folder - + Not allowed because you don't have permission to add files in that folder @@ -2981,54 +2981,54 @@ It is not advisable to use it. Не вдається відкрити протокол синхронізації - + File name contains at least one invalid character Ім’я файлу містить принаймні один некоректний символ - - + + Ignored because of the "choose what to sync" blacklist Ігнорується через чорний список в "обрати що синхронізувати" - + Not allowed because you don't have permission to add subfolders to that folder Заборонено через відсутність прав додавання підкаталогів в цю теку. - + Not allowed to upload this file because it is read-only on the server, restoring Не дозволено завантажувати цей файл, оскільки він має дозвіл лише на перегляд, відновлюємо - - + + Not allowed to remove, restoring Не дозволено видаляти, відновлюємо - + Local files and share folder removed. Локальні файли та теки в загальному доступі було видалено. - + Move not allowed, item restored Переміщення не дозволено, елемент відновлено - + Move not allowed because %1 is read-only Переміщення не дозволено, оскільки %1 помічений тільки для перегляду - + the destination призначення - + the source джерело diff --git a/translations/client_zh_CN.ts b/translations/client_zh_CN.ts index be9bedff9..070a82800 100644 --- a/translations/client_zh_CN.ts +++ b/translations/client_zh_CN.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database 向数据库写入元数据错误 @@ -1916,7 +1916,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database 向数据库写入元数据错误 @@ -2871,12 +2871,12 @@ It is not advisable to use it. 仅有 %1 有效,至少需要 %2 才能开始 - + Not allowed because you don't have permission to add parent folder 你没有权限增加父目录 - + Not allowed because you don't have permission to add files in that folder 你没有权限增加文件 @@ -2991,54 +2991,54 @@ It is not advisable to use it. 无法打开同步日志 - + File name contains at least one invalid character 文件名中存在至少一个非法字符 - - + + Ignored because of the "choose what to sync" blacklist 已忽略(“选择同步内容”黑名单) - + Not allowed because you don't have permission to add subfolders to that folder 你没有权限增加子目录 - + Not allowed to upload this file because it is read-only on the server, restoring 无法上传文件,因为服务器端此文件为只读,正在回退 - - + + Not allowed to remove, restoring 无法删除,正在回退 - + Local files and share folder removed. 本地文件和共享文件夹已被删除。 - + Move not allowed, item restored 无法移动,正在回退 - + Move not allowed because %1 is read-only 无法移动,%1为是只读的 - + the destination 目标 - + the source diff --git a/translations/client_zh_TW.ts b/translations/client_zh_TW.ts index e09bc854b..2772e0944 100644 --- a/translations/client_zh_TW.ts +++ b/translations/client_zh_TW.ts @@ -522,7 +522,7 @@ OCC::CleanupPollsJob - + Error writing metadata to the database @@ -1916,7 +1916,7 @@ It is not advisable to use it. OCC::PropagateDirectory - + Error writing metadata to the database @@ -2871,12 +2871,12 @@ It is not advisable to use it. 目前僅有 %1 可以使用,至少需要 %2 才能開始 - + Not allowed because you don't have permission to add parent folder 拒絕此操作,您沒有新增母資料夾的權限。 - + Not allowed because you don't have permission to add files in that folder 拒絕此操作,您沒有新增檔案在此資料夾的權限。 @@ -2991,54 +2991,54 @@ It is not advisable to use it. 同步處理日誌無法開啟 - + File name contains at least one invalid character 檔案名稱含有不合法的字元 - - + + Ignored because of the "choose what to sync" blacklist 已忽略。根據 "選擇要同步的項目"的黑名單 - + Not allowed because you don't have permission to add subfolders to that folder 拒絕此操作,您沒有在此新增子資料夾的權限。 - + Not allowed to upload this file because it is read-only on the server, restoring 拒絕上傳此檔案,此檔案在伺服器是唯讀檔,復原中 - - + + Not allowed to remove, restoring 不允許刪除,復原中 - + Local files and share folder removed. 本地端檔案和共享資料夾已被刪除。 - + Move not allowed, item restored 不允許移動,物件復原中 - + Move not allowed because %1 is read-only 不允許移動,因為 %1 是唯讀的 - + the destination 目標 - + the source 來源 From e4bf3ec19aa9dffd4300c4d2c11109507ed2e7d8 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sun, 25 Sep 2016 02:18:36 +0200 Subject: [PATCH 45/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index b0afba626..8418adbe0 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -343,6 +343,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 323ebf9bf2a2a0900e383484999eea73172fceeb Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Mon, 26 Sep 2016 02:18:30 +0200 Subject: [PATCH 46/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_cs.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index 8418adbe0..194665479 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -346,6 +346,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_cs.ts b/translations/client_cs.ts index 930ea1857..d2166b7bc 100644 --- a/translations/client_cs.ts +++ b/translations/client_cs.ts @@ -3071,7 +3071,7 @@ Nedoporučuje se jí používat. <p>Copyright ownCloud GmbH</p> - + <p>Copyright ownCloud GmbH</p> @@ -3296,7 +3296,7 @@ Nedoporučuje se jí používat. <p>Version %2. For more information visit <a href="%3">%4</a></p><p><small>By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.</small></p><p>Copyright ownCloud GmbH</p><p>Licensed under the GNU General Public License (GPL) Version 2.0<br/>ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.</p> - + <p>Verze %2. Pro další informace navštivte <a href="%3">%4</a></p><p><small>Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz a další.</small></p><p>Copyright ownCloud GmbH</p><p>Licencováno pod GNU General Public License (GPL) Version 2.0<br/>ownCloud a ownCloud logo jsou registrované obchodní známky ownCloud, Inc. ve Spojených státech, ostatních zemích nebo obojí</p> From 826a675f32c8bb733854d7c78e9fe5ade3aae5ae Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Tue, 27 Sep 2016 02:18:32 +0200 Subject: [PATCH 47/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 194665479..dfbc8bb78 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -349,6 +349,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion From 3e1690ff7abbcfe00d8d565860511110bc61cc7b Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 14 Sep 2016 15:42:19 +0200 Subject: [PATCH 48/93] Improvements to file recall --- csync/tests/ownCloud/t_recall.pl | 6 +++++ src/libsync/propagatedownload.cpp | 45 ++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/csync/tests/ownCloud/t_recall.pl b/csync/tests/ownCloud/t_recall.pl index 244618cf8..de0e17069 100755 --- a/csync/tests/ownCloud/t_recall.pl +++ b/csync/tests/ownCloud/t_recall.pl @@ -56,6 +56,8 @@ assertLocalAndRemoteDir( '', 0); printInfo( "Testing with a .sys.admin#recall#" ); system("echo 'dir/file2.dat' > ". $tmpdir . ".sys.admin\#recall\#"); system("echo 'dir/file3.dat' >> ". $tmpdir . ".sys.admin\#recall\#"); +system("echo 'nonexistant' >> ". $tmpdir . ".sys.admin\#recall\#"); +system("echo '/tmp/t_recall/file4.dat' >> ". $tmpdir . ".sys.admin\#recall\#"); glob_put( "$tmpdir/.sys.admin\#recall\#", "" ); csync(); @@ -68,6 +70,10 @@ assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) ); assert( -e glob(localDir().'dir/file2.dat' ) ); assert( -e glob(localDir().'dir/file3.dat' ) ); +assert( !-e glob(localDir().'nonexistant*' ) ); +assert( !-e glob('/tmp/t_recall/file4_.sys.admin#recall#-*.dat' ) ); +assert( -e glob('/tmp/t_recall/file4.dat' ) ); + #Remove the recall file unlink(localDir() . ".sys.admin#recall#"); diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 27a214d75..92618e7b7 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -617,30 +617,47 @@ static QString makeRecallFileName(const QString &fn) return recallFileName; } -static void handleRecallFile(const QString &fn) +void handleRecallFile(const QString& filePath, const QString& folderPath, SyncJournalDb& journal) { - qDebug() << "handleRecallFile: " << fn; + qDebug() << "handleRecallFile: " << filePath; - FileSystem::setFileHidden(fn, true); + FileSystem::setFileHidden(filePath, true); - QFile file(fn); + QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) { qWarning() << "Could not open recall file" << file.errorString(); return; } - QFileInfo existingFile(fn); - QDir thisDir = existingFile.dir(); + QFileInfo existingFile(filePath); + QDir baseDir = existingFile.dir(); while (!file.atEnd()) { QByteArray line = file.readLine(); line.chop(1); // remove trailing \n - QString fpath = thisDir.filePath(line); - QString rpath = makeRecallFileName(fpath); - qDebug() << "Copy recall file: " << fpath << " -> " << rpath; + QString recalledFile = QDir::cleanPath(baseDir.filePath(line)); + if (!recalledFile.startsWith(folderPath) || !recalledFile.startsWith(baseDir.path())) { + qDebug() << "Ignoring recall of " << recalledFile; + continue; + } + + // Path of the recalled file in the local folder + QString localRecalledFile = recalledFile.mid(folderPath.size()); + + SyncJournalFileRecord record = journal.getFileRecord(localRecalledFile); + if (!record.isValid()) { + qDebug() << "No db entry for recall of" << localRecalledFile; + continue; + } + + qDebug() << "Recalling" << localRecalledFile << "Checksum:" << record._contentChecksumType << record._contentChecksum; + + QString targetPath = makeRecallFileName(recalledFile); + + qDebug() << "Copy recall file: " << recalledFile << " -> " << targetPath; // Remove the target first, QFile::copy will not overwrite it. - FileSystem::remove(rpath); - QFile::copy(fpath, rpath); + FileSystem::remove(targetPath); + QFile::copy(recalledFile, targetPath); } } @@ -797,8 +814,10 @@ void PropagateDownloadFileQNAM::downloadFinished() done(isConflict ? SyncFileItem::Conflict : SyncFileItem::Success); // handle the special recall file - if(_item->_file == QLatin1String(".sys.admin#recall#") || _item->_file.endsWith("/.sys.admin#recall#")) { - handleRecallFile(fn); + if(!_item->_remotePerm.contains("S") + && (_item->_file == QLatin1String(".sys.admin#recall#") + || _item->_file.endsWith("/.sys.admin#recall#"))) { + handleRecallFile(fn, _propagator->_localDir, *_propagator->_journal); } qint64 duration = _stopwatch.elapsed(); From aa5d3055be1c339fdd5c8acdfbbe795f529d0fa3 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 15 Sep 2016 14:56:37 +0200 Subject: [PATCH 49/93] Folder/Watcher: Fix up #5174 #5153 (#5186) It was surprising to have a broken symlink return empty for canonical path. --- src/gui/folder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index b1112e13a..87f600bc1 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -123,9 +123,11 @@ Folder::~Folder() void Folder::checkLocalPath() { const QFileInfo fi(_definition.localPath); - _canonicalLocalPath = fi.canonicalFilePath(); - if( !_canonicalLocalPath.endsWith('/') ) { + if (_canonicalLocalPath.isEmpty()) { + qDebug() << "Broken symlink:" << _definition.localPath; + _canonicalLocalPath = _definition.localPath; + } else if( !_canonicalLocalPath.endsWith('/') ) { _canonicalLocalPath.append('/'); } From 2b274e9460b6236e0f2e54d3b4cef57eca64e980 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 14 Sep 2016 15:31:05 +0200 Subject: [PATCH 50/93] Fix the MSVC build - Replace functions that are provided by MinGW with a Win32-based implementation - Explicitly export needed symbols from ocsync.dll - Rename share.h to sharemanager.h since the name clashes with one of the Windows headers and get included from there - Remove the timestamp from the fallback csync stderr logging, it's not used since we always provide a log callback --- CMakeLists.txt | 9 +- cmake/modules/Warnings.cmake | 32 +++---- csync/src/CMakeLists.txt | 13 +++ csync/src/csync.c | 1 - csync/src/csync.h | 64 ++++++------- csync/src/csync_exclude.c | 7 +- csync/src/csync_exclude.h | 6 +- csync/src/csync_log.c | 43 +-------- csync/src/csync_misc.c | 1 - csync/src/csync_misc.h | 2 +- csync/src/csync_private.h | 3 - csync/src/csync_reconcile.h | 2 +- csync/src/csync_rename.h | 8 +- csync/src/csync_statedb.c | 11 +-- csync/src/csync_time.c | 22 ++++- csync/src/csync_time.h | 1 + csync/src/csync_util.h | 6 +- csync/src/std/CMakeLists.txt | 6 ++ csync/src/std/asprintf.c | 90 +++++++++++++++++++ csync/src/std/asprintf.h | 60 +++++++++++++ csync/src/std/c_private.h | 13 ++- csync/src/std/c_time.c | 4 + csync/src/std/c_time.h | 1 - csync/src/vio/csync_vio_local.h | 10 +-- csync/src/vio/csync_vio_local_win.c | 1 - csync/tests/csync_tests/check_csync_exclude.c | 1 + csync/tests/csync_tests/check_csync_log.c | 1 - .../csync_tests/check_csync_statedb_load.c | 1 - csync/tests/std_tests/check_std_c_time.c | 1 - csync/tests/vio_tests/check_vio.c | 1 - csync/tests/vio_tests/check_vio_ext.c | 1 - src/cmd/cmd.cpp | 1 + src/gui/CMakeLists.txt | 2 +- src/gui/ocssharejob.h | 2 +- src/gui/sharelinkwidget.cpp | 2 +- src/gui/{share.cpp => sharemanager.cpp} | 16 ++-- src/gui/{share.h => sharemanager.h} | 11 ++- src/gui/shareusergroupwidget.cpp | 2 +- src/libsync/CMakeLists.txt | 1 - src/libsync/filesystem.cpp | 3 +- src/libsync/propagatedownload.cpp | 4 + 41 files changed, 315 insertions(+), 151 deletions(-) create mode 100644 csync/src/std/asprintf.c create mode 100644 csync/src/std/asprintf.h rename src/gui/{share.cpp => sharemanager.cpp} (98%) rename src/gui/{share.h => sharemanager.h} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7429278f..a5eb52bab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6) cmake_policy(VERSION 2.8.0) +if(POLICY CMP0020) + cmake_policy(SET CMP0020 NEW) +endif() project(client) @@ -57,7 +60,7 @@ endif() include(GNUInstallDirs) include(DefineInstallationPaths) - +include(GenerateExportHeader) include(GetGitRevisionDescription) @@ -166,6 +169,9 @@ find_package(SQLite3 3.8.0 REQUIRED) # On some OS, we want to use our own, not the system sqlite if (USE_OUR_OWN_SQLITE3) include_directories(BEFORE ${SQLITE3_INCLUDE_DIR}) + if (WIN32) + add_definitions(-DSQLITE_API=__declspec\(dllimport\)) + endif() endif() find_package(ZLIB) @@ -180,6 +186,7 @@ add_definitions(-DUNICODE) add_definitions(-D_UNICODE) if( WIN32 ) add_definitions( -D__USE_MINGW_ANSI_STDIO=1 ) +add_definitions( -DNOMINMAX ) endif( WIN32 ) # Handle Translations, pick all client_* files from trans directory. diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake index 4ba425983..1ee7a9ea7 100644 --- a/cmake/modules/Warnings.cmake +++ b/cmake/modules/Warnings.cmake @@ -2,21 +2,23 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING* file. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -if(CMAKE_COMPILER_IS_GNUCXX) - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion - OUTPUT_VARIABLE GCC_VERSION) - if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") - else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion + OUTPUT_VARIABLE GCC_VERSION) + if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") + else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") + endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) + else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") - endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") -endif(CMAKE_COMPILER_IS_GNUCXX) + endif() -if(DEFINED MIRALL_FATAL_WARNINGS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -endif(DEFINED MIRALL_FATAL_WARNINGS) + if(DEFINED MIRALL_FATAL_WARNINGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + endif(DEFINED MIRALL_FATAL_WARNINGS) +endif() diff --git a/csync/src/CMakeLists.txt b/csync/src/CMakeLists.txt index 6f5fc6095..cb07377e9 100644 --- a/csync/src/CMakeLists.txt +++ b/csync/src/CMakeLists.txt @@ -81,6 +81,13 @@ set(csync_HDRS # Statically include sqlite if (USE_OUR_OWN_SQLITE3) list(APPEND csync_SRCS ${SQLITE3_SOURCE}) + if (WIN32) + # We want to export sqlite symbols from the ocsync DLL without + # having to patch both sqlite3.h and the amalgation sqlite3.c, + # so do the import/export magic manually through the build system. + remove_definitions(-DSQLITE_API=__declspec\(dllimport\)) + add_definitions(-DSQLITE_API=__declspec\(dllexport\)) + endif() endif() include_directories( @@ -91,6 +98,12 @@ include_directories( add_library(${CSYNC_LIBRARY} SHARED ${csync_SRCS}) #add_library(${CSYNC_LIBRARY}_static STATIC ${csync_SRCS}) +generate_export_header( ${CSYNC_LIBRARY} + BASE_NAME ${CSYNC_LIBRARY} + EXPORT_MACRO_NAME OCSYNC_EXPORT + EXPORT_FILE_NAME ocsynclib.h +) + target_link_libraries(${CSYNC_LIBRARY} ${CSYNC_LINK_LIBRARIES}) #target_link_libraries(${CSYNC_LIBRARY}_static ${CSYNC_LINK_LIBRARIES}) diff --git a/csync/src/csync.c b/csync/src/csync.c index 281a00ee9..78660955c 100644 --- a/csync/src/csync.c +++ b/csync/src/csync.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/csync/src/csync.h b/csync/src/csync.h index 678985d32..d731bb5d7 100644 --- a/csync/src/csync.h +++ b/csync/src/csync.h @@ -33,10 +33,10 @@ #define _CSYNC_H #include "std/c_private.h" +#include "ocsynclib.h" #include #include #include -#include #include #include @@ -229,14 +229,14 @@ struct csync_vio_file_stat_s { char *original_name; // only set if locale conversion fails }; -csync_vio_file_stat_t *csync_vio_file_stat_new(void); -csync_vio_file_stat_t *csync_vio_file_stat_copy(csync_vio_file_stat_t *file_stat); +csync_vio_file_stat_t OCSYNC_EXPORT *csync_vio_file_stat_new(void); +csync_vio_file_stat_t OCSYNC_EXPORT *csync_vio_file_stat_copy(csync_vio_file_stat_t *file_stat); -void csync_vio_file_stat_destroy(csync_vio_file_stat_t *fstat); +void OCSYNC_EXPORT csync_vio_file_stat_destroy(csync_vio_file_stat_t *fstat); -void csync_vio_file_stat_set_file_id( csync_vio_file_stat_t* dst, const char* src ); +void OCSYNC_EXPORT csync_vio_file_stat_set_file_id( csync_vio_file_stat_t* dst, const char* src ); -void csync_vio_set_file_id(char* dst, const char *src ); +void OCSYNC_EXPORT csync_vio_set_file_id(char* dst, const char *src ); /** @@ -317,7 +317,7 @@ typedef const char* (*csync_checksum_hook) ( * * @param csync The context variable to allocate. */ -void csync_create(CSYNC **csync, const char *local, const char *remote); +void OCSYNC_EXPORT csync_create(CSYNC **csync, const char *local, const char *remote); /** * @brief Initialize the file synchronizer. @@ -326,7 +326,7 @@ void csync_create(CSYNC **csync, const char *local, const char *remote); * * @param ctx The context to initialize. */ -void csync_init(CSYNC *ctx); +void OCSYNC_EXPORT csync_init(CSYNC *ctx); /** * @brief Update detection @@ -335,7 +335,7 @@ void csync_init(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_update(CSYNC *ctx); +int OCSYNC_EXPORT csync_update(CSYNC *ctx); /** * @brief Reconciliation @@ -344,7 +344,7 @@ int csync_update(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_reconcile(CSYNC *ctx); +int OCSYNC_EXPORT csync_reconcile(CSYNC *ctx); /** * @brief Re-initializes the csync context @@ -353,7 +353,7 @@ int csync_reconcile(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_commit(CSYNC *ctx); +int OCSYNC_EXPORT csync_commit(CSYNC *ctx); /** * @brief Destroy the csync context @@ -364,7 +364,7 @@ int csync_commit(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_destroy(CSYNC *ctx); +int OCSYNC_EXPORT csync_destroy(CSYNC *ctx); /** * @brief Get the userdata saved in the context. @@ -386,7 +386,7 @@ void *csync_get_userdata(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_set_userdata(CSYNC *ctx, void *userdata); +int OCSYNC_EXPORT csync_set_userdata(CSYNC *ctx, void *userdata); /** * @brief Get the authentication callback set. @@ -396,7 +396,7 @@ int csync_set_userdata(CSYNC *ctx, void *userdata); * @return The authentication callback set or NULL if an error * occurred. */ -csync_auth_callback csync_get_auth_callback(CSYNC *ctx); +csync_auth_callback OCSYNC_EXPORT csync_get_auth_callback(CSYNC *ctx); /** * @brief Set the authentication callback. @@ -407,7 +407,7 @@ csync_auth_callback csync_get_auth_callback(CSYNC *ctx); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb); +int OCSYNC_EXPORT csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb); /** * @brief Set the log level. @@ -416,14 +416,14 @@ int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb); * * @return 0 on success, < 0 if an error occurred. */ -int csync_set_log_level(int level); +int OCSYNC_EXPORT csync_set_log_level(int level); /** * @brief Get the log verbosity * * @return The log verbosity, -1 on error. */ -int csync_get_log_level(void); +int OCSYNC_EXPORT csync_get_log_level(void); /** * @brief Get the logging callback set. @@ -431,7 +431,7 @@ int csync_get_log_level(void); * @return The logging callback set or NULL if an error * occurred. */ -csync_log_callback csync_get_log_callback(void); +csync_log_callback OCSYNC_EXPORT csync_get_log_callback(void); /** * @brief Set the logging callback. @@ -440,14 +440,14 @@ csync_log_callback csync_get_log_callback(void); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_set_log_callback(csync_log_callback cb); +int OCSYNC_EXPORT csync_set_log_callback(csync_log_callback cb); /** * @brief get the userdata set for the logging callback. * * @return The userdata or NULL. */ -void *csync_get_log_userdata(void); +void OCSYNC_EXPORT *csync_get_log_userdata(void); /** * @brief Set the userdata passed to the logging callback. @@ -456,13 +456,13 @@ void *csync_get_log_userdata(void); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_set_log_userdata(void *data); +int OCSYNC_EXPORT csync_set_log_userdata(void *data); /* Used for special modes or debugging */ -CSYNC_STATUS csync_get_status(CSYNC *ctx); +CSYNC_STATUS OCSYNC_EXPORT csync_get_status(CSYNC *ctx); /* Used for special modes or debugging */ -int csync_set_status(CSYNC *ctx, int status); +int OCSYNC_EXPORT csync_set_status(CSYNC *ctx, int status); typedef int csync_treewalk_visit_func(TREE_WALK_FILE* ,void*); @@ -475,7 +475,7 @@ typedef int csync_treewalk_visit_func(TREE_WALK_FILE* ,void*); * * @return 0 on success, less than 0 if an error occurred. */ -int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter); +int OCSYNC_EXPORT csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter); /** * @brief Walk the remote file tree and call a visitor function for each file. @@ -486,7 +486,7 @@ int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int fi * * @return 0 on success, less than 0 if an error occurred. */ -int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter); +int OCSYNC_EXPORT csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter); /** * @brief Get the csync status string. @@ -495,7 +495,7 @@ int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int f * * @return A const pointer to a string with more precise status info. */ -const char *csync_get_status_string(CSYNC *ctx); +const char OCSYNC_EXPORT *csync_get_status_string(CSYNC *ctx); #ifdef WITH_ICONV /** @@ -505,7 +505,7 @@ const char *csync_get_status_string(CSYNC *ctx); * * @return 0 on success, or an iconv error number. */ -int csync_set_iconv_codec(const char *from); +int OCSYNC_EXPORT csync_set_iconv_codec(const char *from); #endif /** @@ -513,24 +513,24 @@ int csync_set_iconv_codec(const char *from); * * @param ctx The csync context. */ -void csync_request_abort(CSYNC *ctx); +void OCSYNC_EXPORT csync_request_abort(CSYNC *ctx); /** * @brief Clears the abort flag. Can be called from another thread. * * @param ctx The csync context. */ -void csync_resume(CSYNC *ctx); +void OCSYNC_EXPORT csync_resume(CSYNC *ctx); /** * @brief Checks for the abort flag, to be used from the modules. * * @param ctx The csync context. */ -int csync_abort_requested(CSYNC *ctx); +int OCSYNC_EXPORT csync_abort_requested(CSYNC *ctx); -char *csync_normalize_etag(const char *); -time_t oc_httpdate_parse( const char *date ); +char OCSYNC_EXPORT *csync_normalize_etag(const char *); +time_t OCSYNC_EXPORT oc_httpdate_parse( const char *date ); #ifdef __cplusplus } diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c index 4f106b66f..4a3a097d6 100644 --- a/csync/src/csync_exclude.c +++ b/csync/src/csync_exclude.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "c_lib.h" #include "c_private.h" @@ -37,6 +36,12 @@ #include "csync_exclude.h" #include "csync_misc.h" +#ifdef _WIN32 +#include +#else +#include +#endif + #define CSYNC_LOG_CATEGORY_NAME "csync.exclude" #include "csync_log.h" diff --git a/csync/src/csync_exclude.h b/csync/src/csync_exclude.h index 1fe970cdd..3e49a9291 100644 --- a/csync/src/csync_exclude.h +++ b/csync/src/csync_exclude.h @@ -21,6 +21,8 @@ #ifndef _CSYNC_EXCLUDE_H #define _CSYNC_EXCLUDE_H +#include "ocsynclib.h" + enum csync_exclude_type_e { CSYNC_NOT_EXCLUDED = 0, CSYNC_FILE_SILENTLY_EXCLUDED, @@ -46,7 +48,7 @@ int _csync_exclude_add(c_strlist_t **inList, const char *string); * * @return 0 on success, -1 if an error occurred with errno set. */ -int csync_exclude_load(const char *fname, c_strlist_t **list); +int OCSYNC_EXPORT csync_exclude_load(const char *fname, c_strlist_t **list); /** * @brief Check if the given path should be excluded in a traversal situation. @@ -72,7 +74,7 @@ CSYNC_EXCLUDE_TYPE csync_excluded_traversal(c_strlist_t *excludes, const char *p * @param filetype * @return */ -CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path, int filetype); +CSYNC_EXCLUDE_TYPE OCSYNC_EXPORT csync_excluded_no_ctx(c_strlist_t *excludes, const char *path, int filetype); #endif /* _CSYNC_EXCLUDE_H */ /** diff --git a/csync/src/csync_log.c b/csync/src/csync_log.c index d5f34aa12..159ce2a83 100644 --- a/csync/src/csync_log.c +++ b/csync/src/csync_log.c @@ -23,12 +23,6 @@ #include #include #include -#ifndef _WIN32 -#include -#else -#include -#endif -#include #include "csync_private.h" #include "csync_log.h" @@ -37,46 +31,11 @@ CSYNC_THREAD int csync_log_level; CSYNC_THREAD csync_log_callback csync_log_cb; CSYNC_THREAD void *csync_log_userdata; -static int current_timestring(int hires, char *buf, size_t len) -{ - char tbuf[64]; - struct timeval tv; - struct tm *tm; - time_t t; - - gettimeofday(&tv, NULL); - t = (time_t) tv.tv_sec; - - tm = localtime(&t); - if (tm == NULL) { - return -1; - } - - if (hires) { - strftime(tbuf, sizeof(tbuf) - 1, "%Y/%m/%d %H:%M:%S", tm); - snprintf(buf, len, "%s.%06ld", tbuf, (long) tv.tv_usec); - } else { - strftime(tbuf, sizeof(tbuf) - 1, "%Y/%m/%d %H:%M:%S", tm); - snprintf(buf, len, "%s", tbuf); - } - - return 0; -} - static void csync_log_stderr(int verbosity, const char *function, const char *buffer) { - char date[64] = {0}; - int rc; - - rc = current_timestring(1, date, sizeof(date)); - if (rc == 0) { - fprintf(stderr, "[%s, %d] %s:", date+5, verbosity, function); - } else { - fprintf(stderr, "[%d] %s", verbosity, function); - } - + fprintf(stderr, "[%d] %s", verbosity, function); fprintf(stderr, " %s\n", buffer); } static void csync_log_function(int verbosity, diff --git a/csync/src/csync_misc.c b/csync/src/csync_misc.c index a93d42213..d23236113 100644 --- a/csync/src/csync_misc.c +++ b/csync/src/csync_misc.c @@ -39,7 +39,6 @@ # include #else /* _WIN32 */ # include -# include #endif /* _WIN32 */ #include "c_lib.h" diff --git a/csync/src/csync_misc.h b/csync/src/csync_misc.h index 783ef4dd5..6b9f98418 100644 --- a/csync/src/csync_misc.h +++ b/csync/src/csync_misc.h @@ -36,7 +36,7 @@ #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ #endif -int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags); +int csync_fnmatch(const char *pattern, const char *name, int flags); /** * @brief csync_errno_to_status - errno to csync status code diff --git a/csync/src/csync_private.h b/csync/src/csync_private.h index 1ceede56d..0a5072466 100644 --- a/csync/src/csync_private.h +++ b/csync/src/csync_private.h @@ -224,9 +224,6 @@ struct _csync_treewalk_context_s }; typedef struct _csync_treewalk_context_s _csync_treewalk_context; - -time_t oc_httpdate_parse( const char *date ); - void set_errno_from_http_errcode( int err ); /** diff --git a/csync/src/csync_reconcile.h b/csync/src/csync_reconcile.h index 207727f45..f333adba6 100644 --- a/csync/src/csync_reconcile.h +++ b/csync/src/csync_reconcile.h @@ -50,7 +50,7 @@ * * @todo Add an argument to set the algorithm to use. */ -int csync_reconcile_updates(CSYNC *ctx); +int OCSYNC_EXPORT csync_reconcile_updates(CSYNC *ctx); /** * }@ diff --git a/csync/src/csync_rename.h b/csync/src/csync_rename.h index a4f50a0ac..8aa2e60c7 100644 --- a/csync/src/csync_rename.h +++ b/csync/src/csync_rename.h @@ -27,11 +27,11 @@ extern "C" { #endif /* Return the final destination path of a given patch in case of renames */ -char *csync_rename_adjust_path(CSYNC *ctx, const char *path); +char OCSYNC_EXPORT *csync_rename_adjust_path(CSYNC *ctx, const char *path); /* Return the source of a given path in case of renames */ -char *csync_rename_adjust_path_source(CSYNC *ctx, const char *path); -void csync_rename_destroy(CSYNC *ctx); -void csync_rename_record(CSYNC *ctx, const char *from, const char *to); +char OCSYNC_EXPORT *csync_rename_adjust_path_source(CSYNC *ctx, const char *path); +void OCSYNC_EXPORT csync_rename_destroy(CSYNC *ctx); +void OCSYNC_EXPORT csync_rename_record(CSYNC *ctx, const char *from, const char *to); #ifdef __cplusplus } diff --git a/csync/src/csync_statedb.c b/csync/src/csync_statedb.c index 519a45748..95b8e78e6 100644 --- a/csync/src/csync_statedb.c +++ b/csync/src/csync_statedb.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -53,7 +52,7 @@ #define sqlite_open(A, B) sqlite3_open_v2(A,B, SQLITE_OPEN_READONLY+SQLITE_OPEN_NOMUTEX, NULL) -#define SQLTM_TIME 150000 +#define SQLTM_TIME 150 #define SQLTM_COUNT 10 #define SQLITE_BUSY_HANDLED(F) if(1) { \ @@ -61,7 +60,7 @@ do { rc = F ; \ if( (rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED) ) { \ n++; \ - usleep(SQLTM_TIME); \ + csync_sleep(SQLTM_TIME); \ } \ }while( (n < SQLTM_COUNT) && ((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED))); \ } @@ -519,8 +518,7 @@ c_strlist_t *csync_statedb_query(sqlite3 *db, /* compile SQL program into a virtual machine, reattempteing if busy */ do { if (busy_count) { - /* sleep 100 msec */ - usleep(100000); + csync_sleep(100); CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "sqlite3_prepare: BUSY counter: %zu", busy_count); } err = sqlite3_prepare(db, statement, -1, &stmt, &tail); @@ -547,8 +545,7 @@ c_strlist_t *csync_statedb_query(sqlite3 *db, CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Busy counter has reached its maximum. Aborting this sql statement"); break; } - /* sleep 100 msec */ - usleep(100000); + csync_sleep(100); CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "sqlite3_step: BUSY counter: %zu", busy_count); continue; } diff --git a/csync/src/csync_time.c b/csync/src/csync_time.c index 48e33c190..85bdd5ff4 100644 --- a/csync/src/csync_time.c +++ b/csync/src/csync_time.c @@ -31,6 +31,11 @@ #include "csync_time.h" #include "vio/csync_vio.h" +#ifndef _WIN32 +#include +#include +#endif + #define CSYNC_LOG_CATEGORY_NAME "csync.time" #include "csync_log.h" @@ -45,7 +50,13 @@ int csync_gettime(struct timespec *tp) { -#ifdef HAVE_CLOCK_GETTIME +#if defined(_WIN32) + __int64 wintime; + GetSystemTimeAsFileTime((FILETIME*)&wintime); + wintime -= 116444736000000000ll; //1jan1601 to 1jan1970 + tp->tv_sec = wintime / 10000000ll; //seconds + tp->tv_nsec = wintime % 10000000ll * 100; //nano-seconds +#elif defined(HAVE_CLOCK_GETTIME) return clock_gettime(CSYNC_CLOCK, tp); #else struct timeval tv; @@ -62,4 +73,11 @@ int csync_gettime(struct timespec *tp) #undef CSYNC_CLOCK -/* vim: set ts=8 sw=2 et cindent: */ +void csync_sleep(unsigned int msecs) +{ +#if defined(_WIN32) + Sleep(msecs); +#else + usleep(msecs * 1000); +#endif +} diff --git a/csync/src/csync_time.h b/csync/src/csync_time.h index fe91baba5..1492bef8d 100644 --- a/csync/src/csync_time.h +++ b/csync/src/csync_time.h @@ -26,5 +26,6 @@ #include "csync_private.h" int csync_gettime(struct timespec *tp); +void csync_sleep(unsigned int msecs); #endif /* _CSYNC_TIME_H */ diff --git a/csync/src/csync_util.h b/csync/src/csync_util.h index f8d02df7e..f65ada592 100644 --- a/csync/src/csync_util.h +++ b/csync/src/csync_util.h @@ -26,9 +26,9 @@ #include "csync_private.h" -const char *csync_instruction_str(enum csync_instructions_e instr); +const char OCSYNC_EXPORT *csync_instruction_str(enum csync_instructions_e instr); -void csync_memstat_check(void); +void OCSYNC_EXPORT csync_memstat_check(void); -bool csync_file_locked_or_open( const char *dir, const char *fname); +bool OCSYNC_EXPORT csync_file_locked_or_open( const char *dir, const char *fname); #endif /* _CSYNC_UTIL_H */ diff --git a/csync/src/std/CMakeLists.txt b/csync/src/std/CMakeLists.txt index 88456f354..91b8843a8 100644 --- a/csync/src/std/CMakeLists.txt +++ b/csync/src/std/CMakeLists.txt @@ -26,6 +26,12 @@ set(cstdlib_SRCS c_time.c ) +if(NOT HAVE_ASPRINTF AND NOT HAVE___MINGW_ASPRINTF) + list(APPEND cstdlib_SRCS + asprintf.c + ) +endif() + include_directories( ${CSTDLIB_PUBLIC_INCLUDE_DIRS} ${CSTDLIB_PRIVATE_INCLUDE_DIRS} diff --git a/csync/src/std/asprintf.c b/csync/src/std/asprintf.c new file mode 100644 index 000000000..8738df973 --- /dev/null +++ b/csync/src/std/asprintf.c @@ -0,0 +1,90 @@ +/* + https://raw.githubusercontent.com/littlstar/asprintf.c/20ce5207a4ecb24017b5a17e6cd7d006e3047146/asprintf.c + + The MIT License (MIT) + + Copyright (c) 2014 Little Star Media, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +/** + * `asprintf.c' - asprintf + * + * copyright (c) 2014 joseph werle + */ + +#ifndef HAVE_ASPRINTF + +#include +#include +#include + +#include "asprintf.h" + +int +asprintf (char **str, const char *fmt, ...) { + int size = 0; + va_list args; + + // init variadic argumens + va_start(args, fmt); + + // format and get size + size = vasprintf(str, fmt, args); + + // toss args + va_end(args); + + return size; +} + +int +vasprintf (char **str, const char *fmt, va_list args) { + int size = 0; + va_list tmpa; + + // copy + va_copy(tmpa, args); + + // apply variadic arguments to + // sprintf with format to get size + size = vsnprintf(NULL, size, fmt, tmpa); + + // toss args + va_end(tmpa); + + // return -1 to be compliant if + // size is less than 0 + if (size < 0) { return -1; } + + // alloc with size plus 1 for `\0' + *str = (char *) malloc(size + 1); + + // return -1 to be compliant + // if pointer is `NULL' + if (NULL == *str) { return -1; } + + // format string with original + // variadic arguments and set new size + size = vsprintf(*str, fmt, args); + return size; +} + +#endif diff --git a/csync/src/std/asprintf.h b/csync/src/std/asprintf.h new file mode 100644 index 000000000..d6dd2e859 --- /dev/null +++ b/csync/src/std/asprintf.h @@ -0,0 +1,60 @@ +/* + https://raw.githubusercontent.com/littlstar/asprintf.c/20ce5207a4ecb24017b5a17e6cd7d006e3047146/asprintf.h + + The MIT License (MIT) + + Copyright (c) 2014 Little Star Media, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +/** + * `asprintf.h' - asprintf.c + * + * copyright (c) 2014 joseph werle + */ + +#ifndef HAVE_ASPRINTF +#ifndef ASPRINTF_H +#define ASPRINTF_H 1 + +#include + +/** + * Sets `char **' pointer to be a buffer + * large enough to hold the formatted string + * accepting a `va_list' args of variadic + * arguments. + */ + +int +vasprintf (char **, const char *, va_list); + +/** + * Sets `char **' pointer to be a buffer + * large enough to hold the formatted + * string accepting `n' arguments of + * variadic arguments. + */ + +int +asprintf (char **, const char *, ...); + +#endif +#endif diff --git a/csync/src/std/c_private.h b/csync/src/std/c_private.h index a761506c5..09c1ea36b 100644 --- a/csync/src/std/c_private.h +++ b/csync/src/std/c_private.h @@ -31,14 +31,17 @@ #include #ifdef _WIN32 +#include #include #include #include +#else +#include #endif #include -#ifdef _WIN32 +#ifdef __MINGW32__ #define EDQUOT 0 #define ENODATA 0 #ifndef S_IRGRP @@ -65,6 +68,8 @@ #define nlink_t int #define getuid() 0 #define geteuid() 0 +#elif defined(_WIN32) +#define mode_t int #else #include #endif @@ -89,8 +94,12 @@ typedef struct stat csync_stat_t; #define ENODATA EBADF #endif -#if !defined(HAVE_ASPRINTF) && defined(HAVE___MINGW_ASPRINTF) +#if !defined(HAVE_ASPRINTF) +#if defined(HAVE___MINGW_ASPRINTF) #define asprintf __mingw_asprintf +#else +#include "asprintf.h" +#endif #endif #ifndef HAVE_STRERROR_R diff --git a/csync/src/std/c_time.c b/csync/src/std/c_time.c index 561cd4763..ad43fed02 100644 --- a/csync/src/std/c_time.c +++ b/csync/src/std/c_time.c @@ -25,6 +25,10 @@ #include "c_path.h" #include "c_time.h" +#ifndef _WIN32 +#include +#endif + struct timespec c_tspecdiff(struct timespec time1, struct timespec time0) { struct timespec ret; int xsec = 0; diff --git a/csync/src/std/c_time.h b/csync/src/std/c_time.h index a5718c1c9..aa8ef2f16 100644 --- a/csync/src/std/c_time.h +++ b/csync/src/std/c_time.h @@ -22,7 +22,6 @@ #define _C_TIME_H #include -#include /** * @brief Calculate time difference diff --git a/csync/src/vio/csync_vio_local.h b/csync/src/vio/csync_vio_local.h index dcd12ad6f..294383121 100644 --- a/csync/src/vio/csync_vio_local.h +++ b/csync/src/vio/csync_vio_local.h @@ -21,12 +21,10 @@ #ifndef _CSYNC_VIO_LOCAL_H #define _CSYNC_VIO_LOCAL_H -#include +csync_vio_handle_t OCSYNC_EXPORT *csync_vio_local_opendir(const char *name); +int OCSYNC_EXPORT csync_vio_local_closedir(csync_vio_handle_t *dhandle); +csync_vio_file_stat_t OCSYNC_EXPORT *csync_vio_local_readdir(csync_vio_handle_t *dhandle); -csync_vio_handle_t *csync_vio_local_opendir(const char *name); -int csync_vio_local_closedir(csync_vio_handle_t *dhandle); -csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle); - -int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf); +int OCSYNC_EXPORT csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf); #endif /* _CSYNC_VIO_LOCAL_H */ diff --git a/csync/src/vio/csync_vio_local_win.c b/csync/src/vio/csync_vio_local_win.c index b50d0ecf6..fc4eea512 100644 --- a/csync/src/vio/csync_vio_local_win.c +++ b/csync/src/vio/csync_vio_local_win.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "windows.h" diff --git a/csync/tests/csync_tests/check_csync_exclude.c b/csync/tests/csync_tests/check_csync_exclude.c index 67b3fcb03..b788c1c3c 100644 --- a/csync/tests/csync_tests/check_csync_exclude.c +++ b/csync/tests/csync_tests/check_csync_exclude.c @@ -20,6 +20,7 @@ #include "config_csync.h" #include #include +#include #include "torture.h" diff --git a/csync/tests/csync_tests/check_csync_log.c b/csync/tests/csync_tests/check_csync_log.c index 61fb3aae2..a888447e3 100644 --- a/csync/tests/csync_tests/check_csync_log.c +++ b/csync/tests/csync_tests/check_csync_log.c @@ -19,7 +19,6 @@ */ #include #include -#include #include "torture.h" diff --git a/csync/tests/csync_tests/check_csync_statedb_load.c b/csync/tests/csync_tests/check_csync_statedb_load.c index 2b4a6bf93..c18c5a47e 100644 --- a/csync/tests/csync_tests/check_csync_statedb_load.c +++ b/csync/tests/csync_tests/check_csync_statedb_load.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include -#include #include "torture.h" diff --git a/csync/tests/std_tests/check_std_c_time.c b/csync/tests/std_tests/check_std_c_time.c index 01580083b..df1abbe05 100644 --- a/csync/tests/std_tests/check_std_c_time.c +++ b/csync/tests/std_tests/check_std_c_time.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include -#include #include "torture.h" diff --git a/csync/tests/vio_tests/check_vio.c b/csync/tests/vio_tests/check_vio.c index 745e5f3b1..e8d716f40 100644 --- a/csync/tests/vio_tests/check_vio.c +++ b/csync/tests/vio_tests/check_vio.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "torture.h" diff --git a/csync/tests/vio_tests/check_vio_ext.c b/csync/tests/vio_tests/check_vio_ext.c index 7d6663aad..5642d76fc 100644 --- a/csync/tests/vio_tests/check_vio_ext.c +++ b/csync/tests/vio_tests/check_vio_ext.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "torture.h" diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index fcfea2c7e..60f2aa5e0 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -41,6 +41,7 @@ #include #else #include +#include #endif using namespace OCC; diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 5fc319b6f..af4c98ff9 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -70,9 +70,9 @@ set(client_SRCS activityitemdelegate.cpp selectivesyncdialog.cpp settingsdialog.cpp - share.cpp sharedialog.cpp sharelinkwidget.cpp + sharemanager.cpp shareusergroupwidget.cpp sharee.cpp socketapi.cpp diff --git a/src/gui/ocssharejob.h b/src/gui/ocssharejob.h index ebf1885e8..29c8184fe 100644 --- a/src/gui/ocssharejob.h +++ b/src/gui/ocssharejob.h @@ -15,7 +15,7 @@ #define OCSSHAREJOB_H #include "ocsjob.h" -#include "share.h" +#include "sharemanager.h" #include #include #include diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index ba93eb5d9..343565b3b 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -17,7 +17,7 @@ #include "account.h" #include "capabilities.h" -#include "share.h" +#include "sharemanager.h" #include "QProgressIndicator.h" #include diff --git a/src/gui/share.cpp b/src/gui/sharemanager.cpp similarity index 98% rename from src/gui/share.cpp rename to src/gui/sharemanager.cpp index e3c659489..c407b159f 100644 --- a/src/gui/share.cpp +++ b/src/gui/sharemanager.cpp @@ -11,7 +11,7 @@ * for more details. */ -#include "share.h" +#include "sharemanager.h" #include "ocssharejob.h" #include "account.h" @@ -30,9 +30,9 @@ Q_DECLARE_METATYPE(CreateShare) namespace OCC { -Share::Share(AccountPtr account, - const QString& id, - const QString& path, +Share::Share(AccountPtr account, + const QString& id, + const QString& path, const ShareType shareType, const Permissions permissions, const QSharedPointer shareWith) @@ -100,7 +100,7 @@ void Share::slotDeleted() void Share::slotOcsError(int statusCode, const QString &message) { - emit serverError(statusCode, message); + emit serverError(statusCode, message); } QUrl LinkShare::getLink() const @@ -229,7 +229,7 @@ void ShareManager::slotLinkShareCreated(const QVariantMap &reply) if (code == 403) { emit linkShareRequiresPassword(message); return; - } + } //Parse share auto data = reply.value("ocs").toMap().value("data").toMap(); @@ -329,7 +329,7 @@ void ShareManager::slotSharesFetched(const QVariantMap &reply) newShare = parseShare(data); } - shares.append(QSharedPointer(newShare)); + shares.append(QSharedPointer(newShare)); } qDebug() << Q_FUNC_INFO << "Sending " << shares.count() << "shares"; @@ -371,7 +371,7 @@ QSharedPointer ShareManager::parseShare(const QVariantMap &data) QSharedPointer sharee(new Sharee(data.value("share_with").toString(), data.value("share_with_displayname").toString(), (Sharee::Type)data.value("share_type").toInt())); - + return QSharedPointer(new Share(_account, data.value("id").toString(), data.value("path").toString(), diff --git a/src/gui/share.h b/src/gui/sharemanager.h similarity index 99% rename from src/gui/share.h rename to src/gui/sharemanager.h index e022624b4..8c248c686 100644 --- a/src/gui/share.h +++ b/src/gui/sharemanager.h @@ -11,8 +11,8 @@ * for more details. */ -#ifndef SHARE_H -#define SHARE_H +#ifndef SHAREMANAGER_H +#define SHAREMANAGER_H #include "accountfwd.h" #include "sharee.h" @@ -127,7 +127,7 @@ private slots: class LinkShare : public Share { Q_OBJECT public: - + explicit LinkShare(AccountPtr account, const QString& id, const QString& path, @@ -154,7 +154,7 @@ public: * In case of a server error the serverError signal is emitted. */ void setPublicUpload(bool publicUpload); - + /* * Set the password * @@ -276,7 +276,6 @@ private: AccountPtr _account; }; - } -#endif // SHARE_H +#endif // SHAREMANAGER_H diff --git a/src/gui/shareusergroupwidget.cpp b/src/gui/shareusergroupwidget.cpp index b72de8ccc..546a796d6 100644 --- a/src/gui/shareusergroupwidget.cpp +++ b/src/gui/shareusergroupwidget.cpp @@ -24,8 +24,8 @@ #include "capabilities.h" #include "thumbnailjob.h" -#include "share.h" #include "sharee.h" +#include "sharemanager.h" #include "QProgressIndicator.h" #include diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt index 450f73f2a..abfb2cfd9 100644 --- a/src/libsync/CMakeLists.txt +++ b/src/libsync/CMakeLists.txt @@ -1,6 +1,5 @@ project(libsync) set(CMAKE_AUTOMOC TRUE) -include(GenerateExportHeader) configure_file( version.h.in "${CMAKE_CURRENT_BINARY_DIR}/version.h" ) diff --git a/src/libsync/filesystem.cpp b/src/libsync/filesystem.cpp index 2dd6b51dd..488d04f7b 100644 --- a/src/libsync/filesystem.cpp +++ b/src/libsync/filesystem.cpp @@ -29,10 +29,11 @@ #endif #ifdef Q_OS_WIN +#include #include #include #include - +#include #endif // We use some internals of csync: diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 2b46ff781..83bd15b5a 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -31,6 +31,10 @@ #include #include +#ifdef Q_OS_UNIX +#include +#endif + namespace OCC { // Always coming in with forward slashes. From a221ac1e4d2b23b214d52d9a46911eab92fcb26a Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 16 Sep 2016 17:55:28 +0200 Subject: [PATCH 51/93] Fix unit testing build warning on Linux The compiler complained about the PathComponent reference on the lambdas comes from the anonymous namespace. --- test/syncenginetestutils.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index b6929db91..76b2855a2 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -18,8 +18,7 @@ static const QUrl sRootUrl("owncloud://somehost/owncloud/remote.php/webdav/"); -namespace { -QString generateEtag() { +static QString generateEtag() { return QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch(), 16); } @@ -35,7 +34,6 @@ public: QString pathRoot() const { return first(); } QString fileName() const { return last(); } }; -} class FileModifier { From ff701bd473242b417e8ef9b987d4593e1495020c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 20 Sep 2016 11:55:43 +0200 Subject: [PATCH 52/93] ConnectionValidator: properly handle error in status.php (#5188) We wwer enot connecting to the right signal from the check server job, and therefore we were not catching the condition in which the json was invalid. We would then never terminate the ConnectionValidator job. Note that instanceNotFound is also emited if there is a network error. The log looked like this: 10:25:51.247 OCC::CheckServerJob::finished: status.php from server is not valid JSON! 10:25:51.248 OCC::CheckServerJob::finished: status.php returns: QMap() QNetworkReply::NetworkError(NoError) Reply: QNetworkReplyHttpImpl(0x2b6a790) 10:25:51.248 OCC::CheckServerJob::finished: No proper answer on QUrl("http://localhost/~owncloud/status.php") 10:26:23.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost" 10:26:55.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost" [...] --- src/libsync/connectionvalidator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp index 2a955a521..a1eead282 100644 --- a/src/libsync/connectionvalidator.cpp +++ b/src/libsync/connectionvalidator.cpp @@ -106,7 +106,7 @@ void ConnectionValidator::slotCheckServerAndAuth() checkJob->setTimeout(timeoutToUseMsec); checkJob->setIgnoreCredentialFailure(true); connect(checkJob, SIGNAL(instanceFound(QUrl,QVariantMap)), SLOT(slotStatusFound(QUrl,QVariantMap))); - connect(checkJob, SIGNAL(networkError(QNetworkReply*)), SLOT(slotNoStatusFound(QNetworkReply*))); + connect(checkJob, SIGNAL(instanceNotFound(QNetworkReply*)), SLOT(slotNoStatusFound(QNetworkReply*))); connect(checkJob, SIGNAL(timeout(QUrl)), SLOT(slotJobTimeout(QUrl))); checkJob->start(); } From 98bfa8d5de0b553262bb0107a4b68d45a8870dcc Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 21 Sep 2016 16:35:42 +0200 Subject: [PATCH 53/93] Propagator: properly send the success flag (#5189) In case of the root directory, it may happen that the _item is empty and the _item->_status is NoStatus. But we still need to report the proper success or error of the whole propagation. We should really use _hasError for that. However, _hasError is also defined to NoStatus if there was no error, so in that case we need to set Success. This fixes the problem in which the data-fingerprint is not saved on the database because the SyncEngine think that the sync failed. (Issue #5185) --- src/libsync/owncloudpropagator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index d73f63c76..c875dcfd7 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -686,14 +686,14 @@ void PropagateDirectory::finalize() SyncJournalFileRecord record(*_item, _propagator->_localDir + _item->_file); ok = _propagator->_journal->setFileRecordMetadata(record); if (!ok) { - _item->_status = SyncFileItem::FatalError; + _hasError = _item->_status = SyncFileItem::FatalError; _item->_errorString = tr("Error writing metadata to the database"); qWarning() << "Error writing to the database for file" << _item->_file; } } } _state = Finished; - emit finished(_item->_status); + emit finished(_hasError == SyncFileItem::NoStatus ? SyncFileItem::Success : _hasError); } qint64 PropagateDirectory::committedDiskSpace() const From ea9d17b41d38def0588ef638b5f5aef5711fd4ba Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Thu, 22 Sep 2016 01:15:16 +0200 Subject: [PATCH 54/93] [tx-robot] updated from transifex --- admin/win/nsi/l10n/Portuguese.nsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/win/nsi/l10n/Portuguese.nsh b/admin/win/nsi/l10n/Portuguese.nsh index e81e535fa..d85652bc4 100644 --- a/admin/win/nsi/l10n/Portuguese.nsh +++ b/admin/win/nsi/l10n/Portuguese.nsh @@ -2,7 +2,7 @@ StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar notas de lançamento" StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Encontrados ${APPLICATION_EXECUTABLE} processo(s) em execução que precisa(m) de ser interrompido(s).$\nDeseja que o instalador o(s) termine por si?" StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar os processos de ${APPLICATION_EXECUTABLE}." -StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado nenhum processo para terminar!" +StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado o processo para terminar!" StrCpy $PageReinstall_NEW_Field_1 "Está instalada no sistema uma versão antiga de ${APPLICATION_NAME}. É recomendado que desinstale a versão atual antes de instalar a mais recente. Selecione a operação que deseja executar e clique em $\"Seguinte$\" para continuar." StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar" StrCpy $PageReinstall_NEW_Field_3 "Não desinstale" From 85b8ab178e21cf4dcaf792f68c15e55f6e0ee3c2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 09:02:47 +0200 Subject: [PATCH 55/93] SyncEngine: Fix renaming of folder when file are changed (#5195) Two bugs: - The change filed are not considered as move, they are re-downloaded but the old file was not removed from the database. The change in owncloudpropagator.cpp takes care of removing the old entries. - Next sync would then remove the file in the server in the old folder This was not a problem until we start reusing the sync engine, and that the _renamedFolders map is not cleared. We were before deleting a non-existing file. But now we delete the actual file. Also improve the tests to be able to do move on the server. This include support for file id. Issue #5192 --- src/libsync/owncloudpropagator.cpp | 6 ++++ src/libsync/syncengine.cpp | 1 + test/syncenginetestutils.h | 45 ++++++++++++++++++++++++++++-- test/testsyncengine.cpp | 27 ++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index c875dcfd7..1ff550073 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -668,6 +668,12 @@ void PropagateDirectory::finalize() bool ok = true; if (!_item->isEmpty() && _hasError == SyncFileItem::NoStatus) { if( !_item->_renameTarget.isEmpty() ) { + if(_item->_instruction == CSYNC_INSTRUCTION_RENAME + && _item->_originalFile != _item->_renameTarget) { + // Remove the stale entries from the database. + _propagator->_journal->deleteFileRecord(_item->_originalFile, true); + } + _item->_file = _item->_renameTarget; } diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index fa7b01725..9b9a79e51 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -868,6 +868,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult) bool walkOk = true; _seenFiles.clear(); _temporarilyUnavailablePaths.clear(); + _renamedFolders.clear(); if( csync_walk_local_tree(_csync_ctx, &treewalkLocal, 0) < 0 ) { qDebug() << "Error in local treewalk."; diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 76b2855a2..570952c9c 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -14,13 +14,17 @@ #include #include +#include #include static const QUrl sRootUrl("owncloud://somehost/owncloud/remote.php/webdav/"); -static QString generateEtag() { +inline QString generateEtag() { return QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch(), 16); } +inline QByteArray generateFileId() { + return QByteArray::number(qrand(), 16); +} class PathComponents : public QStringList { public: @@ -44,6 +48,7 @@ public: virtual void setContents(const QString &relativePath, char contentChar) = 0; virtual void appendByte(const QString &relativePath) = 0; virtual void mkdir(const QString &relativePath) = 0; + virtual void rename(const QString &relativePath, const QString &relativeDestinationDirectory) = 0; }; class DiskFileModifier : public FileModifier @@ -85,6 +90,9 @@ public: void mkdir(const QString &relativePath) override { _rootDir.mkpath(relativePath); } + void rename(const QString &, const QString &) override { + Q_ASSERT(!"not implemented"); + } }; class FileInfo : public FileModifier @@ -125,6 +133,7 @@ public: for (const auto &source : children) { auto &dest = this->children[source.name] = source; dest.parentPath = p; + dest.fixupParentPathRecursively(); } } @@ -156,6 +165,21 @@ public: createDir(relativePath); } + void rename(const QString &oldPath, const QString &newPath) override { + const PathComponents newPathComponents{newPath}; + FileInfo *dir = findInvalidatingEtags(newPathComponents.parentDirComponents()); + Q_ASSERT(dir); + Q_ASSERT(dir->isDir); + const PathComponents pathComponents{oldPath}; + FileInfo *parent = findInvalidatingEtags(pathComponents.parentDirComponents()); + Q_ASSERT(parent); + FileInfo fi = parent->children.take(pathComponents.fileName()); + fi.parentPath = dir->path(); + fi.name = newPathComponents.fileName(); + fi.fixupParentPathRecursively(); + dir->children.insert(newPathComponents.fileName(), std::move(fi)); + } + FileInfo *find(const PathComponents &pathComponents, const bool invalidateEtags = false) { if (pathComponents.isEmpty()) { if (invalidateEtags) @@ -217,6 +241,7 @@ public: bool isShared = false; QDateTime lastModified = QDateTime::currentDateTime().addDays(-7); QString etag = generateEtag(); + QByteArray fileId = generateFileId(); qint64 size = 0; char contentChar = 'W'; @@ -228,6 +253,19 @@ private: FileInfo *findInvalidatingEtags(const PathComponents &pathComponents) { return find(pathComponents, true); } + + void fixupParentPathRecursively() { + auto p = path(); + for (auto it = children.begin(); it != children.end(); ++it) { + Q_ASSERT(it.key() == it->name); + it->parentPath = p; + it->fixupParentPathRecursively(); + } + } + + friend inline QDebug operator<<(QDebug dbg, const FileInfo& fi) { + return dbg << "{ " << fi.path() << ": " << fi.children; + } }; class FakePropfindReply : public QNetworkReply @@ -273,6 +311,7 @@ public: xml.writeTextElement(davUri, QStringLiteral("getcontentlength"), QString::number(fileInfo.size)); xml.writeTextElement(davUri, QStringLiteral("getetag"), fileInfo.etag); xml.writeTextElement(ocUri, QStringLiteral("permissions"), fileInfo.isShared ? QStringLiteral("SRDNVCKW") : QStringLiteral("RDNVCKW")); + xml.writeTextElement(ocUri, QStringLiteral("id"), fileInfo.fileId); xml.writeEndElement(); // prop xml.writeTextElement(davUri, QStringLiteral("status"), "HTTP/1.1 200 OK"); xml.writeEndElement(); // propstat @@ -282,6 +321,7 @@ public: Q_ASSERT(request.url().path().startsWith(sRootUrl.path())); QString fileName = request.url().path().mid(sRootUrl.path().length()); const FileInfo *fileInfo = remoteRootFileInfo.find(fileName); + Q_ASSERT(fileInfo); writeFileResponse(*fileInfo); foreach(const FileInfo &childFileInfo, fileInfo->children) @@ -380,7 +420,7 @@ public: } Q_INVOKABLE void respond() { - // FIXME: setRawHeader("OC-FileId", fileInfo->???); + setRawHeader("OC-FileId", fileInfo->fileId); setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 201); emit metaDataChanged(); emit finished(); @@ -443,6 +483,7 @@ public: setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 200); setRawHeader("OC-ETag", fileInfo->etag.toLatin1()); setRawHeader("ETag", fileInfo->etag.toLatin1()); + setRawHeader("OC-FileId", fileInfo->fileId); emit metaDataChanged(); if (bytesAvailable()) emit readyRead(); diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index 55d2ce614..bfb44e22b 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -119,6 +119,33 @@ private slots: QVERIFY(itemDidCompleteSuccessfully(completeSpy, "a3.eml")); QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); } + + void testRemoteChangeInMovedFolder() { + // issue #5192 + FakeFolder fakeFolder{FileInfo{ QString(), { + FileInfo { QStringLiteral("folder"), { + FileInfo{ QStringLiteral("folderA"), { { QStringLiteral("file.txt"), 400 } } }, + QStringLiteral("folderB") + } + }}}}; + + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + + // Edit a file in a moved directory. + fakeFolder.remoteModifier().setContents("folder/folderA/file.txt", 'a'); + fakeFolder.remoteModifier().rename("folder/folderA", "folder/folderB/folderA"); + fakeFolder.syncOnce(); + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + auto oldState = fakeFolder.currentLocalState(); + QVERIFY(oldState.find(PathComponents("folder/folderB/folderA/file.txt"))); + QVERIFY(!oldState.find(PathComponents("folder/folderA/file.txt"))); + + // This sync should not remove the file + fakeFolder.syncOnce(); + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + QCOMPARE(fakeFolder.currentLocalState(), oldState); + + } }; QTEST_GUILESS_MAIN(TestSyncEngine) From 0cea3d85f56b496d0f1cedc9b2b882471c2b557c Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 22 Sep 2016 09:57:42 +0200 Subject: [PATCH 56/93] Add log messages for LockWatcher use #5190 --- src/gui/lockwatcher.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/lockwatcher.cpp b/src/gui/lockwatcher.cpp index 7b1247990..2e01eacfa 100644 --- a/src/gui/lockwatcher.cpp +++ b/src/gui/lockwatcher.cpp @@ -15,6 +15,7 @@ #include "filesystem.h" #include +#include using namespace OCC; @@ -30,6 +31,7 @@ LockWatcher::LockWatcher(QObject* parent) void LockWatcher::addFile(const QString& path) { + qDebug() << "Watching for lock of" << path << "being released"; _watchedPaths.insert(path); } @@ -39,6 +41,7 @@ void LockWatcher::checkFiles() foreach (const QString& path, _watchedPaths) { if (!FileSystem::isFileLocked(path)) { + qDebug() << "Lock of" << path << "was released"; emit fileUnlocked(path); unlocked.insert(path); } From fca5f1b2106a5042ad5647a8541cd3770ef80220 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 10:29:21 +0200 Subject: [PATCH 57/93] owncloudcmd: fix --silent We ignored csync log, but we also need to silent Qt debug output. We need to ignore it at the very begining because there might be qDebug also in account creation. Issue #5196 --- src/cmd/cmd.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index d8f127dbe..17a713735 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -47,6 +47,9 @@ using namespace OCC; + +static void nullMessageHandler(QtMsgType, const char *) {} + struct CmdOptions { QString source_dir; QString target_url; @@ -299,6 +302,11 @@ int main(int argc, char **argv) { parseOptions( app.arguments(), &options ); + csync_set_log_level(options.silent ? 1 : 11); + if (options.silent) { + qInstallMsgHandler(nullMessageHandler); + } + AccountPtr account = Account::create(); if( !account ) { @@ -415,7 +423,6 @@ int main(int argc, char **argv) { int restartCount = 0; restart_sync: - csync_set_log_level(options.silent ? 1 : 11); opts = &options; From 383479fbfd95f6a7a5e1ad3b7a2df3b5890e0eb0 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 22 Sep 2016 13:50:42 +0200 Subject: [PATCH 58/93] Fix Windows build with WITH_UNIT_TESTING --- csync/src/csync_exclude.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csync/src/csync_exclude.h b/csync/src/csync_exclude.h index 3e49a9291..f9f26547d 100644 --- a/csync/src/csync_exclude.h +++ b/csync/src/csync_exclude.h @@ -37,7 +37,7 @@ enum csync_exclude_type_e { typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE; #ifdef WITH_UNIT_TESTING -int _csync_exclude_add(c_strlist_t **inList, const char *string); +int OCSYNC_EXPORT _csync_exclude_add(c_strlist_t **inList, const char *string); #endif /** From e10c97573fc7f01578882604098bd706210879c5 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 22 Sep 2016 14:16:58 +0200 Subject: [PATCH 59/93] Warning if mailto url fails #5142 --- src/gui/sharelinkwidget.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index 343565b3b..f00bbf8b4 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -24,6 +24,7 @@ #include #include #include +#include namespace OCC { @@ -490,13 +491,20 @@ void ShareLinkWidget::slotPushButtonMailLinkPressed() { QString fileName = _sharePath.mid(_sharePath.lastIndexOf('/') + 1); - QDesktopServices::openUrl(QUrl(QString( - "mailto: " - "?subject=I shared %1 with you" - "&body=%2").arg( - fileName, - _shareUrl), - QUrl::TolerantMode)); + if (!QDesktopServices::openUrl(QUrl(QString( + "mailto: " + "?subject=I shared %1 with you" + "&body=%2").arg( + fileName, + _shareUrl), + QUrl::TolerantMode))) { + QMessageBox::warning( + this, + tr("Could not open email client"), + tr("There was an error when launching the email client to " + "create a new message. Maybe no default email client is " + "configured?")); + } } void ShareLinkWidget::slotCheckBoxEditingClicked() From bc04f7995979ce79b3d95022fac2fbaf4db922be Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 15:03:15 +0200 Subject: [PATCH 60/93] Missing Inc -> GmbH (#5181) --- src/libsync/owncloudtheme.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsync/owncloudtheme.cpp b/src/libsync/owncloudtheme.cpp index f5fcbd945..09121acd6 100644 --- a/src/libsync/owncloudtheme.cpp +++ b/src/libsync/owncloudtheme.cpp @@ -49,8 +49,8 @@ QString ownCloudTheme::about() const "Olivier Goffart, Markus Götz and others.

" "

Copyright ownCloud GmbH

" "

Licensed under the GNU General Public License (GPL) Version 2.0
" - "ownCloud and the ownCloud Logo are registered trademarks of ownCloud, " - "Inc. in the United States, other countries, or both.

" + "ownCloud and the ownCloud Logo are registered trademarks of ownCloud GmbH " + "in the United States, other countries, or both.

" ) .arg(MIRALL_VERSION_STRING) .arg("https://" MIRALL_STRINGIFY(APPLICATION_DOMAIN)) From 98efb075357fa64f424070e723db1786faa89d25 Mon Sep 17 00:00:00 2001 From: ckamm Date: Fri, 23 Sep 2016 10:44:54 +0200 Subject: [PATCH 61/93] Tray: Workaround collection (#5179) Tray: Workaround collection * QDBus workaround for Qt 5.5.0 only, there were reports of the tray working fine with 5.5.1. #5164 * OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND to force the workaround on an off * OWNCLOUD_TRAY_UPDATE_WHILE_VISIBLE to enable or disable updating of the menu while it's visible - disable by default due to problems on OSX and Xubuntu. * Track the visibility of the tray menu with aboutToShow/aboutToHide only on OSX - the aboutToHide signal doesn't trigger reliably on linux * Refactor such that setupContextMenu is different from updateContextMenu * Don't use on-demand updating of the tray menu when the qdbus workaround is active, instead to occasional (30s) updates of the tray menu. --- src/gui/owncloudgui.cpp | 232 ++++++++++++++++++++++++++-------------- src/gui/owncloudgui.h | 13 ++- 2 files changed, 164 insertions(+), 81 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 60be57f24..1f5226944 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -56,7 +56,7 @@ ownCloudGui::ownCloudGui(Application *parent) : _settingsDialog(new SettingsDialog(this)), #endif _logBrowser(0), - _contextMenuVisible(false), + _contextMenuVisibleOsx(false), _recentActionsMenu(0), _qdbusmenuWorkaround(false), _folderOpenActionMapper(new QSignalMapper(this)), @@ -93,9 +93,9 @@ ownCloudGui::ownCloudGui(Application *parent) : this,SLOT(slotSyncStateChange(Folder*))); connect( AccountManager::instance(), SIGNAL(accountAdded(AccountState*)), - SLOT(setupContextMenuIfVisible())); + SLOT(updateContextMenuNeeded())); connect( AccountManager::instance(), SIGNAL(accountRemoved(AccountState*)), - SLOT(setupContextMenuIfVisible())); + SLOT(updateContextMenuNeeded())); connect( Logger::instance(), SIGNAL(guiLog(QString,QString)), SLOT(slotShowTrayMessage(QString,QString))); @@ -194,7 +194,7 @@ void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason ) void ownCloudGui::slotSyncStateChange( Folder* folder ) { slotComputeOverallSyncStatus(); - setupContextMenuIfVisible(); + updateContextMenuNeeded(); if( !folder ) { return; // Valid, just a general GUI redraw was needed. @@ -216,7 +216,7 @@ void ownCloudGui::slotSyncStateChange( Folder* folder ) void ownCloudGui::slotFoldersChanged() { slotComputeOverallSyncStatus(); - setupContextMenuIfVisible(); + updateContextMenuNeeded(); } void ownCloudGui::slotOpenPath(const QString &path) @@ -226,7 +226,7 @@ void ownCloudGui::slotOpenPath(const QString &path) void ownCloudGui::slotAccountStateChanged() { - setupContextMenuIfVisible(); + updateContextMenuNeeded(); slotComputeOverallSyncStatus(); } @@ -400,41 +400,154 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men } -static bool minimalTrayMenu() -{ - static QByteArray var = qgetenv("OWNCLOUD_MINIMAL_TRAY_MENU"); - return !var.isEmpty(); -} - - void ownCloudGui::slotContextMenuAboutToShow() { // For some reason on OS X _contextMenu->isVisible returns always false qDebug() << ""; - _contextMenuVisible = true; + _contextMenuVisibleOsx = true; } void ownCloudGui::slotContextMenuAboutToHide() { // For some reason on OS X _contextMenu->isVisible returns always false qDebug() << ""; - _contextMenuVisible = false; + _contextMenuVisibleOsx = false; +} + +bool ownCloudGui::contextMenuVisible() const +{ +#ifdef Q_OS_MAC + return _contextMenuVisibleOsx; +#else + return _contextMenu->isVisible(); +#endif +} + +static bool minimalTrayMenu() +{ + static QByteArray var = qgetenv("OWNCLOUD_MINIMAL_TRAY_MENU"); + return !var.isEmpty(); +} + +static bool updateWhileVisible() +{ + static QByteArray var = qgetenv("OWNCLOUD_TRAY_UPDATE_WHILE_VISIBLE"); + if (var == "1") { + return true; + } else if (var == "0") { + return false; + } else { + // triggers bug on OS X: https://bugreports.qt.io/browse/QTBUG-54845 + // or flickering on Xubuntu + return false; + } +} + +static QByteArray forceQDBusTrayWorkaround() +{ + static QByteArray var = qgetenv("OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND"); + return var; } void ownCloudGui::setupContextMenu() { + if (_contextMenu) { + return; + } + + _contextMenu.reset(new QMenu()); + _contextMenu->setTitle(Theme::instance()->appNameGUI() ); + + _recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data()); + + // this must be called only once after creating the context menu, or + // it will trigger a bug in Ubuntu's SNI bridge patch (11.10, 12.04). + _tray->setContextMenu(_contextMenu.data()); + // The tray menu is surprisingly problematic. Being able to switch to // a minimal version of it is a useful workaround and testing tool. if (minimalTrayMenu()) { - if (!_contextMenu) { - _contextMenu.reset(new QMenu()); - _recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data()); - _tray->setContextMenu(_contextMenu.data()); - _contextMenu->addAction(_actionQuit); - } + _contextMenu->addAction(_actionQuit); return; } + // Enables workarounds for bugs introduced in Qt 5.5.0 + // In particular QTBUG-47863 #3672 (tray menu fails to update and + // becomes unresponsive) and QTBUG-48068 #3722 (click signal is + // emitted several times) + // The Qt version check intentionally uses 5.0.0 (where platformMenu() + // was introduced) instead of 5.5.0 to avoid issues where the Qt + // version used to build is different from the one used at runtime. + // If we build with 5.6.1 or newer, we can skip this because the + // bugs should be fixed there. +#ifdef Q_OS_LINUX +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && (QT_VERSION < QT_VERSION_CHECK(5, 6, 0)) + if (qVersion() == QByteArray("5.5.0")) { + QObject* platformMenu = reinterpret_cast(_tray->contextMenu()->platformMenu()); + if (platformMenu + && platformMenu->metaObject()->className() == QLatin1String("QDBusPlatformMenu")) { + _qdbusmenuWorkaround = true; + qDebug() << "Enabled QDBusPlatformMenu workaround"; + } + } +#endif +#endif + + if (forceQDBusTrayWorkaround() == "1") { + _qdbusmenuWorkaround = true; + } else if (forceQDBusTrayWorkaround() == "0") { + _qdbusmenuWorkaround = false; + } + + // When the qdbusmenuWorkaround is necessary, we can't do on-demand updates + // because the workaround is to hide and show the tray icon. + if (_qdbusmenuWorkaround) { + connect(&_workaroundBatchTrayUpdate, SIGNAL(timeout()), SLOT(updateContextMenu())); + _workaroundBatchTrayUpdate.setInterval(30 * 1000); + _workaroundBatchTrayUpdate.setSingleShot(true); + } else { + // Update the context menu whenever we're about to show it + // to the user. +#ifdef Q_OS_MAC + // https://bugreports.qt.io/browse/QTBUG-54633 + connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(slotContextMenuAboutToShow())); + connect(_contextMenu.data(), SIGNAL(aboutToHide()), SLOT(slotContextMenuAboutToHide())); +#else + connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(updateContextMenu())); +#endif + } + + // Populate the context menu now. + updateContextMenu(); +} + +void ownCloudGui::updateContextMenu() +{ + if (minimalTrayMenu()) { + return; + } + + if (_qdbusmenuWorkaround) { + // To make tray menu updates work with these bugs (see setupContextMenu) + // we need to hide and show the tray icon. We don't want to do that + // while it's visible! + if (contextMenuVisible()) { + if (!_workaroundBatchTrayUpdate.isActive()) { + _workaroundBatchTrayUpdate.start(); + } + return; + } + _tray->hide(); + } + + _contextMenu->clear(); + slotRebuildRecentMenus(); + + // We must call deleteLater because we might be called from the press in one of the actions. + foreach (auto menu, _accountMenus) { menu->deleteLater(); } + _accountMenus.clear(); + + auto accountList = AccountManager::instance()->accounts(); bool isConfigured = (!accountList.isEmpty()); @@ -461,54 +574,6 @@ void ownCloudGui::setupContextMenu() } } - if ( _contextMenu ) { - if (_qdbusmenuWorkaround) { - _tray->hide(); - } - _contextMenu->clear(); - } else { - _contextMenu.reset(new QMenu()); - - // Update the context menu whenever we're about to show it - // to the user. -#ifdef Q_OS_MAC - // https://bugreports.qt.io/browse/QTBUG-54633 -#else - connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(setupContextMenu())); -#endif - connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(slotContextMenuAboutToShow())); - connect(_contextMenu.data(), SIGNAL(aboutToHide()), SLOT(slotContextMenuAboutToHide())); - - - _recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data()); - // this must be called only once after creating the context menu, or - // it will trigger a bug in Ubuntu's SNI bridge patch (11.10, 12.04). - _tray->setContextMenu(_contextMenu.data()); - - // Enables workarounds for bugs introduced in Qt 5.5.0 - // In particular QTBUG-47863 #3672 (tray menu fails to update and - // becomes unresponsive) and QTBUG-48068 #3722 (click signal is - // emitted several times) - // The Qt version check intentionally uses 5.0.0 (where platformMenu() - // was introduced) instead of 5.5.0 to avoid issues where the Qt - // version used to build is different from the one used at runtime. -#ifdef Q_OS_LINUX -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) - QObject* platformMenu = reinterpret_cast(_tray->contextMenu()->platformMenu()); - if (platformMenu - && platformMenu->metaObject()->className() == QLatin1String("QDBusPlatformMenu")) { - _qdbusmenuWorkaround = true; - qDebug() << "Enabled QDBusPlatformMenu workaround"; - } -#endif -#endif - } - _contextMenu->setTitle(Theme::instance()->appNameGUI() ); - slotRebuildRecentMenus(); - - // We must call deleteLater because we might be called from the press in one of the actions. - foreach (auto menu, _accountMenus) { menu->deleteLater(); } - _accountMenus.clear(); if (accountList.count() > 1) { foreach (AccountStatePtr account, accountList) { QMenu* accountMenu = new QMenu(account->account()->displayName(), _contextMenu.data()); @@ -581,17 +646,30 @@ void ownCloudGui::setupContextMenu() } } -void ownCloudGui::setupContextMenuIfVisible() +void ownCloudGui::updateContextMenuNeeded() { + // For the workaround case updating while visible is impossible. Instead + // occasionally update the menu when it's invisible. + if (_qdbusmenuWorkaround) { + if (!_workaroundBatchTrayUpdate.isActive()) { + _workaroundBatchTrayUpdate.start(); + } + return; + } + #ifdef Q_OS_MAC // https://bugreports.qt.io/browse/QTBUG-54845 - if (!_contextMenuVisible) { - setupContextMenu(); + // We cannot update on demand or while visible -> update when invisible. + if (!contextMenuVisible()) { + updateContextMenu(); } #else - if (_contextMenuVisible) - setupContextMenu(); + if (updateWhileVisible() && contextMenuVisible()) + updateContextMenu(); #endif + + // If no update was done here, we might update it on-demand due to + // the aboutToShow() signal. } void ownCloudGui::slotShowTrayMessage(const QString &title, const QString &msg) @@ -754,13 +832,9 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo& // Update the "Recent" menu if the context menu is being shown, // otherwise it'll be updated later, when the context menu is opened. -#ifdef Q_OS_MAC - // https://bugreports.qt.io/browse/QTBUG-54845 -#else - if (_contextMenuVisible) { + if (updateWhileVisible() && contextMenuVisible()) { slotRebuildRecentMenus(); } -#endif } if (progress.isUpdatingEstimates() diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 682944cb5..938158d8a 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -24,6 +24,7 @@ #include #include #include +#include namespace OCC { @@ -52,12 +53,16 @@ public: static QSize settingsDialogSize() { return QSize(800, 500); } void setupOverlayIcons(); + /// Whether the tray menu is visible + bool contextMenuVisible() const; + signals: void setupProxy(); public slots: void setupContextMenu(); - void setupContextMenuIfVisible(); + void updateContextMenu(); + void updateContextMenuNeeded(); void slotContextMenuAboutToShow(); void slotContextMenuAboutToHide(); void slotComputeOverallSyncStatus(); @@ -104,11 +109,15 @@ private: QPointer_logBrowser; // tray's menu QScopedPointer _contextMenu; - bool _contextMenuVisible; + + // Manually tracking whether the context menu is visible, but only works + // on OSX because aboutToHide is not reliable everywhere. + bool _contextMenuVisibleOsx; QMenu *_recentActionsMenu; QVector _accountMenus; bool _qdbusmenuWorkaround; + QTimer _workaroundBatchTrayUpdate; QMap > _shareDialogs; QAction *_actionLogin; From 035442b6da374cee4995e2ce2c4e377dd3d1f427 Mon Sep 17 00:00:00 2001 From: ckamm Date: Fri, 23 Sep 2016 13:47:57 +0200 Subject: [PATCH 62/93] Improve the "new big folder" UI #5202 (#5204) Instead of using the regular selective-sync UI (where it's unclear what the "Cancel" button would even mean in this context), provide a different set of buttons that allow the user to quickly synchronize all pending big folders, none of them, or perform manual changes as usual. --- src/gui/accountsettings.cpp | 11 ++- src/gui/accountsettings.ui | 127 +++++++++++++++++++++++++--------- src/gui/folderstatusmodel.cpp | 71 +++++++++++++++++++ src/gui/folderstatusmodel.h | 2 + 4 files changed, 175 insertions(+), 36 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 69028efc3..eb458079e 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -117,6 +117,10 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) : connect(ui->selectiveSyncApply, SIGNAL(clicked()), _model, SLOT(slotApplySelectiveSync())); connect(ui->selectiveSyncCancel, SIGNAL(clicked()), _model, SLOT(resetFolders())); + connect(ui->bigFolderApply, SIGNAL(clicked(bool)), _model, SLOT(slotApplySelectiveSync())); + connect(ui->bigFolderSyncAll, SIGNAL(clicked(bool)), _model, SLOT(slotSyncAllPendingBigFolders())); + connect(ui->bigFolderSyncNone, SIGNAL(clicked(bool)), _model, SLOT(slotSyncNoPendingBigFolders())); + connect(FolderMan::instance(), SIGNAL(folderListChanged(Folder::Map)), _model, SLOT(resetFolders())); connect(this, SIGNAL(folderChanged()), _model, SLOT(resetFolders())); @@ -635,12 +639,13 @@ void AccountSettings::refreshSelectiveSyncStatus() } if (msg.isEmpty()) { - ui->selectiveSyncNotification->setVisible(false); - ui->selectiveSyncNotification->setText(QString()); + ui->selectiveSyncButtons->setVisible(true); + ui->bigFolderUi->setVisible(false); } else { - ui->selectiveSyncNotification->setVisible(true); QString wholeMsg = tr("There are new folders that were not synchronized because they are too big: ") + msg; ui->selectiveSyncNotification->setText(wholeMsg); + ui->selectiveSyncButtons->setVisible(false); + ui->bigFolderUi->setVisible(true); shouldBeVisible = true; } diff --git a/src/gui/accountsettings.ui b/src/gui/accountsettings.ui index 8cc236cef..f100d3752 100644 --- a/src/gui/accountsettings.ui +++ b/src/gui/accountsettings.ui @@ -154,44 +154,105 @@ - - - color: red - - - - - - true - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + color: red + + + + + + true + + + + + + + + + Synchronize all + + + + + + + Synchronize none + + + + + + + Apply manual changes + + + + + + - - - - 0 - 0 - - - - Cancel - - - - - - - - 0 - 0 - - - - Apply - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Cancel + + + + + + + + 0 + 0 + + + + Apply + + + + diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index a850824d7..5b6ea1b2a 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -1046,6 +1046,77 @@ void FolderStatusModel::resetFolders() setAccountState(_accountState); } +void FolderStatusModel::slotSyncAllPendingBigFolders() +{ + for (int i = 0; i < _folders.count(); ++i) { + if (!_folders[i]._fetched) { + _folders[i]._folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList()); + continue; + } + auto folder = _folders.at(i)._folder; + + bool ok; + auto undecidedList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, &ok); + if( !ok ) { + qDebug() << Q_FUNC_INFO << "Could not read selective sync list from db."; + return; + } + + // If this folder had no undecided entries, skip it. + if (undecidedList.isEmpty()) { + continue; + } + + // Remove all undecided folders from the blacklist + auto blackList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok); + if( !ok ) { + qDebug() << Q_FUNC_INFO << "Could not read selective sync list from db."; + return; + } + foreach (const auto& undecidedFolder, undecidedList) { + blackList.removeAll(undecidedFolder); + } + folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList); + + // Add all undecided folders to the white list + auto whiteList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, &ok); + if( !ok ) { + qDebug() << Q_FUNC_INFO << "Could not read selective sync list from db."; + return; + } + whiteList += undecidedList; + folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, whiteList); + + // Clear the undecided list + folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList()); + + // Trigger a sync + if (folder->isBusy()) { + folder->slotTerminateSync(); + } + // The part that changed should not be read from the DB on next sync because there might be new folders + // (the ones that are no longer in the blacklist) + foreach (const auto &it, undecidedList) { + folder->journalDb()->avoidReadFromDbOnNextSync(it); + } + FolderMan::instance()->slotScheduleSync(folder); + } + + resetFolders(); +} + +void FolderStatusModel::slotSyncNoPendingBigFolders() +{ + for (int i = 0; i < _folders.count(); ++i) { + auto folder = _folders.at(i)._folder; + + // clear the undecided list + folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList()); + } + + resetFolders(); +} + void FolderStatusModel::slotNewBigFolder() { auto f = qobject_cast(sender()); diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index 312e978ae..f1813ca1c 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -107,6 +107,8 @@ public slots: void slotUpdateFolderState(Folder *); void slotApplySelectiveSync(); void resetFolders(); + void slotSyncAllPendingBigFolders(); + void slotSyncNoPendingBigFolders(); void slotSetProgress(const ProgressInfo &progress); private slots: From 95c479aa07e29cce0b3a948964e5056de355edd4 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 26 Sep 2016 15:45:30 +0200 Subject: [PATCH 63/93] Wizard: Do the system proxy lookup in a thread (#5160) This is analogous to the code in ConnectionValidator. --- src/gui/owncloudsetupwizard.cpp | 36 +++++++++++++++++++++++++++++++-- src/gui/owncloudsetupwizard.h | 2 ++ src/libsync/clientproxy.cpp | 1 - src/libsync/clientproxy.h | 2 +- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index 0f4637845..993bf04f0 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -30,6 +30,7 @@ #include "networkjobs.h" #include "sslerrordialog.h" #include "accountmanager.h" +#include "clientproxy.h" #include "creds/credentialsfactory.h" #include "creds/abstractcredentials.h" @@ -128,7 +129,38 @@ void OwncloudSetupWizard::slotDetermineAuthType(const QString &urlString) account->setUrl(url); // Reset the proxy which might had been determined previously in ConnectionValidator::checkServerAndAuth() // when there was a previous account. - account->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::DefaultProxy)); + account->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::NoProxy)); + + // Lookup system proxy in a thread https://github.com/owncloud/client/issues/2993 + if (ClientProxy::isUsingSystemDefault()) { + qDebug() << "Trying to look up system proxy"; + ClientProxy::lookupSystemProxyAsync(account->url(), + this, SLOT(slotSystemProxyLookupDone(QNetworkProxy))); + } else { + // We want to reset the QNAM proxy so that the global proxy settings are used (via ClientProxy settings) + account->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::DefaultProxy)); + // use a queued invocation so we're as asynchronous as with the other code path + QMetaObject::invokeMethod(this, "slotContinueDetermineAuth", Qt::QueuedConnection); + } +} + +void OwncloudSetupWizard::slotSystemProxyLookupDone(const QNetworkProxy &proxy) +{ + if (proxy.type() != QNetworkProxy::NoProxy) { + qDebug() << "Setting QNAM proxy to be system proxy" << printQNetworkProxy(proxy); + } else { + qDebug() << "No system proxy set by OS"; + } + AccountPtr account = _ocWizard->account(); + account->networkAccessManager()->setProxy(proxy); + + slotContinueDetermineAuth(); +} + +void OwncloudSetupWizard::slotContinueDetermineAuth() +{ + AccountPtr account = _ocWizard->account(); + // Set fake credentials before we check what credential it actually is. account->setCredentials(CredentialsFactory::create("dummy")); CheckServerJob *job = new CheckServerJob(_ocWizard->account(), this); @@ -136,7 +168,7 @@ void OwncloudSetupWizard::slotDetermineAuthType(const QString &urlString) connect(job, SIGNAL(instanceFound(QUrl,QVariantMap)), SLOT(slotOwnCloudFoundAuth(QUrl,QVariantMap))); connect(job, SIGNAL(instanceNotFound(QNetworkReply*)), SLOT(slotNoOwnCloudFoundAuth(QNetworkReply*))); connect(job, SIGNAL(timeout(const QUrl&)), SLOT(slotNoOwnCloudFoundAuthTimeout(const QUrl&))); - job->setTimeout(10*1000); + job->setTimeout((account->url().scheme() == "https") ? 30*1000 : 10*1000); job->start(); } diff --git a/src/gui/owncloudsetupwizard.h b/src/gui/owncloudsetupwizard.h index 65075ad47..8f172c8db 100644 --- a/src/gui/owncloudsetupwizard.h +++ b/src/gui/owncloudsetupwizard.h @@ -66,6 +66,8 @@ signals: private slots: void slotDetermineAuthType(const QString&); + void slotSystemProxyLookupDone(const QNetworkProxy &proxy); + void slotContinueDetermineAuth(); void slotOwnCloudFoundAuth(const QUrl&, const QVariantMap&); void slotNoOwnCloudFoundAuth(QNetworkReply *reply); void slotNoOwnCloudFoundAuthTimeout(const QUrl&url); diff --git a/src/libsync/clientproxy.cpp b/src/libsync/clientproxy.cpp index 721906645..b2fb18d30 100644 --- a/src/libsync/clientproxy.cpp +++ b/src/libsync/clientproxy.cpp @@ -129,7 +129,6 @@ SystemProxyRunnable::SystemProxyRunnable(const QUrl &url) : QObject(), QRunnable void SystemProxyRunnable::run() { - qDebug() << Q_FUNC_INFO << "Starting system proxy lookup"; qRegisterMetaType("QNetworkProxy"); QList proxies = QNetworkProxyFactory::systemProxyForQuery(QNetworkProxyQuery(_url)); diff --git a/src/libsync/clientproxy.h b/src/libsync/clientproxy.h index c377a04d8..6d7fbfdda 100644 --- a/src/libsync/clientproxy.h +++ b/src/libsync/clientproxy.h @@ -57,7 +57,7 @@ private: QUrl _url; }; -QString printQNetworkProxy(const QNetworkProxy &proxy); +OWNCLOUDSYNC_EXPORT QString printQNetworkProxy(const QNetworkProxy &proxy); } From f1e2e42d99ccc221eeeaa612ef3550c82363354b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 27 Sep 2016 10:52:18 +0200 Subject: [PATCH 64/93] 2.2.4: Set release date --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee4f0d43e..30848411c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ ChangeLog ========= -version 2.2.4 (release 2016-09-xx) +version 2.2.4 (release 2016-09-27) * Dolphin Plugin: Use the Application name for the socket path (#5172) * SyncEngine: Fix renaming of folder when file are changed (#5195) * Selective Sync: Fix HTTP request loop and show error in view (#5154) From e8c8943a30ee91c35344dd2945f67b50c382797c Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 27 Sep 2016 18:21:55 +0200 Subject: [PATCH 65/93] VERSION.cmake: We're at 2.2.5 --- VERSION.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.cmake b/VERSION.cmake index ed25cd247..b4fd28972 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ set( MIRALL_VERSION_MAJOR 2 ) set( MIRALL_VERSION_MINOR 2 ) -set( MIRALL_VERSION_PATCH 4 ) +set( MIRALL_VERSION_PATCH 5 ) set( MIRALL_VERSION_YEAR 2016 ) set( MIRALL_SOVERSION 0 ) From 46d934bd95ae217fbc6c95368179fdfa105b5455 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Wed, 28 Sep 2016 02:18:31 +0200 Subject: [PATCH 66/93] [tx-robot] updated from transifex --- mirall.desktop.in | 3 +++ translations/client_ca.ts | 6 +++--- translations/client_cs.ts | 6 +++--- translations/client_de.ts | 6 +++--- translations/client_el.ts | 6 +++--- translations/client_en.ts | 6 +++--- translations/client_es.ts | 6 +++--- translations/client_es_AR.ts | 6 +++--- translations/client_et.ts | 6 +++--- translations/client_eu.ts | 6 +++--- translations/client_fa.ts | 6 +++--- translations/client_fi.ts | 6 +++--- translations/client_fr.ts | 6 +++--- translations/client_gl.ts | 6 +++--- translations/client_hu.ts | 6 +++--- translations/client_it.ts | 6 +++--- translations/client_ja.ts | 6 +++--- translations/client_nb_NO.ts | 6 +++--- translations/client_nl.ts | 6 +++--- translations/client_pl.ts | 6 +++--- translations/client_pt.ts | 6 +++--- translations/client_pt_BR.ts | 6 +++--- translations/client_ru.ts | 6 +++--- translations/client_sk.ts | 6 +++--- translations/client_sl.ts | 6 +++--- translations/client_sr.ts | 6 +++--- translations/client_sv.ts | 6 +++--- translations/client_th.ts | 6 +++--- translations/client_tr.ts | 6 +++--- translations/client_uk.ts | 6 +++--- translations/client_zh_CN.ts | 6 +++--- translations/client_zh_TW.ts | 6 +++--- 32 files changed, 96 insertions(+), 93 deletions(-) diff --git a/mirall.desktop.in b/mirall.desktop.in index dfbc8bb78..4fbf84177 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -352,6 +352,9 @@ X-GNOME-Autostart-Delay=3 # Translations +# Translations + + # Translations Comment[oc]=@APPLICATION_NAME@ sincronizacion del client GenericName[oc]=Dorsièr de Sincronizacion diff --git a/translations/client_ca.ts b/translations/client_ca.ts index 7fc17f7bd..5307a46b5 100644 --- a/translations/client_ca.ts +++ b/translations/client_ca.ts @@ -1954,17 +1954,17 @@ No és aconsellada usar-la. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery El fitxer ha canviat des de que es va descobrir - + Error writing metadata to the database Error en escriure les metadades a la base de dades diff --git a/translations/client_cs.ts b/translations/client_cs.ts index d2166b7bc..3b55aca51 100644 --- a/translations/client_cs.ts +++ b/translations/client_cs.ts @@ -1956,17 +1956,17 @@ Nedoporučuje se jí používat. Stažený soubor je prázdný, přestože server oznámil, že měl být %1. - + File %1 cannot be saved because of a local file name clash! Soubor %1 nemohl být uložen z důvodu kolize názvu se souborem v místním systému! - + File has changed since discovery Soubor se mezitím změnil - + Error writing metadata to the database Chyba zápisu metadat do databáze diff --git a/translations/client_de.ts b/translations/client_de.ts index 18edf083c..d8f7f28d1 100644 --- a/translations/client_de.ts +++ b/translations/client_de.ts @@ -1954,17 +1954,17 @@ Es ist nicht ratsam, diese zu benutzen. Die heruntergeladene Datei ist leer, obwohl der Server %1 als Größe übermittelt hat. - + File %1 cannot be saved because of a local file name clash! Die Datei %1 kann aufgrund eines Konfliktes mit dem lokalen Dateinamen nicht gespeichert geladen werden! - + File has changed since discovery Datei ist seit der Entdeckung geändert worden - + Error writing metadata to the database Fehler beim Schreiben der Metadaten in die Datenbank diff --git a/translations/client_el.ts b/translations/client_el.ts index 138796167..b2efb2e6c 100644 --- a/translations/client_el.ts +++ b/translations/client_el.ts @@ -1954,17 +1954,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Το αρχείο %1 δεν είναι δυνατό να αποθηκευτεί λόγω διένεξης με το όνομα ενός τοπικού ονόματος αρχείου! - + File has changed since discovery Το αρχείο έχει αλλάξει από όταν ανακαλύφθηκε - + Error writing metadata to the database Σφάλμα εγγραφής μεταδεδομένων στην βάση δεδομένων diff --git a/translations/client_en.ts b/translations/client_en.ts index fd183c26e..1da9670dd 100644 --- a/translations/client_en.ts +++ b/translations/client_en.ts @@ -1975,17 +1975,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database diff --git a/translations/client_es.ts b/translations/client_es.ts index c576301bf..f1256502f 100644 --- a/translations/client_es.ts +++ b/translations/client_es.ts @@ -1955,17 +1955,17 @@ No se recomienda usarla. El archivo descargado está vacio aunque el servidor dice que deberia haber sido %1. - + File %1 cannot be saved because of a local file name clash! ¡El fichero %1 no puede guardarse debido a un conflicto con el nombre de otro fichero local! - + File has changed since discovery El archivo ha cambiado desde que fue descubierto - + Error writing metadata to the database Error al escribir los metadatos en la base de datos diff --git a/translations/client_es_AR.ts b/translations/client_es_AR.ts index ef9829d38..65826bb9c 100644 --- a/translations/client_es_AR.ts +++ b/translations/client_es_AR.ts @@ -1943,17 +1943,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database diff --git a/translations/client_et.ts b/translations/client_et.ts index 8d0e7a385..b52918e95 100644 --- a/translations/client_et.ts +++ b/translations/client_et.ts @@ -1944,17 +1944,17 @@ Selle kasutamine pole soovitatav. - + File %1 cannot be saved because of a local file name clash! Faili %1 ei saa salvestada kuna on nime konflikt kohaliku failiga! - + File has changed since discovery Faili on pärast avastamist muudetud - + Error writing metadata to the database diff --git a/translations/client_eu.ts b/translations/client_eu.ts index ec5f55c15..1cadb6edd 100644 --- a/translations/client_eu.ts +++ b/translations/client_eu.ts @@ -1950,17 +1950,17 @@ Ez da gomendagarria erabltzea. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database diff --git a/translations/client_fa.ts b/translations/client_fa.ts index f3d1ac134..d93f76619 100644 --- a/translations/client_fa.ts +++ b/translations/client_fa.ts @@ -1943,17 +1943,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database diff --git a/translations/client_fi.ts b/translations/client_fi.ts index 3c006df3b..8152c92fe 100644 --- a/translations/client_fi.ts +++ b/translations/client_fi.ts @@ -1951,17 +1951,17 @@ Osoitteen käyttäminen ei ole suositeltavaa. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery Tiedosto on muuttunut löytymisen jälkeen - + Error writing metadata to the database Virhe kirjoittaessa metadataa tietokantaan diff --git a/translations/client_fr.ts b/translations/client_fr.ts index cf6cf9656..b9def8a79 100644 --- a/translations/client_fr.ts +++ b/translations/client_fr.ts @@ -1956,17 +1956,17 @@ Il est déconseillé de l'utiliser. Le fichier téléchargé est vide malgré que le serveur a annoncé qu'il aurait dû être %1. - + File %1 cannot be saved because of a local file name clash! Le fichier %1 n'a pas pu être sauvegardé en raison d'un conflit sur le nom du fichier local ! - + File has changed since discovery Le fichier a changé depuis sa découverte - + Error writing metadata to the database Erreur à l'écriture des métadonnées dans la base de données diff --git a/translations/client_gl.ts b/translations/client_gl.ts index f298eff8f..b2e12d187 100644 --- a/translations/client_gl.ts +++ b/translations/client_gl.ts @@ -1950,17 +1950,17 @@ Recomendámoslle que non o use. - + File %1 cannot be saved because of a local file name clash! Non foi posíbel gardar o ficheiro %1 por mor dunha colisión co nome dun ficheiro local! - + File has changed since discovery O ficheiro cambiou após seren atopado - + Error writing metadata to the database diff --git a/translations/client_hu.ts b/translations/client_hu.ts index 1e1a3111e..4075cefee 100644 --- a/translations/client_hu.ts +++ b/translations/client_hu.ts @@ -1947,17 +1947,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database diff --git a/translations/client_it.ts b/translations/client_it.ts index 0b704ecee..6eb19868f 100644 --- a/translations/client_it.ts +++ b/translations/client_it.ts @@ -1955,17 +1955,17 @@ Non è consigliabile utilizzarlo. Il file scaricato è vuoto nonostante il server indicasse una dimensione di %1. - + File %1 cannot be saved because of a local file name clash! Il file %1 non può essere salvato a causa di un conflitto con un file locale. - + File has changed since discovery Il file è stato modificato dal suo rilevamento - + Error writing metadata to the database Errore durante la scrittura dei metadati nel database diff --git a/translations/client_ja.ts b/translations/client_ja.ts index b53803b21..175a25e50 100644 --- a/translations/client_ja.ts +++ b/translations/client_ja.ts @@ -1954,17 +1954,17 @@ It is not advisable to use it. サーバーが通知しているファイルは %1 であるべきですが、ダウンロードファイルは空でした。 - + File %1 cannot be saved because of a local file name clash! %1 はローカルファイル名が衝突しているため保存できません! - + File has changed since discovery ファイルは発見以降に変更されました - + Error writing metadata to the database メタデータのデータベースへの書き込みに失敗 diff --git a/translations/client_nb_NO.ts b/translations/client_nb_NO.ts index bdfa025bd..2dda63d17 100644 --- a/translations/client_nb_NO.ts +++ b/translations/client_nb_NO.ts @@ -1956,17 +1956,17 @@ Det er ikke tilrådelig å bruke den. Nedlastet fil er tom, selv om serveren annonserte at den skulle være %1. - + File %1 cannot be saved because of a local file name clash! Fil %1 kan ikke lagres på grunn av lokal konflikt med filnavn. - + File has changed since discovery Filen er endret siden den ble oppdaget - + Error writing metadata to the database Feil ved skriving av metadata til databasen diff --git a/translations/client_nl.ts b/translations/client_nl.ts index 6757347ed..82d9cbb4c 100644 --- a/translations/client_nl.ts +++ b/translations/client_nl.ts @@ -1957,17 +1957,17 @@ We adviseren deze site niet te gebruiken. Het gedownloade bestand is leeg, hoewel de server meldde dat het %1 zou moeten zijn. - + File %1 cannot be saved because of a local file name clash! Bestand %1 kan niet worden opgeslagen wegens een lokaal bestandsnaam conflict! - + File has changed since discovery Het bestand is gewijzigd sinds het is gevonden - + Error writing metadata to the database Fout bij schrijven van Metadata naar de database diff --git a/translations/client_pl.ts b/translations/client_pl.ts index 015cf1d77..c74aab789 100644 --- a/translations/client_pl.ts +++ b/translations/client_pl.ts @@ -1956,17 +1956,17 @@ Niezalecane jest jego użycie. - + File %1 cannot be saved because of a local file name clash! - + File has changed since discovery - + Error writing metadata to the database Błąd podczas zapisu metadanych do bazy diff --git a/translations/client_pt.ts b/translations/client_pt.ts index 622708599..1ce3c8173 100644 --- a/translations/client_pt.ts +++ b/translations/client_pt.ts @@ -1956,17 +1956,17 @@ Não é aconselhada a sua utilização. O ficheiro transferido está vazio, apesar do servidor indicar que este deveria ter %1. - + File %1 cannot be saved because of a local file name clash! Ficheiro %1 não pode ser guardado devido à existência de um ficheiro local com o mesmo nome. - + File has changed since discovery O ficheiro alterou-se desde a sua descoberta - + Error writing metadata to the database Erro ao escrever a meta-informação par a base de dados diff --git a/translations/client_pt_BR.ts b/translations/client_pt_BR.ts index ffeaf8ee4..2c93d0c29 100644 --- a/translations/client_pt_BR.ts +++ b/translations/client_pt_BR.ts @@ -1955,17 +1955,17 @@ It is not advisable to use it. O arquivo baixado está vazio apesar do servidor anunciou que deveria ter %1. - + File %1 cannot be saved because of a local file name clash! O arquivo %1 não pode ser salvo por causa de um confronto com um nome de arquivo local! - + File has changed since discovery Arquivo foi alterado desde a descoberta - + Error writing metadata to the database Ocorreu um erro ao escrever metadados ao banco de dados diff --git a/translations/client_ru.ts b/translations/client_ru.ts index 428955195..4ed398f2b 100644 --- a/translations/client_ru.ts +++ b/translations/client_ru.ts @@ -1955,17 +1955,17 @@ It is not advisable to use it. Скачанный файл пуст, хотя сервер заявил, что он должен быть %1. - + File %1 cannot be saved because of a local file name clash! Файл %1 не может быть сохранён из-за локального конфликта имен! - + File has changed since discovery После обнаружения файл был изменен - + Error writing metadata to the database Ошибка записи метаданных в базу данных diff --git a/translations/client_sk.ts b/translations/client_sk.ts index 018293758..cc36165c5 100644 --- a/translations/client_sk.ts +++ b/translations/client_sk.ts @@ -1950,17 +1950,17 @@ Nie je vhodné ju používať. - + File %1 cannot be saved because of a local file name clash! Súbor %1 nie je možné uložiť, pretože jeho názov koliduje s názvom lokálneho súboru! - + File has changed since discovery Súbor sa medzitým zmenil - + Error writing metadata to the database Chyba pri zápise metadát do databázy diff --git a/translations/client_sl.ts b/translations/client_sl.ts index c4043a332..8771f49c7 100644 --- a/translations/client_sl.ts +++ b/translations/client_sl.ts @@ -1955,17 +1955,17 @@ Uporaba ni priporočljiva. Prejeta datoteka je prazna, čeprav je na strežniku objavljena z %1. - + File %1 cannot be saved because of a local file name clash! Datoteke %1 ni mogoče shraniti zaradi neskladja z imenom obstoječe datoteke! - + File has changed since discovery Datoteka je bila po spremenjena po usklajevanju seznama datotek. - + Error writing metadata to the database Napaka zapisovanja metapodatkov v podatkovno zbirko diff --git a/translations/client_sr.ts b/translations/client_sr.ts index 8b68bff78..05b17412d 100644 --- a/translations/client_sr.ts +++ b/translations/client_sr.ts @@ -1949,17 +1949,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Фајл %1 се не може сачувати јер се судара са називом локалног фајла! - + File has changed since discovery Фајл је измењен у међувремену - + Error writing metadata to the database diff --git a/translations/client_sv.ts b/translations/client_sv.ts index b5508c2d8..c712dfc4f 100644 --- a/translations/client_sv.ts +++ b/translations/client_sv.ts @@ -1956,17 +1956,17 @@ Det är inte lämpligt använda den. Den nedladdade filen är tom men servern sa att den skulle vara %1. - + File %1 cannot be saved because of a local file name clash! Fil %1 kan inte sparas eftersom namnet krockar med en lokal fil! - + File has changed since discovery Filen har ändrats sedan upptäckten - + Error writing metadata to the database Fel vid skrivning av metadata till databasen diff --git a/translations/client_th.ts b/translations/client_th.ts index 96e797cff..f483de215 100644 --- a/translations/client_th.ts +++ b/translations/client_th.ts @@ -1956,17 +1956,17 @@ It is not advisable to use it. ไฟล์ที่ดาวน์โหลดว่างเปล่าแม้ว่าเซิร์ฟเวอร์ประกาศว่าควรจะเป็น %1 - + File %1 cannot be saved because of a local file name clash! ไฟล์ %1 ไม่สามารถบันทึกได้เพราะชื่อไฟล์ต้นทางเหมือนกัน! - + File has changed since discovery ไฟล์มีการเปลี่ยนแปลงตั้งแต่ถูกพบ - + Error writing metadata to the database ข้อผิดพลาดในการเขียนข้อมูลเมตาไปยังฐานข้อมูล diff --git a/translations/client_tr.ts b/translations/client_tr.ts index c3758557b..69827db33 100644 --- a/translations/client_tr.ts +++ b/translations/client_tr.ts @@ -1954,17 +1954,17 @@ Kullanmanız önerilmez. Sunucu boyutunu %1 olarak duyurmasına rağmen indirilen dosya boş. - + File %1 cannot be saved because of a local file name clash! Yerel bir dosya ismi ile çakıştığından, %1 dosyası kaydedilemedi! - + File has changed since discovery Dosya, bulunduğundan itibaren değişmiş - + Error writing metadata to the database Veritabanına üstveri yazma hatası diff --git a/translations/client_uk.ts b/translations/client_uk.ts index b7408f8f1..9c6395cba 100644 --- a/translations/client_uk.ts +++ b/translations/client_uk.ts @@ -1944,17 +1944,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! Файл %1 не збережено через локальний конфлікт назви файлу! - + File has changed since discovery Файл змінився з моменту знаходження - + Error writing metadata to the database diff --git a/translations/client_zh_CN.ts b/translations/client_zh_CN.ts index 070a82800..3d140a5f2 100644 --- a/translations/client_zh_CN.ts +++ b/translations/client_zh_CN.ts @@ -1954,17 +1954,17 @@ It is not advisable to use it. 虽然服务器宣称已完成 %1,但实际下载文件为空。 - + File %1 cannot be saved because of a local file name clash! 由于本地文件名冲突,文件 %1 无法保存。 - + File has changed since discovery 自从发现文件以来,它已经被改变了 - + Error writing metadata to the database 向数据库写入元数据错误 diff --git a/translations/client_zh_TW.ts b/translations/client_zh_TW.ts index 2772e0944..aac175689 100644 --- a/translations/client_zh_TW.ts +++ b/translations/client_zh_TW.ts @@ -1954,17 +1954,17 @@ It is not advisable to use it. - + File %1 cannot be saved because of a local file name clash! 檔案 %1 無法存檔,因為本地端的檔案名稱已毀損! - + File has changed since discovery 尋找的過程中檔案已經被更改 - + Error writing metadata to the database From bd2bcad3baead318431fc747a7fb04d5591781ce Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 28 Sep 2016 13:00:52 +0200 Subject: [PATCH 67/93] ShareDialog: Remove context help button Ticket #5203 --- src/gui/sharedialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index 1b2e744e5..4a8de24a5 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -46,6 +46,7 @@ ShareDialog::ShareDialog(QPointer accountState, _userGroupWidget(NULL), _progressIndicator(NULL) { + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setAttribute(Qt::WA_DeleteOnClose); setObjectName("SharingDialog"); // required as group for saveGeometry call From 5f2b1999f6c22b293cb8aa91835b53cedc2dec94 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 28 Sep 2016 13:09:15 +0200 Subject: [PATCH 68/93] Package: Fix nautilus plugin name collision when branded As suggested by @olifre in #5183 --- shell_integration/nautilus/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell_integration/nautilus/CMakeLists.txt b/shell_integration/nautilus/CMakeLists.txt index 6c1e9f73b..33911026f 100644 --- a/shell_integration/nautilus/CMakeLists.txt +++ b/shell_integration/nautilus/CMakeLists.txt @@ -19,8 +19,8 @@ if( UNIX AND NOT APPLE ) ERROR_VARIABLE errors OUTPUT_VARIABLE out) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${DATADIR}/nemo-python/extensions RENAME syncstate.py) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${DATADIR}/nemo-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) From 6382a142cdcde7b970a4fa6827b476e61662e16d Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Sat, 1 Oct 2016 01:15:17 +0200 Subject: [PATCH 69/93] [tx-robot] updated from transifex --- admin/win/nsi/l10n/Dutch.nsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/win/nsi/l10n/Dutch.nsh b/admin/win/nsi/l10n/Dutch.nsh index e5bf94e2e..82f66b949 100644 --- a/admin/win/nsi/l10n/Dutch.nsh +++ b/admin/win/nsi/l10n/Dutch.nsh @@ -1,5 +1,5 @@ # Auto-generated - do not modify -StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Toon opmerkingen bij deze uitgave" +StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Toon opmerkingen bij deze versie" StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Gevonden ${APPLICATION_EXECUTABLE} proces(sen) moet worden gestopt.$\nWilt u dat het installatieprogramma dat voor u doet?" StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Stoppen ${APPLICATION_EXECUTABLE} processen." StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Het te stoppen proces is niet gevonden!" From 84c925dc588bd328bf9b7e2fd1c196816c4ae787 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 6 Oct 2016 14:45:04 +0200 Subject: [PATCH 70/93] 503: Also parse other server error message (#5228) From https://github.com/owncloud/core/pull/26145 --- src/libsync/discoveryphase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index fa71944c0..b55ecbf62 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -192,7 +192,8 @@ int get_errno_from_http_errcode( int err, const QString & reason ) { new_errno = EIO; break; case 503: /* Service Unavailable */ - if (reason == "Storage not available") { + // https://github.com/owncloud/core/pull/26145/files + if (reason == "Storage not available" || reason == "Storage is temporarily not available") { new_errno = ERRNO_STORAGE_UNAVAILABLE; } else { new_errno = ERRNO_SERVICE_UNAVAILABLE; From 67ecca492b71d17411ed2cb4c239fea18a7f638d Mon Sep 17 00:00:00 2001 From: Tommy Sparber Date: Thu, 6 Oct 2016 17:18:51 +0200 Subject: [PATCH 71/93] Improve macOS SysTray/StatusBar monochrome icon (#5227) - Use a white icon if the context menu is visible. - Enable `QIcon::setIsMask` if compiled on Qt >= 5.6 to allow automatic macOS color handling. - No changes if the colored icons are used. --- src/gui/owncloudgui.cpp | 18 ++++++++++++------ src/libsync/theme.cpp | 28 +++++++++++++++++++++------- src/libsync/theme.h | 8 ++++---- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 1f5226944..ae5eb0170 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -67,7 +67,7 @@ ownCloudGui::ownCloudGui(Application *parent) : _tray->setParent(this); // for the beginning, set the offline icon until the account was verified - _tray->setIcon( Theme::instance()->folderOfflineIcon(true)); + _tray->setIcon( Theme::instance()->folderOfflineIcon(true, contextMenuVisible())); connect(_tray.data(), SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(slotTrayClicked(QSystemTrayIcon::ActivationReason))); @@ -262,7 +262,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() } if (!problemAccounts.empty()) { - _tray->setIcon(Theme::instance()->folderOfflineIcon(true)); + _tray->setIcon(Theme::instance()->folderOfflineIcon(true, contextMenuVisible())); #ifdef Q_OS_WIN // Windows has a 128-char tray tooltip length limit. QStringList accountNames; @@ -289,11 +289,11 @@ void ownCloudGui::slotComputeOverallSyncStatus() } if (allSignedOut) { - _tray->setIcon(Theme::instance()->folderOfflineIcon(true)); + _tray->setIcon(Theme::instance()->folderOfflineIcon(true, contextMenuVisible())); _tray->setToolTip(tr("Please sign in")); return; } else if (allPaused) { - _tray->setIcon(Theme::instance()->syncStateIcon(SyncResult::Paused, true)); + _tray->setIcon(Theme::instance()->syncStateIcon(SyncResult::Paused, true, contextMenuVisible())); _tray->setToolTip(tr("Account synchronization is disabled")); return; } @@ -323,12 +323,12 @@ void ownCloudGui::slotComputeOverallSyncStatus() trayMessage = tr("No sync folders configured."); } - QIcon statusIcon = Theme::instance()->syncStateIcon( overallResult.status(), true); + QIcon statusIcon = Theme::instance()->syncStateIcon( overallResult.status(), true, contextMenuVisible()); _tray->setIcon( statusIcon ); _tray->setToolTip(trayMessage); } else { // undefined because there are no folders. - QIcon icon = Theme::instance()->syncStateIcon(SyncResult::Problem, true); + QIcon icon = Theme::instance()->syncStateIcon(SyncResult::Problem, true, contextMenuVisible()); _tray->setIcon( icon ); _tray->setToolTip(tr("There are no sync folders configured.")); } @@ -405,6 +405,9 @@ void ownCloudGui::slotContextMenuAboutToShow() // For some reason on OS X _contextMenu->isVisible returns always false qDebug() << ""; _contextMenuVisibleOsx = true; + + // Update icon in sys tray, as it might change depending on the context menu state + slotComputeOverallSyncStatus(); } void ownCloudGui::slotContextMenuAboutToHide() @@ -412,6 +415,9 @@ void ownCloudGui::slotContextMenuAboutToHide() // For some reason on OS X _contextMenu->isVisible returns always false qDebug() << ""; _contextMenuVisibleOsx = false; + + // Update icon in sys tray, as it might change depending on the context menu state + slotComputeOverallSyncStatus(); } bool ownCloudGui::contextMenuVisible() const diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 5dfecc94b..474124275 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -115,11 +115,11 @@ QIcon Theme::trayFolderIcon( const QString& backend ) const * helper to load a icon from either the icon theme the desktop provides or from * the apps Qt resources. */ -QIcon Theme::themeIcon( const QString& name, bool sysTray ) const +QIcon Theme::themeIcon( const QString& name, bool sysTray, bool sysTrayMenuVisible ) const { QString flavor; if (sysTray) { - flavor = systrayIconFlavor(_mono); + flavor = systrayIconFlavor(_mono, sysTrayMenuVisible); } else { flavor = QLatin1String("colored"); } @@ -158,6 +158,14 @@ QIcon Theme::themeIcon( const QString& name, bool sysTray ) const } } + #ifdef Q_OS_MAC + #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + // This defines the icon as a template and enables automatic macOS color handling + // See https://bugreports.qt.io/browse/QTBUG-42109 + cached.setIsMask(_mono && sysTray && !sysTrayMenuVisible); + #endif + #endif + return cached; } @@ -227,11 +235,17 @@ QString Theme::defaultClientFolder() const return appName(); } -QString Theme::systrayIconFlavor(bool mono) const +QString Theme::systrayIconFlavor(bool mono, bool sysTrayMenuVisible ) const { QString flavor; if (mono) { flavor = Utility::hasDarkSystray() ? QLatin1String("white") : QLatin1String("black"); + + #ifdef Q_OS_MAC + if (sysTrayMenuVisible) { + flavor = QLatin1String("white"); + } + #endif } else { flavor = QLatin1String("colored"); } @@ -331,7 +345,7 @@ QVariant Theme::customMedia( CustomMediaType type ) return re; } -QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray ) const +QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray, bool sysTrayMenuVisible ) const { // FIXME: Mind the size! QString statusIcon; @@ -363,7 +377,7 @@ QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray ) const statusIcon = QLatin1String("state-error"); } - return themeIcon( statusIcon, sysTray ); + return themeIcon( statusIcon, sysTray, sysTrayMenuVisible ); } QIcon Theme::folderDisabledIcon( ) const @@ -371,9 +385,9 @@ QIcon Theme::folderDisabledIcon( ) const return themeIcon( QLatin1String("state-pause") ); } -QIcon Theme::folderOfflineIcon(bool systray) const +QIcon Theme::folderOfflineIcon(bool sysTray, bool sysTrayMenuVisible ) const { - return themeIcon( QLatin1String("state-offline"), systray ); + return themeIcon( QLatin1String("state-offline"), sysTray, sysTrayMenuVisible ); } QColor Theme::wizardHeaderTitleColor() const diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 84416fc78..63c86b4aa 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -97,10 +97,10 @@ public: /** * get an sync state icon */ - virtual QIcon syncStateIcon( SyncResult::Status, bool sysTray = false ) const; + virtual QIcon syncStateIcon( SyncResult::Status, bool sysTray = false, bool sysTrayMenuVisible = false) const; virtual QIcon folderDisabledIcon() const; - virtual QIcon folderOfflineIcon(bool systray = false) const; + virtual QIcon folderOfflineIcon(bool sysTray = false, bool sysTrayMenuVisible = false) const; virtual QIcon applicationIcon() const = 0; #endif @@ -152,7 +152,7 @@ public: virtual QString enforcedLocale() const { return QString::null; } /** colored, white or black */ - QString systrayIconFlavor(bool mono) const; + QString systrayIconFlavor(bool mono, bool sysTrayMenuVisible = false) const; #ifndef TOKEN_AUTH_ONLY /** @@ -304,7 +304,7 @@ public: protected: #ifndef TOKEN_AUTH_ONLY - QIcon themeIcon(const QString& name, bool sysTray = false) const; + QIcon themeIcon(const QString& name, bool sysTray = false, bool sysTrayMenuVisible = false) const; #endif Theme(); From f36d4562a15cd6cc4ea8c834acd24403c63a52b2 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 7 Oct 2016 13:22:43 +0200 Subject: [PATCH 72/93] Doc: Remove mention of "F5 to reset database" #5130 --- doc/architecture.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/architecture.rst b/doc/architecture.rst index 860b7606c..daf1a9515 100644 --- a/doc/architecture.rst +++ b/doc/architecture.rst @@ -199,12 +199,6 @@ the database by comparing the files and their modification times. This process ensures that both server and client are synchronized using the appropriate NTP time before restarting the client following a database removal. -Pressing ``F5`` while in the Account Settings Dialog enables you to "reset" the -journal. This function can be used to recreate the journal database. - -.. note:: We recommend that you use this function only when advised to do so by - ownCloud support staff. - Custom WebDAV Properties ------------------------ From 91b6b888835852450e521c3a6bf5f2366e85feef Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 7 Oct 2016 13:32:42 +0200 Subject: [PATCH 73/93] Tray: Fix crash on startup for non-OSX oses --- src/gui/owncloudgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index ae5eb0170..3a2fd92a3 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -67,7 +67,7 @@ ownCloudGui::ownCloudGui(Application *parent) : _tray->setParent(this); // for the beginning, set the offline icon until the account was verified - _tray->setIcon( Theme::instance()->folderOfflineIcon(true, contextMenuVisible())); + _tray->setIcon( Theme::instance()->folderOfflineIcon(/*systray?*/ true, /*currently visible?*/ false)); connect(_tray.data(), SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(slotTrayClicked(QSystemTrayIcon::ActivationReason))); From 86522cbbf0be43b767405cab5dfc00d1c6c6bec9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Sep 2016 11:25:27 +0200 Subject: [PATCH 74/93] OwnSQL: avoid crashing in SqlQuery::reset_and_clear_bindings The crash reporter shows a lot of crashes in sqlite3_clear_bindings which seems to indicate that _stmt is null. We should guard against a null value in order to avoid crashing. This should only happen if the prepare call fails. We don't usually check the return value of the prepare call, but if _stmt is null, the exec call should return false, not true. We check the result of the exec call, so this should then abort the sync with an error, rather than crashing. --- src/libsync/ownsql.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libsync/ownsql.cpp b/src/libsync/ownsql.cpp index 7628e229c..96f03efc3 100644 --- a/src/libsync/ownsql.cpp +++ b/src/libsync/ownsql.cpp @@ -230,8 +230,12 @@ bool SqlQuery::isPragma() bool SqlQuery::exec() { + if (!_stmt) { + return false; + } + // Don't do anything for selects, that is how we use the lib :-| - if(_stmt && !isSelect() && !isPragma() ) { + if( !isSelect() && !isPragma() ) { int rc, n = 0; do { rc = sqlite3_step(_stmt); @@ -376,8 +380,10 @@ void SqlQuery::finish() void SqlQuery::reset_and_clear_bindings() { - SQLITE_DO(sqlite3_reset(_stmt)); - SQLITE_DO(sqlite3_clear_bindings(_stmt)); + if (_stmt) { + SQLITE_DO(sqlite3_reset(_stmt)); + SQLITE_DO(sqlite3_clear_bindings(_stmt)); + } } } // namespace OCC From c2fa9b5bbf6cbdce5d6fed6c16d9ce8ac6eebd8f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 10 Oct 2016 12:47:59 +0200 Subject: [PATCH 75/93] AccoutWizard: Change the set policy of a radio button In an attempt to make sure the button next to it don't get too small. Issue #5209 --- src/gui/wizard/owncloudadvancedsetuppage.ui | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 660e43a5a..74ec741ea 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -267,6 +267,12 @@ + + + 0 + 0 + + From 57fe7b800f635450573545f882ac5da7a7582d6a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Oct 2016 10:29:24 +0200 Subject: [PATCH 76/93] Theme: Fix compiler warning Relates #5227 --- src/libsync/theme.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 474124275..53e850b99 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -237,6 +237,7 @@ QString Theme::defaultClientFolder() const QString Theme::systrayIconFlavor(bool mono, bool sysTrayMenuVisible ) const { + Q_UNUSED(sysTrayMenuVisible) QString flavor; if (mono) { flavor = Utility::hasDarkSystray() ? QLatin1String("white") : QLatin1String("black"); From f75106fd8ebe615a6bb32b928cb8f4daa5e2421d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Oct 2016 09:51:14 +0200 Subject: [PATCH 77/93] SyncJournalDB: check the return value of the prepare statements in checkConnect Relates to #5199 --- src/libsync/syncjournaldb.cpp | 106 ++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 31 deletions(-) diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp index d624fac1c..988646c6e 100644 --- a/src/libsync/syncjournaldb.cpp +++ b/src/libsync/syncjournaldb.cpp @@ -318,7 +318,9 @@ bool SyncJournalDb::checkConnect() createQuery.bindValue(2, MIRALL_VERSION_MINOR); createQuery.bindValue(3, MIRALL_VERSION_PATCH); createQuery.bindValue(4, MIRALL_VERSION_BUILD); - createQuery.exec(); + if (!createQuery.exec()) { + return sqlFail("Update version", createQuery); + } } else { int major = versionQuery.intValue(0); @@ -367,60 +369,84 @@ bool SyncJournalDb::checkConnect() } _getFileRecordQuery.reset(new SqlQuery(_db)); - _getFileRecordQuery->prepare( + if (_getFileRecordQuery->prepare( "SELECT path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize," " ignoredChildrenRemote, contentChecksum, contentchecksumtype.name" " FROM metadata" " LEFT JOIN checksumtype as contentchecksumtype ON metadata.contentChecksumTypeId == contentchecksumtype.id" - " WHERE phash=?1" ); + " WHERE phash=?1" )) { + return sqlFail("prepare _getFileRecordQuery", *_getFileRecordQuery); + } _setFileRecordQuery.reset(new SqlQuery(_db) ); - _setFileRecordQuery->prepare("INSERT OR REPLACE INTO metadata " + if (_setFileRecordQuery->prepare("INSERT OR REPLACE INTO metadata " "(phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize, ignoredChildrenRemote, contentChecksum, contentChecksumTypeId) " - "VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7, ?8 , ?9 , ?10, ?11, ?12, ?13, ?14, ?15, ?16);" ); + "VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7, ?8 , ?9 , ?10, ?11, ?12, ?13, ?14, ?15, ?16);" )) { + return sqlFail("prepare _setFileRecordQuery", *_setFileRecordQuery); + } _setFileRecordChecksumQuery.reset(new SqlQuery(_db) ); - _setFileRecordChecksumQuery->prepare( + if (_setFileRecordChecksumQuery->prepare( "UPDATE metadata" " SET contentChecksum = ?2, contentChecksumTypeId = ?3" - " WHERE phash == ?1;"); + " WHERE phash == ?1;")) { + return sqlFail("prepare _setFileRecordChecksumQuery", *_setFileRecordChecksumQuery); + } _setFileRecordLocalMetadataQuery.reset(new SqlQuery(_db)); - _setFileRecordLocalMetadataQuery->prepare( + if (_setFileRecordLocalMetadataQuery->prepare( "UPDATE metadata" " SET inode=?2, modtime=?3, filesize=?4" - " WHERE phash == ?1;"); + " WHERE phash == ?1;")) { + return sqlFail("prepare _setFileRecordLocalMetadataQuery", *_setFileRecordLocalMetadataQuery); + } _getDownloadInfoQuery.reset(new SqlQuery(_db) ); - _getDownloadInfoQuery->prepare( "SELECT tmpfile, etag, errorcount FROM " - "downloadinfo WHERE path=?1" ); + if (_getDownloadInfoQuery->prepare( "SELECT tmpfile, etag, errorcount FROM " + "downloadinfo WHERE path=?1" )) { + return sqlFail("prepare _getDownloadInfoQuery", *_getDownloadInfoQuery); + } _setDownloadInfoQuery.reset(new SqlQuery(_db) ); - _setDownloadInfoQuery->prepare( "INSERT OR REPLACE INTO downloadinfo " + if (_setDownloadInfoQuery->prepare( "INSERT OR REPLACE INTO downloadinfo " "(path, tmpfile, etag, errorcount) " - "VALUES ( ?1 , ?2, ?3, ?4 )" ); + "VALUES ( ?1 , ?2, ?3, ?4 )" )) { + return sqlFail("prepare _setDownloadInfoQuery", *_setDownloadInfoQuery); + } _deleteDownloadInfoQuery.reset(new SqlQuery(_db) ); - _deleteDownloadInfoQuery->prepare( "DELETE FROM downloadinfo WHERE path=?1" ); + if (_deleteDownloadInfoQuery->prepare( "DELETE FROM downloadinfo WHERE path=?1" )) { + return sqlFail("prepare _deleteDownloadInfoQuery", *_deleteDownloadInfoQuery); + } _getUploadInfoQuery.reset(new SqlQuery(_db)); - _getUploadInfoQuery->prepare( "SELECT chunk, transferid, errorcount, size, modtime FROM " - "uploadinfo WHERE path=?1" ); + if (_getUploadInfoQuery->prepare( "SELECT chunk, transferid, errorcount, size, modtime FROM " + "uploadinfo WHERE path=?1" )) { + return sqlFail("prepare _getUploadInfoQuery", *_getUploadInfoQuery); + } _setUploadInfoQuery.reset(new SqlQuery(_db)); - _setUploadInfoQuery->prepare( "INSERT OR REPLACE INTO uploadinfo " + if (_setUploadInfoQuery->prepare( "INSERT OR REPLACE INTO uploadinfo " "(path, chunk, transferid, errorcount, size, modtime) " - "VALUES ( ?1 , ?2, ?3 , ?4 , ?5, ?6 )"); + "VALUES ( ?1 , ?2, ?3 , ?4 , ?5, ?6 )")) { + return sqlFail("prepare _setUploadInfoQuery", *_setUploadInfoQuery); + } _deleteUploadInfoQuery.reset(new SqlQuery(_db)); - _deleteUploadInfoQuery->prepare("DELETE FROM uploadinfo WHERE path=?1" ); + if (_deleteUploadInfoQuery->prepare("DELETE FROM uploadinfo WHERE path=?1" )) { + return sqlFail("prepare _deleteUploadInfoQuery", *_deleteUploadInfoQuery); + } _deleteFileRecordPhash.reset(new SqlQuery(_db)); - _deleteFileRecordPhash->prepare("DELETE FROM metadata WHERE phash=?1"); + if (_deleteFileRecordPhash->prepare("DELETE FROM metadata WHERE phash=?1")) { + return sqlFail("prepare _deleteFileRecordPhash", *_deleteFileRecordPhash); + } _deleteFileRecordRecursively.reset(new SqlQuery(_db)); - _deleteFileRecordRecursively->prepare("DELETE FROM metadata WHERE path LIKE(?||'/%')"); + if (_deleteFileRecordRecursively->prepare("DELETE FROM metadata WHERE path LIKE(?||'/%')")) { + return sqlFail("prepare _deleteFileRecordRecursively", *_deleteFileRecordRecursively); + } QString sql( "SELECT lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget " "FROM blacklist WHERE path=?1"); @@ -430,32 +456,50 @@ bool SyncJournalDb::checkConnect() sql += QLatin1String(" COLLATE NOCASE"); } _getErrorBlacklistQuery.reset(new SqlQuery(_db)); - _getErrorBlacklistQuery->prepare(sql); + if (_getErrorBlacklistQuery->prepare(sql)) { + return sqlFail("prepare _getErrorBlacklistQuery", *_getErrorBlacklistQuery); + } _setErrorBlacklistQuery.reset(new SqlQuery(_db)); - _setErrorBlacklistQuery->prepare("INSERT OR REPLACE INTO blacklist " + if (_setErrorBlacklistQuery->prepare("INSERT OR REPLACE INTO blacklist " "(path, lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget) " - "VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"); + "VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)")) { + return sqlFail("prepare _setErrorBlacklistQuery", *_setErrorBlacklistQuery); + } _getSelectiveSyncListQuery.reset(new SqlQuery(_db)); - _getSelectiveSyncListQuery->prepare("SELECT path FROM selectivesync WHERE type=?1"); + if (_getSelectiveSyncListQuery->prepare("SELECT path FROM selectivesync WHERE type=?1")) { + return sqlFail("prepare _getSelectiveSyncListQuery", *_getSelectiveSyncListQuery); + } _getChecksumTypeIdQuery.reset(new SqlQuery(_db)); - _getChecksumTypeIdQuery->prepare("SELECT id FROM checksumtype WHERE name=?1"); + if (_getChecksumTypeIdQuery->prepare("SELECT id FROM checksumtype WHERE name=?1")) { + return sqlFail("prepare _getChecksumTypeIdQuery", *_getChecksumTypeIdQuery); + } _getChecksumTypeQuery.reset(new SqlQuery(_db)); - _getChecksumTypeQuery->prepare("SELECT name FROM checksumtype WHERE id=?1"); + if (_getChecksumTypeQuery->prepare("SELECT name FROM checksumtype WHERE id=?1")) { + return sqlFail("prepare _getChecksumTypeQuery", *_getChecksumTypeQuery); + } _insertChecksumTypeQuery.reset(new SqlQuery(_db)); - _insertChecksumTypeQuery->prepare("INSERT OR IGNORE INTO checksumtype (name) VALUES (?1)"); + if (_insertChecksumTypeQuery->prepare("INSERT OR IGNORE INTO checksumtype (name) VALUES (?1)")) { + return sqlFail("prepare _insertChecksumTypeQuery", *_insertChecksumTypeQuery); + } _getDataFingerprintQuery.reset(new SqlQuery(_db)); - _getDataFingerprintQuery->prepare("SELECT fingerprint FROM datafingerprint"); + if (_getDataFingerprintQuery->prepare("SELECT fingerprint FROM datafingerprint")) { + return sqlFail("prepare _getDataFingerprintQuery", *_getDataFingerprintQuery); + } _setDataFingerprintQuery1.reset(new SqlQuery(_db)); - _setDataFingerprintQuery1->prepare("DELETE FROM datafingerprint;"); + if (_setDataFingerprintQuery1->prepare("DELETE FROM datafingerprint;")) { + return sqlFail("prepare _setDataFingerprintQuery1", *_setDataFingerprintQuery1); + } _setDataFingerprintQuery2.reset(new SqlQuery(_db)); - _setDataFingerprintQuery2->prepare("INSERT INTO datafingerprint (fingerprint) VALUES (?1);"); + if (_setDataFingerprintQuery2->prepare("INSERT INTO datafingerprint (fingerprint) VALUES (?1);")) { + return sqlFail("prepare _setDataFingerprintQuery2", *_setDataFingerprintQuery2); + } // don't start a new transaction now commitInternal(QString("checkConnect End"), false); From b6079bfe4f8a6eb6a42178bd42c3427c4a0df9ce Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Oct 2016 10:55:02 +0200 Subject: [PATCH 78/93] Remove usused variable --- src/libsync/syncengine.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libsync/syncengine.h b/src/libsync/syncengine.h index ae091af46..ff119d6cb 100644 --- a/src/libsync/syncengine.h +++ b/src/libsync/syncengine.h @@ -202,7 +202,6 @@ private: SyncJournalDb *_journal; QPointer _discoveryMainThread; QSharedPointer _propagator; - QString _lastDeleted; // if the last item was a path and it has been deleted // After a sync, only the syncdb entries whose filenames appear in this // set will be kept. See _temporarilyUnavailablePaths. From 9d3e78ed542cda175a9121b805cb93689f2dab65 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Oct 2016 11:46:51 +0200 Subject: [PATCH 79/93] AccountManager: do not load invalid account Some tests (such as FolderManTest) can polute the config file with invalid accounts. (That's because most of the code, (even in libsync) always instentiate a ConfigFile) --- src/gui/accountmanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 421ee0add..70ec84cf0 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -209,6 +209,13 @@ void AccountManager::saveAccountHelper(Account* acc, QSettings& settings, bool s AccountPtr AccountManager::loadAccountHelper(QSettings& settings) { + auto urlConfig = settings.value(QLatin1String(urlC)); + if (!urlConfig.isValid()) { + // No URL probably means a corrupted entry in the account settings + qDebug() << "No URL for account " << settings.group(); + return AccountPtr(); + } + auto acc = createAccount(); QString authType = settings.value(QLatin1String(authTypeC)).toString(); @@ -220,7 +227,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings& settings) acc->setUrl(overrideUrl); authType = forceAuth; } else { - acc->setUrl(settings.value(QLatin1String(urlC)).toUrl()); + acc->setUrl(urlConfig.toUrl()); } acc->_serverVersion = settings.value(QLatin1String(serverVersionC)).toString(); From e0a36ab3137501fab3ff4463ce74219590c48383 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Oct 2016 11:55:20 +0200 Subject: [PATCH 80/93] TestFolderMan: don't pollute user's settings --- test/testfolderman.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp index 7b1c3cc5b..d753d5977 100644 --- a/test/testfolderman.cpp +++ b/test/testfolderman.cpp @@ -15,6 +15,7 @@ #include "folderman.h" #include "account.h" #include "accountstate.h" +#include "configfile.h" using namespace OCC; @@ -39,6 +40,7 @@ private slots: { #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QTemporaryDir dir; + ConfigFile::setConfDir(dir.path()); // we don't want to pollute the user's config file QVERIFY(dir.isValid()); QDir dir2(dir.path()); QVERIFY(dir2.mkpath("sub/ownCloud1/folder/f")); From d80d5a8ee48a1f578b226a2468e565879f98563a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 10 Oct 2016 16:55:31 +0200 Subject: [PATCH 81/93] SyncEngine: Fix renaming a folder should keep the selective sync state Issue #5224 Two problems: - In the discovery phase, we need to check the selective sync entries of the source path in case of renames. - When the rename is done, we need to actually update the black list in the database. --- csync/src/csync_rename.cc | 5 ++ csync/src/csync_rename.h | 2 + src/libsync/discoveryphase.cpp | 19 ++++++-- src/libsync/discoveryphase.h | 2 +- src/libsync/propagateremotemove.cpp | 36 +++++++++++++++ src/libsync/propagateremotemove.h | 6 +++ src/libsync/propagatorjobs.cpp | 10 +++- test/syncenginetestutils.h | 38 ++++++++++++++- test/testsyncengine.cpp | 71 ++++++++++++++++++++++++++++- 9 files changed, 179 insertions(+), 10 deletions(-) diff --git a/csync/src/csync_rename.cc b/csync/src/csync_rename.cc index f7c77a4ea..5cc43ce22 100644 --- a/csync/src/csync_rename.cc +++ b/csync/src/csync_rename.cc @@ -20,6 +20,7 @@ extern "C" { #include "csync_private.h" +#include "csync_rename.h" } #include @@ -93,5 +94,9 @@ char* csync_rename_adjust_path_source(CSYNC* ctx, const char* path) return c_strdup(path); } +bool csync_rename_count(CSYNC *ctx) { + csync_rename_s* d = csync_rename_s::get(ctx); + return d->folder_renamed_from.size(); +} } diff --git a/csync/src/csync_rename.h b/csync/src/csync_rename.h index 8aa2e60c7..53968324c 100644 --- a/csync/src/csync_rename.h +++ b/csync/src/csync_rename.h @@ -32,6 +32,8 @@ char OCSYNC_EXPORT *csync_rename_adjust_path(CSYNC *ctx, const char *path); char OCSYNC_EXPORT *csync_rename_adjust_path_source(CSYNC *ctx, const char *path); void OCSYNC_EXPORT csync_rename_destroy(CSYNC *ctx); void OCSYNC_EXPORT csync_rename_record(CSYNC *ctx, const char *from, const char *to); +/* Return the amount of renamed item recorded */ +bool OCSYNC_EXPORT csync_rename_count(CSYNC *ctx); #ifdef __cplusplus } diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index b55ecbf62..bb35f1f97 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -14,6 +14,7 @@ #include "discoveryphase.h" #include +#include #include #include @@ -51,7 +52,7 @@ static bool findPathInList(const QStringList &list, const QString &path) return pathSlash.startsWith(*it); } -bool DiscoveryJob::isInSelectiveSyncBlackList(const QString& path) const +bool DiscoveryJob::isInSelectiveSyncBlackList(const char *path) const { if (_selectiveSyncBlackList.isEmpty()) { // If there is no black list, everything is allowed @@ -59,13 +60,25 @@ bool DiscoveryJob::isInSelectiveSyncBlackList(const QString& path) const } // Block if it is in the black list - return findPathInList(_selectiveSyncBlackList, path); + if (findPathInList(_selectiveSyncBlackList, QString::fromUtf8(path))) { + return true; + } + // Also try to adjust the path if there was renames + if (csync_rename_count(_csync_ctx)) { + QScopedPointer adjusted( + csync_rename_adjust_path_source(_csync_ctx, path)); + if (strcmp(adjusted.data(), path) != 0) { + return findPathInList(_selectiveSyncBlackList, QString::fromUtf8(adjusted.data())); + } + } + + return false; } int DiscoveryJob::isInSelectiveSyncBlackListCallback(void *data, const char *path) { - return static_cast(data)->isInSelectiveSyncBlackList(QString::fromUtf8(path)); + return static_cast(data)->isInSelectiveSyncBlackList(path); } bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path) diff --git a/src/libsync/discoveryphase.h b/src/libsync/discoveryphase.h index b442d9a20..c030adb33 100644 --- a/src/libsync/discoveryphase.h +++ b/src/libsync/discoveryphase.h @@ -174,7 +174,7 @@ class DiscoveryJob : public QObject { * return true if the given path should be ignored, * false if the path should be synced */ - bool isInSelectiveSyncBlackList(const QString &path) const; + bool isInSelectiveSyncBlackList(const char* path) const; static int isInSelectiveSyncBlackListCallback(void *, const char *); bool checkSelectiveSyncNewFolder(const QString &path); static int checkSelectiveSyncNewFolderCallback(void*, const char*); diff --git a/src/libsync/propagateremotemove.cpp b/src/libsync/propagateremotemove.cpp index 5a75e761e..bc0b4efa1 100644 --- a/src/libsync/propagateremotemove.cpp +++ b/src/libsync/propagateremotemove.cpp @@ -13,6 +13,7 @@ */ #include "propagateremotemove.h" +#include "propagatorjobs.h" #include "owncloudpropagator_p.h" #include "account.h" #include "syncjournalfilerecord.h" @@ -175,10 +176,45 @@ void PropagateRemoteMove::finalize() done(SyncFileItem::FatalError, tr("Error writing metadata to the database")); return; } + + if (_item->_isDirectory) { + if (!adjustSelectiveSync(_propagator->_journal, _item->_file, _item->_renameTarget)) { + done(SyncFileItem::FatalError, tr("Error writing metadata to the database")); + return; + } + } + _propagator->_journal->commit("Remote Rename"); done(SyncFileItem::Success); } +bool PropagateRemoteMove::adjustSelectiveSync(SyncJournalDb *journal, const QString &from_, const QString &to_) +{ + bool ok; + // We only care about preserving the blacklist. The white list should anyway be empty. + // And the undecided list will be repopulated on the next sync, if there is anything too big. + QStringList list = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok); + if (!ok) + return false; + + bool changed = false; + Q_ASSERT(!from_.endsWith(QLatin1String("/"))); + Q_ASSERT(!to_.endsWith(QLatin1String("/"))); + QString from = from_ + QLatin1String("/"); + QString to = to_ + QLatin1String("/"); + + for (auto it = list.begin(); it != list.end(); ++it) { + if (it->startsWith(from)) { + *it = it->replace(0, from.size(), to); + changed = true; + } + } + + if (changed) { + journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, list); + } + return true; +} } diff --git a/src/libsync/propagateremotemove.h b/src/libsync/propagateremotemove.h index 3ce54f4a8..829e7a1fb 100644 --- a/src/libsync/propagateremotemove.h +++ b/src/libsync/propagateremotemove.h @@ -51,6 +51,12 @@ public: void start() Q_DECL_OVERRIDE; void abort() Q_DECL_OVERRIDE; JobParallelism parallelism() Q_DECL_OVERRIDE { return OCC::PropagatorJob::WaitForFinishedInParentDirectory; } + + /** + * Rename the directory in the selective sync list + */ + static bool adjustSelectiveSync(SyncJournalDb *journal, const QString &from, const QString &to); + private slots: void slotMoveJobFinished(); void finalize(); diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp index 58c599dc1..272a0b879 100644 --- a/src/libsync/propagatorjobs.cpp +++ b/src/libsync/propagatorjobs.cpp @@ -15,7 +15,7 @@ #include "propagatorjobs.h" #include "owncloudpropagator_p.h" - +#include "propagateremotemove.h" #include "utility.h" #include "syncjournaldb.h" #include "syncjournalfilerecord.h" @@ -231,6 +231,7 @@ void PropagateLocalRename::start() _propagator->_journal->deleteFileRecord(_item->_originalFile); // store the rename file name in the item. + const auto oldFile = _item->_file; _item->_file = _item->_renameTarget; SyncJournalFileRecord record(*_item, targetFile); @@ -245,9 +246,14 @@ void PropagateLocalRename::start() done(SyncFileItem::FatalError, tr("Error writing metadata to the database")); return; } + } else { + if (!PropagateRemoteMove::adjustSelectiveSync(_propagator->_journal, oldFile, _item->_renameTarget)) { + done(SyncFileItem::FatalError, tr("Error writing metadata to the database")); + return; + } } - _propagator->_journal->commit("localRename"); + _propagator->_journal->commit("localRename"); done(SyncFileItem::Success); } diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 570952c9c..883837c6d 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -28,6 +28,7 @@ inline QByteArray generateFileId() { class PathComponents : public QStringList { public: + PathComponents(const char *path) : PathComponents{QString::fromUtf8(path)} {} PathComponents(const QString &path) : QStringList{path.split('/', QString::SkipEmptyParts)} { } PathComponents(const QStringList &pathComponents) : QStringList{pathComponents} { } @@ -90,8 +91,9 @@ public: void mkdir(const QString &relativePath) override { _rootDir.mkpath(relativePath); } - void rename(const QString &, const QString &) override { - Q_ASSERT(!"not implemented"); + void rename(const QString &from, const QString &to) override { + QVERIFY(_rootDir.exists(from)); + QVERIFY(_rootDir.rename(from, to)); } }; @@ -457,6 +459,36 @@ public: qint64 readData(char *, qint64) override { return 0; } }; +class FakeMoveReply : public QNetworkReply +{ + Q_OBJECT +public: + FakeMoveReply(FileInfo &remoteRootFileInfo, QNetworkAccessManager::Operation op, const QNetworkRequest &request, QObject *parent) + : QNetworkReply{parent} { + setRequest(request); + setUrl(request.url()); + setOperation(op); + open(QIODevice::ReadOnly); + + Q_ASSERT(request.url().path().startsWith(sRootUrl.path())); + QString fileName = request.url().path().mid(sRootUrl.path().length()); + QString destPath = request.rawHeader("Destination"); + Q_ASSERT(destPath.startsWith(sRootUrl.path())); + QString dest = destPath.mid(sRootUrl.path().length()); + remoteRootFileInfo.rename(fileName, dest); + QMetaObject::invokeMethod(this, "respond", Qt::QueuedConnection); + } + + Q_INVOKABLE void respond() { + setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 201); + emit metaDataChanged(); + emit finished(); + } + + void abort() override { } + qint64 readData(char *, qint64) override { return 0; } +}; + class FakeGetReply : public QNetworkReply { Q_OBJECT @@ -552,6 +584,8 @@ protected: return new FakeMkcolReply{_remoteRootFileInfo, op, request, this}; else if (verb == QLatin1String("DELETE")) return new FakeDeleteReply{_remoteRootFileInfo, op, request, this}; + else if (verb == QLatin1String("MOVE")) + return new FakeMoveReply{_remoteRootFileInfo, op, request, this}; else { qDebug() << verb << outgoingData; Q_UNREACHABLE(); diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index bfb44e22b..f54ff1110 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -7,6 +7,7 @@ #include #include "syncenginetestutils.h" +#include using namespace OCC; @@ -137,8 +138,8 @@ private slots: fakeFolder.syncOnce(); QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); auto oldState = fakeFolder.currentLocalState(); - QVERIFY(oldState.find(PathComponents("folder/folderB/folderA/file.txt"))); - QVERIFY(!oldState.find(PathComponents("folder/folderA/file.txt"))); + QVERIFY(oldState.find("folder/folderB/folderA/file.txt")); + QVERIFY(!oldState.find("folder/folderA/file.txt")); // This sync should not remove the file fakeFolder.syncOnce(); @@ -146,6 +147,72 @@ private slots: QCOMPARE(fakeFolder.currentLocalState(), oldState); } + + void testSelectiveSyncModevFolder() { + // issue #5224 + FakeFolder fakeFolder{FileInfo{ QString(), { + FileInfo { QStringLiteral("parentFolder"), { + FileInfo{ QStringLiteral("subFolderA"), { { QStringLiteral("fileA.txt"), 400 } } }, + FileInfo{ QStringLiteral("subFolderB"), { { QStringLiteral("fileB.txt"), 400 } } } + } + }}}}; + + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + auto expectedServerState = fakeFolder.currentRemoteState(); + + // Remove subFolderA with selectiveSync: + fakeFolder.syncEngine().journal()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, + {"parentFolder/subFolderA/"}); + fakeFolder.syncEngine().journal()->avoidReadFromDbOnNextSync("parentFolder/subFolderA/"); + + fakeFolder.syncOnce(); + + { + // Nothing changed on the server + QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState); + // The local state should not have subFolderA + auto remoteState = fakeFolder.currentRemoteState(); + remoteState.remove("parentFolder/subFolderA"); + QCOMPARE(fakeFolder.currentLocalState(), remoteState); + } + + // Rename parentFolder on the server + fakeFolder.remoteModifier().rename("parentFolder", "parentFolderRenamed"); + expectedServerState = fakeFolder.currentRemoteState(); + fakeFolder.syncOnce(); + + { + QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState); + auto remoteState = fakeFolder.currentRemoteState(); + // The subFolderA should still be there on the server. + QVERIFY(remoteState.find("parentFolderRenamed/subFolderA/fileA.txt")); + // But not on the client because of the selective sync + remoteState.remove("parentFolderRenamed/subFolderA"); + QCOMPARE(fakeFolder.currentLocalState(), remoteState); + } + + // Rename it again, locally this time. + fakeFolder.localModifier().rename("parentFolderRenamed", "parentThirdName"); + fakeFolder.syncOnce(); + + { + auto remoteState = fakeFolder.currentRemoteState(); + // The subFolderA should still be there on the server. + QVERIFY(remoteState.find("parentThirdName/subFolderA/fileA.txt")); + // But not on the client because of the selective sync + remoteState.remove("parentThirdName/subFolderA"); + QCOMPARE(fakeFolder.currentLocalState(), remoteState); + + expectedServerState = fakeFolder.currentRemoteState(); + QSignalSpy completeSpy(&fakeFolder.syncEngine(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &))); + fakeFolder.syncOnce(); // This sync should do nothing + QCOMPARE(completeSpy.count(), 0); + + QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState); + QCOMPARE(fakeFolder.currentLocalState(), remoteState); + } + } + }; QTEST_GUILESS_MAIN(TestSyncEngine) From f6355e15a392293af87a83dcedf35cf4a8c0bdff Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 11 Oct 2016 20:06:43 +0200 Subject: [PATCH 82/93] sqlite: Update bundled version to 3.14.2 For OS X and Windows. --- src/3rdparty/sqlite3/sqlite3.c | 6411 +++++++++++++++++++------------- src/3rdparty/sqlite3/sqlite3.h | 688 ++-- 2 files changed, 4153 insertions(+), 2946 deletions(-) diff --git a/src/3rdparty/sqlite3/sqlite3.c b/src/3rdparty/sqlite3/sqlite3.c index e19867890..9e962ce13 100644 --- a/src/3rdparty/sqlite3/sqlite3.c +++ b/src/3rdparty/sqlite3/sqlite3.c @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.13.0. By combining all the individual C code files into this +** version 3.14.2. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -9,7 +9,7 @@ ** ** This file is all you need to compile SQLite. To use SQLite in other ** programs, you need this file and the "sqlite3.h" header file that defines -** the programming interface to the SQLite library. (If you do not have +** the programming interface to the SQLite library. (If you do not have ** the "sqlite3.h" header file at hand, you will find a copy embedded within ** the text of this file. Search for "Begin file sqlite3.h" to find the start ** of the embedded sqlite3.h header file.) Additional code files may be needed @@ -37,8 +37,8 @@ ** Internal interface definitions for SQLite. ** */ -#ifndef _SQLITEINT_H_ -#define _SQLITEINT_H_ +#ifndef SQLITEINT_H +#define SQLITEINT_H /* Special Comments: ** @@ -67,6 +67,14 @@ ** asterisks and the comment text. */ +/* +** Make sure the Tcl calling convention macro is defined. This macro is +** only used by test code and Tcl integration code. +*/ +#ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +#endif + /* ** Make sure that rand_s() is available on Windows systems with MSVC 2005 ** or higher. @@ -97,8 +105,8 @@ ** ** This file contains code that is specific to MSVC. */ -#ifndef _MSVC_H_ -#define _MSVC_H_ +#ifndef SQLITE_MSVC_H +#define SQLITE_MSVC_H #if defined(_MSC_VER) #pragma warning(disable : 4054) @@ -118,7 +126,7 @@ #pragma warning(disable : 4706) #endif /* defined(_MSC_VER) */ -#endif /* _MSVC_H_ */ +#endif /* SQLITE_MSVC_H */ /************** End of msvc.h ************************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -282,8 +290,8 @@ ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. */ -#ifndef _SQLITE3_H_ -#define _SQLITE3_H_ +#ifndef SQLITE3_H +#define SQLITE3_H #include /* Needed for the definition of va_list */ /* @@ -306,8 +314,17 @@ extern "C" { #ifndef SQLITE_CDECL # define SQLITE_CDECL #endif +#ifndef SQLITE_APICALL +# define SQLITE_APICALL +#endif #ifndef SQLITE_STDCALL -# define SQLITE_STDCALL +# define SQLITE_STDCALL SQLITE_APICALL +#endif +#ifndef SQLITE_CALLBACK +# define SQLITE_CALLBACK +#endif +#ifndef SQLITE_SYSAPI +# define SQLITE_SYSAPI #endif /* @@ -363,9 +380,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.13.0" -#define SQLITE_VERSION_NUMBER 3013000 -#define SQLITE_SOURCE_ID "2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2" +#define SQLITE_VERSION "3.14.2" +#define SQLITE_VERSION_NUMBER 3014002 +#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -398,9 +415,9 @@ extern "C" { ** See also: [sqlite_version()] and [sqlite_source_id()]. */ SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); -SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); -SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); +SQLITE_API const char *sqlite3_libversion(void); +SQLITE_API const char *sqlite3_sourceid(void); +SQLITE_API int sqlite3_libversion_number(void); /* ** CAPI3REF: Run-Time Library Compilation Options Diagnostics @@ -425,8 +442,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); ** [sqlite_compileoption_get()] and the [compile_options pragma]. */ #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); +SQLITE_API const char *sqlite3_compileoption_get(int N); #endif /* @@ -465,7 +482,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); ** ** See the [threading mode] documentation for additional information. */ -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); +SQLITE_API int sqlite3_threadsafe(void); /* ** CAPI3REF: Database Connection Handle @@ -562,8 +579,8 @@ typedef sqlite_uint64 sqlite3_uint64; ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer ** argument is a harmless no-op. */ -SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); -SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); +SQLITE_API int sqlite3_close(sqlite3*); +SQLITE_API int sqlite3_close_v2(sqlite3*); /* ** The type for a callback function. @@ -634,7 +651,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. ** */ -SQLITE_API int SQLITE_STDCALL sqlite3_exec( +SQLITE_API int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluated */ int (*callback)(void*,int,char**,char**), /* Callback function */ @@ -758,6 +775,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec( #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) +#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) /* ** CAPI3REF: Flags For File Open Operations @@ -1287,6 +1305,16 @@ struct sqlite3_io_methods { */ typedef struct sqlite3_mutex sqlite3_mutex; +/* +** CAPI3REF: Loadable Extension Thunk +** +** A pointer to the opaque sqlite3_api_routines structure is passed as +** the third parameter to entry points of [loadable extensions]. This +** structure must be typedefed in order to work around compiler warnings +** on some platforms. +*/ +typedef struct sqlite3_api_routines sqlite3_api_routines; + /* ** CAPI3REF: OS Interface Object ** @@ -1622,10 +1650,10 @@ struct sqlite3_vfs { ** must return [SQLITE_OK] on success and some other [error code] upon ** failure. */ -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); +SQLITE_API int sqlite3_initialize(void); +SQLITE_API int sqlite3_shutdown(void); +SQLITE_API int sqlite3_os_init(void); +SQLITE_API int sqlite3_os_end(void); /* ** CAPI3REF: Configuring The SQLite Library @@ -1658,7 +1686,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); ** ^If the option is unknown or SQLite is unable to set the option ** then this routine returns a non-zero [error code]. */ -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); +SQLITE_API int sqlite3_config(int, ...); /* ** CAPI3REF: Configure database connections @@ -1677,7 +1705,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if ** the call is considered successful. */ -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); /* ** CAPI3REF: Memory Allocation Routines @@ -2191,7 +2219,7 @@ struct sqlite3_mem_methods { ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. ** There should be two additional arguments. ** When the first argument to this interface is 1, then only the C-API is -** enabled and the SQL function remains disabled. If the first argment to +** enabled and the SQL function remains disabled. If the first argument to ** this interface is 0, then both the C-API and the SQL function are disabled. ** If the first argument is -1, then no changes are made to state of either the ** C-API or the SQL function. @@ -2218,7 +2246,7 @@ struct sqlite3_mem_methods { ** [extended result codes] feature of SQLite. ^The extended result ** codes are disabled by default for historical compatibility. */ -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); /* ** CAPI3REF: Last Insert Rowid @@ -2270,7 +2298,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff) ** unpredictable and might not equal either the old or the new ** last insert [rowid]. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); /* ** CAPI3REF: Count The Number Of Rows Modified @@ -2323,7 +2351,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); ** while [sqlite3_changes()] is running then the value returned ** is unpredictable and not meaningful. */ -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); +SQLITE_API int sqlite3_changes(sqlite3*); /* ** CAPI3REF: Total Number Of Rows Modified @@ -2347,7 +2375,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); ** while [sqlite3_total_changes()] is running then the value ** returned is unpredictable and not meaningful. */ -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); +SQLITE_API int sqlite3_total_changes(sqlite3*); /* ** CAPI3REF: Interrupt A Long-Running Query @@ -2387,7 +2415,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); ** If the database connection closes while [sqlite3_interrupt()] ** is running then bad things will likely happen. */ -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); +SQLITE_API void sqlite3_interrupt(sqlite3*); /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -2422,8 +2450,8 @@ SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); ** The input to [sqlite3_complete16()] must be a zero-terminated ** UTF-16 string in native byte order. */ -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); +SQLITE_API int sqlite3_complete(const char *sql); +SQLITE_API int sqlite3_complete16(const void *sql); /* ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors @@ -2484,7 +2512,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); ** A busy handler must not close the database connection ** or [prepared statement] that invoked the busy handler. */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); +SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); /* ** CAPI3REF: Set A Busy Timeout @@ -2507,7 +2535,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), ** ** See also: [PRAGMA busy_timeout] */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); /* ** CAPI3REF: Convenience Routines For Running Queries @@ -2582,7 +2610,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); ** reflected in subsequent calls to [sqlite3_errcode()] or ** [sqlite3_errmsg()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( +SQLITE_API int sqlite3_get_table( sqlite3 *db, /* An open database */ const char *zSql, /* SQL to be evaluated */ char ***pazResult, /* Results of the query */ @@ -2590,7 +2618,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_table( int *pnColumn, /* Number of result columns written here */ char **pzErrmsg /* Error msg written here */ ); -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); +SQLITE_API void sqlite3_free_table(char **result); /* ** CAPI3REF: Formatted String Printing Functions @@ -2696,10 +2724,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); ** addition that after the string has been read and copied into ** the result, [sqlite3_free()] is called on the input string.)^ */ -SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); -SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); -SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); +SQLITE_API char *sqlite3_mprintf(const char*,...); +SQLITE_API char *sqlite3_vmprintf(const char*, va_list); +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); +SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); /* ** CAPI3REF: Memory Allocation Subsystem @@ -2789,12 +2817,12 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list ** a block of memory after it has been released using ** [sqlite3_free()] or [sqlite3_realloc()]. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); -SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); +SQLITE_API void *sqlite3_malloc(int); +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64); +SQLITE_API void *sqlite3_realloc(void*, int); +SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64); +SQLITE_API void sqlite3_free(void*); +SQLITE_API sqlite3_uint64 sqlite3_msize(void*); /* ** CAPI3REF: Memory Allocator Statistics @@ -2819,8 +2847,8 @@ SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); ** by [sqlite3_memory_highwater(1)] is the high-water mark ** prior to the reset. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); +SQLITE_API sqlite3_int64 sqlite3_memory_used(void); +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); /* ** CAPI3REF: Pseudo-Random Number Generator @@ -2843,7 +2871,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); ** internally and without recourse to the [sqlite3_vfs] xRandomness ** method. */ -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); +SQLITE_API void sqlite3_randomness(int N, void *P); /* ** CAPI3REF: Compile-Time Authorization Callbacks @@ -2926,7 +2954,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); ** as stated in the previous paragraph, sqlite3_step() invokes ** sqlite3_prepare_v2() to reprepare a statement after a schema change. */ -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( +SQLITE_API int sqlite3_set_authorizer( sqlite3*, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pUserData @@ -3006,6 +3034,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( ** CAPI3REF: Tracing And Profiling Functions ** METHOD: sqlite3 ** +** These routines are deprecated. Use the [sqlite3_trace_v2()] interface +** instead of the routines described here. +** ** These routines register callback functions that can be used for ** tracing and profiling the execution of SQL statements. ** @@ -3031,10 +3062,104 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( ** sqlite3_profile() function is considered experimental and is ** subject to change in future versions of SQLite. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*, +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, + void(*xTrace)(void*,const char*), void*); +SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, void(*xProfile)(void*,const char*,sqlite3_uint64), void*); +/* +** CAPI3REF: SQL Trace Event Codes +** KEYWORDS: SQLITE_TRACE +** +** These constants identify classes of events that can be monitored +** using the [sqlite3_trace_v2()] tracing logic. The third argument +** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of +** the following constants. ^The first argument to the trace callback +** is one of the following constants. +** +** New tracing constants may be added in future releases. +** +** ^A trace callback has four arguments: xCallback(T,C,P,X). +** ^The T argument is one of the integer type codes above. +** ^The C argument is a copy of the context pointer passed in as the +** fourth argument to [sqlite3_trace_v2()]. +** The P and X arguments are pointers whose meanings depend on T. +** +**
+** [[SQLITE_TRACE_STMT]]
SQLITE_TRACE_STMT
+**
^An SQLITE_TRACE_STMT callback is invoked when a prepared statement +** first begins running and possibly at other times during the +** execution of the prepared statement, such as at the start of each +** trigger subprogram. ^The P argument is a pointer to the +** [prepared statement]. ^The X argument is a pointer to a string which +** is the unexpanded SQL text of the prepared statement or an SQL comment +** that indicates the invocation of a trigger. ^The callback can compute +** the same text that would have been returned by the legacy [sqlite3_trace()] +** interface by using the X argument when X begins with "--" and invoking +** [sqlite3_expanded_sql(P)] otherwise. +** +** [[SQLITE_TRACE_PROFILE]]
SQLITE_TRACE_PROFILE
+**
^An SQLITE_TRACE_PROFILE callback provides approximately the same +** information as is provided by the [sqlite3_profile()] callback. +** ^The P argument is a pointer to the [prepared statement] and the +** X argument points to a 64-bit integer which is the estimated of +** the number of nanosecond that the prepared statement took to run. +** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. +** +** [[SQLITE_TRACE_ROW]]
SQLITE_TRACE_ROW
+**
^An SQLITE_TRACE_ROW callback is invoked whenever a prepared +** statement generates a single row of result. +** ^The P argument is a pointer to the [prepared statement] and the +** X argument is unused. +** +** [[SQLITE_TRACE_CLOSE]]
SQLITE_TRACE_CLOSE
+**
^An SQLITE_TRACE_CLOSE callback is invoked when a database +** connection closes. +** ^The P argument is a pointer to the [database connection] object +** and the X argument is unused. +**
+*/ +#define SQLITE_TRACE_STMT 0x01 +#define SQLITE_TRACE_PROFILE 0x02 +#define SQLITE_TRACE_ROW 0x04 +#define SQLITE_TRACE_CLOSE 0x08 + +/* +** CAPI3REF: SQL Trace Hook +** METHOD: sqlite3 +** +** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback +** function X against [database connection] D, using property mask M +** and context pointer P. ^If the X callback is +** NULL or if the M mask is zero, then tracing is disabled. The +** M argument should be the bitwise OR-ed combination of +** zero or more [SQLITE_TRACE] constants. +** +** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides +** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). +** +** ^The X callback is invoked whenever any of the events identified by +** mask M occur. ^The integer return value from the callback is currently +** ignored, though this may change in future releases. Callback +** implementations should return zero to ensure future compatibility. +** +** ^A trace callback is invoked with four arguments: callback(T,C,P,X). +** ^The T argument is one of the [SQLITE_TRACE] +** constants to indicate why the callback was invoked. +** ^The C argument is a copy of the context pointer. +** The P and X arguments are pointers whose meanings depend on T. +** +** The sqlite3_trace_v2() interface is intended to replace the legacy +** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which +** are deprecated. +*/ +SQLITE_API int sqlite3_trace_v2( + sqlite3*, + unsigned uMask, + int(*xCallback)(unsigned,void*,void*,void*), + void *pCtx +); + /* ** CAPI3REF: Query Progress Callbacks ** METHOD: sqlite3 @@ -3067,7 +3192,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*, ** database connections for the meaning of "modify" in this paragraph. ** */ -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); +SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); /* ** CAPI3REF: Opening A New Database Connection @@ -3296,15 +3421,15 @@ SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(vo ** ** See also: [sqlite3_temp_directory] */ -SQLITE_API int SQLITE_STDCALL sqlite3_open( +SQLITE_API int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_open16( +SQLITE_API int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( +SQLITE_API int sqlite3_open_v2( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb, /* OUT: SQLite db handle */ int flags, /* Flags */ @@ -3350,9 +3475,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( ** VFS method, then the behavior of this routine is undefined and probably ** undesirable. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); -SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); +SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); +SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); +SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); /* @@ -3396,11 +3521,11 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const cha ** was invoked incorrectly by the application. In that case, the ** error code and message may or may not be set. */ -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); +SQLITE_API int sqlite3_errcode(sqlite3 *db); +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); +SQLITE_API const char *sqlite3_errmsg(sqlite3*); +SQLITE_API const void *sqlite3_errmsg16(sqlite3*); +SQLITE_API const char *sqlite3_errstr(int); /* ** CAPI3REF: Prepared Statement Object @@ -3468,7 +3593,7 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** ** New run-time limit categories may be added in future releases. */ -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); /* ** CAPI3REF: Run-Time Limit Categories @@ -3620,28 +3745,28 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); ** ** */ -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( +SQLITE_API int sqlite3_prepare( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( +SQLITE_API int sqlite3_prepare_v2( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( +SQLITE_API int sqlite3_prepare16( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const void **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( +SQLITE_API int sqlite3_prepare16_v2( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ @@ -3653,11 +3778,35 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( ** CAPI3REF: Retrieving Statement SQL ** METHOD: sqlite3_stmt ** -** ^This interface can be used to retrieve a saved copy of the original -** SQL text used to create a [prepared statement] if that statement was -** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. +** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8 +** SQL text used to create [prepared statement] P if P was +** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. +** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 +** string containing the SQL text of prepared statement P with +** [bound parameters] expanded. +** +** ^(For example, if a prepared statement is created using the SQL +** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 +** and parameter :xyz is unbound, then sqlite3_sql() will return +** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql() +** will return "SELECT 2345,NULL".)^ +** +** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory +** is available to hold the result, or if the result would exceed the +** the maximum string length determined by the [SQLITE_LIMIT_LENGTH]. +** +** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of +** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time +** option causes sqlite3_expanded_sql() to always return NULL. +** +** ^The string returned by sqlite3_sql(P) is managed by SQLite and is +** automatically freed when the prepared statement is finalized. +** ^The string returned by sqlite3_expanded_sql(P), on the other hand, +** is obtained from [sqlite3_malloc()] and must be free by the application +** by passing it to [sqlite3_free()]. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); /* ** CAPI3REF: Determine If An SQL Statement Writes The Database @@ -3689,7 +3838,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); ** change the configuration of a database connection, they do not make ** changes to the content of the database files on disk. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset @@ -3710,7 +3859,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); ** for example, in diagnostic routines to search for prepared ** statements that are holding a transaction open. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); /* ** CAPI3REF: Dynamically Typed Value Object @@ -3874,20 +4023,20 @@ typedef struct sqlite3_context sqlite3_context; ** See also: [sqlite3_bind_parameter_count()], ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, +SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); +SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, +SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); +SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); +SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); +SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); +SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, void(*)(void*), unsigned char encoding); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); +SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); +SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); /* ** CAPI3REF: Number Of SQL Parameters @@ -3908,7 +4057,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite ** [sqlite3_bind_parameter_name()], and ** [sqlite3_bind_parameter_index()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); /* ** CAPI3REF: Name Of A Host Parameter @@ -3936,7 +4085,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_index()]. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); /* ** CAPI3REF: Index Of A Parameter With A Given Name @@ -3953,7 +4102,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_name()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); /* ** CAPI3REF: Reset All Bindings On A Prepared Statement @@ -3963,7 +4112,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. ** ^Use this routine to reset all host parameters to NULL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); /* ** CAPI3REF: Number Of Columns In A Result Set @@ -3975,7 +4124,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); ** ** See also: [sqlite3_data_count()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Column Names In A Result Set @@ -4004,8 +4153,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); ** then the name of the column is unspecified and may change from ** one release of SQLite to the next. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); /* ** CAPI3REF: Source Of Data In A Query Result @@ -4053,12 +4202,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N ** for the same [prepared statement] and result column ** at the same time then the results are undefined. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); /* ** CAPI3REF: Declared Datatype Of A Query Result @@ -4090,8 +4239,8 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt* ** is associated with individual values, not with the containers ** used to hold those values. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); /* ** CAPI3REF: Evaluate An SQL Statement @@ -4171,7 +4320,7 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,in ** then the more specific [error codes] are returned directly ** by sqlite3_step(). The use of the "v2" interface is recommended. */ -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); +SQLITE_API int sqlite3_step(sqlite3_stmt*); /* ** CAPI3REF: Number of columns in a result set @@ -4192,7 +4341,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); ** ** See also: [sqlite3_column_count()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Fundamental Datatypes @@ -4382,16 +4531,16 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); ** pointer. Subsequent calls to [sqlite3_errcode()] will return ** [SQLITE_NOMEM].)^ */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); +SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); /* ** CAPI3REF: Destroy A Prepared Statement Object @@ -4419,7 +4568,7 @@ SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int ** statement after it has been finalized can result in undefined and ** undesirable behavior such as segfaults and heap corruption. */ -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); /* ** CAPI3REF: Reset A Prepared Statement Object @@ -4446,7 +4595,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); ** ^The [sqlite3_reset(S)] interface does not change the values ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. */ -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); /* ** CAPI3REF: Create Or Redefine SQL Functions @@ -4546,7 +4695,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); ** close the database connection nor finalize or reset the prepared ** statement in which the function is running. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( +SQLITE_API int sqlite3_create_function( sqlite3 *db, const char *zFunctionName, int nArg, @@ -4556,7 +4705,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function( void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( +SQLITE_API int sqlite3_create_function16( sqlite3 *db, const void *zFunctionName, int nArg, @@ -4566,7 +4715,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( +SQLITE_API int sqlite3_create_function_v2( sqlite3 *db, const char *zFunctionName, int nArg, @@ -4612,12 +4761,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( ** these functions, we will not explain what they do. */ #ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), +SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); +SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); +SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), void*,sqlite3_int64); #endif @@ -4667,18 +4816,18 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi ** These routines must be called from the same thread as ** the SQL function that supplied the [sqlite3_value*] parameters. */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); +SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); +SQLITE_API double sqlite3_value_double(sqlite3_value*); +SQLITE_API int sqlite3_value_int(sqlite3_value*); +SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); +SQLITE_API int sqlite3_value_type(sqlite3_value*); +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); /* ** CAPI3REF: Finding The Subtype Of SQL Values @@ -4694,7 +4843,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); ** from the result of one [application-defined SQL function] into the ** input of another. */ -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); /* ** CAPI3REF: Copy And Free SQL Values @@ -4710,8 +4859,8 @@ SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer ** then sqlite3_value_free(V) is a harmless no-op. */ -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); +SQLITE_API void sqlite3_value_free(sqlite3_value*); /* ** CAPI3REF: Obtain Aggregate Function Context @@ -4756,7 +4905,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); ** This routine must be called from the same thread in which ** the aggregate SQL function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); /* ** CAPI3REF: User Data For Functions @@ -4771,7 +4920,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int ** This routine must be called from the same thread in which ** the application-defined function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); +SQLITE_API void *sqlite3_user_data(sqlite3_context*); /* ** CAPI3REF: Database Connection For Functions @@ -4783,7 +4932,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); ** and [sqlite3_create_function16()] routines that originally ** registered the application defined function. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); /* ** CAPI3REF: Function Auxiliary Data @@ -4815,12 +4964,13 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); ** SQLite will invoke the destructor function X with parameter P exactly ** once, when the metadata is discarded. ** SQLite is free to discard the metadata at any time, including:
    -**
  • when the corresponding function parameter changes, or -**
  • when [sqlite3_reset()] or [sqlite3_finalize()] is called for the -** SQL statement, or -**
  • when sqlite3_set_auxdata() is invoked again on the same parameter, or -**
  • during the original sqlite3_set_auxdata() call when a memory -** allocation error occurs.
)^ +**
  • ^(when the corresponding function parameter changes)^, or +**
  • ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the +** SQL statement)^, or +**
  • ^(when sqlite3_set_auxdata() is invoked again on the same +** parameter)^, or +**
  • ^(during the original sqlite3_set_auxdata() call when a memory +** allocation error occurs.)^ ** ** Note the last bullet in particular. The destructor X in ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the @@ -4836,8 +4986,8 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); ** These routines must be called from the same thread in which ** the SQL function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); +SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); /* @@ -4973,27 +5123,27 @@ typedef void (*sqlite3_destructor_type)(void*); ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, +SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*, sqlite3_uint64,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, +SQLITE_API void sqlite3_result_double(sqlite3_context*, double); +SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); +SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); +SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); +SQLITE_API void sqlite3_result_null(sqlite3_context*); +SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, void(*)(void*), unsigned char encoding); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); -SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); +SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); +SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); /* @@ -5008,7 +5158,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite ** The number of subtype bytes preserved by SQLite might increase ** in future releases of SQLite. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); /* ** CAPI3REF: Define New Collating Sequences @@ -5090,14 +5240,14 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned ** ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( +SQLITE_API int sqlite3_create_collation( sqlite3*, const char *zName, int eTextRep, void *pArg, int(*xCompare)(void*,int,const void*,int,const void*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( +SQLITE_API int sqlite3_create_collation_v2( sqlite3*, const char *zName, int eTextRep, @@ -5105,7 +5255,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( int(*xCompare)(void*,int,const void*,int,const void*), void(*xDestroy)(void*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( +SQLITE_API int sqlite3_create_collation16( sqlite3*, const void *zName, int eTextRep, @@ -5140,12 +5290,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or ** [sqlite3_create_collation_v2()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( +SQLITE_API int sqlite3_collation_needed( sqlite3*, void*, void(*)(void*,sqlite3*,int eTextRep,const char*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( +SQLITE_API int sqlite3_collation_needed16( sqlite3*, void*, void(*)(void*,sqlite3*,int eTextRep,const void*) @@ -5159,11 +5309,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( ** The code to implement this API is not available in the public release ** of SQLite. */ -SQLITE_API int SQLITE_STDCALL sqlite3_key( +SQLITE_API int sqlite3_key( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The key */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( +SQLITE_API int sqlite3_key_v2( sqlite3 *db, /* Database to be rekeyed */ const char *zDbName, /* Name of the database */ const void *pKey, int nKey /* The key */ @@ -5177,11 +5327,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( ** The code to implement this API is not available in the public release ** of SQLite. */ -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( +SQLITE_API int sqlite3_rekey( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( +SQLITE_API int sqlite3_rekey_v2( sqlite3 *db, /* Database to be rekeyed */ const char *zDbName, /* Name of the database */ const void *pKey, int nKey /* The new key */ @@ -5191,7 +5341,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( ** Specify the activation key for a SEE database. Unless ** activated, none of the SEE routines will work. */ -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( +SQLITE_API void sqlite3_activate_see( const char *zPassPhrase /* Activation phrase */ ); #endif @@ -5201,7 +5351,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( ** Specify the activation key for a CEROD database. Unless ** activated, none of the CEROD routines will work. */ -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( +SQLITE_API void sqlite3_activate_cerod( const char *zPassPhrase /* Activation phrase */ ); #endif @@ -5223,7 +5373,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( ** all, then the behavior of sqlite3_sleep() may deviate from the description ** in the previous paragraphs. */ -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); +SQLITE_API int sqlite3_sleep(int); /* ** CAPI3REF: Name Of The Folder Holding Temporary Files @@ -5342,7 +5492,7 @@ SQLITE_API char *sqlite3_data_directory; ** connection while this routine is running, then the return value ** is undefined. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); +SQLITE_API int sqlite3_get_autocommit(sqlite3*); /* ** CAPI3REF: Find The Database Handle Of A Prepared Statement @@ -5355,7 +5505,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); /* ** CAPI3REF: Return The Filename For A Database Connection @@ -5372,7 +5522,7 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); ** will be an absolute pathname, even if the filename used ** to open the database originally was a URI or relative pathname. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); +SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); /* ** CAPI3REF: Determine if a database is read-only @@ -5382,7 +5532,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const cha ** of connection D is read-only, 0 if it is read/write, or -1 if N is not ** the name of a database on connection D. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); +SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); /* ** CAPI3REF: Find the next prepared statement @@ -5398,7 +5548,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbNa ** [sqlite3_next_stmt(D,S)] must refer to an open database ** connection and in particular must not be a NULL pointer. */ -SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); /* ** CAPI3REF: Commit And Rollback Notification Callbacks @@ -5447,8 +5597,8 @@ SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_ ** ** See also the [sqlite3_update_hook()] interface. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); /* ** CAPI3REF: Data Change Notification Callbacks @@ -5499,7 +5649,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], ** and [sqlite3_preupdate_hook()] interfaces. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( +SQLITE_API void *sqlite3_update_hook( sqlite3*, void(*)(void *,int ,char const *,char const *,sqlite3_int64), void* @@ -5539,7 +5689,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( ** ** See Also: [SQLite Shared-Cache Mode] */ -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); +SQLITE_API int sqlite3_enable_shared_cache(int); /* ** CAPI3REF: Attempt To Free Heap Memory @@ -5555,7 +5705,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); ** ** See also: [sqlite3_db_release_memory()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); +SQLITE_API int sqlite3_release_memory(int); /* ** CAPI3REF: Free Memory Used By A Database Connection @@ -5569,7 +5719,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); ** ** See also: [sqlite3_release_memory()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); +SQLITE_API int sqlite3_db_release_memory(sqlite3*); /* ** CAPI3REF: Impose A Limit On Heap Size @@ -5621,7 +5771,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); ** The circumstances under which SQLite will enforce the soft heap limit may ** changes in future releases of SQLite. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); +SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); /* ** CAPI3REF: Deprecated Soft Heap Limit Interface @@ -5632,7 +5782,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 ** only. All new applications should use the ** [sqlite3_soft_heap_limit64()] interface rather than this one. */ -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); +SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); /* @@ -5647,7 +5797,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); ** column exists. ^The sqlite3_table_column_metadata() interface returns ** SQLITE_ERROR and if the specified column does not exist. ** ^If the column-name parameter to sqlite3_table_column_metadata() is a -** NULL pointer, then this routine simply checks for the existance of the +** NULL pointer, then this routine simply checks for the existence of the ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it ** does not. ** @@ -5702,7 +5852,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); ** parsed, if that has not already been done, and returns an error if ** any errors are encountered while loading the schema. */ -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( +SQLITE_API int sqlite3_table_column_metadata( sqlite3 *db, /* Connection handle */ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ @@ -5758,7 +5908,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( ** ** See also the [load_extension() SQL function]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( +SQLITE_API int sqlite3_load_extension( sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ @@ -5781,8 +5931,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( ** ** ^This interface enables or disables both the C-API ** [sqlite3_load_extension()] and the SQL function [load_extension()]. -** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) -** to enable or disable only the C-API. +** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) +** to enable or disable only the C-API.)^ ** ** Security warning: It is recommended that extension loading ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method @@ -5790,7 +5940,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( ** remains disabled. This will prevent SQL injections from giving attackers ** access to extension loading capabilities. */ -SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); /* ** CAPI3REF: Automatically Load Statically Linked Extensions @@ -5802,7 +5952,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono ** ** ^(Even though the function prototype shows that xEntryPoint() takes ** no arguments and returns void, SQLite invokes xEntryPoint() with three -** arguments and expects and integer result as if the signature of the +** arguments and expects an integer result as if the signature of the ** entry point where as follows: ** **
    @@ -5828,7 +5978,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
     ** See also: [sqlite3_reset_auto_extension()]
     ** and [sqlite3_cancel_auto_extension()]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
    +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
     
     /*
     ** CAPI3REF: Cancel Automatic Extension Loading
    @@ -5840,7 +5990,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
     ** unregistered and it returns 0 if X was not on the list of initialization
     ** routines.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
    +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
     
     /*
     ** CAPI3REF: Reset Automatic Extension Loading
    @@ -5848,7 +5998,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(
     ** ^This interface disables all automatic extensions previously
     ** registered using [sqlite3_auto_extension()].
     */
    -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
    +SQLITE_API void sqlite3_reset_auto_extension(void);
     
     /*
     ** The interface to the virtual-table mechanism is currently considered
    @@ -6093,13 +6243,13 @@ struct sqlite3_index_info {
     ** interface is equivalent to sqlite3_create_module_v2() with a NULL
     ** destructor.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
    +SQLITE_API int sqlite3_create_module(
       sqlite3 *db,               /* SQLite connection to register module with */
       const char *zName,         /* Name of the module */
       const sqlite3_module *p,   /* Methods for the module */
       void *pClientData          /* Client data for xCreate/xConnect */
     );
    -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
    +SQLITE_API int sqlite3_create_module_v2(
       sqlite3 *db,               /* SQLite connection to register module with */
       const char *zName,         /* Name of the module */
       const sqlite3_module *p,   /* Methods for the module */
    @@ -6162,7 +6312,7 @@ struct sqlite3_vtab_cursor {
     ** to declare the format (the names and datatypes of the columns) of
     ** the virtual tables they implement.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
    +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
     
     /*
     ** CAPI3REF: Overload A Function For A Virtual Table
    @@ -6181,7 +6331,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
     ** purpose is to be a placeholder function that can be overloaded
     ** by a [virtual table].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
    +SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
     
     /*
     ** The interface to the virtual-table mechanism defined above (back up
    @@ -6280,7 +6430,7 @@ typedef struct sqlite3_blob sqlite3_blob;
     ** To avoid a resource leak, every open [BLOB handle] should eventually
     ** be released by a call to [sqlite3_blob_close()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
    +SQLITE_API int sqlite3_blob_open(
       sqlite3*,
       const char *zDb,
       const char *zTable,
    @@ -6313,7 +6463,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
     **
     ** ^This function sets the database handle error code and message.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
    +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
     
     /*
     ** CAPI3REF: Close A BLOB Handle
    @@ -6336,7 +6486,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64)
     ** is passed a valid open blob handle, the values returned by the 
     ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
    +SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
     
     /*
     ** CAPI3REF: Return The Size Of An Open BLOB
    @@ -6352,7 +6502,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
     ** been closed by [sqlite3_blob_close()].  Passing any other pointer in
     ** to this routine results in undefined and probably undesirable behavior.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
    +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
     
     /*
     ** CAPI3REF: Read Data From A BLOB Incrementally
    @@ -6381,7 +6531,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
     **
     ** See also: [sqlite3_blob_write()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
    +SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
     
     /*
     ** CAPI3REF: Write Data Into A BLOB Incrementally
    @@ -6423,7 +6573,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N,
     **
     ** See also: [sqlite3_blob_read()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
    +SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
     
     /*
     ** CAPI3REF: Virtual File System Objects
    @@ -6454,9 +6604,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z,
     ** ^(If the default VFS is unregistered, another VFS is chosen as
     ** the default.  The choice for the new VFS is arbitrary.)^
     */
    -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
    -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
    +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
    +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
     
     /*
     ** CAPI3REF: Mutexes
    @@ -6572,11 +6722,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
     **
     ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
     */
    -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
    +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
    +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
     
     /*
     ** CAPI3REF: Mutex Methods Object
    @@ -6686,8 +6836,8 @@ struct sqlite3_mutex_methods {
     ** interface should also return 1 when given a NULL pointer.
     */
     #ifndef NDEBUG
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
     #endif
     
     /*
    @@ -6727,7 +6877,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
     ** ^If the [threading mode] is Single-thread or Multi-thread then this
     ** routine returns a NULL pointer.
     */
    -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
    +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
     
     /*
     ** CAPI3REF: Low-Level Control Of Database Files
    @@ -6762,7 +6912,7 @@ SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
     **
     ** See also: [SQLITE_FCNTL_LOCKSTATE]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
    +SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
     
     /*
     ** CAPI3REF: Testing Interface
    @@ -6781,7 +6931,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName
     ** Unlike most of the SQLite API, this function is not guaranteed to
     ** operate consistently from one release to the next.
     */
    -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
    +SQLITE_API int sqlite3_test_control(int op, ...);
     
     /*
     ** CAPI3REF: Testing Interface Operation Codes
    @@ -6844,8 +6994,8 @@ SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
     **
     ** See also: [sqlite3_db_status()]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    -SQLITE_API int SQLITE_STDCALL sqlite3_status64(
    +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    +SQLITE_API int sqlite3_status64(
       int op,
       sqlite3_int64 *pCurrent,
       sqlite3_int64 *pHighwater,
    @@ -6970,7 +7120,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
     **
     ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
    +SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
     
     /*
     ** CAPI3REF: Status Parameters for database connections
    @@ -7016,6 +7166,18 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
     ** memory used by all pager caches associated with the database connection.)^
     ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
     **
    +** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] 
    +** ^(
    SQLITE_DBSTATUS_CACHE_USED_SHARED
    +**
    This parameter is similar to DBSTATUS_CACHE_USED, except that if a +** pager cache is shared between two or more connections the bytes of heap +** memory used by that pager cache is divided evenly between the attached +** connections.)^ In other words, if none of the pager caches associated +** with the database connection are shared, this request returns the same +** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are +** shared, the value returned by this call will be smaller than that returned +** by DBSTATUS_CACHE_USED. ^The highwater mark associated with +** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. +** ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
    SQLITE_DBSTATUS_SCHEMA_USED
    **
    This parameter returns the approximate number of bytes of heap ** memory used to store the schema for all databases associated @@ -7073,7 +7235,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int #define SQLITE_DBSTATUS_CACHE_MISS 8 #define SQLITE_DBSTATUS_CACHE_WRITE 9 #define SQLITE_DBSTATUS_DEFERRED_FKS 10 -#define SQLITE_DBSTATUS_MAX 10 /* Largest defined DBSTATUS */ +#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11 +#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */ /* @@ -7100,7 +7263,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int ** ** See also: [sqlite3_status()] and [sqlite3_db_status()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); +SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); /* ** CAPI3REF: Status Parameters for prepared statements @@ -7569,16 +7732,16 @@ typedef struct sqlite3_backup sqlite3_backup; ** same time as another thread is invoking sqlite3_backup_step() it is ** possible that they return invalid values. */ -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( +SQLITE_API sqlite3_backup *sqlite3_backup_init( sqlite3 *pDest, /* Destination database handle */ const char *zDestName, /* Destination database name */ sqlite3 *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); /* ** CAPI3REF: Unlock Notification @@ -7695,7 +7858,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); ** the special "DROP TABLE/INDEX" case, the extended error code is just ** SQLITE_LOCKED.)^ */ -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( +SQLITE_API int sqlite3_unlock_notify( sqlite3 *pBlocked, /* Waiting connection */ void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ void *pNotifyArg /* Argument to pass to xNotify */ @@ -7710,8 +7873,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( ** strings in a case-independent fashion, using the same definition of "case ** independence" that SQLite uses internally when comparing identifiers. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); -SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); +SQLITE_API int sqlite3_stricmp(const char *, const char *); +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); /* ** CAPI3REF: String Globbing @@ -7728,7 +7891,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); ** ** See also: [sqlite3_strlike()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); +SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr); /* ** CAPI3REF: String LIKE Matching @@ -7751,7 +7914,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zSt ** ** See also: [sqlite3_strglob()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); +SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); /* ** CAPI3REF: Error Logging Interface @@ -7774,7 +7937,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zSt ** a few hundred characters, it will be truncated to the length of the ** buffer. */ -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); /* ** CAPI3REF: Write-Ahead Log Commit Hook @@ -7810,7 +7973,7 @@ SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...) ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will ** overwrite any prior [sqlite3_wal_hook()] settings. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( +SQLITE_API void *sqlite3_wal_hook( sqlite3*, int(*)(void *,sqlite3*,const char*,int), void* @@ -7845,7 +8008,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( ** is only necessary if the default setting is found to be suboptimal ** for a particular application. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); /* ** CAPI3REF: Checkpoint a database @@ -7867,7 +8030,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); ** start a callback but which do not need the full power (and corresponding ** complication) of [sqlite3_wal_checkpoint_v2()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); +SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); /* ** CAPI3REF: Checkpoint a database @@ -7961,7 +8124,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zD ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface ** from SQL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( +SQLITE_API int sqlite3_wal_checkpoint_v2( sqlite3 *db, /* Database handle */ const char *zDb, /* Name of attached database (or NULL) */ int eMode, /* SQLITE_CHECKPOINT_* value */ @@ -7997,7 +8160,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options ** may be added in the future. */ -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); /* ** CAPI3REF: Virtual Table Configuration Options @@ -8050,7 +8213,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); ** of the SQL statement that triggered the call to the [xUpdate] method of the ** [virtual table]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); /* ** CAPI3REF: Conflict resolution modes @@ -8155,7 +8318,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); ** ** See also: [sqlite3_stmt_scanstatus_reset()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( +SQLITE_API int sqlite3_stmt_scanstatus( sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ int idx, /* Index of loop to report on */ int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ @@ -8171,7 +8334,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( ** This API is only available if the library is built with pre-processor ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. */ -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); /* ** CAPI3REF: Flush caches to disk mid-transaction @@ -8203,7 +8366,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** ^This function does not set the database handle error code or message ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); /* ** CAPI3REF: The pre-update hook. @@ -8229,7 +8392,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); ** ^The second parameter to the preupdate callback is a pointer to ** the [database connection] that registered the preupdate hook. ** ^The third parameter to the preupdate callback is one of the constants -** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the +** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the ** kind of update operation that is about to occur. ** ^(The fourth parameter to the preupdate callback is the name of the ** database within the database connection that is being modified. This @@ -8283,7 +8446,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); ** ** See also: [sqlite3_update_hook()] */ -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( sqlite3 *db, void(*xPreUpdate)( void *pCtx, /* Copy of third arg to preupdate_hook() */ @@ -8296,10 +8459,10 @@ SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( ), void* ); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); /* ** CAPI3REF: Low-level system error code @@ -8311,7 +8474,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 ** called to get back the underlying "errno" that caused the problem, such ** as ENOSPC, EAUTH, EISDIR, and so forth. */ -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); +SQLITE_API int sqlite3_system_errno(sqlite3*); /* ** CAPI3REF: Database Snapshot @@ -8361,7 +8524,7 @@ typedef struct sqlite3_snapshot sqlite3_snapshot; ** The [sqlite3_snapshot_get()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( sqlite3 *db, const char *zSchema, sqlite3_snapshot **ppSnapshot @@ -8399,7 +8562,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( ** The [sqlite3_snapshot_open()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( sqlite3 *db, const char *zSchema, sqlite3_snapshot *pSnapshot @@ -8416,7 +8579,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( ** The [sqlite3_snapshot_free()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); /* ** CAPI3REF: Compare the ages of two snapshot handles. @@ -8440,7 +8603,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3 ** snapshot than P2, zero if the two handles refer to the same database ** snapshot, and a positive value if P1 is a newer snapshot than P2. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( sqlite3_snapshot *p1, sqlite3_snapshot *p2 ); @@ -8456,7 +8619,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( #if 0 } /* End of the 'extern "C"' block */ #endif -#endif /* _SQLITE3_H_ */ +#endif /* SQLITE3_H */ /******** Begin file sqlite3rtree.h *********/ /* @@ -8498,7 +8661,7 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info; ** ** SELECT ... FROM WHERE MATCH $zGeom(... params ...) */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( +SQLITE_API int sqlite3_rtree_geometry_callback( sqlite3 *db, const char *zGeom, int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), @@ -8524,7 +8687,7 @@ struct sqlite3_rtree_geometry { ** ** SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...) */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( +SQLITE_API int sqlite3_rtree_query_callback( sqlite3 *db, const char *zQueryFunc, int (*xQueryFunc)(sqlite3_rtree_query_info*), @@ -10176,7 +10339,7 @@ struct Fts5ExtensionApi { ** behaviour. The structure methods are expected to function as follows: ** ** xCreate: -** This function is used to allocate and inititalize a tokenizer instance. +** This function is used to allocate and initialize a tokenizer instance. ** A tokenizer instance is required to actually tokenize text. ** ** The first argument passed to this function is a copy of the (void*) @@ -10436,7 +10599,6 @@ struct fts5_api { #endif /* _FTS5_H */ - /******** End of fts5.h *********/ /************** End of sqlite3.h *********************************************/ @@ -10734,7 +10896,7 @@ struct fts5_api { ** the SQLITE_DISABLE_INTRINSIC define. */ #if !defined(SQLITE_DISABLE_INTRINSIC) -# if defined(_MSC_VER) && _MSC_VER>=1300 +# if defined(_MSC_VER) && _MSC_VER>=1400 # if !defined(_WIN32_WCE) # include # pragma intrinsic(_byteswap_ushort) @@ -11011,8 +11173,8 @@ SQLITE_PRIVATE void sqlite3Coverage(int); ** This is the header file for the generic hash-table implementation ** used in SQLite. */ -#ifndef _SQLITE_HASH_H_ -#define _SQLITE_HASH_H_ +#ifndef SQLITE_HASH_H +#define SQLITE_HASH_H /* Forward declarations of structures. */ typedef struct Hash Hash; @@ -11092,7 +11254,7 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*); */ /* #define sqliteHashCount(H) ((H)->count) // NOT USED */ -#endif /* _SQLITE_HASH_H_ */ +#endif /* SQLITE_HASH_H */ /************** End of hash.h ************************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -11740,8 +11902,8 @@ struct BusyHandler { #define SQLITE_WSD const #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) -SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J); -SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L); +SQLITE_API int sqlite3_wsd_init(int N, int J); +SQLITE_API void *sqlite3_wsd_find(void *K, int L); #else #define SQLITE_WSD #define GLOBAL(t,v) v @@ -11840,8 +12002,8 @@ typedef struct With With; ** subsystem. See comments in the source code for a detailed description ** of what each interface routine does. */ -#ifndef _BTREE_H_ -#define _BTREE_H_ +#ifndef SQLITE_BTREE_H +#define SQLITE_BTREE_H /* TODO: This definition is just included so other modules compile. It ** needs to be revisited. @@ -11866,6 +12028,7 @@ typedef struct With With; typedef struct Btree Btree; typedef struct BtCursor BtCursor; typedef struct BtShared BtShared; +typedef struct BtreePayload BtreePayload; SQLITE_PRIVATE int sqlite3BtreeOpen( @@ -12077,19 +12240,43 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*, u8 flags); #define BTREE_SAVEPOSITION 0x02 /* Leave cursor pointing at NEXT or PREV */ #define BTREE_AUXDELETE 0x04 /* not the primary delete operation */ -SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey, - const void *pData, int nData, - int nZero, int bias, int seekResult); +/* An instance of the BtreePayload object describes the content of a single +** entry in either an index or table btree. +** +** Index btrees (used for indexes and also WITHOUT ROWID tables) contain +** an arbitrary key and no data. These btrees have pKey,nKey set to their +** key and pData,nData,nZero set to zero. +** +** Table btrees (used for rowid tables) contain an integer rowid used as +** the key and passed in the nKey field. The pKey field is zero. +** pData,nData hold the content of the new entry. nZero extra zero bytes +** are appended to the end of the content when constructing the entry. +** +** This object is used to pass information into sqlite3BtreeInsert(). The +** same information used to be passed as five separate parameters. But placing +** the information into this object helps to keep the interface more +** organized and understandable, and it also helps the resulting code to +** run a little faster by using fewer registers for parameter passing. +*/ +struct BtreePayload { + const void *pKey; /* Key content for indexes. NULL for tables */ + sqlite3_int64 nKey; /* Size of pKey for indexes. PRIMARY KEY for tabs */ + const void *pData; /* Data for tables. NULL for indexes */ + int nData; /* Size of pData. 0 if none. */ + int nZero; /* Extra zero data appended after pData,nData */ +}; + +SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload, + int bias, int seekResult); SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes); SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*); SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize); +SQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor*); SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, u32 *pAmt); -SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, u32 *pAmt); -SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize); +SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt); +SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*); SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); @@ -12130,11 +12317,13 @@ SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*); SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*); SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*); SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*); +SQLITE_PRIVATE int sqlite3BtreeConnectionCount(Btree*); #else # define sqlite3BtreeEnter(X) # define sqlite3BtreeEnterAll(X) # define sqlite3BtreeSharable(X) 0 # define sqlite3BtreeEnterCursor(X) +# define sqlite3BtreeConnectionCount(X) 1 #endif #if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE @@ -12159,7 +12348,7 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*); #endif -#endif /* _BTREE_H_ */ +#endif /* SQLITE_BTREE_H */ /************** End of btree.h ***********************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -12182,8 +12371,8 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*); ** or VDBE. The VDBE implements an abstract machine that runs a ** simple program to access and modify the underlying database. */ -#ifndef _SQLITE_VDBE_H_ -#define _SQLITE_VDBE_H_ +#ifndef SQLITE_VDBE_H +#define SQLITE_VDBE_H /* #include */ /* @@ -12368,17 +12557,17 @@ typedef struct VdbeOpList VdbeOpList; #define OP_NoConflict 29 /* synopsis: key=r[P3@P4] */ #define OP_NotFound 30 /* synopsis: key=r[P3@P4] */ #define OP_Found 31 /* synopsis: key=r[P3@P4] */ -#define OP_NotExists 32 /* synopsis: intkey=r[P3] */ -#define OP_Last 33 +#define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */ +#define OP_NotExists 33 /* synopsis: intkey=r[P3] */ #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */ #define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */ -#define OP_Ne 36 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */ -#define OP_Eq 37 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */ -#define OP_Gt 38 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */ -#define OP_Le 39 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */ -#define OP_Lt 40 /* same as TK_LT, synopsis: if r[P1]=r[P3] goto P2 */ -#define OP_SorterSort 42 +#define OP_Ne 36 /* same as TK_NE, synopsis: IF r[P3]!=r[P1] */ +#define OP_Eq 37 /* same as TK_EQ, synopsis: IF r[P3]==r[P1] */ +#define OP_Gt 38 /* same as TK_GT, synopsis: IF r[P3]>r[P1] */ +#define OP_Le 39 /* same as TK_LE, synopsis: IF r[P3]<=r[P1] */ +#define OP_Lt 40 /* same as TK_LT, synopsis: IF r[P3]=r[P1] */ +#define OP_Last 42 #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */ #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */ #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<0 then r[P1]-=P3, goto P2 */ -#define OP_IfNotZero 65 /* synopsis: if r[P1]!=0 then r[P1]-=P3, goto P2 */ -#define OP_DecrJumpZero 66 /* synopsis: if (--r[P1])==0 goto P2 */ -#define OP_IncrVacuum 67 -#define OP_VNext 68 -#define OP_Init 69 /* synopsis: Start at P2 */ -#define OP_Return 70 -#define OP_EndCoroutine 71 -#define OP_HaltIfNull 72 /* synopsis: if r[P3]=null halt */ -#define OP_Halt 73 -#define OP_Integer 74 /* synopsis: r[P2]=P1 */ -#define OP_Int64 75 /* synopsis: r[P2]=P4 */ -#define OP_String 76 /* synopsis: r[P2]='P4' (len=P1) */ -#define OP_Null 77 /* synopsis: r[P2..P3]=NULL */ -#define OP_SoftNull 78 /* synopsis: r[P1]=NULL */ -#define OP_Blob 79 /* synopsis: r[P2]=P4 (len=P1) */ -#define OP_Variable 80 /* synopsis: r[P2]=parameter(P1,P4) */ -#define OP_Move 81 /* synopsis: r[P2@P3]=r[P1@P3] */ -#define OP_Copy 82 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */ -#define OP_SCopy 83 /* synopsis: r[P2]=r[P1] */ -#define OP_IntCopy 84 /* synopsis: r[P2]=r[P1] */ -#define OP_ResultRow 85 /* synopsis: output=r[P1@P2] */ -#define OP_CollSeq 86 -#define OP_Function0 87 /* synopsis: r[P3]=func(r[P2@P5]) */ -#define OP_Function 88 /* synopsis: r[P3]=func(r[P2@P5]) */ -#define OP_AddImm 89 /* synopsis: r[P1]=r[P1]+P2 */ -#define OP_RealAffinity 90 -#define OP_Cast 91 /* synopsis: affinity(r[P1]) */ -#define OP_Permutation 92 -#define OP_Compare 93 /* synopsis: r[P1@P3] <-> r[P2@P3] */ -#define OP_Column 94 /* synopsis: r[P3]=PX */ -#define OP_Affinity 95 /* synopsis: affinity(r[P1@P2]) */ -#define OP_MakeRecord 96 /* synopsis: r[P3]=mkrec(r[P1@P2]) */ +#define OP_Sort 55 +#define OP_Rewind 56 +#define OP_IdxLE 57 /* synopsis: key=r[P3@P4] */ +#define OP_IdxGT 58 /* synopsis: key=r[P3@P4] */ +#define OP_IdxLT 59 /* synopsis: key=r[P3@P4] */ +#define OP_IdxGE 60 /* synopsis: key=r[P3@P4] */ +#define OP_RowSetRead 61 /* synopsis: r[P3]=rowset(P1) */ +#define OP_RowSetTest 62 /* synopsis: if r[P3] in rowset(P1) goto P2 */ +#define OP_Program 63 +#define OP_FkIfZero 64 /* synopsis: if fkctr[P1]==0 goto P2 */ +#define OP_IfPos 65 /* synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */ +#define OP_IfNotZero 66 /* synopsis: if r[P1]!=0 then r[P1]-=P3, goto P2 */ +#define OP_DecrJumpZero 67 /* synopsis: if (--r[P1])==0 goto P2 */ +#define OP_IncrVacuum 68 +#define OP_VNext 69 +#define OP_Init 70 /* synopsis: Start at P2 */ +#define OP_Return 71 +#define OP_EndCoroutine 72 +#define OP_HaltIfNull 73 /* synopsis: if r[P3]=null halt */ +#define OP_Halt 74 +#define OP_Integer 75 /* synopsis: r[P2]=P1 */ +#define OP_Int64 76 /* synopsis: r[P2]=P4 */ +#define OP_String 77 /* synopsis: r[P2]='P4' (len=P1) */ +#define OP_Null 78 /* synopsis: r[P2..P3]=NULL */ +#define OP_SoftNull 79 /* synopsis: r[P1]=NULL */ +#define OP_Blob 80 /* synopsis: r[P2]=P4 (len=P1) */ +#define OP_Variable 81 /* synopsis: r[P2]=parameter(P1,P4) */ +#define OP_Move 82 /* synopsis: r[P2@P3]=r[P1@P3] */ +#define OP_Copy 83 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */ +#define OP_SCopy 84 /* synopsis: r[P2]=r[P1] */ +#define OP_IntCopy 85 /* synopsis: r[P2]=r[P1] */ +#define OP_ResultRow 86 /* synopsis: output=r[P1@P2] */ +#define OP_CollSeq 87 +#define OP_Function0 88 /* synopsis: r[P3]=func(r[P2@P5]) */ +#define OP_Function 89 /* synopsis: r[P3]=func(r[P2@P5]) */ +#define OP_AddImm 90 /* synopsis: r[P1]=r[P1]+P2 */ +#define OP_RealAffinity 91 +#define OP_Cast 92 /* synopsis: affinity(r[P1]) */ +#define OP_Permutation 93 +#define OP_Compare 94 /* synopsis: r[P1@P3] <-> r[P2@P3] */ +#define OP_Column 95 /* synopsis: r[P3]=PX */ +#define OP_Affinity 96 /* synopsis: affinity(r[P1@P2]) */ #define OP_String8 97 /* same as TK_STRING, synopsis: r[P2]='P4' */ -#define OP_Count 98 /* synopsis: r[P2]=count() */ -#define OP_ReadCookie 99 -#define OP_SetCookie 100 -#define OP_ReopenIdx 101 /* synopsis: root=P2 iDb=P3 */ -#define OP_OpenRead 102 /* synopsis: root=P2 iDb=P3 */ -#define OP_OpenWrite 103 /* synopsis: root=P2 iDb=P3 */ -#define OP_OpenAutoindex 104 /* synopsis: nColumn=P2 */ -#define OP_OpenEphemeral 105 /* synopsis: nColumn=P2 */ -#define OP_SorterOpen 106 -#define OP_SequenceTest 107 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */ -#define OP_OpenPseudo 108 /* synopsis: P3 columns in r[P2] */ -#define OP_Close 109 -#define OP_ColumnsUsed 110 -#define OP_Sequence 111 /* synopsis: r[P2]=cursor[P1].ctr++ */ -#define OP_NewRowid 112 /* synopsis: r[P2]=rowid */ -#define OP_Insert 113 /* synopsis: intkey=r[P3] data=r[P2] */ -#define OP_InsertInt 114 /* synopsis: intkey=P3 data=r[P2] */ -#define OP_Delete 115 -#define OP_ResetCount 116 -#define OP_SorterCompare 117 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */ -#define OP_SorterData 118 /* synopsis: r[P2]=data */ -#define OP_RowKey 119 /* synopsis: r[P2]=key */ -#define OP_RowData 120 /* synopsis: r[P2]=data */ -#define OP_Rowid 121 /* synopsis: r[P2]=rowid */ -#define OP_NullRow 122 -#define OP_SorterInsert 123 -#define OP_IdxInsert 124 /* synopsis: key=r[P2] */ -#define OP_IdxDelete 125 /* synopsis: key=r[P2@P3] */ -#define OP_Seek 126 /* synopsis: Move P3 to P1.rowid */ -#define OP_IdxRowid 127 /* synopsis: r[P2]=rowid */ -#define OP_Destroy 128 -#define OP_Clear 129 -#define OP_ResetSorter 130 -#define OP_CreateIndex 131 /* synopsis: r[P2]=root iDb=P1 */ -#define OP_CreateTable 132 /* synopsis: r[P2]=root iDb=P1 */ +#define OP_MakeRecord 98 /* synopsis: r[P3]=mkrec(r[P1@P2]) */ +#define OP_Count 99 /* synopsis: r[P2]=count() */ +#define OP_ReadCookie 100 +#define OP_SetCookie 101 +#define OP_ReopenIdx 102 /* synopsis: root=P2 iDb=P3 */ +#define OP_OpenRead 103 /* synopsis: root=P2 iDb=P3 */ +#define OP_OpenWrite 104 /* synopsis: root=P2 iDb=P3 */ +#define OP_OpenAutoindex 105 /* synopsis: nColumn=P2 */ +#define OP_OpenEphemeral 106 /* synopsis: nColumn=P2 */ +#define OP_SorterOpen 107 +#define OP_SequenceTest 108 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */ +#define OP_OpenPseudo 109 /* synopsis: P3 columns in r[P2] */ +#define OP_Close 110 +#define OP_ColumnsUsed 111 +#define OP_Sequence 112 /* synopsis: r[P2]=cursor[P1].ctr++ */ +#define OP_NewRowid 113 /* synopsis: r[P2]=rowid */ +#define OP_Insert 114 /* synopsis: intkey=r[P3] data=r[P2] */ +#define OP_InsertInt 115 /* synopsis: intkey=P3 data=r[P2] */ +#define OP_Delete 116 +#define OP_ResetCount 117 +#define OP_SorterCompare 118 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */ +#define OP_SorterData 119 /* synopsis: r[P2]=data */ +#define OP_RowKey 120 /* synopsis: r[P2]=key */ +#define OP_RowData 121 /* synopsis: r[P2]=data */ +#define OP_Rowid 122 /* synopsis: r[P2]=rowid */ +#define OP_NullRow 123 +#define OP_SorterInsert 124 +#define OP_IdxInsert 125 /* synopsis: key=r[P2] */ +#define OP_IdxDelete 126 /* synopsis: key=r[P2@P3] */ +#define OP_Seek 127 /* synopsis: Move P3 to P1.rowid */ +#define OP_IdxRowid 128 /* synopsis: r[P2]=rowid */ +#define OP_Destroy 129 +#define OP_Clear 130 +#define OP_ResetSorter 131 +#define OP_CreateIndex 132 /* synopsis: r[P2]=root iDb=P1 */ #define OP_Real 133 /* same as TK_FLOAT, synopsis: r[P2]=P4 */ -#define OP_ParseSchema 134 -#define OP_LoadAnalysis 135 -#define OP_DropTable 136 -#define OP_DropIndex 137 -#define OP_DropTrigger 138 -#define OP_IntegrityCk 139 -#define OP_RowSetAdd 140 /* synopsis: rowset(P1)=r[P2] */ -#define OP_Param 141 -#define OP_FkCounter 142 /* synopsis: fkctr[P1]+=P2 */ -#define OP_MemMax 143 /* synopsis: r[P1]=max(r[P1],r[P2]) */ -#define OP_OffsetLimit 144 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */ -#define OP_AggStep0 145 /* synopsis: accum=r[P3] step(r[P2@P5]) */ -#define OP_AggStep 146 /* synopsis: accum=r[P3] step(r[P2@P5]) */ -#define OP_AggFinal 147 /* synopsis: accum=r[P1] N=P2 */ -#define OP_Expire 148 -#define OP_TableLock 149 /* synopsis: iDb=P1 root=P2 write=P3 */ -#define OP_VBegin 150 -#define OP_VCreate 151 -#define OP_VDestroy 152 -#define OP_VOpen 153 -#define OP_VColumn 154 /* synopsis: r[P3]=vcolumn(P2) */ -#define OP_VRename 155 -#define OP_Pagecount 156 -#define OP_MaxPgcnt 157 -#define OP_CursorHint 158 -#define OP_Noop 159 -#define OP_Explain 160 +#define OP_CreateTable 134 /* synopsis: r[P2]=root iDb=P1 */ +#define OP_ParseSchema 135 +#define OP_LoadAnalysis 136 +#define OP_DropTable 137 +#define OP_DropIndex 138 +#define OP_DropTrigger 139 +#define OP_IntegrityCk 140 +#define OP_RowSetAdd 141 /* synopsis: rowset(P1)=r[P2] */ +#define OP_Param 142 +#define OP_FkCounter 143 /* synopsis: fkctr[P1]+=P2 */ +#define OP_MemMax 144 /* synopsis: r[P1]=max(r[P1],r[P2]) */ +#define OP_OffsetLimit 145 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */ +#define OP_AggStep0 146 /* synopsis: accum=r[P3] step(r[P2@P5]) */ +#define OP_AggStep 147 /* synopsis: accum=r[P3] step(r[P2@P5]) */ +#define OP_AggFinal 148 /* synopsis: accum=r[P1] N=P2 */ +#define OP_Expire 149 +#define OP_TableLock 150 /* synopsis: iDb=P1 root=P2 write=P3 */ +#define OP_VBegin 151 +#define OP_VCreate 152 +#define OP_VDestroy 153 +#define OP_VOpen 154 +#define OP_VColumn 155 /* synopsis: r[P3]=vcolumn(P2) */ +#define OP_VRename 156 +#define OP_Pagecount 157 +#define OP_MaxPgcnt 158 +#define OP_CursorHint 159 +#define OP_Noop 160 +#define OP_Explain 161 /* Properties such as "out2" or "jump" that are specified in ** comments following the "case" for each opcode in the vdbe.c @@ -12513,23 +12703,23 @@ typedef struct VdbeOpList VdbeOpList; /* 8 */ 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01,\ /* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0x03, 0x03, 0x09,\ /* 24 */ 0x09, 0x09, 0x09, 0x26, 0x26, 0x09, 0x09, 0x09,\ -/* 32 */ 0x09, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\ +/* 32 */ 0x09, 0x09, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\ /* 40 */ 0x0b, 0x0b, 0x01, 0x26, 0x26, 0x26, 0x26, 0x26,\ /* 48 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x01, 0x12, 0x01,\ -/* 56 */ 0x01, 0x01, 0x01, 0x01, 0x23, 0x0b, 0x01, 0x01,\ -/* 64 */ 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x02, 0x02,\ -/* 72 */ 0x08, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10,\ -/* 80 */ 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00,\ -/* 88 */ 0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,\ -/* 96 */ 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,\ -/* 104 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\ -/* 112 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 120 */ 0x00, 0x10, 0x00, 0x04, 0x04, 0x00, 0x00, 0x10,\ -/* 128 */ 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00,\ -/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\ -/* 144 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 152 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\ -/* 160 */ 0x00,} +/* 56 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x23, 0x0b, 0x01,\ +/* 64 */ 0x01, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x02,\ +/* 72 */ 0x02, 0x08, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00,\ +/* 80 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\ +/* 88 */ 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00,\ +/* 96 */ 0x00, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00,\ +/* 104 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ +/* 112 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ +/* 120 */ 0x00, 0x00, 0x10, 0x00, 0x04, 0x04, 0x00, 0x00,\ +/* 128 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00,\ +/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00,\ +/* 144 */ 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ +/* 152 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00,\ +/* 160 */ 0x00, 0x00,} /* The sqlite3P2Values() routine is able to run faster if it knows ** the value of the largest JUMP opcode. The smaller the maximum @@ -12537,7 +12727,7 @@ typedef struct VdbeOpList VdbeOpList; ** generated this include file strives to group all JUMP opcodes ** together near the beginning of the list. */ -#define SQLITE_MX_JUMP_OPCODE 69 /* Maximum JUMP opcode */ +#define SQLITE_MX_JUMP_OPCODE 70 /* Maximum JUMP opcode */ /************** End of opcodes.h *********************************************/ /************** Continuing where we left off in vdbe.h ***********************/ @@ -12684,7 +12874,7 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const ch # define sqlite3VdbeScanStatus(a,b,c,d,e) #endif -#endif +#endif /* SQLITE_VDBE_H */ /************** End of vdbe.h ************************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -12706,8 +12896,8 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const ch ** at a time and provides a journal for rollback. */ -#ifndef _PAGER_H_ -#define _PAGER_H_ +#ifndef SQLITE_PAGER_H +#define SQLITE_PAGER_H /* ** Default maximum size for persistent journal files. A negative @@ -12895,7 +13085,7 @@ SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*); SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*); SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *); -SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *); +SQLITE_PRIVATE void sqlite3PagerClearCache(Pager*); SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *); /* Functions used to truncate the database file. */ @@ -12922,7 +13112,7 @@ SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); # define enable_simulated_io_errors() #endif -#endif /* _PAGER_H_ */ +#endif /* SQLITE_PAGER_H */ /************** End of pager.h ***********************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -13160,8 +13350,8 @@ SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*); ** This file contains pre-processor directives related to operating system ** detection and/or setup. */ -#ifndef _OS_SETUP_H_ -#define _OS_SETUP_H_ +#ifndef SQLITE_OS_SETUP_H +#define SQLITE_OS_SETUP_H /* ** Figure out if we are dealing with Unix, Windows, or some other operating @@ -13201,7 +13391,7 @@ SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*); # endif #endif -#endif /* _OS_SETUP_H_ */ +#endif /* SQLITE_OS_SETUP_H */ /************** End of os_setup.h ********************************************/ /************** Continuing where we left off in os.h *************************/ @@ -13658,6 +13848,15 @@ SQLITE_PRIVATE void sqlite3CryptFunc(sqlite3_context*,int,sqlite3_value**); const char*); #endif +#ifndef SQLITE_OMIT_DEPRECATED +/* This is an extra SQLITE_TRACE macro that indicates "legacy" tracing +** in the style of sqlite3_trace() +*/ +#define SQLITE_TRACE_LEGACY 0x80 +#else +#define SQLITE_TRACE_LEGACY 0 +#endif /* SQLITE_OMIT_DEPRECATED */ + /* ** Each database connection is an instance of the following structure. @@ -13687,6 +13886,7 @@ struct sqlite3 { u8 suppressErr; /* Do not issue error messages if true */ u8 vtabOnConflict; /* Value to return for s3_vtab_on_conflict() */ u8 isTransactionSavepoint; /* True if the outermost savepoint is a TS */ + u8 mTrace; /* zero or more SQLITE_TRACE flags */ int nextPagesize; /* Pagesize after VACUUM if >0 */ u32 magic; /* Magic number for detect library misuse */ int nChange; /* Value returned by sqlite3_changes() */ @@ -13707,7 +13907,7 @@ struct sqlite3 { int nVDestroy; /* Number of active OP_VDestroy operations */ int nExtension; /* Number of loaded extensions */ void **aExtension; /* Array of shared library handles */ - void (*xTrace)(void*,const char*); /* Trace function */ + int (*xTrace)(u32,void*,void*,void*); /* Trace function */ void *pTraceArg; /* Argument to the trace function */ void (*xProfile)(void*,const char*,u64); /* Profiling function */ void *pProfileArg; /* Argument to profile function */ @@ -14902,7 +15102,7 @@ struct SrcList { int regReturn; /* Register holding return address of addrFillSub */ int regResult; /* Registers holding results of a co-routine */ struct { - u8 jointype; /* Type of join between this able and the previous */ + u8 jointype; /* Type of join between this table and the previous */ unsigned notIndexed :1; /* True if there is a NOT INDEXED clause */ unsigned isIndexedBy :1; /* True if there is an INDEXED BY clause */ unsigned isTabFunc :1; /* True if table-valued-function syntax */ @@ -14948,19 +15148,20 @@ struct SrcList { #define WHERE_ORDERBY_MIN 0x0001 /* ORDER BY processing for min() func */ #define WHERE_ORDERBY_MAX 0x0002 /* ORDER BY processing for max() func */ #define WHERE_ONEPASS_DESIRED 0x0004 /* Want to do one-pass UPDATE/DELETE */ -#define WHERE_DUPLICATES_OK 0x0008 /* Ok to return a row more than once */ -#define WHERE_OMIT_OPEN_CLOSE 0x0010 /* Table cursors are already open */ -#define WHERE_FORCE_TABLE 0x0020 /* Do not use an index-only search */ -#define WHERE_ONETABLE_ONLY 0x0040 /* Only code the 1st table in pTabList */ -#define WHERE_NO_AUTOINDEX 0x0080 /* Disallow automatic indexes */ -#define WHERE_GROUPBY 0x0100 /* pOrderBy is really a GROUP BY */ -#define WHERE_DISTINCTBY 0x0200 /* pOrderby is really a DISTINCT clause */ -#define WHERE_WANT_DISTINCT 0x0400 /* All output needs to be distinct */ -#define WHERE_SORTBYGROUP 0x0800 /* Support sqlite3WhereIsSorted() */ -#define WHERE_REOPEN_IDX 0x1000 /* Try to use OP_ReopenIdx */ -#define WHERE_ONEPASS_MULTIROW 0x2000 /* ONEPASS is ok with multiple rows */ -#define WHERE_USE_LIMIT 0x4000 /* There is a constant LIMIT clause */ -#define WHERE_SEEK_TABLE 0x8000 /* Do not defer seeks on main table */ +#define WHERE_ONEPASS_MULTIROW 0x0008 /* ONEPASS is ok with multiple rows */ +#define WHERE_DUPLICATES_OK 0x0010 /* Ok to return a row more than once */ +#define WHERE_OR_SUBCLAUSE 0x0020 /* Processing a sub-WHERE as part of + ** the OR optimization */ +#define WHERE_GROUPBY 0x0040 /* pOrderBy is really a GROUP BY */ +#define WHERE_DISTINCTBY 0x0080 /* pOrderby is really a DISTINCT clause */ +#define WHERE_WANT_DISTINCT 0x0100 /* All output needs to be distinct */ +#define WHERE_SORTBYGROUP 0x0200 /* Support sqlite3WhereIsSorted() */ +#define WHERE_SEEK_TABLE 0x0400 /* Do not defer seeks on main table */ +#define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */ + /* 0x1000 not currently used */ + /* 0x2000 not currently used */ +#define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */ + /* 0x8000 not currently used */ /* Allowed return values from sqlite3WhereIsDistinct() */ @@ -15663,6 +15864,7 @@ struct Walker { struct SrcCount *pSrcCount; /* Counting column references */ struct CCurHint *pCCurHint; /* Used by codeCursorHint() */ int *aiCol; /* array of column indexes */ + struct IdxCover *pIdxCover; /* Check for index coverage */ } u; }; @@ -15846,11 +16048,15 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull(void); # define sqlite3StackFree(D,P) sqlite3DbFree(D,P) #endif -#ifdef SQLITE_ENABLE_MEMSYS3 -SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void); -#endif +/* Do not allow both MEMSYS5 and MEMSYS3 to be defined together. If they +** are, disable MEMSYS3 +*/ #ifdef SQLITE_ENABLE_MEMSYS5 SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void); +#undef SQLITE_ENABLE_MEMSYS3 +#endif +#ifdef SQLITE_ENABLE_MEMSYS3 +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void); #endif @@ -16033,8 +16239,8 @@ SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*); SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*); SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*); SQLITE_PRIVATE Index *sqlite3AllocateIndexObject(sqlite3*,i16,int,char**); -SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*, - Expr*, int, int); +SQLITE_PRIVATE void sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*, + Expr*, int, int, u8); SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int); SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*); SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*, @@ -16053,6 +16259,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo*); SQLITE_PRIVATE LogEst sqlite3WhereOutputRowCount(WhereInfo*); SQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo*); SQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo*); +SQLITE_PRIVATE int sqlite3WhereOrderedInnerLoop(WhereInfo*); SQLITE_PRIVATE int sqlite3WhereIsSorted(WhereInfo*); SQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo*); SQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo*); @@ -16086,8 +16293,10 @@ SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int); SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int); SQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse*, Expr*, int, int); SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*); -SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*); -SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,int isView,struct SrcList_item *); +#define LOCATE_VIEW 0x01 +#define LOCATE_NOERR 0x02 +SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*); +SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,struct SrcList_item *); SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*); SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*); SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*); @@ -16099,6 +16308,7 @@ SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*, int); SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr*, Expr*, int); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*); +SQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx); SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr*, SrcList*); SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*); #ifndef SQLITE_OMIT_BUILTIN_TEST @@ -16650,7 +16860,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread*, void**); SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3*); #endif -#endif /* _SQLITEINT_H_ */ +#endif /* SQLITEINT_H */ /************** End of sqliteInt.h *******************************************/ /************** Begin file global.c ******************************************/ @@ -16985,6 +17195,15 @@ static const char * const azCompileOpt[] = { #if SQLITE_CHECK_PAGES "CHECK_PAGES", #endif +#if defined(__clang__) && defined(__clang_major__) + "COMPILER=clang-" CTIMEOPT_VAL(__clang_major__) "." + CTIMEOPT_VAL(__clang_minor__) "." + CTIMEOPT_VAL(__clang_patchlevel__), +#elif defined(_MSC_VER) + "COMPILER=msvc-" CTIMEOPT_VAL(_MSC_VER), +#elif defined(__GNUC__) && defined(__VERSION__) + "COMPILER=gcc-" __VERSION__, +#endif #if SQLITE_COVERAGE_TEST "COVERAGE_TEST", #endif @@ -17004,7 +17223,7 @@ static const char * const azCompileOpt[] = { "DISABLE_LFS", #endif #if SQLITE_ENABLE_8_3_NAMES - "ENABLE_8_3_NAMES", + "ENABLE_8_3_NAMES=" CTIMEOPT_VAL(SQLITE_ENABLE_8_3_NAMES), #endif #if SQLITE_ENABLE_API_ARMOR "ENABLE_API_ARMOR", @@ -17344,7 +17563,7 @@ static const char * const azCompileOpt[] = { ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix ** is not required for a match. */ -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ +SQLITE_API int sqlite3_compileoption_used(const char *zOptName){ int i, n; #if SQLITE_ENABLE_API_ARMOR @@ -17372,7 +17591,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ ** Return the N-th compile-time option string. If N is out of range, ** return a NULL pointer. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ +SQLITE_API const char *sqlite3_compileoption_get(int N){ if( N>=0 && NaDb[i].pBt; if( pBt ){ Pager *pPager = sqlite3BtreePager(pBt); - totalUsed += sqlite3PagerMemUsed(pPager); + int nByte = sqlite3PagerMemUsed(pPager); + if( op==SQLITE_DBSTATUS_CACHE_USED_SHARED ){ + nByte = nByte / sqlite3BtreeConnectionCount(pBt); + } + totalUsed += nByte; } } sqlite3BtreeLeaveAll(db); @@ -19411,7 +19635,6 @@ static void currentTimeFunc( ){ time_t t; char *zFormat = (char *)sqlite3_user_data(context); - sqlite3 *db; sqlite3_int64 iT; struct tm *pTm; struct tm sNow; @@ -19480,9 +19703,7 @@ SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){ ** This file contains OS interface code that is common to all ** architectures. */ -#define _SQLITE_OS_C_ 1 /* #include "sqliteInt.h" */ -#undef _SQLITE_OS_C_ /* ** If we compile with the SQLITE_TEST macro set, then the following block @@ -19799,7 +20020,7 @@ static sqlite3_vfs * SQLITE_WSD vfsList = 0; ** Locate a VFS by name. If no name is given, simply return the ** first VFS on the list. */ -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){ sqlite3_vfs *pVfs = 0; #if SQLITE_THREADSAFE sqlite3_mutex *mutex; @@ -19845,7 +20066,7 @@ static void vfsUnlink(sqlite3_vfs *pVfs){ ** VFS multiple times. The new VFS becomes the default if makeDflt is ** true. */ -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ MUTEX_LOGIC(sqlite3_mutex *mutex;) #ifndef SQLITE_OMIT_AUTOINIT int rc = sqlite3_initialize(); @@ -19873,7 +20094,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDf /* ** Unregister a VFS so that it is no longer accessible. */ -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); #endif @@ -22224,7 +22445,7 @@ SQLITE_PRIVATE int sqlite3MutexEnd(void){ /* ** Retrieve a pointer to a static mutex or allocate a new dynamic one. */ -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){ #ifndef SQLITE_OMIT_AUTOINIT if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; @@ -22245,7 +22466,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){ /* ** Free a dynamic mutex. */ -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){ if( p ){ assert( sqlite3GlobalConfig.mutex.xMutexFree ); sqlite3GlobalConfig.mutex.xMutexFree(p); @@ -22256,7 +22477,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ ** Obtain the mutex p. If some other thread already has the mutex, block ** until it can be obtained. */ -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){ if( p ){ assert( sqlite3GlobalConfig.mutex.xMutexEnter ); sqlite3GlobalConfig.mutex.xMutexEnter(p); @@ -22267,7 +22488,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. */ -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){ int rc = SQLITE_OK; if( p ){ assert( sqlite3GlobalConfig.mutex.xMutexTry ); @@ -22282,7 +22503,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ ** is not currently entered. If a NULL pointer is passed as an argument ** this function is a no-op. */ -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){ if( p ){ assert( sqlite3GlobalConfig.mutex.xMutexLeave ); sqlite3GlobalConfig.mutex.xMutexLeave(p); @@ -22294,11 +22515,11 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are ** intended for use inside assert() statements. */ -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){ assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); } -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){ assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); } @@ -22995,8 +23216,8 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){ ** This file contains inline asm code for retrieving "high-performance" ** counters for x86 class CPUs. */ -#ifndef _HWTIME_H_ -#define _HWTIME_H_ +#ifndef SQLITE_HWTIME_H +#define SQLITE_HWTIME_H /* ** The following routine only works on pentium-class (or newer) processors. @@ -23064,7 +23285,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } #endif -#endif /* !defined(_HWTIME_H_) */ +#endif /* !defined(SQLITE_HWTIME_H) */ /************** End of hwtime.h **********************************************/ /************** Continuing where we left off in os_common.h ******************/ @@ -23154,8 +23375,8 @@ SQLITE_API extern int sqlite3_open_file_count; ** ** This file contains code that is specific to Windows. */ -#ifndef _OS_WIN_H_ -#define _OS_WIN_H_ +#ifndef SQLITE_OS_WIN_H +#define SQLITE_OS_WIN_H /* ** Include the primary Windows SDK header file. @@ -23227,7 +23448,7 @@ SQLITE_API extern int sqlite3_open_file_count; # define SQLITE_OS_WIN_THREADS 0 #endif -#endif /* _OS_WIN_H_ */ +#endif /* SQLITE_OS_WIN_H */ /************** End of os_win.h **********************************************/ /************** Continuing where we left off in mutex_w32.c ******************/ @@ -23330,8 +23551,8 @@ static int winMutex_isNt = -1; /* <0 means "need to query" */ */ static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */ -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ +SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */ +SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ static int winMutexInit(void){ /* The first to increment to 1 does actual initialization */ @@ -23631,7 +23852,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){ ** held by SQLite. An example of non-essential memory is memory used to ** cache database pages that are not currently in use. */ -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ +SQLITE_API int sqlite3_release_memory(int n){ #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT return sqlite3PcacheReleaseMemory(n); #else @@ -23690,7 +23911,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void){ ** that was invoked when memory usage grew too large. Now it is a ** no-op. */ -SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( +SQLITE_API int sqlite3_memory_alarm( void(*xCallback)(void *pArg, sqlite3_int64 used,int N), void *pArg, sqlite3_int64 iThreshold @@ -23706,7 +23927,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( ** Set the soft heap-size limit for the library. Passing a zero or ** negative value indicates no limit. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ +SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){ sqlite3_int64 priorLimit; sqlite3_int64 excess; sqlite3_int64 nUsed; @@ -23728,7 +23949,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); return priorLimit; } -SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ +SQLITE_API void sqlite3_soft_heap_limit(int n){ if( n<0 ) n = 0; sqlite3_soft_heap_limit64(n); } @@ -23797,7 +24018,7 @@ SQLITE_PRIVATE void sqlite3MallocEnd(void){ /* ** Return the amount of memory currently checked out. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ +SQLITE_API sqlite3_int64 sqlite3_memory_used(void){ sqlite3_int64 res, mx; sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); return res; @@ -23808,7 +24029,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ ** checked out since either the beginning of this process ** or since the most recent reset. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ sqlite3_int64 res, mx; sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); return mx; @@ -23888,13 +24109,13 @@ SQLITE_PRIVATE void *sqlite3Malloc(u64 n){ ** First make sure the memory subsystem is initialized, then do the ** allocation. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ +SQLITE_API void *sqlite3_malloc(int n){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif return n<=0 ? 0 : sqlite3Malloc(n); } -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif @@ -24037,7 +24258,7 @@ SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){ return db->lookaside.sz; } } -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ +SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){ assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); return p ? sqlite3GlobalConfig.m.xSize(p) : 0; @@ -24046,7 +24267,7 @@ SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ /* ** Free memory previously obtained from sqlite3Malloc(). */ -SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ +SQLITE_API void sqlite3_free(void *p){ if( p==0 ) return; /* IMP: R-49053-54554 */ assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); @@ -24155,14 +24376,14 @@ SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, u64 nBytes){ ** The public interface to sqlite3Realloc. Make sure that the memory ** subsystem is initialized prior to invoking sqliteRealloc. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ +SQLITE_API void *sqlite3_realloc(void *pOld, int n){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif if( n<0 ) n = 0; /* IMP: R-26507-47431 */ return sqlite3Realloc(pOld, n); } -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ +SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif @@ -25389,7 +25610,7 @@ SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){ ** Print into memory obtained from sqlite3_malloc(). Omit the internal ** %-conversion extensions. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){ +SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){ char *z; char zBase[SQLITE_PRINT_BUF_SIZE]; StrAccum acc; @@ -25413,7 +25634,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap ** Print into memory obtained from sqlite3_malloc()(). Omit the internal ** %-conversion extensions. */ -SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){ +SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){ va_list ap; char *z; #ifndef SQLITE_OMIT_AUTOINIT @@ -25438,7 +25659,7 @@ SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){ ** ** sqlite3_vsnprintf() is the varargs version. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ +SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ StrAccum acc; if( n<=0 ) return zBuf; #ifdef SQLITE_ENABLE_API_ARMOR @@ -25452,7 +25673,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char sqlite3VXPrintf(&acc, zFormat, ap); return sqlite3StrAccumFinish(&acc); } -SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ +SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ char *z; va_list ap; va_start(ap,zFormat); @@ -25488,7 +25709,7 @@ static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){ /* ** Format and write a message to the log if logging is enabled. */ -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){ +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){ va_list ap; /* Vararg list */ if( sqlite3GlobalConfig.xLog ){ va_start(ap, zFormat); @@ -25978,6 +26199,12 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m break; } #endif + case TK_MATCH: { + sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s", + pExpr->iTable, pExpr->iColumn, zFlgs); + sqlite3TreeViewExpr(pView, pExpr->pRight, 0); + break; + } default: { sqlite3TreeViewLine(pView, "op=%d", pExpr->op); break; @@ -26059,7 +26286,7 @@ static SQLITE_WSD struct sqlite3PrngType { /* ** Return N random bytes. */ -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ +SQLITE_API void sqlite3_randomness(int N, void *pBuf){ unsigned char t; unsigned char *zBuf = pBuf; @@ -27262,7 +27489,7 @@ SQLITE_PRIVATE void sqlite3TokenInit(Token *p, char *z){ ** case-independent fashion, using the same definition of "case ** independence" that SQLite uses internally when comparing identifiers. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){ +SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){ if( zLeft==0 ){ return zRight ? -1 : 0; }else if( zRight==0 ){ @@ -27283,7 +27510,7 @@ SQLITE_PRIVATE int sqlite3StrICmp(const char *zLeft, const char *zRight){ } return c; } -SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ +SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ register unsigned char *a, *b; if( zLeft==0 ){ return zRight ? -1 : 0; @@ -28761,17 +28988,17 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ /* 29 */ "NoConflict" OpHelp("key=r[P3@P4]"), /* 30 */ "NotFound" OpHelp("key=r[P3@P4]"), /* 31 */ "Found" OpHelp("key=r[P3@P4]"), - /* 32 */ "NotExists" OpHelp("intkey=r[P3]"), - /* 33 */ "Last" OpHelp(""), + /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"), + /* 33 */ "NotExists" OpHelp("intkey=r[P3]"), /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"), /* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"), - /* 36 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"), - /* 37 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"), - /* 38 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"), - /* 39 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"), - /* 40 */ "Lt" OpHelp("if r[P1]=r[P3] goto P2"), - /* 42 */ "SorterSort" OpHelp(""), + /* 36 */ "Ne" OpHelp("IF r[P3]!=r[P1]"), + /* 37 */ "Eq" OpHelp("IF r[P3]==r[P1]"), + /* 38 */ "Gt" OpHelp("IF r[P3]>r[P1]"), + /* 39 */ "Le" OpHelp("IF r[P3]<=r[P1]"), + /* 40 */ "Lt" OpHelp("IF r[P3]=r[P1]"), + /* 42 */ "Last" OpHelp(""), /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"), /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"), /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<0 then r[P1]-=P3, goto P2"), - /* 65 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"), - /* 66 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"), - /* 67 */ "IncrVacuum" OpHelp(""), - /* 68 */ "VNext" OpHelp(""), - /* 69 */ "Init" OpHelp("Start at P2"), - /* 70 */ "Return" OpHelp(""), - /* 71 */ "EndCoroutine" OpHelp(""), - /* 72 */ "HaltIfNull" OpHelp("if r[P3]=null halt"), - /* 73 */ "Halt" OpHelp(""), - /* 74 */ "Integer" OpHelp("r[P2]=P1"), - /* 75 */ "Int64" OpHelp("r[P2]=P4"), - /* 76 */ "String" OpHelp("r[P2]='P4' (len=P1)"), - /* 77 */ "Null" OpHelp("r[P2..P3]=NULL"), - /* 78 */ "SoftNull" OpHelp("r[P1]=NULL"), - /* 79 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"), - /* 80 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"), - /* 81 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"), - /* 82 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"), - /* 83 */ "SCopy" OpHelp("r[P2]=r[P1]"), - /* 84 */ "IntCopy" OpHelp("r[P2]=r[P1]"), - /* 85 */ "ResultRow" OpHelp("output=r[P1@P2]"), - /* 86 */ "CollSeq" OpHelp(""), - /* 87 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"), - /* 88 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"), - /* 89 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"), - /* 90 */ "RealAffinity" OpHelp(""), - /* 91 */ "Cast" OpHelp("affinity(r[P1])"), - /* 92 */ "Permutation" OpHelp(""), - /* 93 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"), - /* 94 */ "Column" OpHelp("r[P3]=PX"), - /* 95 */ "Affinity" OpHelp("affinity(r[P1@P2])"), - /* 96 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"), + /* 55 */ "Sort" OpHelp(""), + /* 56 */ "Rewind" OpHelp(""), + /* 57 */ "IdxLE" OpHelp("key=r[P3@P4]"), + /* 58 */ "IdxGT" OpHelp("key=r[P3@P4]"), + /* 59 */ "IdxLT" OpHelp("key=r[P3@P4]"), + /* 60 */ "IdxGE" OpHelp("key=r[P3@P4]"), + /* 61 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"), + /* 62 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"), + /* 63 */ "Program" OpHelp(""), + /* 64 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"), + /* 65 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"), + /* 66 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"), + /* 67 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"), + /* 68 */ "IncrVacuum" OpHelp(""), + /* 69 */ "VNext" OpHelp(""), + /* 70 */ "Init" OpHelp("Start at P2"), + /* 71 */ "Return" OpHelp(""), + /* 72 */ "EndCoroutine" OpHelp(""), + /* 73 */ "HaltIfNull" OpHelp("if r[P3]=null halt"), + /* 74 */ "Halt" OpHelp(""), + /* 75 */ "Integer" OpHelp("r[P2]=P1"), + /* 76 */ "Int64" OpHelp("r[P2]=P4"), + /* 77 */ "String" OpHelp("r[P2]='P4' (len=P1)"), + /* 78 */ "Null" OpHelp("r[P2..P3]=NULL"), + /* 79 */ "SoftNull" OpHelp("r[P1]=NULL"), + /* 80 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"), + /* 81 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"), + /* 82 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"), + /* 83 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"), + /* 84 */ "SCopy" OpHelp("r[P2]=r[P1]"), + /* 85 */ "IntCopy" OpHelp("r[P2]=r[P1]"), + /* 86 */ "ResultRow" OpHelp("output=r[P1@P2]"), + /* 87 */ "CollSeq" OpHelp(""), + /* 88 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"), + /* 89 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"), + /* 90 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"), + /* 91 */ "RealAffinity" OpHelp(""), + /* 92 */ "Cast" OpHelp("affinity(r[P1])"), + /* 93 */ "Permutation" OpHelp(""), + /* 94 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"), + /* 95 */ "Column" OpHelp("r[P3]=PX"), + /* 96 */ "Affinity" OpHelp("affinity(r[P1@P2])"), /* 97 */ "String8" OpHelp("r[P2]='P4'"), - /* 98 */ "Count" OpHelp("r[P2]=count()"), - /* 99 */ "ReadCookie" OpHelp(""), - /* 100 */ "SetCookie" OpHelp(""), - /* 101 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"), - /* 102 */ "OpenRead" OpHelp("root=P2 iDb=P3"), - /* 103 */ "OpenWrite" OpHelp("root=P2 iDb=P3"), - /* 104 */ "OpenAutoindex" OpHelp("nColumn=P2"), - /* 105 */ "OpenEphemeral" OpHelp("nColumn=P2"), - /* 106 */ "SorterOpen" OpHelp(""), - /* 107 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"), - /* 108 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"), - /* 109 */ "Close" OpHelp(""), - /* 110 */ "ColumnsUsed" OpHelp(""), - /* 111 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"), - /* 112 */ "NewRowid" OpHelp("r[P2]=rowid"), - /* 113 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"), - /* 114 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"), - /* 115 */ "Delete" OpHelp(""), - /* 116 */ "ResetCount" OpHelp(""), - /* 117 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"), - /* 118 */ "SorterData" OpHelp("r[P2]=data"), - /* 119 */ "RowKey" OpHelp("r[P2]=key"), - /* 120 */ "RowData" OpHelp("r[P2]=data"), - /* 121 */ "Rowid" OpHelp("r[P2]=rowid"), - /* 122 */ "NullRow" OpHelp(""), - /* 123 */ "SorterInsert" OpHelp(""), - /* 124 */ "IdxInsert" OpHelp("key=r[P2]"), - /* 125 */ "IdxDelete" OpHelp("key=r[P2@P3]"), - /* 126 */ "Seek" OpHelp("Move P3 to P1.rowid"), - /* 127 */ "IdxRowid" OpHelp("r[P2]=rowid"), - /* 128 */ "Destroy" OpHelp(""), - /* 129 */ "Clear" OpHelp(""), - /* 130 */ "ResetSorter" OpHelp(""), - /* 131 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"), - /* 132 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"), + /* 98 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"), + /* 99 */ "Count" OpHelp("r[P2]=count()"), + /* 100 */ "ReadCookie" OpHelp(""), + /* 101 */ "SetCookie" OpHelp(""), + /* 102 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"), + /* 103 */ "OpenRead" OpHelp("root=P2 iDb=P3"), + /* 104 */ "OpenWrite" OpHelp("root=P2 iDb=P3"), + /* 105 */ "OpenAutoindex" OpHelp("nColumn=P2"), + /* 106 */ "OpenEphemeral" OpHelp("nColumn=P2"), + /* 107 */ "SorterOpen" OpHelp(""), + /* 108 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"), + /* 109 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"), + /* 110 */ "Close" OpHelp(""), + /* 111 */ "ColumnsUsed" OpHelp(""), + /* 112 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"), + /* 113 */ "NewRowid" OpHelp("r[P2]=rowid"), + /* 114 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"), + /* 115 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"), + /* 116 */ "Delete" OpHelp(""), + /* 117 */ "ResetCount" OpHelp(""), + /* 118 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"), + /* 119 */ "SorterData" OpHelp("r[P2]=data"), + /* 120 */ "RowKey" OpHelp("r[P2]=key"), + /* 121 */ "RowData" OpHelp("r[P2]=data"), + /* 122 */ "Rowid" OpHelp("r[P2]=rowid"), + /* 123 */ "NullRow" OpHelp(""), + /* 124 */ "SorterInsert" OpHelp(""), + /* 125 */ "IdxInsert" OpHelp("key=r[P2]"), + /* 126 */ "IdxDelete" OpHelp("key=r[P2@P3]"), + /* 127 */ "Seek" OpHelp("Move P3 to P1.rowid"), + /* 128 */ "IdxRowid" OpHelp("r[P2]=rowid"), + /* 129 */ "Destroy" OpHelp(""), + /* 130 */ "Clear" OpHelp(""), + /* 131 */ "ResetSorter" OpHelp(""), + /* 132 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"), /* 133 */ "Real" OpHelp("r[P2]=P4"), - /* 134 */ "ParseSchema" OpHelp(""), - /* 135 */ "LoadAnalysis" OpHelp(""), - /* 136 */ "DropTable" OpHelp(""), - /* 137 */ "DropIndex" OpHelp(""), - /* 138 */ "DropTrigger" OpHelp(""), - /* 139 */ "IntegrityCk" OpHelp(""), - /* 140 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"), - /* 141 */ "Param" OpHelp(""), - /* 142 */ "FkCounter" OpHelp("fkctr[P1]+=P2"), - /* 143 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"), - /* 144 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"), - /* 145 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"), - /* 146 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"), - /* 147 */ "AggFinal" OpHelp("accum=r[P1] N=P2"), - /* 148 */ "Expire" OpHelp(""), - /* 149 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"), - /* 150 */ "VBegin" OpHelp(""), - /* 151 */ "VCreate" OpHelp(""), - /* 152 */ "VDestroy" OpHelp(""), - /* 153 */ "VOpen" OpHelp(""), - /* 154 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"), - /* 155 */ "VRename" OpHelp(""), - /* 156 */ "Pagecount" OpHelp(""), - /* 157 */ "MaxPgcnt" OpHelp(""), - /* 158 */ "CursorHint" OpHelp(""), - /* 159 */ "Noop" OpHelp(""), - /* 160 */ "Explain" OpHelp(""), + /* 134 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"), + /* 135 */ "ParseSchema" OpHelp(""), + /* 136 */ "LoadAnalysis" OpHelp(""), + /* 137 */ "DropTable" OpHelp(""), + /* 138 */ "DropIndex" OpHelp(""), + /* 139 */ "DropTrigger" OpHelp(""), + /* 140 */ "IntegrityCk" OpHelp(""), + /* 141 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"), + /* 142 */ "Param" OpHelp(""), + /* 143 */ "FkCounter" OpHelp("fkctr[P1]+=P2"), + /* 144 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"), + /* 145 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"), + /* 146 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"), + /* 147 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"), + /* 148 */ "AggFinal" OpHelp("accum=r[P1] N=P2"), + /* 149 */ "Expire" OpHelp(""), + /* 150 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"), + /* 151 */ "VBegin" OpHelp(""), + /* 152 */ "VCreate" OpHelp(""), + /* 153 */ "VDestroy" OpHelp(""), + /* 154 */ "VOpen" OpHelp(""), + /* 155 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"), + /* 156 */ "VRename" OpHelp(""), + /* 157 */ "Pagecount" OpHelp(""), + /* 158 */ "MaxPgcnt" OpHelp(""), + /* 159 */ "CursorHint" OpHelp(""), + /* 160 */ "Noop" OpHelp(""), + /* 161 */ "Explain" OpHelp(""), }; return azName[i]; } @@ -29239,8 +29467,8 @@ static pid_t randomnessPid = 0; ** This file contains inline asm code for retrieving "high-performance" ** counters for x86 class CPUs. */ -#ifndef _HWTIME_H_ -#define _HWTIME_H_ +#ifndef SQLITE_HWTIME_H +#define SQLITE_HWTIME_H /* ** The following routine only works on pentium-class (or newer) processors. @@ -29308,7 +29536,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } #endif -#endif /* !defined(_HWTIME_H_) */ +#endif /* !defined(SQLITE_HWTIME_H) */ /************** End of hwtime.h **********************************************/ /************** Continuing where we left off in os_common.h ******************/ @@ -36581,7 +36809,7 @@ static int proxyClose(sqlite3_file *id) { ** necessarily been initialized when this routine is called, and so they ** should not be used. */ -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ +SQLITE_API int sqlite3_os_init(void){ /* ** The following macro defines an initializer for an sqlite3_vfs object. ** The name of the VFS is NAME. The pAppData is a pointer to a pointer @@ -36680,7 +36908,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ ** to release dynamically allocated objects. But not on unix. ** This routine is a no-op for unix. */ -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ +SQLITE_API int sqlite3_os_end(void){ return SQLITE_OK; } @@ -36768,8 +36996,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ ** This file contains inline asm code for retrieving "high-performance" ** counters for x86 class CPUs. */ -#ifndef _HWTIME_H_ -#define _HWTIME_H_ +#ifndef SQLITE_HWTIME_H +#define SQLITE_HWTIME_H /* ** The following routine only works on pentium-class (or newer) processors. @@ -36837,7 +37065,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } #endif -#endif /* !defined(_HWTIME_H_) */ +#endif /* !defined(SQLITE_HWTIME_H) */ /************** End of hwtime.h **********************************************/ /************** Continuing where we left off in os_common.h ******************/ @@ -37178,6 +37406,17 @@ struct winFile { #endif }; +/* +** The winVfsAppData structure is used for the pAppData member for all of the +** Win32 VFS variants. +*/ +typedef struct winVfsAppData winVfsAppData; +struct winVfsAppData { + const sqlite3_io_methods *pMethod; /* The file I/O methods to use. */ + void *pAppData; /* The extra pAppData, if any. */ + BOOL bNoLock; /* Non-zero if locking is disabled. */ +}; + /* ** Allowed values for winFile.ctrlFlags */ @@ -38104,7 +38343,7 @@ static const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){ ** "pnLargest" argument, if non-zero, will be used to return the size of the ** largest committed free block in the heap, in bytes. */ -SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ +SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){ int rc = SQLITE_OK; UINT nLargest = 0; HANDLE hHeap; @@ -38144,7 +38383,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will ** be returned and no changes will be made to the Win32 native heap. */ -SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ +SQLITE_API int sqlite3_win32_reset_heap(){ int rc; MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ @@ -38189,7 +38428,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ ** (if available). */ -SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ +SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){ char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ @@ -38235,7 +38474,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int n static HANDLE sleepObj = NULL; #endif -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ +SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){ #if SQLITE_OS_WINRT if ( sleepObj==NULL ){ sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, @@ -38284,7 +38523,7 @@ SQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject){ ** This function determines if the machine is running a version of Windows ** based on the NT kernel. */ -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ +SQLITE_API int sqlite3_win32_is_nt(void){ #if SQLITE_OS_WINRT /* ** NOTE: The WinRT sub-platform is always assumed to be based on the NT @@ -38672,7 +38911,7 @@ static char *winUtf8ToMbcs(const char *zText, int useAnsi){ /* ** This is a public wrapper for the winUtf8ToUnicode() function. */ -SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){ +SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zText ){ (void)SQLITE_MISUSE_BKPT; @@ -38688,7 +38927,7 @@ SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText /* ** This is a public wrapper for the winUnicodeToUtf8() function. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ +SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zWideText ){ (void)SQLITE_MISUSE_BKPT; @@ -38704,7 +38943,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText) /* ** This is a public wrapper for the winMbcsToUtf8() function. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){ +SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zText ){ (void)SQLITE_MISUSE_BKPT; @@ -38720,7 +38959,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){ /* ** This is a public wrapper for the winMbcsToUtf8() function. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ +SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zText ){ (void)SQLITE_MISUSE_BKPT; @@ -38736,7 +38975,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, /* ** This is a public wrapper for the winUtf8ToMbcs() function. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){ +SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zText ){ (void)SQLITE_MISUSE_BKPT; @@ -38752,7 +38991,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){ /* ** This is a public wrapper for the winUtf8ToMbcs() function. */ -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ +SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ #ifdef SQLITE_ENABLE_API_ARMOR if( !zText ){ (void)SQLITE_MISUSE_BKPT; @@ -38772,7 +39011,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, ** argument is the name of the directory to use. The return value will be ** SQLITE_OK if successful. */ -SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ +SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ char **ppDirectory = 0; #ifndef SQLITE_OMIT_AUTOINIT int rc = sqlite3_initialize(); @@ -39499,7 +39738,12 @@ static int winClose(sqlite3_file *id){ }while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (sqlite3_win32_sleep(100), 1) ); #if SQLITE_OS_WINCE #define WINCE_DELETION_ATTEMPTS 3 - winceDestroyLock(pFile); + { + winVfsAppData *pAppData = (winVfsAppData*)pFile->pVfs->pAppData; + if( pAppData==NULL || !pAppData->bNoLock ){ + winceDestroyLock(pFile); + } + } if( pFile->zDeleteOnClose ){ int cnt = 0; while( @@ -40231,6 +40475,44 @@ static int winUnlock(sqlite3_file *id, int locktype){ return rc; } +/****************************************************************************** +****************************** No-op Locking ********************************** +** +** Of the various locking implementations available, this is by far the +** simplest: locking is ignored. No attempt is made to lock the database +** file for reading or writing. +** +** This locking mode is appropriate for use on read-only databases +** (ex: databases that are burned into CD-ROM, for example.) It can +** also be used if the application employs some external mechanism to +** prevent simultaneous access of the same database by two or more +** database connections. But there is a serious risk of database +** corruption if this locking mode is used in situations where multiple +** database connections are accessing the same database file at the same +** time and one or more of those connections are writing. +*/ + +static int winNolockLock(sqlite3_file *id, int locktype){ + UNUSED_PARAMETER(id); + UNUSED_PARAMETER(locktype); + return SQLITE_OK; +} + +static int winNolockCheckReservedLock(sqlite3_file *id, int *pResOut){ + UNUSED_PARAMETER(id); + UNUSED_PARAMETER(pResOut); + return SQLITE_OK; +} + +static int winNolockUnlock(sqlite3_file *id, int locktype){ + UNUSED_PARAMETER(id); + UNUSED_PARAMETER(locktype); + return SQLITE_OK; +} + +/******************* End of the no-op lock implementation ********************* +******************************************************************************/ + /* ** If *pArg is initially negative then this is a query. Set *pArg to ** 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. @@ -40509,12 +40791,12 @@ struct winShm { /* ** Apply advisory locks for all n bytes beginning at ofst. */ -#define _SHM_UNLCK 1 -#define _SHM_RDLCK 2 -#define _SHM_WRLCK 3 +#define WINSHM_UNLCK 1 +#define WINSHM_RDLCK 2 +#define WINSHM_WRLCK 3 static int winShmSystemLock( winShmNode *pFile, /* Apply locks to this open shared-memory segment */ - int lockType, /* _SHM_UNLCK, _SHM_RDLCK, or _SHM_WRLCK */ + int lockType, /* WINSHM_UNLCK, WINSHM_RDLCK, or WINSHM_WRLCK */ int ofst, /* Offset to first byte to be locked/unlocked */ int nByte /* Number of bytes to lock or unlock */ ){ @@ -40527,12 +40809,12 @@ static int winShmSystemLock( pFile->hFile.h, lockType, ofst, nByte)); /* Release/Acquire the system-level lock */ - if( lockType==_SHM_UNLCK ){ + if( lockType==WINSHM_UNLCK ){ rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0); }else{ /* Initialize the locking parameters */ DWORD dwFlags = LOCKFILE_FAIL_IMMEDIATELY; - if( lockType == _SHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK; + if( lockType == WINSHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK; rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0); } @@ -40544,7 +40826,7 @@ static int winShmSystemLock( } OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n", - pFile->hFile.h, (lockType == _SHM_UNLCK) ? "winUnlockFile" : + pFile->hFile.h, (lockType == WINSHM_UNLCK) ? "winUnlockFile" : "winLockFile", pFile->lastErrno, sqlite3ErrName(rc))); return rc; @@ -40672,7 +40954,7 @@ static int winOpenSharedMemory(winFile *pDbFd){ /* Check to see if another process is holding the dead-man switch. ** If not, truncate the file to zero length. */ - if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){ + if( winShmSystemLock(pShmNode, WINSHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){ rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0); if( rc!=SQLITE_OK ){ rc = winLogError(SQLITE_IOERR_SHMOPEN, osGetLastError(), @@ -40680,8 +40962,8 @@ static int winOpenSharedMemory(winFile *pDbFd){ } } if( rc==SQLITE_OK ){ - winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1); - rc = winShmSystemLock(pShmNode, _SHM_RDLCK, WIN_SHM_DMS, 1); + winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1); + rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, WIN_SHM_DMS, 1); } if( rc ) goto shm_open_err; } @@ -40710,7 +40992,7 @@ static int winOpenSharedMemory(winFile *pDbFd){ /* Jump here on any error */ shm_open_err: - winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1); + winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1); winShmPurge(pDbFd->pVfs, 0); /* This call frees pShmNode if required */ sqlite3_free(p); sqlite3_free(pNew); @@ -40799,7 +41081,7 @@ static int winShmLock( /* Unlock the system-level locks */ if( (mask & allMask)==0 ){ - rc = winShmSystemLock(pShmNode, _SHM_UNLCK, ofst+WIN_SHM_BASE, n); + rc = winShmSystemLock(pShmNode, WINSHM_UNLCK, ofst+WIN_SHM_BASE, n); }else{ rc = SQLITE_OK; } @@ -40827,7 +41109,7 @@ static int winShmLock( /* Get shared locks at the system level, if necessary */ if( rc==SQLITE_OK ){ if( (allShared & mask)==0 ){ - rc = winShmSystemLock(pShmNode, _SHM_RDLCK, ofst+WIN_SHM_BASE, n); + rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, ofst+WIN_SHM_BASE, n); }else{ rc = SQLITE_OK; } @@ -40852,7 +41134,7 @@ static int winShmLock( ** also mark the local connection as being locked. */ if( rc==SQLITE_OK ){ - rc = winShmSystemLock(pShmNode, _SHM_WRLCK, ofst+WIN_SHM_BASE, n); + rc = winShmSystemLock(pShmNode, WINSHM_WRLCK, ofst+WIN_SHM_BASE, n); if( rc==SQLITE_OK ){ assert( (p->sharedMask & mask)==0 ); p->exclMask |= mask; @@ -41295,6 +41577,44 @@ static const sqlite3_io_methods winIoMethod = { winUnfetch /* xUnfetch */ }; +/* +** This vector defines all the methods that can operate on an +** sqlite3_file for win32 without performing any locking. +*/ +static const sqlite3_io_methods winIoNolockMethod = { + 3, /* iVersion */ + winClose, /* xClose */ + winRead, /* xRead */ + winWrite, /* xWrite */ + winTruncate, /* xTruncate */ + winSync, /* xSync */ + winFileSize, /* xFileSize */ + winNolockLock, /* xLock */ + winNolockUnlock, /* xUnlock */ + winNolockCheckReservedLock, /* xCheckReservedLock */ + winFileControl, /* xFileControl */ + winSectorSize, /* xSectorSize */ + winDeviceCharacteristics, /* xDeviceCharacteristics */ + winShmMap, /* xShmMap */ + winShmLock, /* xShmLock */ + winShmBarrier, /* xShmBarrier */ + winShmUnmap, /* xShmUnmap */ + winFetch, /* xFetch */ + winUnfetch /* xUnfetch */ +}; + +static winVfsAppData winAppData = { + &winIoMethod, /* pMethod */ + 0, /* pAppData */ + 0 /* bNoLock */ +}; + +static winVfsAppData winNolockAppData = { + &winIoNolockMethod, /* pMethod */ + 0, /* pAppData */ + 1 /* bNoLock */ +}; + /**************************************************************************** **************************** sqlite3_vfs methods **************************** ** @@ -41627,7 +41947,7 @@ static int winIsDir(const void *zConverted){ ** Open a file. */ static int winOpen( - sqlite3_vfs *pVfs, /* Used to get maximum path name length */ + sqlite3_vfs *pVfs, /* Used to get maximum path length and AppData */ const char *zName, /* Name of the file (UTF-8) */ sqlite3_file *id, /* Write the SQLite file handle here */ int flags, /* Open mode flags */ @@ -41642,6 +41962,7 @@ static int winOpen( #if SQLITE_OS_WINCE int isTemp = 0; #endif + winVfsAppData *pAppData; winFile *pFile = (winFile*)id; void *zConverted; /* Filename in OS encoding */ const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */ @@ -41863,15 +42184,20 @@ static int winOpen( "rc=%s\n", h, zUtf8Name, dwDesiredAccess, pOutFlags, pOutFlags ? *pOutFlags : 0, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok")); + pAppData = (winVfsAppData*)pVfs->pAppData; + #if SQLITE_OS_WINCE - if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB - && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK - ){ - osCloseHandle(h); - sqlite3_free(zConverted); - sqlite3_free(zTmpname); - OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc))); - return rc; + { + if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB + && ((pAppData==NULL) || !pAppData->bNoLock) + && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK + ){ + osCloseHandle(h); + sqlite3_free(zConverted); + sqlite3_free(zTmpname); + OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc))); + return rc; + } } if( isTemp ){ pFile->zDeleteOnClose = zConverted; @@ -41882,7 +42208,7 @@ static int winOpen( } sqlite3_free(zTmpname); - pFile->pMethod = &winIoMethod; + pFile->pMethod = pAppData ? pAppData->pMethod : &winIoMethod; pFile->pVfs = pVfs; pFile->h = h; if( isReadonly ){ @@ -42157,6 +42483,18 @@ static int winFullPathname( int nFull, /* Size of output buffer in bytes */ char *zFull /* Output buffer */ ){ +#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__) + DWORD nByte; + void *zConverted; + char *zOut; +#endif + + /* If this path name begins with "/X:", where "X" is any alphabetic + ** character, discard the initial "/" from the pathname. + */ + if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){ + zRelative++; + } #if defined(__CYGWIN__) SimulateIOError( return SQLITE_ERROR ); @@ -42235,17 +42573,6 @@ static int winFullPathname( #endif #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__) - DWORD nByte; - void *zConverted; - char *zOut; - - /* If this path name begins with "/X:", where "X" is any alphabetic - ** character, discard the initial "/" from the pathname. - */ - if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){ - zRelative++; - } - /* It's odd to simulate an io-error here, but really this is just ** using the io-error infrastructure to test that SQLite handles this ** function failing. This function could fail if, for example, the @@ -42602,55 +42929,105 @@ static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ /* ** Initialize and deinitialize the operating system interface. */ -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ +SQLITE_API int sqlite3_os_init(void){ static sqlite3_vfs winVfs = { - 3, /* iVersion */ - sizeof(winFile), /* szOsFile */ + 3, /* iVersion */ + sizeof(winFile), /* szOsFile */ SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ - 0, /* pNext */ - "win32", /* zName */ - 0, /* pAppData */ - winOpen, /* xOpen */ - winDelete, /* xDelete */ - winAccess, /* xAccess */ - winFullPathname, /* xFullPathname */ - winDlOpen, /* xDlOpen */ - winDlError, /* xDlError */ - winDlSym, /* xDlSym */ - winDlClose, /* xDlClose */ - winRandomness, /* xRandomness */ - winSleep, /* xSleep */ - winCurrentTime, /* xCurrentTime */ - winGetLastError, /* xGetLastError */ - winCurrentTimeInt64, /* xCurrentTimeInt64 */ - winSetSystemCall, /* xSetSystemCall */ - winGetSystemCall, /* xGetSystemCall */ - winNextSystemCall, /* xNextSystemCall */ + 0, /* pNext */ + "win32", /* zName */ + &winAppData, /* pAppData */ + winOpen, /* xOpen */ + winDelete, /* xDelete */ + winAccess, /* xAccess */ + winFullPathname, /* xFullPathname */ + winDlOpen, /* xDlOpen */ + winDlError, /* xDlError */ + winDlSym, /* xDlSym */ + winDlClose, /* xDlClose */ + winRandomness, /* xRandomness */ + winSleep, /* xSleep */ + winCurrentTime, /* xCurrentTime */ + winGetLastError, /* xGetLastError */ + winCurrentTimeInt64, /* xCurrentTimeInt64 */ + winSetSystemCall, /* xSetSystemCall */ + winGetSystemCall, /* xGetSystemCall */ + winNextSystemCall, /* xNextSystemCall */ }; #if defined(SQLITE_WIN32_HAS_WIDE) static sqlite3_vfs winLongPathVfs = { - 3, /* iVersion */ - sizeof(winFile), /* szOsFile */ + 3, /* iVersion */ + sizeof(winFile), /* szOsFile */ SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */ - 0, /* pNext */ - "win32-longpath", /* zName */ - 0, /* pAppData */ - winOpen, /* xOpen */ - winDelete, /* xDelete */ - winAccess, /* xAccess */ - winFullPathname, /* xFullPathname */ - winDlOpen, /* xDlOpen */ - winDlError, /* xDlError */ - winDlSym, /* xDlSym */ - winDlClose, /* xDlClose */ - winRandomness, /* xRandomness */ - winSleep, /* xSleep */ - winCurrentTime, /* xCurrentTime */ - winGetLastError, /* xGetLastError */ - winCurrentTimeInt64, /* xCurrentTimeInt64 */ - winSetSystemCall, /* xSetSystemCall */ - winGetSystemCall, /* xGetSystemCall */ - winNextSystemCall, /* xNextSystemCall */ + 0, /* pNext */ + "win32-longpath", /* zName */ + &winAppData, /* pAppData */ + winOpen, /* xOpen */ + winDelete, /* xDelete */ + winAccess, /* xAccess */ + winFullPathname, /* xFullPathname */ + winDlOpen, /* xDlOpen */ + winDlError, /* xDlError */ + winDlSym, /* xDlSym */ + winDlClose, /* xDlClose */ + winRandomness, /* xRandomness */ + winSleep, /* xSleep */ + winCurrentTime, /* xCurrentTime */ + winGetLastError, /* xGetLastError */ + winCurrentTimeInt64, /* xCurrentTimeInt64 */ + winSetSystemCall, /* xSetSystemCall */ + winGetSystemCall, /* xGetSystemCall */ + winNextSystemCall, /* xNextSystemCall */ + }; +#endif + static sqlite3_vfs winNolockVfs = { + 3, /* iVersion */ + sizeof(winFile), /* szOsFile */ + SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ + 0, /* pNext */ + "win32-none", /* zName */ + &winNolockAppData, /* pAppData */ + winOpen, /* xOpen */ + winDelete, /* xDelete */ + winAccess, /* xAccess */ + winFullPathname, /* xFullPathname */ + winDlOpen, /* xDlOpen */ + winDlError, /* xDlError */ + winDlSym, /* xDlSym */ + winDlClose, /* xDlClose */ + winRandomness, /* xRandomness */ + winSleep, /* xSleep */ + winCurrentTime, /* xCurrentTime */ + winGetLastError, /* xGetLastError */ + winCurrentTimeInt64, /* xCurrentTimeInt64 */ + winSetSystemCall, /* xSetSystemCall */ + winGetSystemCall, /* xGetSystemCall */ + winNextSystemCall, /* xNextSystemCall */ + }; +#if defined(SQLITE_WIN32_HAS_WIDE) + static sqlite3_vfs winLongPathNolockVfs = { + 3, /* iVersion */ + sizeof(winFile), /* szOsFile */ + SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */ + 0, /* pNext */ + "win32-longpath-none", /* zName */ + &winNolockAppData, /* pAppData */ + winOpen, /* xOpen */ + winDelete, /* xDelete */ + winAccess, /* xAccess */ + winFullPathname, /* xFullPathname */ + winDlOpen, /* xDlOpen */ + winDlError, /* xDlError */ + winDlSym, /* xDlSym */ + winDlClose, /* xDlClose */ + winRandomness, /* xRandomness */ + winSleep, /* xSleep */ + winCurrentTime, /* xCurrentTime */ + winGetLastError, /* xGetLastError */ + winCurrentTimeInt64, /* xCurrentTimeInt64 */ + winSetSystemCall, /* xSetSystemCall */ + winGetSystemCall, /* xGetSystemCall */ + winNextSystemCall, /* xNextSystemCall */ }; #endif @@ -42674,10 +43051,16 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ sqlite3_vfs_register(&winLongPathVfs, 0); #endif + sqlite3_vfs_register(&winNolockVfs, 0); + +#if defined(SQLITE_WIN32_HAS_WIDE) + sqlite3_vfs_register(&winLongPathNolockVfs, 0); +#endif + return SQLITE_OK; } -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ +SQLITE_API int sqlite3_os_end(void){ #if SQLITE_OS_WINRT if( sleepObj!=NULL ){ osCloseHandle(sleepObj); @@ -43794,29 +44177,31 @@ SQLITE_PRIVATE void sqlite3PcacheClear(PCache *pCache){ /* ** Merge two lists of pages connected by pDirty and in pgno order. -** Do not both fixing the pDirtyPrev pointers. +** Do not bother fixing the pDirtyPrev pointers. */ static PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){ PgHdr result, *pTail; pTail = &result; - while( pA && pB ){ + assert( pA!=0 && pB!=0 ); + for(;;){ if( pA->pgnopgno ){ pTail->pDirty = pA; pTail = pA; pA = pA->pDirty; + if( pA==0 ){ + pTail->pDirty = pB; + break; + } }else{ pTail->pDirty = pB; pTail = pB; pB = pB->pDirty; + if( pB==0 ){ + pTail->pDirty = pA; + break; + } } } - if( pA ){ - pTail->pDirty = pA; - }else if( pB ){ - pTail->pDirty = pB; - }else{ - pTail->pDirty = 0; - } return result.pDirty; } @@ -43857,7 +44242,8 @@ static PgHdr *pcacheSortDirtyList(PgHdr *pIn){ } p = a[0]; for(i=1; inPage is correct */ - unsigned int h; + TESTONLY( int nPage = 0; ) /* To assert pCache->nPage is correct */ + unsigned int h, iStop; assert( sqlite3_mutex_held(pCache->pGroup->mutex) ); - for(h=0; hnHash; h++){ - PgHdr1 **pp = &pCache->apHash[h]; + assert( pCache->iMaxKey >= iLimit ); + assert( pCache->nHash > 0 ); + if( pCache->iMaxKey - iLimit < pCache->nHash ){ + /* If we are just shaving the last few pages off the end of the + ** cache, then there is no point in scanning the entire hash table. + ** Only scan those hash slots that might contain pages that need to + ** be removed. */ + h = iLimit % pCache->nHash; + iStop = pCache->iMaxKey % pCache->nHash; + TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */ + }else{ + /* This is the general case where many pages are being removed. + ** It is necessary to scan the entire hash table */ + h = pCache->nHash/2; + iStop = h - 1; + } + for(;;){ + PgHdr1 **pp; PgHdr1 *pPage; + assert( hnHash ); + pp = &pCache->apHash[h]; while( (pPage = *pp)!=0 ){ if( pPage->iKey>=iLimit ){ pCache->nPage--; @@ -44626,11 +45030,13 @@ static void pcache1TruncateUnsafe( pcache1FreePage(pPage); }else{ pp = &pPage->pNext; - TESTONLY( nPage++; ) + TESTONLY( if( nPage>=0 ) nPage++; ) } } + if( h==iStop ) break; + h = (h+1) % pCache->nHash; } - assert( pCache->nPage==nPage ); + assert( nPage<0 || pCache->nPage==(unsigned)nPage ); } /******************************************************************************/ @@ -45107,7 +45513,7 @@ static void pcache1Destroy(sqlite3_pcache *p){ PGroup *pGroup = pCache->pGroup; assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) ); pcache1EnterMutex(pGroup); - pcache1TruncateUnsafe(pCache, 0); + if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0); assert( pGroup->nMaxPage >= pCache->nMax ); pGroup->nMaxPage -= pCache->nMax; assert( pGroup->nMinPage >= pCache->nMin ); @@ -45462,28 +45868,26 @@ static struct RowSetEntry *rowSetEntryMerge( struct RowSetEntry *pTail; pTail = &head; - while( pA && pB ){ + assert( pA!=0 && pB!=0 ); + for(;;){ assert( pA->pRight==0 || pA->v<=pA->pRight->v ); assert( pB->pRight==0 || pB->v<=pB->pRight->v ); - if( pA->vv ){ - pTail->pRight = pA; + if( pA->v<=pB->v ){ + if( pA->vv ) pTail = pTail->pRight = pA; pA = pA->pRight; - pTail = pTail->pRight; - }else if( pB->vv ){ - pTail->pRight = pB; - pB = pB->pRight; - pTail = pTail->pRight; + if( pA==0 ){ + pTail->pRight = pB; + break; + } }else{ - pA = pA->pRight; + pTail = pTail->pRight = pB; + pB = pB->pRight; + if( pB==0 ){ + pTail->pRight = pA; + break; + } } } - if( pA ){ - assert( pA->pRight==0 || pA->v<=pA->pRight->v ); - pTail->pRight = pA; - }else{ - assert( pB==0 || pB->pRight==0 || pB->v<=pB->pRight->v ); - pTail->pRight = pB; - } return head.pRight; } @@ -45506,9 +45910,10 @@ static struct RowSetEntry *rowSetEntrySort(struct RowSetEntry *pIn){ aBucket[i] = pIn; pIn = pNext; } - pIn = 0; - for(i=0; ipadToSectorBoundary ){ int sectorSize = sqlite3SectorSize(pWal->pWalFd); w.iSyncPoint = ((iOffset+sectorSize-1)/sectorSize)*sectorSize; + bSync = (w.iSyncPoint==iOffset); + testcase( bSync ); while( iOffsetpBt->mutex); } + +/* Verify that the cursor and the BtShared agree about what is the current +** database connetion. This is important in shared-cache mode. If the database +** connection pointers get out-of-sync, it is possible for routines like +** btreeInitPage() to reference an stale connection pointer that references a +** a connection that has already closed. This routine is used inside assert() +** statements only and for the purpose of double-checking that the btree code +** does keep the database connection pointers up-to-date. +*/ static int cursorOwnsBtShared(BtCursor *p){ assert( cursorHoldsMutex(p) ); return (p->pBtree->db==p->pBt->db); @@ -58335,21 +58754,19 @@ static void btreeReleaseAllCursorPages(BtCursor *pCur){ ** the key. */ static int saveCursorKey(BtCursor *pCur){ - int rc; + int rc = SQLITE_OK; assert( CURSOR_VALID==pCur->eState ); assert( 0==pCur->pKey ); assert( cursorHoldsMutex(pCur) ); - rc = sqlite3BtreeKeySize(pCur, &pCur->nKey); - assert( rc==SQLITE_OK ); /* KeySize() cannot fail */ - - /* If this is an intKey table, then the above call to BtreeKeySize() - ** stores the integer key in pCur->nKey. In this case this value is - ** all that is required. Otherwise, if pCur is not open on an intKey - ** table, then malloc space for and store the pCur->nKey bytes of key - ** data. */ - if( 0==pCur->curIntKey ){ - void *pKey = sqlite3Malloc( pCur->nKey ); + if( pCur->curIntKey ){ + /* Only the rowid is required for a table btree */ + pCur->nKey = sqlite3BtreeIntegerKey(pCur); + }else{ + /* For an index btree, save the complete key content */ + void *pKey; + pCur->nKey = sqlite3BtreePayloadSize(pCur); + pKey = sqlite3Malloc( pCur->nKey ); if( pKey ){ rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey); if( rc==SQLITE_OK ){ @@ -60056,9 +60473,9 @@ SQLITE_PRIVATE int sqlite3BtreeOpen( #if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO) /* Add the new BtShared object to the linked list sharable BtShareds. */ + pBt->nRef = 1; if( p->sharable ){ MUTEX_LOGIC( sqlite3_mutex *mutexShared; ) - pBt->nRef = 1; MUTEX_LOGIC( mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);) if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){ pBt->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST); @@ -60129,6 +60546,7 @@ btree_open_out: assert( sqlite3_mutex_held(mutexOpen) ); sqlite3_mutex_leave(mutexOpen); } + assert( rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0 ); return rc; } @@ -61988,46 +62406,33 @@ SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){ #endif /* NDEBUG */ /* -** Set *pSize to the size of the buffer needed to hold the value of -** the key for the current entry. If the cursor is not pointing -** to a valid entry, *pSize is set to 0. -** -** For a table with the INTKEY flag set, this routine returns the key -** itself, not the number of bytes in the key. -** -** The caller must position the cursor prior to invoking this routine. -** -** This routine cannot fail. It always returns SQLITE_OK. +** Return the value of the integer key or "rowid" for a table btree. +** This routine is only valid for a cursor that is pointing into a +** ordinary table btree. If the cursor points to an index btree or +** is invalid, the result of this routine is undefined. */ -SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor *pCur, i64 *pSize){ +SQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor *pCur){ assert( cursorHoldsMutex(pCur) ); assert( pCur->eState==CURSOR_VALID ); + assert( pCur->curIntKey ); getCellInfo(pCur); - *pSize = pCur->info.nKey; - return SQLITE_OK; + return pCur->info.nKey; } /* -** Set *pSize to the number of bytes of data in the entry the -** cursor currently points to. +** Return the number of bytes of payload for the entry that pCur is +** currently pointing to. For table btrees, this will be the amount +** of data. For index btrees, this will be the size of the key. ** ** The caller must guarantee that the cursor is pointing to a non-NULL ** valid entry. In other words, the calling procedure must guarantee ** that the cursor has Cursor.eState==CURSOR_VALID. -** -** Failure is not possible. This function always returns SQLITE_OK. -** It might just as well be a procedure (returning void) but we continue -** to return an integer result code for historical reasons. */ -SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){ - assert( cursorOwnsBtShared(pCur) ); +SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){ + assert( cursorHoldsMutex(pCur) ); assert( pCur->eState==CURSOR_VALID ); - assert( pCur->iPage>=0 ); - assert( pCur->iPageapPage[pCur->iPage]->intKeyLeaf==1 ); getCellInfo(pCur); - *pSize = pCur->info.nPayload; - return SQLITE_OK; + return pCur->info.nPayload; } /* @@ -62469,10 +62874,7 @@ static const void *fetchPayload( ** These routines is used to get quick access to key and data ** in the common case where no overflow pages are used. */ -SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor *pCur, u32 *pAmt){ - return fetchPayload(pCur, pAmt); -} -SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, u32 *pAmt){ +SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){ return fetchPayload(pCur, pAmt); } @@ -62805,11 +63207,12 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked( assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) ); assert( pRes ); assert( (pIdxKey==0)==(pCur->pKeyInfo==0) ); + assert( pCur->eState!=CURSOR_VALID || (pIdxKey==0)==(pCur->curIntKey!=0) ); /* If the cursor is already positioned at the point we are trying ** to move to, then just return without doing any work */ - if( pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0 - && pCur->curIntKey + if( pIdxKey==0 + && pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0 ){ if( pCur->info.nKey==intKey ){ *pRes = 0; @@ -63798,9 +64201,7 @@ static int clearCell( static int fillInCell( MemPage *pPage, /* The page that contains the cell */ unsigned char *pCell, /* Complete text of the cell */ - const void *pKey, i64 nKey, /* The key */ - const void *pData,int nData, /* The data */ - int nZero, /* Extra zero bytes to append to pData */ + const BtreePayload *pX, /* Payload with which to construct the cell */ int *pnSize /* Write cell size here */ ){ int nPayload; @@ -63824,26 +64225,23 @@ static int fillInCell( /* Fill in the header. */ nHeader = pPage->childPtrSize; - nPayload = nData + nZero; - if( pPage->intKeyLeaf ){ - nHeader += putVarint32(&pCell[nHeader], nPayload); - }else{ - assert( nData==0 ); - assert( nZero==0 ); - } - nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey); - - /* Fill in the payload size */ if( pPage->intKey ){ - pSrc = pData; - nSrc = nData; - nData = 0; - }else{ - assert( nKey<=0x7fffffff && pKey!=0 ); - nPayload = (int)nKey; - pSrc = pKey; - nSrc = (int)nKey; + nPayload = pX->nData + pX->nZero; + pSrc = pX->pData; + nSrc = pX->nData; + assert( pPage->intKeyLeaf ); /* fillInCell() only called for leaves */ + nHeader += putVarint32(&pCell[nHeader], nPayload); + nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey); + }else{ + assert( pX->nData==0 ); + assert( pX->nZero==0 ); + assert( pX->nKey<=0x7fffffff && pX->pKey!=0 ); + nSrc = nPayload = (int)pX->nKey; + pSrc = pX->pKey; + nHeader += putVarint32(&pCell[nHeader], nPayload); } + + /* Fill in the payload */ if( nPayload<=pPage->maxLocal ){ n = nHeader + nPayload; testcase( n==3 ); @@ -63881,7 +64279,7 @@ static int fillInCell( CellInfo info; pPage->xParseCell(pPage, pCell, &info); assert( nHeader==(int)(info.pPayload - pCell) ); - assert( info.nKey==nKey ); + assert( info.nKey==pX->nKey ); assert( *pnSize == info.nSize ); assert( spaceLeft == info.nLocal ); } @@ -63966,10 +64364,6 @@ static int fillInCell( pSrc += n; nSrc -= n; spaceLeft -= n; - if( nSrc==0 ){ - nSrc = nData; - pSrc = pData; - } } releasePage(pToRelease); return SQLITE_OK; @@ -64036,6 +64430,8 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){ ** in pTemp or the original pCell) and also record its index. ** Allocating a new entry in pPage->aCell[] implies that ** pPage->nOverflow is incremented. +** +** *pRC must be SQLITE_OK when this routine is called. */ static void insertCell( MemPage *pPage, /* Page into which we are copying */ @@ -64051,8 +64447,7 @@ static void insertCell( u8 *data; /* The content of the whole page */ u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */ - if( *pRC ) return; - + assert( *pRC==SQLITE_OK ); assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); assert( MX_CELL(pPage->pBt)<=10921 ); assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB ); @@ -64126,7 +64521,7 @@ static void insertCell( /* ** A CellArray object contains a cache of pointers and sizes for a -** consecutive sequence of cells that might be held multiple pages. +** consecutive sequence of cells that might be held on multiple pages. */ typedef struct CellArray CellArray; struct CellArray { @@ -64558,8 +64953,10 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){ while( ((*(pOut++) = *(pCell++))&0x80) && pCellnCell, pSpace, (int)(pOut-pSpace), - 0, pPage->pgno, &rc); + if( rc==SQLITE_OK ){ + insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace), + 0, pPage->pgno, &rc); + } /* Set the right-child pointer of pParent to point to the new page. */ put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew); @@ -65079,7 +65476,7 @@ static int balance_nonroot( assert( r szLeft-(b.szCell[r]+2)) ){ + && (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+(i==k-1?0:2)))){ break; } szRight += b.szCell[d] + 2; @@ -65651,13 +66048,19 @@ static int balance(BtCursor *pCur){ /* -** Insert a new record into the BTree. The key is given by (pKey,nKey) -** and the data is given by (pData,nData). The cursor is used only to -** define what table the record should be inserted into. The cursor -** is left pointing at a random location. +** Insert a new record into the BTree. The content of the new record +** is described by the pX object. The pCur cursor is used only to +** define what table the record should be inserted into, and is left +** pointing at a random location. ** -** For an INTKEY table, only the nKey value of the key is used. pKey is -** ignored. For a ZERODATA table, the pData and nData are both ignored. +** For a table btree (used for rowid tables), only the pX.nKey value of +** the key is used. The pX.pKey value must be NULL. The pX.nKey is the +** rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields +** hold the content of the row. +** +** For an index btree (used for indexes and WITHOUT ROWID tables), the +** key is an arbitrary byte sequence stored in pX.pKey,nKey. The +** pX.pData,nData,nZero fields must be zero. ** ** If the seekResult parameter is non-zero, then a successful call to ** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already @@ -65674,9 +66077,7 @@ static int balance(BtCursor *pCur){ */ SQLITE_PRIVATE int sqlite3BtreeInsert( BtCursor *pCur, /* Insert data into the table of this cursor */ - const void *pKey, i64 nKey, /* The key of the new record */ - const void *pData, int nData, /* The data of the new record */ - int nZero, /* Number of extra 0 bytes to append to data */ + const BtreePayload *pX, /* Content of the row to be inserted */ int appendBias, /* True if this is likely an append */ int seekResult /* Result of prior MovetoUnpacked() call */ ){ @@ -65706,7 +66107,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** keys with no associated data. If the cursor was opened expecting an ** intkey table, the caller should be inserting integer keys with a ** blob of associated data. */ - assert( (pKey==0)==(pCur->pKeyInfo==0) ); + assert( (pX->pKey==0)==(pCur->pKeyInfo==0) ); /* Save the positions of any other cursors open on this table. ** @@ -65725,38 +66126,38 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( } if( pCur->pKeyInfo==0 ){ - assert( pKey==0 ); + assert( pX->pKey==0 ); /* If this is an insert into a table b-tree, invalidate any incrblob ** cursors open on the row being replaced */ - invalidateIncrblobCursors(p, nKey, 0); + invalidateIncrblobCursors(p, pX->nKey, 0); /* If the cursor is currently on the last row and we are appending a ** new row onto the end, set the "loc" to avoid an unnecessary ** btreeMoveto() call */ - if( (pCur->curFlags&BTCF_ValidNKey)!=0 && nKey>0 - && pCur->info.nKey==nKey-1 ){ + if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey>0 + && pCur->info.nKey==pX->nKey-1 ){ loc = -1; }else if( loc==0 ){ - rc = sqlite3BtreeMovetoUnpacked(pCur, 0, nKey, appendBias, &loc); + rc = sqlite3BtreeMovetoUnpacked(pCur, 0, pX->nKey, appendBias, &loc); if( rc ) return rc; } }else if( loc==0 ){ - rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc); + rc = btreeMoveto(pCur, pX->pKey, pX->nKey, appendBias, &loc); if( rc ) return rc; } assert( pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc) ); pPage = pCur->apPage[pCur->iPage]; - assert( pPage->intKey || nKey>=0 ); + assert( pPage->intKey || pX->nKey>=0 ); assert( pPage->leaf || !pPage->intKey ); TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n", - pCur->pgnoRoot, nKey, nData, pPage->pgno, + pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno, loc==0 ? "overwrite" : "new entry")); assert( pPage->isInit ); newCell = pBt->pTmpSpace; assert( newCell!=0 ); - rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew); + rc = fillInCell(pPage, newCell, pX, &szNew); if( rc ) goto end_insert; assert( szNew==pPage->xCellSize(pPage, newCell) ); assert( szNew <= MX_CELL_SIZE(pBt) ); @@ -65782,6 +66183,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( assert( pPage->leaf ); } insertCell(pPage, idx, newCell, szNew, 0, 0, &rc); + assert( pPage->nOverflow==0 || rc==SQLITE_OK ); assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 ); /* If no error has occurred and pPage has an overflow cell, call balance() @@ -65805,7 +66207,8 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** row without seeking the cursor. This can be a big performance boost. */ pCur->info.nSize = 0; - if( rc==SQLITE_OK && pPage->nOverflow ){ + if( pPage->nOverflow ){ + assert( rc==SQLITE_OK ); pCur->curFlags &= ~(BTCF_ValidNKey); rc = balance(pCur); @@ -65941,7 +66344,9 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){ pTmp = pBt->pTmpSpace; assert( pTmp!=0 ); rc = sqlite3PagerWrite(pLeaf->pDbPage); - insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc); + if( rc==SQLITE_OK ){ + insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc); + } dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc); if( rc ) return rc; } @@ -67430,6 +67835,16 @@ SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); SQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){ return p->sharable; } + +/* +** Return the number of connections to the BtShared object accessed by +** the Btree handle passed as the only argument. For private caches +** this is always 1. For shared caches it may be 1 or greater. +*/ +SQLITE_PRIVATE int sqlite3BtreeConnectionCount(Btree *p){ + testcase( p->sharable ); + return p->pBt->nRef; +} #endif /************** End of btree.c ***********************************************/ @@ -67580,7 +67995,7 @@ static int checkReadTransaction(sqlite3 *db, Btree *p){ ** If an error occurs, NULL is returned and an error code and error message ** stored in database handle pDestDb. */ -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( +SQLITE_API sqlite3_backup *sqlite3_backup_init( sqlite3* pDestDb, /* Database to write to */ const char *zDestDb, /* Name of database within pDestDb */ sqlite3* pSrcDb, /* Database connection to read from */ @@ -67788,7 +68203,7 @@ static void attachBackupObject(sqlite3_backup *p){ /* ** Copy nPage pages from the source b-tree to the destination. */ -SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){ int rc; int destMode; /* Destination journal mode */ int pgszSrc = 0; /* Source page size */ @@ -68032,7 +68447,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ /* ** Release all resources associated with an sqlite3_backup* handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){ sqlite3_backup **pp; /* Ptr to head of pagers backup list */ sqlite3 *pSrcDb; /* Source database connection */ int rc; /* Value to return */ @@ -68084,7 +68499,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ ** Return the number of pages still to be backed up as of the most recent ** call to sqlite3_backup_step(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){ #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ){ (void)SQLITE_MISUSE_BKPT; @@ -68098,7 +68513,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ ** Return the total number of pages in the source database as of the most ** recent call to sqlite3_backup_step(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){ #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ){ (void)SQLITE_MISUSE_BKPT; @@ -68213,10 +68628,10 @@ SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){ ** sqlite3_backup_step(), we can guarantee that the copy finishes ** within a single call (unless an error occurs). The assert() statement ** checks this assumption - (p->rc) should be set to either SQLITE_DONE - ** or an error code. - */ + ** or an error code. */ sqlite3_backup_step(&b, 0x7FFFFFFF); assert( b.rc!=SQLITE_OK ); + rc = sqlite3_backup_finish(&b); if( rc==SQLITE_OK ){ pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED; @@ -69227,11 +69642,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtree( /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert() ** that both the BtShared and database handle mutexes are held. */ assert( (pMem->flags & MEM_RowSet)==0 ); - if( key ){ - zData = (char *)sqlite3BtreeKeyFetch(pCur, &available); - }else{ - zData = (char *)sqlite3BtreeDataFetch(pCur, &available); - } + zData = (char *)sqlite3BtreePayloadFetch(pCur, &available); assert( zData!=0 ); if( offset+amt<=available ){ @@ -70011,14 +70422,6 @@ SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepa p->isPrepareV2 = (u8)isPrepareV2; } -/* -** Return the SQL associated with a prepared statement -*/ -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ - Vdbe *p = (Vdbe *)pStmt; - return p ? p->zSql : 0; -} - /* ** Swap all content between two VDBE structures. */ @@ -70738,7 +71141,7 @@ SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){ ** the FuncDef is not ephermal, then do nothing. */ static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){ - if( ALWAYS(pDef) && (pDef->funcFlags & SQLITE_FUNC_EPHEM)!=0 ){ + if( (pDef->funcFlags & SQLITE_FUNC_EPHEM)!=0 ){ sqlite3DbFree(db, pDef); } } @@ -70748,12 +71151,20 @@ static void vdbeFreeOpArray(sqlite3 *, Op *, int); /* ** Delete a P4 value if necessary. */ +static SQLITE_NOINLINE void freeP4Mem(sqlite3 *db, Mem *p){ + if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc); + sqlite3DbFree(db, p); +} +static SQLITE_NOINLINE void freeP4FuncCtx(sqlite3 *db, sqlite3_context *p){ + freeEphemeralFunction(db, p->pFunc); + sqlite3DbFree(db, p); +} static void freeP4(sqlite3 *db, int p4type, void *p4){ assert( db ); switch( p4type ){ case P4_FUNCCTX: { - freeEphemeralFunction(db, ((sqlite3_context*)p4)->pFunc); - /* Fall through into the next case */ + freeP4FuncCtx(db, (sqlite3_context*)p4); + break; } case P4_REAL: case P4_INT64: @@ -70784,9 +71195,7 @@ static void freeP4(sqlite3 *db, int p4type, void *p4){ if( db->pnBytesFreed==0 ){ sqlite3ValueFree((sqlite3_value*)p4); }else{ - Mem *p = (Mem*)p4; - if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc); - sqlite3DbFree(db, p); + freeP4Mem(db, (Mem*)p4); } break; } @@ -71043,12 +71452,21 @@ static int displayComment( const char *zSynopsis; int nOpName; int ii, jj; + char zAlt[50]; zOpName = sqlite3OpcodeName(pOp->opcode); nOpName = sqlite3Strlen30(zOpName); if( zOpName[nOpName+1] ){ int seenCom = 0; char c; zSynopsis = zOpName += nOpName + 1; + if( strncmp(zSynopsis,"IF ",3)==0 ){ + if( pOp->p5 & SQLITE_STOREP2 ){ + sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3); + }else{ + sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3); + } + zSynopsis = zAlt; + } for(ii=jj=0; jjeCurType==CURTYPE_BTREE ); pCur = pC->uc.pCursor; assert( sqlite3BtreeCursorIsValid(pCur) ); - VVA_ONLY(rc =) sqlite3BtreeKeySize(pCur, &nCellKey); - assert( rc==SQLITE_OK ); /* pCur is always valid so KeySize cannot fail */ + nCellKey = sqlite3BtreePayloadSize(pCur); /* nCellKey will always be between 0 and 0xffffffff because of the way ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */ if( nCellKey<=0 || nCellKey>0x7fffffff ){ @@ -74562,7 +74978,7 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook( ** collating sequences are registered or if an authorizer function is ** added or changed. */ -SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; return p==0 || p->expired; } @@ -74597,12 +75013,19 @@ static int vdbeSafetyNotNull(Vdbe *p){ */ static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){ sqlite3_int64 iNow; + sqlite3_int64 iElapse; assert( p->startTime>0 ); - assert( db->xProfile!=0 ); + assert( db->xProfile!=0 || (db->mTrace & SQLITE_TRACE_PROFILE)!=0 ); assert( db->init.busy==0 ); assert( p->zSql!=0 ); sqlite3OsCurrentTimeInt64(db->pVfs, &iNow); - db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000); + iElapse = (iNow - p->startTime)*1000000; + if( db->xProfile ){ + db->xProfile(db->pProfileArg, p->zSql, iElapse); + } + if( db->mTrace & SQLITE_TRACE_PROFILE ){ + db->xTrace(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse); + } p->startTime = 0; } /* @@ -74624,7 +75047,7 @@ static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){ ** This routine sets the error code and string returned by ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){ int rc; if( pStmt==0 ){ /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -74651,7 +75074,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ ** This routine sets the error code and string returned by ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){ int rc; if( pStmt==0 ){ rc = SQLITE_OK; @@ -74672,7 +75095,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ /* ** Set all the parameters in the compiled SQL statement to NULL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ int i; int rc = SQLITE_OK; Vdbe *p = (Vdbe*)pStmt; @@ -74696,7 +75119,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ ** The following routines extract information from a Mem or sqlite3_value ** structure. */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ +SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){ Mem *p = (Mem*)pVal; if( p->flags & (MEM_Blob|MEM_Str) ){ if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ @@ -74709,36 +75132,36 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ return sqlite3_value_text(pVal); } } -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ +SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){ return sqlite3ValueBytes(pVal, SQLITE_UTF8); } -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ +SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){ return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); } -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ +SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){ return sqlite3VdbeRealValue((Mem*)pVal); } -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ +SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){ return (int)sqlite3VdbeIntValue((Mem*)pVal); } -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ +SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){ return sqlite3VdbeIntValue((Mem*)pVal); } -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){ Mem *pMem = (Mem*)pVal; return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); } -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){ +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){ return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){ +SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){ return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); } -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){ return sqlite3ValueText(pVal, SQLITE_UTF16BE); } -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){ return sqlite3ValueText(pVal, SQLITE_UTF16LE); } #endif /* SQLITE_OMIT_UTF16 */ @@ -74746,7 +75169,7 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating ** point number string BLOB NULL */ -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ +SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){ static const u8 aType[] = { SQLITE_BLOB, /* 0x00 */ SQLITE_NULL, /* 0x01 */ @@ -74786,7 +75209,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ /* Make a copy of an sqlite3_value object */ -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){ +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){ sqlite3_value *pNew; if( pOrig==0 ) return 0; pNew = sqlite3_malloc( sizeof(*pNew) ); @@ -74809,7 +75232,7 @@ SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value * /* Destroy an sqlite3_value object previously obtained from ** sqlite3_value_dup(). */ -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ +SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){ sqlite3ValueFree(pOld); } @@ -74852,7 +75275,7 @@ static int invokeValueDestructor( if( pCtx ) sqlite3_result_error_toobig(pCtx); return SQLITE_TOOBIG; } -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( +SQLITE_API void sqlite3_result_blob( sqlite3_context *pCtx, const void *z, int n, @@ -74862,7 +75285,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); setResultStrOrError(pCtx, z, n, 0, xDel); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( +SQLITE_API void sqlite3_result_blob64( sqlite3_context *pCtx, const void *z, sqlite3_uint64 n, @@ -74876,43 +75299,43 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( setResultStrOrError(pCtx, z, (int)n, 0, xDel); } } -SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ +SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ +SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); pCtx->isError = SQLITE_ERROR; pCtx->fErrorOrAux = 1; sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ +SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); pCtx->isError = SQLITE_ERROR; pCtx->fErrorOrAux = 1; sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); } #endif -SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ +SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ +SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ +SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetNull(pCtx->pOut); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ +SQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ Mem *pOut = pCtx->pOut; assert( sqlite3_mutex_held(pOut->db->mutex) ); pOut->eSubtype = eSubtype & 0xff; pOut->flags |= MEM_Subtype; } -SQLITE_API void SQLITE_STDCALL sqlite3_result_text( +SQLITE_API void sqlite3_result_text( sqlite3_context *pCtx, const char *z, int n, @@ -74921,7 +75344,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text( assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( +SQLITE_API void sqlite3_result_text64( sqlite3_context *pCtx, const char *z, sqlite3_uint64 n, @@ -74938,7 +75361,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( } } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( +SQLITE_API void sqlite3_result_text16( sqlite3_context *pCtx, const void *z, int n, @@ -74947,7 +75370,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( +SQLITE_API void sqlite3_result_text16be( sqlite3_context *pCtx, const void *z, int n, @@ -74956,7 +75379,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( +SQLITE_API void sqlite3_result_text16le( sqlite3_context *pCtx, const void *z, int n, @@ -74966,15 +75389,15 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); } #endif /* SQLITE_OMIT_UTF16 */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ +SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemCopy(pCtx->pOut, pValue); } -SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); } -SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ +SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ Mem *pOut = pCtx->pOut; assert( sqlite3_mutex_held(pOut->db->mutex) ); if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ @@ -74983,7 +75406,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); return SQLITE_OK; } -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ +SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ pCtx->isError = errCode; pCtx->fErrorOrAux = 1; #ifdef SQLITE_DEBUG @@ -74996,7 +75419,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, } /* Force an SQLITE_TOOBIG error. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); pCtx->isError = SQLITE_TOOBIG; pCtx->fErrorOrAux = 1; @@ -75005,7 +75428,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx } /* An SQLITE_NOMEM error. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetNull(pCtx->pOut); pCtx->isError = SQLITE_NOMEM_BKPT; @@ -75106,7 +75529,8 @@ static int sqlite3Step(Vdbe *p){ ); #ifndef SQLITE_OMIT_TRACE - if( db->xProfile && !db->init.busy && p->zSql ){ + if( (db->xProfile || (db->mTrace & SQLITE_TRACE_PROFILE)!=0) + && !db->init.busy && p->zSql ){ sqlite3OsCurrentTimeInt64(db->pVfs, &p->startTime); }else{ assert( p->startTime==0 ); @@ -75176,7 +75600,7 @@ end_of_step: ** sqlite3Step() to do most of the work. If a schema error occurs, ** call sqlite3Reprepare() and try again. */ -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){ int rc = SQLITE_OK; /* Result from sqlite3Step() */ int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ @@ -75227,7 +75651,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ ** Extract the user data from a sqlite3_context structure and return a ** pointer to it. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ +SQLITE_API void *sqlite3_user_data(sqlite3_context *p){ assert( p && p->pFunc ); return p->pFunc->pUserData; } @@ -75242,7 +75666,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ ** sqlite3_create_function16() routines that originally registered the ** application defined function. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ assert( p && p->pOut ); return p->pOut->db; } @@ -75318,7 +75742,7 @@ static SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){ ** context is allocated on the first call. Subsequent calls return the ** same context that was returned on prior calls. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){ assert( p && p->pFunc && p->pFunc->xFinalize ); assert( sqlite3_mutex_held(p->pOut->db->mutex) ); testcase( nByte<0 ); @@ -75333,7 +75757,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, in ** Return the auxiliary data pointer, if any, for the iArg'th argument to ** the user-function defined by pCtx. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ AuxData *pAuxData; assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); @@ -75354,7 +75778,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int i ** argument to the user-function defined by pCtx. Any previous value is ** deleted by calling the delete function specified when it was set. */ -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( +SQLITE_API void sqlite3_set_auxdata( sqlite3_context *pCtx, int iArg, void *pAux, @@ -75409,7 +75833,7 @@ failed: ** implementations should keep their own counts within their aggregate ** context. */ -SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ +SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){ assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); return p->pMem->n; } @@ -75418,7 +75842,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ /* ** Return the number of columns in the result set for the statement pStmt. */ -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ Vdbe *pVm = (Vdbe *)pStmt; return pVm ? pVm->nResColumn : 0; } @@ -75427,7 +75851,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ ** Return the number of values available from the current row of the ** currently executing statement pStmt. */ -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){ Vdbe *pVm = (Vdbe *)pStmt; if( pVm==0 || pVm->pResultSet==0 ) return 0; return pVm->nResColumn; @@ -75530,7 +75954,7 @@ static void columnMallocFailure(sqlite3_stmt *pStmt) ** The following routines are used to access elements of the current row ** in the result set. */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ const void *val; val = sqlite3_value_blob( columnMem(pStmt,i) ); /* Even though there is no encoding conversion, value_blob() might @@ -75540,37 +75964,37 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, i columnMallocFailure(pStmt); return val; } -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ int val = sqlite3_value_bytes( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ +SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){ double val = sqlite3_value_double( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ +SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){ int val = sqlite3_value_int( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ +SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){ const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){ Mem *pOut = columnMem(pStmt, i); if( pOut->flags&MEM_Static ){ pOut->flags &= ~MEM_Static; @@ -75580,13 +76004,13 @@ SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStm return (sqlite3_value *)pOut; } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return val; } #endif /* SQLITE_OMIT_UTF16 */ -SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ +SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){ int iType = sqlite3_value_type( columnMem(pStmt,i) ); columnMallocFailure(pStmt); return iType; @@ -75650,12 +76074,12 @@ static const void *columnName( ** Return the name of the Nth column of the result set returned by SQL ** statement pStmt. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); } @@ -75675,12 +76099,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, ** Return the column declaration type (if applicable) of the 'i'th column ** of the result set of SQL statement pStmt. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); } @@ -75693,12 +76117,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pS ** NULL is returned if the result column is an expression or constant or ** anything else which is not an unambiguous reference to a database column. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); } @@ -75709,12 +76133,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stm ** NULL is returned if the result column is an expression or constant or ** anything else which is not an unambiguous reference to a database column. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); } @@ -75725,12 +76149,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt * ** NULL is returned if the result column is an expression or constant or ** anything else which is not an unambiguous reference to a database column. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ return columnName( pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); } @@ -75831,7 +76255,7 @@ static int bindText( /* ** Bind a blob value to an SQL statement variable. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( +SQLITE_API int sqlite3_bind_blob( sqlite3_stmt *pStmt, int i, const void *zData, @@ -75843,7 +76267,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( #endif return bindText(pStmt, i, zData, nData, xDel, 0); } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( +SQLITE_API int sqlite3_bind_blob64( sqlite3_stmt *pStmt, int i, const void *zData, @@ -75857,7 +76281,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( return bindText(pStmt, i, zData, (int)nData, xDel, 0); } } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ +SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ int rc; Vdbe *p = (Vdbe *)pStmt; rc = vdbeUnbind(p, i); @@ -75867,10 +76291,10 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, do } return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ +SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ return sqlite3_bind_int64(p, i, (i64)iValue); } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ int rc; Vdbe *p = (Vdbe *)pStmt; rc = vdbeUnbind(p, i); @@ -75880,7 +76304,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sql } return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ +SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ int rc; Vdbe *p = (Vdbe*)pStmt; rc = vdbeUnbind(p, i); @@ -75889,7 +76313,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ } return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( +SQLITE_API int sqlite3_bind_text( sqlite3_stmt *pStmt, int i, const char *zData, @@ -75898,7 +76322,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( ){ return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( +SQLITE_API int sqlite3_bind_text64( sqlite3_stmt *pStmt, int i, const char *zData, @@ -75915,7 +76339,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( } } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( +SQLITE_API int sqlite3_bind_text16( sqlite3_stmt *pStmt, int i, const void *zData, @@ -75925,7 +76349,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); } #endif /* SQLITE_OMIT_UTF16 */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ +SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ int rc; switch( sqlite3_value_type((sqlite3_value*)pValue) ){ case SQLITE_INTEGER: { @@ -75956,7 +76380,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, con } return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ int rc; Vdbe *p = (Vdbe *)pStmt; rc = vdbeUnbind(p, i); @@ -75966,7 +76390,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, } return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ +SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ int rc; Vdbe *p = (Vdbe *)pStmt; sqlite3_mutex_enter(p->db->mutex); @@ -75985,7 +76409,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i ** Return the number of wildcards that can be potentially bound to. ** This routine is added to support DBD::SQLite. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; return p ? p->nVar : 0; } @@ -75996,7 +76420,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ ** ** The result is always UTF-8. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ Vdbe *p = (Vdbe*)pStmt; if( p==0 || i<1 || i>p->nzVar ){ return 0; @@ -76024,7 +76448,7 @@ SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nNa } return 0; } -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); } @@ -76058,7 +76482,7 @@ SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise ** SQLITE_OK is returned. */ -SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ +SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ Vdbe *pFrom = (Vdbe*)pFromStmt; Vdbe *pTo = (Vdbe*)pToStmt; if( pFrom->nVar!=pTo->nVar ){ @@ -76080,7 +76504,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, ** the first argument to the sqlite3_prepare() that was used to create ** the statement in the first place. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){ return pStmt ? ((Vdbe*)pStmt)->db : 0; } @@ -76088,14 +76512,14 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ ** Return true if the prepared statement is guaranteed to not modify the ** database. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; } /* ** Return true if the prepared statement is in need of being reset. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){ Vdbe *v = (Vdbe*)pStmt; return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; } @@ -76106,7 +76530,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ ** prepared statement for the database connection. Return NULL if there ** are no more. */ -SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ sqlite3_stmt *pNext; #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(pDb) ){ @@ -76127,7 +76551,7 @@ SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_ /* ** Return the value of a status counter for a prepared statement */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ +SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ Vdbe *pVdbe = (Vdbe*)pStmt; u32 v; #ifdef SQLITE_ENABLE_API_ARMOR @@ -76141,6 +76565,39 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, i return (int)v; } +/* +** Return the SQL associated with a prepared statement +*/ +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){ + Vdbe *p = (Vdbe *)pStmt; + return p ? p->zSql : 0; +} + +/* +** Return the SQL associated with a prepared statement with +** bound parameters expanded. Space to hold the returned string is +** obtained from sqlite3_malloc(). The caller is responsible for +** freeing the returned string by passing it to sqlite3_free(). +** +** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of +** expanded bound parameters. +*/ +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){ +#ifdef SQLITE_OMIT_TRACE + return 0; +#else + char *z = 0; + const char *zSql = sqlite3_sql(pStmt); + if( zSql ){ + Vdbe *p = (Vdbe *)pStmt; + sqlite3_mutex_enter(p->db->mutex); + z = sqlite3VdbeExpandSql(p, zSql); + sqlite3_mutex_leave(p->db->mutex); + } + return z; +#endif +} + #ifdef SQLITE_ENABLE_PREUPDATE_HOOK /* ** Allocate and populate an UnpackedRecord structure based on the serialized @@ -76167,7 +76624,7 @@ static UnpackedRecord *vdbeUnpackRecord( ** This function is called from within a pre-update callback to retrieve ** a field of the row currently being updated or deleted. */ -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ +SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ PreUpdate *p = db->pPreUpdate; int rc = SQLITE_OK; @@ -76187,8 +76644,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlit u32 nRec; u8 *aRec; - rc = sqlite3BtreeDataSize(p->pCsr->uc.pCursor, &nRec); - if( rc!=SQLITE_OK ) goto preupdate_old_out; + nRec = sqlite3BtreePayloadSize(p->pCsr->uc.pCursor); aRec = sqlite3DbMallocRaw(db, nRec); if( !aRec ) goto preupdate_old_out; rc = sqlite3BtreeData(p->pCsr->uc.pCursor, 0, nRec, aRec); @@ -76223,7 +76679,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlit ** This function is called from within a pre-update callback to retrieve ** the number of columns in the row being updated, deleted or inserted. */ -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ +SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){ PreUpdate *p = db->pPreUpdate; return (p ? p->keyinfo.nField : 0); } @@ -76241,7 +76697,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL ** or SET DEFAULT action is considered a trigger. */ -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ +SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){ PreUpdate *p = db->pPreUpdate; return (p ? p->v->nFrame : 0); } @@ -76252,7 +76708,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ ** This function is called from within a pre-update callback to retrieve ** a field of the row currently being updated or inserted. */ -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ +SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ PreUpdate *p = db->pPreUpdate; int rc = SQLITE_OK; Mem *pMem; @@ -76326,7 +76782,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlit /* ** Return status data for a single loop within query pStmt. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( +SQLITE_API int sqlite3_stmt_scanstatus( sqlite3_stmt *pStmt, /* Prepared statement being queried */ int idx, /* Index of loop to report on */ int iScanStatusOp, /* Which metric to return */ @@ -76385,7 +76841,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( /* ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. */ -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; memset(p->anExec, 0, p->nOp * sizeof(i64)); } @@ -76476,10 +76932,13 @@ SQLITE_PRIVATE char *sqlite3VdbeExpandSql( int i; /* Loop counter */ Mem *pVar; /* Value of a host parameter */ StrAccum out; /* Accumulate the output here */ +#ifndef SQLITE_OMIT_UTF16 + Mem utf8; /* Used to convert UTF16 parameters into UTF8 for display */ +#endif char zBase[100]; /* Initial working space */ db = p->db; - sqlite3StrAccumInit(&out, db, zBase, sizeof(zBase), + sqlite3StrAccumInit(&out, 0, zBase, sizeof(zBase), db->aLimit[SQLITE_LIMIT_LENGTH]); if( db->nVdbeExec>1 ){ while( *zRawSql ){ @@ -76530,12 +76989,14 @@ SQLITE_PRIVATE char *sqlite3VdbeExpandSql( int nOut; /* Number of bytes of the string text to include in output */ #ifndef SQLITE_OMIT_UTF16 u8 enc = ENC(db); - Mem utf8; if( enc!=SQLITE_UTF8 ){ memset(&utf8, 0, sizeof(utf8)); utf8.db = db; sqlite3VdbeMemSetStr(&utf8, pVar->z, pVar->n, enc, SQLITE_STATIC); - sqlite3VdbeChangeEncoding(&utf8, SQLITE_UTF8); + if( SQLITE_NOMEM==sqlite3VdbeChangeEncoding(&utf8, SQLITE_UTF8) ){ + out.accError = STRACCUM_NOMEM; + out.nAlloc = 0; + } pVar = &utf8; } #endif @@ -76577,6 +77038,7 @@ SQLITE_PRIVATE char *sqlite3VdbeExpandSql( } } } + if( out.accError ) sqlite3StrAccumReset(&out); return sqlite3StrAccumFinish(&out); } @@ -76906,7 +77368,7 @@ static void applyAffinity( ** is appropriate. But only do the conversion if it is possible without ** loss of information and return the revised type of the argument. */ -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){ int eType = sqlite3_value_type(pVal); if( eType==SQLITE_TEXT ){ Mem *pMem = (Mem*)pVal; @@ -77109,8 +77571,8 @@ static void registerTrace(int iReg, Mem *p){ ** This file contains inline asm code for retrieving "high-performance" ** counters for x86 class CPUs. */ -#ifndef _HWTIME_H_ -#define _HWTIME_H_ +#ifndef SQLITE_HWTIME_H +#define SQLITE_HWTIME_H /* ** The following routine only works on pentium-class (or newer) processors. @@ -77178,7 +77640,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } #endif -#endif /* !defined(_HWTIME_H_) */ +#endif /* !defined(SQLITE_HWTIME_H) */ /************** End of hwtime.h **********************************************/ /************** Continuing where we left off in vdbe.c ***********************/ @@ -78058,6 +78520,10 @@ case OP_ResultRow: { } if( db->mallocFailed ) goto no_mem; + if( db->mTrace & SQLITE_TRACE_ROW ){ + db->xTrace(SQLITE_TRACE_ROW, db->pTraceArg, p, 0); + } + /* Return SQLITE_ROW */ p->pc = (int)(pOp - aOp) + 1; @@ -78552,7 +79018,7 @@ case OP_Cast: { /* in1 */ #endif /* SQLITE_OMIT_CAST */ /* Opcode: Lt P1 P2 P3 P4 P5 -** Synopsis: if r[P1]r[P3] goto P2 +** Synopsis: IF r[P3]>r[P1] ** ** This works just like the Lt opcode except that the jump is taken if ** the content of register P3 is greater than the content of ** register P1. See the Lt opcode for additional information. */ /* Opcode: Ge P1 P2 P3 P4 P5 -** Synopsis: if r[P1]>=r[P3] goto P2 +** Synopsis: IF r[P3]>=r[P1] ** ** This works just like the Lt opcode except that the jump is taken if ** the content of register P3 is greater than or equal to the content of @@ -78691,6 +79157,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ if( (flags1 | flags3)&MEM_Str ){ if( (flags1 & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){ applyNumericAffinity(pIn1,0); + flags3 = pIn3->flags; } if( (flags3 & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){ applyNumericAffinity(pIn3,0); @@ -78703,6 +79170,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ sqlite3VdbeMemStringify(pIn1, encoding, 1); testcase( (flags1&MEM_Dyn) != (pIn1->flags&MEM_Dyn) ); flags1 = (pIn1->flags & ~MEM_TypeMask) | (flags1 & MEM_TypeMask); + flags3 = pIn3->flags; } if( (flags3 & MEM_Str)==0 && (flags3 & (MEM_Int|MEM_Real))!=0 ){ testcase( pIn3->flags & MEM_Int ); @@ -79055,7 +79523,6 @@ case OP_NotNull: { /* same as TK_NOTNULL, jump, in1 */ ** skipped for length() and all content loading can be skipped for typeof(). */ case OP_Column: { - i64 payloadSize64; /* Number of bytes in the record */ int p2; /* column number to retrieve */ VdbeCursor *pC; /* The VDBE cursor */ BtCursor *pCrsr; /* The BTree cursor */ @@ -79078,6 +79545,7 @@ case OP_Column: { /* If the cursor cache is stale, bring it up-to-date */ rc = sqlite3VdbeCursorMoveto(&pC, &p2); + if( rc ) goto abort_due_to_error; assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) ); pDest = &aMem[pOp->p3]; @@ -79091,8 +79559,7 @@ case OP_Column: { assert( pC->eCurType!=CURTYPE_SORTER ); pCrsr = pC->uc.pCursor; - if( rc ) goto abort_due_to_error; - if( pC->cacheStatus!=p->cacheCtr ){ + if( pC->cacheStatus!=p->cacheCtr ){ /*OPTIMIZATION-IF-FALSE*/ if( pC->nullRow ){ if( pC->eCurType==CURTYPE_PSEUDO ){ assert( pC->uc.pseudoTableReg>0 ); @@ -79108,22 +79575,9 @@ case OP_Column: { }else{ assert( pC->eCurType==CURTYPE_BTREE ); assert( pCrsr ); - if( pC->isTable==0 ){ - assert( sqlite3BtreeCursorIsValid(pCrsr) ); - VVA_ONLY(rc =) sqlite3BtreeKeySize(pCrsr, &payloadSize64); - assert( rc==SQLITE_OK ); /* True because of CursorMoveto() call above */ - /* sqlite3BtreeParseCellPtr() uses getVarint32() to extract the - ** payload size, so it is impossible for payloadSize64 to be - ** larger than 32 bits. */ - assert( (payloadSize64 & SQLITE_MAX_U32)==(u64)payloadSize64 ); - pC->aRow = sqlite3BtreeKeyFetch(pCrsr, &avail); - pC->payloadSize = (u32)payloadSize64; - }else{ - assert( sqlite3BtreeCursorIsValid(pCrsr) ); - VVA_ONLY(rc =) sqlite3BtreeDataSize(pCrsr, &pC->payloadSize); - assert( rc==SQLITE_OK ); /* DataSize() cannot fail */ - pC->aRow = sqlite3BtreeDataFetch(pCrsr, &avail); - } + assert( sqlite3BtreeCursorIsValid(pCrsr) ); + pC->payloadSize = sqlite3BtreePayloadSize(pCrsr); + pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &avail); assert( avail<=65536 ); /* Maximum page size is 64KiB */ if( pC->payloadSize <= (u32)avail ){ pC->szRow = pC->payloadSize; @@ -79139,7 +79593,7 @@ case OP_Column: { aOffset[0] = offset; - if( availaRow does not have to hold the entire row, but it does at least ** need to cover the header of the record. If pC->aRow does not contain ** the complete header, then set it to zero, forcing the header to be @@ -79160,14 +79614,15 @@ case OP_Column: { rc = SQLITE_CORRUPT_BKPT; goto abort_due_to_error; } + }else if( offset>0 ){ /*OPTIMIZATION-IF-TRUE*/ + /* The following goto is an optimization. It can be omitted and + ** everything will still work. But OP_Column is measurably faster + ** by skipping the subsequent conditional, which is always true. + */ + zData = pC->aRow; + assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */ + goto op_column_read_header; } - - /* The following goto is an optimization. It can be omitted and - ** everything will still work. But OP_Column is measurably faster - ** by skipping the subsequent conditional, which is always true. - */ - assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */ - goto op_column_read_header; } /* Make sure at least the first p2+1 entries of the header have been @@ -79177,7 +79632,6 @@ case OP_Column: { /* If there is more header available for parsing in the record, try ** to extract additional fields up through the p2+1-th field */ - op_column_read_header: if( pC->iHdrOffsetaRow==0 ){ @@ -79190,11 +79644,11 @@ case OP_Column: { } /* Fill in pC->aType[i] and aOffset[i] values through the p2-th field. */ + op_column_read_header: i = pC->nHdrParsed; offset64 = aOffset[i]; zHdr = zData + pC->iHdrOffset; zEndHdr = zData + aOffset[0]; - assert( i<=p2 && zHdraType[i++] = t; aOffset[i] = (u32)(offset64 & 0xffffffff); }while( i<=p2 && zHdrnHdrParsed = i; - pC->iHdrOffset = (u32)(zHdr - zData); - + /* The record is corrupt if any of the following are true: ** (1) the bytes of the header extend past the declared header size ** (2) the entire header was used but not all data was used @@ -79221,8 +79673,10 @@ case OP_Column: { rc = SQLITE_CORRUPT_BKPT; goto abort_due_to_error; } - if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem); + pC->nHdrParsed = i; + pC->iHdrOffset = (u32)(zHdr - zData); + if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem); }else{ t = 0; } @@ -79250,9 +79704,10 @@ case OP_Column: { assert( p2nHdrParsed ); assert( rc==SQLITE_OK ); assert( sqlite3VdbeCheckMemInvariants(pDest) ); - if( VdbeMemDynamic(pDest) ) sqlite3VdbeMemSetNull(pDest); + if( VdbeMemDynamic(pDest) ){ + sqlite3VdbeMemSetNull(pDest); + } assert( t==pC->aType[p2] ); - pDest->enc = encoding; if( pC->szRow>=aOffset[p2+1] ){ /* This is the common case where the desired content fits on the original ** page - where the content is not on an overflow page */ @@ -79266,6 +79721,7 @@ case OP_Column: { */ static const u16 aFlag[] = { MEM_Blob, MEM_Str|MEM_Term }; pDest->n = len = (t-12)/2; + pDest->enc = encoding; if( pDest->szMalloc < len+2 ){ pDest->flags = MEM_Null; if( sqlite3VdbeMemGrow(pDest, len+2, 0) ) goto no_mem; @@ -79278,6 +79734,7 @@ case OP_Column: { pDest->flags = aFlag[t&1]; } }else{ + pDest->enc = encoding; /* This branch happens only when content is on overflow pages */ if( ((pOp->p5 & (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG))!=0 && ((t>=12 && (t&1)==0) || (pOp->p5 & OPFLAG_TYPEOFARG)!=0)) @@ -80695,6 +81152,30 @@ case OP_Found: { /* jump, in3 */ break; } +/* Opcode: SeekRowid P1 P2 P3 * * +** Synopsis: intkey=r[P3] +** +** P1 is the index of a cursor open on an SQL table btree (with integer +** keys). If register P3 does not contain an integer or if P1 does not +** contain a record with rowid P3 then jump immediately to P2. +** Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain +** a record with rowid P3 then +** leave the cursor pointing at that record and fall through to the next +** instruction. +** +** The OP_NotExists opcode performs the same operation, but with OP_NotExists +** the P3 register must be guaranteed to contain an integer value. With this +** opcode, register P3 might not contain an integer. +** +** The OP_NotFound opcode performs the same operation on index btrees +** (with arbitrary multi-value keys). +** +** This opcode leaves the cursor in a state where it cannot be advanced +** in either direction. In other words, the Next and Prev opcodes will +** not work following this opcode. +** +** See also: Found, NotFound, NoConflict, SeekRowid +*/ /* Opcode: NotExists P1 P2 P3 * * ** Synopsis: intkey=r[P3] ** @@ -80705,6 +81186,10 @@ case OP_Found: { /* jump, in3 */ ** leave the cursor pointing at that record and fall through to the next ** instruction. ** +** The OP_SeekRowid opcode performs the same operation but also allows the +** P3 register to contain a non-integer value, in which case the jump is +** always taken. This opcode requires that P3 always contain an integer. +** ** The OP_NotFound opcode performs the same operation on index btrees ** (with arbitrary multi-value keys). ** @@ -80712,14 +81197,21 @@ case OP_Found: { /* jump, in3 */ ** in either direction. In other words, the Next and Prev opcodes will ** not work following this opcode. ** -** See also: Found, NotFound, NoConflict +** See also: Found, NotFound, NoConflict, SeekRowid */ -case OP_NotExists: { /* jump, in3 */ +case OP_SeekRowid: { /* jump, in3 */ VdbeCursor *pC; BtCursor *pCrsr; int res; u64 iKey; + pIn3 = &aMem[pOp->p3]; + if( (pIn3->flags & MEM_Int)==0 ){ + applyAffinity(pIn3, SQLITE_AFF_NUMERIC, encoding); + if( (pIn3->flags & MEM_Int)==0 ) goto jump_to_p2; + } + /* Fall through into OP_NotExists */ +case OP_NotExists: /* jump, in3 */ pIn3 = &aMem[pOp->p3]; assert( pIn3->flags & MEM_Int ); assert( pOp->p1>=0 && pOp->p1nCursor ); @@ -80838,8 +81330,7 @@ case OP_NewRowid: { /* out2 */ v = 1; /* IMP: R-61914-48074 */ }else{ assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) ); - rc = sqlite3BtreeKeySize(pC->uc.pCursor, &v); - assert( rc==SQLITE_OK ); /* Cannot fail following BtreeLast() */ + v = sqlite3BtreeIntegerKey(pC->uc.pCursor); if( v>=MAX_ROWID ){ pC->useRandomRowid = 1; }else{ @@ -80922,10 +81413,12 @@ case OP_NewRowid: { /* out2 */ ** sqlite3_last_insert_rowid() function (otherwise it is unmodified). ** ** If the OPFLAG_USESEEKRESULT flag of P5 is set and if the result of -** the last seek operation (OP_NotExists) was a success, then this +** the last seek operation (OP_NotExists or OP_SeekRowid) was a success, +** then this ** operation will not attempt to find the appropriate row before doing ** the insert but will instead overwrite the row that the cursor is -** currently pointing to. Presumably, the prior OP_NotExists opcode +** currently pointing to. Presumably, the prior OP_NotExists or +** OP_SeekRowid opcode ** has already positioned the cursor correctly. This is an optimization ** that boosts performance by avoiding redundant seeks. ** @@ -80957,13 +81450,12 @@ case OP_Insert: case OP_InsertInt: { Mem *pData; /* MEM cell holding data for the record to be inserted */ Mem *pKey; /* MEM cell holding key for the record */ - i64 iKey; /* The integer ROWID or key for the record to be inserted */ VdbeCursor *pC; /* Cursor to table into which insert is written */ - int nZero; /* Number of zero-bytes to append */ int seekResult; /* Result of prior seek or 0 if no USESEEKRESULT flag */ const char *zDb; /* database name - used by the update hook */ Table *pTab; /* Table structure - used by update and pre-update hooks */ int op; /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */ + BtreePayload x; /* Payload to be inserted */ op = 0; pData = &aMem[pOp->p2]; @@ -80982,10 +81474,10 @@ case OP_InsertInt: { assert( pKey->flags & MEM_Int ); assert( memIsValid(pKey) ); REGISTER_TRACE(pOp->p3, pKey); - iKey = pKey->u.i; + x.nKey = pKey->u.i; }else{ assert( pOp->opcode==OP_InsertInt ); - iKey = pOp->p3; + x.nKey = pOp->p3; } if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){ @@ -81006,26 +81498,28 @@ case OP_InsertInt: { && pOp->p4type==P4_TABLE && !(pOp->p5 & OPFLAG_ISUPDATE) ){ - sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, iKey, pOp->p2); + sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey, pOp->p2); } #endif if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++; - if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = lastRowid = iKey; + if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = lastRowid = x.nKey; if( pData->flags & MEM_Null ){ - pData->z = 0; - pData->n = 0; + x.pData = 0; + x.nData = 0; }else{ assert( pData->flags & (MEM_Blob|MEM_Str) ); + x.pData = pData->z; + x.nData = pData->n; } seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0); if( pData->flags & MEM_Zero ){ - nZero = pData->u.nZero; + x.nZero = pData->u.nZero; }else{ - nZero = 0; + x.nZero = 0; } - rc = sqlite3BtreeInsert(pC->uc.pCursor, 0, iKey, - pData->z, pData->n, nZero, + x.pKey = 0; + rc = sqlite3BtreeInsert(pC->uc.pCursor, &x, (pOp->p5 & OPFLAG_APPEND)!=0, seekResult ); pC->deferredMoveto = 0; @@ -81034,7 +81528,7 @@ case OP_InsertInt: { /* Invoke the update-hook if required. */ if( rc ) goto abort_due_to_error; if( db->xUpdateCallback && op ){ - db->xUpdateCallback(db->pUpdateArg, op, zDb, pTab->zName, iKey); + db->xUpdateCallback(db->pUpdateArg, op, zDb, pTab->zName, x.nKey); } break; } @@ -81093,8 +81587,7 @@ case OP_Delete: { /* If p5 is zero, the seek operation that positioned the cursor prior to ** OP_Delete will have also set the pC->movetoTarget field to the rowid of ** the row that is being deleted */ - i64 iKey = 0; - sqlite3BtreeKeySize(pC->uc.pCursor, &iKey); + i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor); assert( pC->movetoTarget==iKey ); } #endif @@ -81110,7 +81603,7 @@ case OP_Delete: { zDb = db->aDb[pC->iDb].zName; pTab = pOp->p4.pTab; if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){ - sqlite3BtreeKeySize(pC->uc.pCursor, &pC->movetoTarget); + pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor); } }else{ zDb = 0; /* Not needed. Silence a compiler warning. */ @@ -81264,7 +81757,6 @@ case OP_RowData: { VdbeCursor *pC; BtCursor *pCrsr; u32 n; - i64 n64; pOut = &aMem[pOp->p2]; memAboutToChange(p, pOut); @@ -81282,8 +81774,9 @@ case OP_RowData: { pCrsr = pC->uc.pCursor; /* The OP_RowKey and OP_RowData opcodes always follow OP_NotExists or - ** OP_Rewind/Op_Next with no intervening instructions that might invalidate - ** the cursor. If this where not the case, on of the following assert()s + ** OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions + ** that might invalidate the cursor. + ** If this where not the case, on of the following assert()s ** would fail. Should this ever change (because of changes in the code ** generator) then the fix would be to insert a call to ** sqlite3VdbeCursorMoveto(). @@ -81295,20 +81788,9 @@ case OP_RowData: { if( rc!=SQLITE_OK ) goto abort_due_to_error; #endif - if( pC->isTable==0 ){ - assert( !pC->isTable ); - VVA_ONLY(rc =) sqlite3BtreeKeySize(pCrsr, &n64); - assert( rc==SQLITE_OK ); /* True because of CursorMoveto() call above */ - if( n64>db->aLimit[SQLITE_LIMIT_LENGTH] ){ - goto too_big; - } - n = (u32)n64; - }else{ - VVA_ONLY(rc =) sqlite3BtreeDataSize(pCrsr, &n); - assert( rc==SQLITE_OK ); /* DataSize() cannot fail */ - if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){ - goto too_big; - } + n = sqlite3BtreePayloadSize(pCrsr); + if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){ + goto too_big; } testcase( n==0 ); if( sqlite3VdbeMemClearAndResize(pOut, MAX(n,32)) ){ @@ -81373,8 +81855,7 @@ case OP_Rowid: { /* out2 */ pOut->flags = MEM_Null; break; } - rc = sqlite3BtreeKeySize(pC->uc.pCursor, &v); - assert( rc==SQLITE_OK ); /* Always so because of CursorRestore() above */ + v = sqlite3BtreeIntegerKey(pC->uc.pCursor); } pOut->u.i = v; break; @@ -81649,8 +82130,7 @@ next_tail: case OP_SorterInsert: /* in2 */ case OP_IdxInsert: { /* in2 */ VdbeCursor *pC; - int nKey; - const char *zKey; + BtreePayload x; assert( pOp->p1>=0 && pOp->p1nCursor ); pC = p->apCsr[pOp->p1]; @@ -81666,9 +82146,12 @@ case OP_IdxInsert: { /* in2 */ if( pOp->opcode==OP_SorterInsert ){ rc = sqlite3VdbeSorterWrite(pC, pIn2); }else{ - nKey = pIn2->n; - zKey = pIn2->z; - rc = sqlite3BtreeInsert(pC->uc.pCursor, zKey, nKey, "", 0, 0, pOp->p3, + x.nKey = pIn2->n; + x.pKey = pIn2->z; + x.nData = 0; + x.nZero = 0; + x.pData = 0; + rc = sqlite3BtreeInsert(pC->uc.pCursor, &x, pOp->p3, ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0) ); assert( pC->deferredMoveto==0 ); @@ -83436,16 +83919,34 @@ case OP_MaxPgcnt: { /* out2 */ */ case OP_Init: { /* jump */ char *zTrace; - char *z; + + /* If the P4 argument is not NULL, then it must be an SQL comment string. + ** The "--" string is broken up to prevent false-positives with srcck1.c. + ** + ** This assert() provides evidence for: + ** EVIDENCE-OF: R-50676-09860 The callback can compute the same text that + ** would have been returned by the legacy sqlite3_trace() interface by + ** using the X argument when X begins with "--" and invoking + ** sqlite3_expanded_sql(P) otherwise. + */ + assert( pOp->p4.z==0 || strncmp(pOp->p4.z, "-" "- ", 3)==0 ); #ifndef SQLITE_OMIT_TRACE - if( db->xTrace + if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0 && !p->doingRerun && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 ){ - z = sqlite3VdbeExpandSql(p, zTrace); - db->xTrace(db->pTraceArg, z); - sqlite3DbFree(db, z); +#ifndef SQLITE_OMIT_DEPRECATED + if( db->mTrace & SQLITE_TRACE_LEGACY ){ + void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace; + char *z = sqlite3VdbeExpandSql(p, zTrace); + x(db->pTraceArg, z); + sqlite3_free(z); + }else +#endif + { + (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace); + } } #ifdef SQLITE_USE_FCNTL_TRACE zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql); @@ -83719,7 +84220,7 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){ /* ** Open a blob handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( +SQLITE_API int sqlite3_blob_open( sqlite3* db, /* The database connection */ const char *zDb, /* The attached database containing the blob */ const char *zTable, /* The table containing the blob */ @@ -83960,7 +84461,7 @@ blob_open_out: ** Close a blob handle that was previously created using ** sqlite3_blob_open(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ +SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){ Incrblob *p = (Incrblob *)pBlob; int rc; sqlite3 *db; @@ -84028,7 +84529,7 @@ static int blobReadWrite( ** anyhow. */ sqlite3_int64 iKey; - sqlite3BtreeKeySize(p->pCsr, &iKey); + iKey = sqlite3BtreeIntegerKey(p->pCsr); sqlite3VdbePreUpdateHook( v, v->apCsr[0], SQLITE_DELETE, p->zDb, p->pTab, iKey, -1 ); @@ -84053,14 +84554,14 @@ static int blobReadWrite( /* ** Read data from a blob handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ +SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); } /* ** Write data to a blob handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ +SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); } @@ -84070,7 +84571,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob ** so no mutex is required for access. */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){ Incrblob *p = (Incrblob *)pBlob; return (p && p->pStmt) ? p->nByte : 0; } @@ -84085,7 +84586,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) ** immediately return SQLITE_ABORT. */ -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ int rc; Incrblob *p = (Incrblob *)pBlob; sqlite3 *db; @@ -85463,19 +85964,18 @@ static int vdbeSortAllocUnpacked(SortSubtask *pTask){ /* ** Merge the two sorted lists p1 and p2 into a single list. -** Set *ppOut to the head of the new list. */ -static void vdbeSorterMerge( +static SorterRecord *vdbeSorterMerge( SortSubtask *pTask, /* Calling thread context */ SorterRecord *p1, /* First list to merge */ - SorterRecord *p2, /* Second list to merge */ - SorterRecord **ppOut /* OUT: Head of merged list */ + SorterRecord *p2 /* Second list to merge */ ){ SorterRecord *pFinal = 0; SorterRecord **pp = &pFinal; int bCached = 0; - while( p1 && p2 ){ + assert( p1!=0 && p2!=0 ); + for(;;){ int res; res = pTask->xCompare( pTask, &bCached, SRVAL(p1), p1->nVal, SRVAL(p2), p2->nVal @@ -85485,15 +85985,22 @@ static void vdbeSorterMerge( *pp = p1; pp = &p1->u.pNext; p1 = p1->u.pNext; + if( p1==0 ){ + *pp = p2; + break; + } }else{ *pp = p2; pp = &p2->u.pNext; p2 = p2->u.pNext; bCached = 0; + if( p2==0 ){ + *pp = p1; + break; + } } } - *pp = p1 ? p1 : p2; - *ppOut = pFinal; + return pFinal; } /* @@ -85546,7 +86053,7 @@ static int vdbeSorterSort(SortSubtask *pTask, SorterList *pList){ p->u.pNext = 0; for(i=0; aSlot[i]; i++){ - vdbeSorterMerge(pTask, p, aSlot[i], &p); + p = vdbeSorterMerge(pTask, p, aSlot[i]); aSlot[i] = 0; } aSlot[i] = p; @@ -85555,7 +86062,8 @@ static int vdbeSorterSort(SortSubtask *pTask, SorterList *pList){ p = 0; for(i=0; i<64; i++){ - vdbeSorterMerge(pTask, p, aSlot[i], &p); + if( aSlot[i]==0 ) continue; + p = p ? vdbeSorterMerge(pTask, p, aSlot[i]) : aSlot[i]; } pList->pList = p; @@ -88175,7 +88683,11 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId); pNC->nErr++; is_agg = 0; - }else if( no_such_func && pParse->db->init.busy==0 ){ + }else if( no_such_func && pParse->db->init.busy==0 +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + && pParse->explain==0 +#endif + ){ sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId); pNC->nErr++; }else if( wrong_num_args ){ @@ -90775,6 +91287,11 @@ SQLITE_PRIVATE int sqlite3FindInIndex(Parse *pParse, Expr *pX, u32 inFlags, int eType = IN_INDEX_INDEX_ASC + pIdx->aSortOrder[0]; if( prRhsHasNull && !pTab->aCol[iCol].notNull ){ +#ifdef SQLITE_ENABLE_COLUMN_USED_MASK + const i64 sOne = 1; + sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed, + iTab, 0, 0, (u8*)&sOne, P4_INT64); +#endif *prRhsHasNull = ++pParse->nMem; sqlite3SetHasNullFlag(v, iTab, *prRhsHasNull); } @@ -90787,7 +91304,7 @@ SQLITE_PRIVATE int sqlite3FindInIndex(Parse *pParse, Expr *pX, u32 inFlags, int /* If no preexisting index is available for the IN clause ** and IN_INDEX_NOOP is an allowed reply ** and the RHS of the IN operator is a list, not a subquery - ** and the RHS is not contant or has two or fewer terms, + ** and the RHS is not constant or has two or fewer terms, ** then it is not worth creating an ephemeral table to evaluate ** the IN operator so return IN_INDEX_NOOP. */ @@ -91179,8 +91696,7 @@ static void sqlite3ExprCodeIN( if( eType==IN_INDEX_ROWID ){ /* In this case, the RHS is the ROWID of table b-tree */ - sqlite3VdbeAddOp2(v, OP_MustBeInt, r1, destIfFalse); VdbeCoverage(v); - sqlite3VdbeAddOp3(v, OP_NotExists, pExpr->iTable, destIfFalse, r1); + sqlite3VdbeAddOp3(v, OP_SeekRowid, pExpr->iTable, destIfFalse, r1); VdbeCoverage(v); }else{ /* In this case, the RHS is an index b-tree. @@ -91493,7 +92009,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable( }else{ int op = IsVirtual(pTab) ? OP_VColumn : OP_Column; int x = iCol; - if( !HasRowid(pTab) ){ + if( !HasRowid(pTab) && !IsVirtual(pTab) ){ x = sqlite3ColumnOfIndex(sqlite3PrimaryKeyIndex(pTab), iCol); } sqlite3VdbeAddOp3(v, op, iTabCur, x, regOut); @@ -91896,6 +92412,11 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) assert( !ExprHasProperty(pExpr, EP_IntValue) ); zId = pExpr->u.zToken; pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0); +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + if( pDef==0 && pParse->explain ){ + pDef = sqlite3FindFunction(db, "unknown", nFarg, enc, 0); + } +#endif if( pDef==0 || pDef->xFinalize!=0 ){ sqlite3ErrorMsg(pParse, "unknown function: %s()", zId); break; @@ -92918,6 +93439,61 @@ SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr *pE1, Expr *pE2, int iTab){ return 0; } +/* +** An instance of the following structure is used by the tree walker +** to determine if an expression can be evaluated by reference to the +** index only, without having to do a search for the corresponding +** table entry. The IdxCover.pIdx field is the index. IdxCover.iCur +** is the cursor for the table. +*/ +struct IdxCover { + Index *pIdx; /* The index to be tested for coverage */ + int iCur; /* Cursor number for the table corresponding to the index */ +}; + +/* +** Check to see if there are references to columns in table +** pWalker->u.pIdxCover->iCur can be satisfied using the index +** pWalker->u.pIdxCover->pIdx. +*/ +static int exprIdxCover(Walker *pWalker, Expr *pExpr){ + if( pExpr->op==TK_COLUMN + && pExpr->iTable==pWalker->u.pIdxCover->iCur + && sqlite3ColumnOfIndex(pWalker->u.pIdxCover->pIdx, pExpr->iColumn)<0 + ){ + pWalker->eCode = 1; + return WRC_Abort; + } + return WRC_Continue; +} + +/* +** Determine if an index pIdx on table with cursor iCur contains will +** the expression pExpr. Return true if the index does cover the +** expression and false if the pExpr expression references table columns +** that are not found in the index pIdx. +** +** An index covering an expression means that the expression can be +** evaluated using only the index and without having to lookup the +** corresponding table entry. +*/ +SQLITE_PRIVATE int sqlite3ExprCoveredByIndex( + Expr *pExpr, /* The index to be tested */ + int iCur, /* The cursor number for the corresponding table */ + Index *pIdx /* The index that might be used for coverage */ +){ + Walker w; + struct IdxCover xcov; + memset(&w, 0, sizeof(w)); + xcov.iCur = iCur; + xcov.pIdx = pIdx; + w.xExprCallback = exprIdxCover; + w.u.pIdxCover = &xcov; + sqlite3WalkExpr(&w, pExpr); + return !w.eCode; +} + + /* ** An instance of the following structure is used by the tree walker ** to count references to table columns in the arguments of an @@ -93872,6 +94448,7 @@ SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){ Expr *pDflt; /* Default value for the new column */ sqlite3 *db; /* The database connection; */ Vdbe *v = pParse->pVdbe; /* The prepared statement under construction */ + int r1; /* Temporary registers */ db = pParse->db; if( pParse->nErr || db->mallocFailed ) return; @@ -93966,16 +94543,18 @@ SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){ db->flags = savedDbFlags; } - /* If the default value of the new column is NULL, then the file - ** format to 2. If the default value of the new column is not NULL, - ** the file format be 3. Back when this feature was first added - ** in 2006, we went to the trouble to upgrade the file format to the - ** minimum support values. But 10-years on, we can assume that all - ** extent versions of SQLite support file-format 4, so we always and - ** unconditionally upgrade to 4. + /* Make sure the schema version is at least 3. But do not upgrade + ** from less than 3 to 4, as that will corrupt any preexisting DESC + ** index. */ - sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, - SQLITE_MAX_FILE_FORMAT); + r1 = sqlite3GetTempReg(pParse); + sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT); + sqlite3VdbeUsesBtree(v, iDb); + sqlite3VdbeAddOp2(v, OP_AddImm, r1, -2); + sqlite3VdbeAddOp2(v, OP_IfPos, r1, sqlite3VdbeCurrentAddr(v)+2); + VdbeCoverage(v); + sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3); + sqlite3ReleaseTempReg(pParse, r1); /* Reload the schema of the modified table. */ reloadTableSchema(pParse, pTab, pTab->zName); @@ -96620,7 +97199,7 @@ SQLITE_PRIVATE int sqlite3FixTriggerStep( ** Setting the auth function to NULL disables this hook. The default ** setting of the auth function is NULL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( +SQLITE_API int sqlite3_set_authorizer( sqlite3 *db, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pArg @@ -96664,6 +97243,7 @@ SQLITE_PRIVATE int sqlite3AuthReadCol( char *zDb = db->aDb[iDb].zName; /* Name of attached database */ int rc; /* Auth callback return code */ + if( db->init.busy ) return SQLITE_OK; rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext #ifdef SQLITE_USER_AUTHENTICATION ,db->auth.zAuthUser @@ -97154,7 +97734,7 @@ SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const cha */ SQLITE_PRIVATE Table *sqlite3LocateTable( Parse *pParse, /* context in which to report errors */ - int isView, /* True if looking for a VIEW rather than a TABLE */ + u32 flags, /* LOCATE_VIEW or LOCATE_NOERR */ const char *zName, /* Name of the table we are looking for */ const char *zDbase /* Name of the database. Might be NULL */ ){ @@ -97168,7 +97748,7 @@ SQLITE_PRIVATE Table *sqlite3LocateTable( p = sqlite3FindTable(pParse->db, zName, zDbase); if( p==0 ){ - const char *zMsg = isView ? "no such view" : "no such table"; + const char *zMsg = flags & LOCATE_VIEW ? "no such view" : "no such table"; #ifndef SQLITE_OMIT_VIRTUALTABLE if( sqlite3FindDbName(pParse->db, zDbase)<1 ){ /* If zName is the not the name of a table in the schema created using @@ -97180,12 +97760,14 @@ SQLITE_PRIVATE Table *sqlite3LocateTable( } } #endif - if( zDbase ){ - sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName); - }else{ - sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName); + if( (flags & LOCATE_NOERR)==0 ){ + if( zDbase ){ + sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName); + }else{ + sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName); + } + pParse->checkSchema = 1; } - pParse->checkSchema = 1; } return p; @@ -97202,7 +97784,7 @@ SQLITE_PRIVATE Table *sqlite3LocateTable( */ SQLITE_PRIVATE Table *sqlite3LocateTableItem( Parse *pParse, - int isView, + u32 flags, struct SrcList_item *p ){ const char *zDb; @@ -97213,7 +97795,7 @@ SQLITE_PRIVATE Table *sqlite3LocateTableItem( }else{ zDb = p->zDatabase; } - return sqlite3LocateTable(pParse, isView, p->zName, zDb); + return sqlite3LocateTable(pParse, flags, p->zName, zDb); } /* @@ -97421,8 +98003,9 @@ static void SQLITE_NOINLINE deleteTable(sqlite3 *db, Table *pTable){ /* Delete all indices associated with this table. */ for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){ pNext = pIndex->pNext; - assert( pIndex->pSchema==pTable->pSchema ); - if( !db || db->pnBytesFreed==0 ){ + assert( pIndex->pSchema==pTable->pSchema + || (IsVirtual(pTable) && pIndex->idxType!=SQLITE_IDXTYPE_APPDEF) ); + if( (db==0 || db->pnBytesFreed==0) && !IsVirtual(pTable) ){ char *zName = pIndex->zName; TESTONLY ( Index *pOld = ) sqlite3HashInsert( &pIndex->pSchema->idxHash, zName, 0 @@ -98104,7 +98687,7 @@ SQLITE_PRIVATE void sqlite3AddPrimaryKey( Column *pCol = 0; int iCol = -1, i; int nTerm; - if( pTab==0 || IN_DECLARE_VTAB ) goto primary_key_exit; + if( pTab==0 ) goto primary_key_exit; if( pTab->tabFlags & TF_HasPrimaryKey ){ sqlite3ErrorMsg(pParse, "table \"%s\" has more than one primary key", pTab->zName); @@ -98150,12 +98733,8 @@ SQLITE_PRIVATE void sqlite3AddPrimaryKey( "INTEGER PRIMARY KEY"); #endif }else{ - Index *p; - p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, - 0, sortOrder, 0); - if( p ){ - p->idxType = SQLITE_IDXTYPE_PRIMARYKEY; - } + sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, + 0, sortOrder, 0, SQLITE_IDXTYPE_PRIMARYKEY); pList = 0; } @@ -98472,21 +99051,23 @@ static int hasColumn(const i16 *aiCol, int nCol, int x){ ** are appropriate for a WITHOUT ROWID table instead of a rowid table. ** Changes include: ** -** (1) Convert the OP_CreateTable into an OP_CreateIndex. There is +** (1) Set all columns of the PRIMARY KEY schema object to be NOT NULL. +** (2) Convert the OP_CreateTable into an OP_CreateIndex. There is ** no rowid btree for a WITHOUT ROWID. Instead, the canonical ** data storage is a covering index btree. -** (2) Bypass the creation of the sqlite_master table entry +** (3) Bypass the creation of the sqlite_master table entry ** for the PRIMARY KEY as the primary key index is now ** identified by the sqlite_master table entry of the table itself. -** (3) Set the Index.tnum of the PRIMARY KEY Index object in the +** (4) Set the Index.tnum of the PRIMARY KEY Index object in the ** schema to the rootpage from the main table. -** (4) Set all columns of the PRIMARY KEY schema object to be NOT NULL. ** (5) Add all table columns to the PRIMARY KEY Index object ** so that the PRIMARY KEY is a covering index. The surplus ** columns are part of KeyInfo.nXField and are not used for ** sorting or lookup or uniqueness checks. ** (6) Replace the rowid tail on all automatically generated UNIQUE ** indices with the PRIMARY KEY columns. +** +** For virtual tables, only (1) is performed. */ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ Index *pIdx; @@ -98496,6 +99077,20 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ sqlite3 *db = pParse->db; Vdbe *v = pParse->pVdbe; + /* Mark every PRIMARY KEY column as NOT NULL (except for imposter tables) + */ + if( !db->init.imposterTable ){ + for(i=0; inCol; i++){ + if( (pTab->aCol[i].colFlags & COLFLAG_PRIMKEY)!=0 ){ + pTab->aCol[i].notNull = OE_Abort; + } + } + } + + /* The remaining transformations only apply to b-tree tables, not to + ** virtual tables */ + if( IN_DECLARE_VTAB ) return; + /* Convert the OP_CreateTable opcode that would normally create the ** root-page for the table into an OP_CreateIndex opcode. The index ** created will become the PRIMARY KEY index. @@ -98517,9 +99112,10 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ if( pList==0 ) return; pList->a[0].sortOrder = pParse->iPkSortOrder; assert( pParse->pNewTable==pTab ); - pPk = sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0); - if( pPk==0 ) return; - pPk->idxType = SQLITE_IDXTYPE_PRIMARYKEY; + sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0, + SQLITE_IDXTYPE_PRIMARYKEY); + if( db->mallocFailed ) return; + pPk = sqlite3PrimaryKeyIndex(pTab); pTab->iPKey = -1; }else{ pPk = sqlite3PrimaryKeyIndex(pTab); @@ -98547,19 +99143,11 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ } pPk->nKeyCol = j; } - pPk->isCovering = 1; assert( pPk!=0 ); + pPk->isCovering = 1; + if( !db->init.imposterTable ) pPk->uniqNotNull = 1; nPk = pPk->nKeyCol; - /* Make sure every column of the PRIMARY KEY is NOT NULL. (Except, - ** do not enforce this for imposter tables.) */ - if( !db->init.imposterTable ){ - for(i=0; iaCol[pPk->aiColumn[i]].notNull = OE_Abort; - } - pPk->uniqNotNull = 1; - } - /* The root page of the PRIMARY KEY is the table root page */ pPk->tnum = pTab->tnum; @@ -99314,6 +99902,7 @@ SQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, assert( pName->nSrc==1 ); if( sqlite3ReadSchema(pParse) ) goto exit_drop_table; if( noErr ) db->suppressErr++; + assert( isView==0 || isView==LOCATE_VIEW ); pTab = sqlite3LocateTableItem(pParse, isView, &pName->a[0]); if( noErr ) db->suppressErr--; @@ -99684,12 +100273,8 @@ SQLITE_PRIVATE Index *sqlite3AllocateIndexObject( ** pList is a list of columns to be indexed. pList will be NULL if this ** is a primary key or unique-constraint on the most recent column added ** to the table currently under construction. -** -** If the index is created successfully, return a pointer to the new Index -** structure. This is used by sqlite3AddPrimaryKey() to mark the index -** as the tables primary key (Index.idxType==SQLITE_IDXTYPE_PRIMARYKEY) */ -SQLITE_PRIVATE Index *sqlite3CreateIndex( +SQLITE_PRIVATE void sqlite3CreateIndex( Parse *pParse, /* All information about this parse */ Token *pName1, /* First part of index name. May be NULL */ Token *pName2, /* Second part of index name. May be NULL */ @@ -99699,9 +100284,9 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( Token *pStart, /* The CREATE token that begins this statement */ Expr *pPIWhere, /* WHERE clause for partial indices */ int sortOrder, /* Sort order of primary key when pList==NULL */ - int ifNotExist /* Omit error if index already exists */ + int ifNotExist, /* Omit error if index already exists */ + u8 idxType /* The index type */ ){ - Index *pRet = 0; /* Pointer to return */ Table *pTab = 0; /* Table to be indexed */ Index *pIndex = 0; /* The index to be created */ char *zName = 0; /* Name of the index */ @@ -99719,7 +100304,10 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( char *zExtra = 0; /* Extra space after the Index object */ Index *pPk = 0; /* PRIMARY KEY index for WITHOUT ROWID tables */ - if( db->mallocFailed || IN_DECLARE_VTAB || pParse->nErr>0 ){ + if( db->mallocFailed || pParse->nErr>0 ){ + goto exit_create_index; + } + if( IN_DECLARE_VTAB && idxType!=SQLITE_IDXTYPE_PRIMARYKEY ){ goto exit_create_index; } if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){ @@ -99845,6 +100433,13 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( if( zName==0 ){ goto exit_create_index; } + + /* Automatic index names generated from within sqlite3_declare_vtab() + ** must have names that are distinct from normal automatic index names. + ** The following statement converts "sqlite3_autoindex..." into + ** "sqlite3_butoindex..." in order to make the names distinct. + ** The "vtab_err.test" test demonstrates the need of this statement. */ + if( IN_DECLARE_VTAB ) zName[7]++; } /* Check for authorization to create an index. @@ -99908,7 +100503,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( pIndex->pTable = pTab; pIndex->onError = (u8)onError; pIndex->uniqNotNull = onError!=OE_None; - pIndex->idxType = pName ? SQLITE_IDXTYPE_APPDEF : SQLITE_IDXTYPE_UNIQUE; + pIndex->idxType = idxType; pIndex->pSchema = db->aDb[iDb].pSchema; pIndex->nKeyCol = pList->nExpr; if( pPIWhere ){ @@ -100088,7 +100683,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( pIdx->onError = pIndex->onError; } } - pRet = pIdx; + if( idxType==SQLITE_IDXTYPE_PRIMARYKEY ) pIdx->idxType = idxType; goto exit_create_index; } } @@ -100100,6 +100695,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( assert( pParse->nErr==0 ); if( db->init.busy ){ Index *p; + assert( !IN_DECLARE_VTAB ); assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) ); p = sqlite3HashInsert(&pIndex->pSchema->idxHash, pIndex->zName, pIndex); @@ -100181,7 +100777,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( sqlite3ChangeCookie(pParse, iDb); sqlite3VdbeAddParseSchemaOp(v, iDb, sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName)); - sqlite3VdbeAddOp1(v, OP_Expire, 0); + sqlite3VdbeAddOp0(v, OP_Expire); } sqlite3VdbeJumpHere(v, pIndex->tnum); @@ -100206,7 +100802,6 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex( pIndex->pNext = pOther->pNext; pOther->pNext = pIndex; } - pRet = pIndex; pIndex = 0; } @@ -100217,7 +100812,6 @@ exit_create_index: sqlite3ExprListDelete(db, pList); sqlite3SrcListDelete(db, pTblName); sqlite3DbFree(db, zName); - return pRet; } /* @@ -100246,10 +100840,11 @@ SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){ int i; /* Set the first entry (number of rows in the index) to the estimated - ** number of rows in the table. Or 10, if the estimated number of rows - ** in the table is less than that. */ + ** number of rows in the table, or half the number of rows in the table + ** for a partial index. But do not let the estimate drop below 10. */ a[0] = pIdx->pTable->nRowLogEst; - if( a[0]<33 ) a[0] = 33; assert( 33==sqlite3LogEst(10) ); + if( pIdx->pPartIdxWhere!=0 ) a[0] -= 10; assert( 10==sqlite3LogEst(2) ); + if( a[0]<33 ) a[0] = 33; assert( 33==sqlite3LogEst(10) ); /* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is ** 6 and each subsequent value (if any) is 5. */ @@ -101131,10 +101726,6 @@ SQLITE_PRIVATE void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){ /* ** Return a KeyInfo structure that is appropriate for the given Index. ** -** The KeyInfo structure for an index is cached in the Index object. -** So there might be multiple references to the returned pointer. The -** caller should not try to modify the KeyInfo object. -** ** The caller should invoke sqlite3KeyInfoUnref() on the returned object ** when it has finished using it. */ @@ -103366,7 +103957,7 @@ static int patternCompare( } c2 = Utf8Read(zString); if( c==c2 ) continue; - if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){ + if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) && c<0x80 && c2<0x80 ){ continue; } if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue; @@ -103378,14 +103969,14 @@ static int patternCompare( /* ** The sqlite3_strglob() interface. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ +SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){ return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; } /* ** The sqlite3_strlike() interface. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ +SQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; } @@ -103942,6 +104533,26 @@ static void trimFunc( } +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION +/* +** The "unknown" function is automatically substituted in place of +** any unrecognized function name when doing an EXPLAIN or EXPLAIN QUERY PLAN +** when the SQLITE_ENABLE_UNKNOWN_FUNCTION compile-time option is used. +** When the "sqlite3" command-line shell is built using this functionality, +** that allows an EXPLAIN or EXPLAIN QUERY PLAN for complex queries +** involving application-defined functions to be examined in a generic +** sqlite3 shell. +*/ +static void unknownFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + /* no-op */ +} +#endif /*SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION*/ + + /* IMP: R-25361-16150 This function is omitted from SQLite by default. It ** is only available if the SQLITE_SOUNDEX compile-time option is used ** when SQLite is built. @@ -104412,13 +105023,16 @@ SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void){ AGGREGATE(group_concat, 2, 0, 0, groupConcatStep, groupConcatFinalize), LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), - #ifdef SQLITE_CASE_SENSITIVE_LIKE +#ifdef SQLITE_CASE_SENSITIVE_LIKE LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE), - #else +#else LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE), LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE), - #endif +#endif +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + FUNCTION(unknown, -1, 0, 0, unknownFunc ), +#endif FUNCTION(coalesce, 1, 0, 0, 0 ), FUNCTION(coalesce, 0, 0, 0, 0 ), FUNCTION2(coalesce, -1, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), @@ -105825,7 +106439,8 @@ SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){ FKey *pFKey; /* Iterator variable */ FKey *pNext; /* Copy of pFKey->pNextFrom */ - assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) ); + assert( db==0 || IsVirtual(pTab) + || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) ); for(pFKey=pTab->pFKey; pFKey; pFKey=pNext){ /* Remove the FK from the fkeyHash hash table. */ @@ -107640,15 +108255,15 @@ SQLITE_PRIVATE int sqlite3OpenTableAndIndices( for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ int iIdxCur = iBase++; assert( pIdx->pSchema==pTab->pSchema ); + if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ + if( piDataCur ) *piDataCur = iIdxCur; + p5 = 0; + } if( aToOpen==0 || aToOpen[i+1] ){ sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb); sqlite3VdbeSetP4KeyInfo(pParse, pIdx); - VdbeComment((v, "%s", pIdx->zName)); - } - if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ - if( piDataCur ) *piDataCur = iIdxCur; - }else{ sqlite3VdbeChangeP5(v, p5); + VdbeComment((v, "%s", pIdx->zName)); } } if( iBase>pParse->nTab ) pParse->nTab = iBase; @@ -108080,7 +108695,7 @@ static int xferOptimization( ** argument to xCallback(). If xCallback=NULL then no callback ** is invoked, even for queries. */ -SQLITE_API int SQLITE_STDCALL sqlite3_exec( +SQLITE_API int sqlite3_exec( sqlite3 *db, /* The database on which the SQL executes */ const char *zSql, /* The SQL to be executed */ sqlite3_callback xCallback, /* Invoke this callback routine */ @@ -108235,12 +108850,10 @@ exec_out: ** as extensions by SQLite should #include this file instead of ** sqlite3.h. */ -#ifndef _SQLITE3EXT_H_ -#define _SQLITE3EXT_H_ +#ifndef SQLITE3EXT_H +#define SQLITE3EXT_H /* #include "sqlite3.h" */ -typedef struct sqlite3_api_routines sqlite3_api_routines; - /* ** The following structure holds pointers to all of the SQLite API ** routines. @@ -108501,8 +109114,21 @@ struct sqlite3_api_routines { int (*db_cacheflush)(sqlite3*); /* Version 3.12.0 and later */ int (*system_errno)(sqlite3*); + /* Version 3.14.0 and later */ + int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*); + char *(*expanded_sql)(sqlite3_stmt*); }; +/* +** This is the function signature used for all extension entry points. It +** is also defined in the file "loadext.c". +*/ +typedef int (*sqlite3_loadext_entry)( + sqlite3 *db, /* Handle to the database. */ + char **pzErrMsg, /* Used to set error string on failure. */ + const sqlite3_api_routines *pThunk /* Extension API function pointers. */ +); + /* ** The following macros redefine the API routines so that they are ** redirected through the global sqlite3_api structure. @@ -108746,6 +109372,9 @@ struct sqlite3_api_routines { #define sqlite3_db_cacheflush sqlite3_api->db_cacheflush /* Version 3.12.0 and later */ #define sqlite3_system_errno sqlite3_api->system_errno +/* Version 3.14.0 and later */ +#define sqlite3_trace_v2 sqlite3_api->trace_v2 +#define sqlite3_expanded_sql sqlite3_api->expanded_sql #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) @@ -108763,7 +109392,7 @@ struct sqlite3_api_routines { # define SQLITE_EXTENSION_INIT3 /*no-op*/ #endif -#endif /* _SQLITE3EXT_H_ */ +#endif /* SQLITE3EXT_H */ /************** End of sqlite3ext.h ******************************************/ /************** Continuing where we left off in loadext.c ********************/ @@ -108771,7 +109400,6 @@ struct sqlite3_api_routines { /* #include */ #ifndef SQLITE_OMIT_LOAD_EXTENSION - /* ** Some API routines are omitted when various features are ** excluded from a build of SQLite. Substitute a NULL pointer @@ -108841,7 +109469,7 @@ struct sqlite3_api_routines { # define sqlite3_enable_shared_cache 0 #endif -#ifdef SQLITE_OMIT_TRACE +#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED) # define sqlite3_profile 0 # define sqlite3_trace 0 #endif @@ -108861,6 +109489,10 @@ struct sqlite3_api_routines { #define sqlite3_blob_reopen 0 #endif +#if defined(SQLITE_OMIT_TRACE) +# define sqlite3_trace_v2 0 +#endif + /* ** The following structure contains pointers to all SQLite API routines. ** A pointer to this structure is passed into extensions when they are @@ -109166,7 +109798,10 @@ static const sqlite3_api_routines sqlite3Apis = { sqlite3_strlike, sqlite3_db_cacheflush, /* Version 3.12.0 and later */ - sqlite3_system_errno + sqlite3_system_errno, + /* Version 3.14.0 and later */ + sqlite3_trace_v2, + sqlite3_expanded_sql }; /* @@ -109189,13 +109824,14 @@ static int sqlite3LoadExtension( ){ sqlite3_vfs *pVfs = db->pVfs; void *handle; - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); + sqlite3_loadext_entry xInit; char *zErrmsg = 0; const char *zEntry; char *zAltEntry = 0; void **aHandle; u64 nMsg = 300 + sqlite3Strlen30(zFile); int ii; + int rc; /* Shared library endings to try if zFile cannot be loaded as written */ static const char *azEndings[] = { @@ -109247,8 +109883,7 @@ static int sqlite3LoadExtension( } return SQLITE_ERROR; } - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - sqlite3OsDlSym(pVfs, handle, zEntry); + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); /* If no entry point was specified and the default legacy ** entry point name "sqlite3_extension_init" was not found, then @@ -109280,8 +109915,7 @@ static int sqlite3LoadExtension( } memcpy(zAltEntry+iEntry, "_init", 6); zEntry = zAltEntry; - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - sqlite3OsDlSym(pVfs, handle, zEntry); + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); } if( xInit==0 ){ if( pzErrMsg ){ @@ -109298,7 +109932,9 @@ static int sqlite3LoadExtension( return SQLITE_ERROR; } sqlite3_free(zAltEntry); - if( xInit(db, &zErrmsg, &sqlite3Apis) ){ + rc = xInit(db, &zErrmsg, &sqlite3Apis); + if( rc ){ + if( rc==SQLITE_OK_LOAD_PERMANENTLY ) return SQLITE_OK; if( pzErrMsg ){ *pzErrMsg = sqlite3_mprintf("error during initialization: %s", zErrmsg); } @@ -109321,7 +109957,7 @@ static int sqlite3LoadExtension( db->aExtension[db->nExtension++] = handle; return SQLITE_OK; } -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( +SQLITE_API int sqlite3_load_extension( sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ @@ -109352,7 +109988,7 @@ SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){ ** Enable or disable extension loading. Extension loading is disabled by ** default so as not to open security holes in older applications. */ -SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){ sqlite3_mutex_enter(db->mutex); if( onoff ){ db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; @@ -109409,7 +110045,9 @@ static SQLITE_WSD struct sqlite3AutoExtList { ** Register a statically linked extension that is automatically ** loaded by every new database connection. */ -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xInit)(void)){ +SQLITE_API int sqlite3_auto_extension( + void (*xInit)(void) +){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_AUTOINIT rc = sqlite3_initialize(); @@ -109454,7 +110092,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xInit)(void)){ ** Return 1 if xInit was found on the list and removed. Return 0 if xInit ** was not on the list. */ -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xInit)(void)){ +SQLITE_API int sqlite3_cancel_auto_extension( + void (*xInit)(void) +){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); #endif @@ -109477,7 +110117,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xInit)(void)) /* ** Reset the automatic extension loading mechanism. */ -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ +SQLITE_API void sqlite3_reset_auto_extension(void){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize()==SQLITE_OK ) #endif @@ -109503,7 +110143,7 @@ SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){ u32 i; int go = 1; int rc; - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); + sqlite3_loadext_entry xInit; wsdAutoextInit; if( wsdAutoext.nExt==0 ){ @@ -109520,8 +110160,7 @@ SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){ xInit = 0; go = 0; }else{ - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - wsdAutoext.aExt[i]; + xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i]; } sqlite3_mutex_leave(mutex); zErrmsg = 0; @@ -111036,7 +111675,7 @@ SQLITE_PRIVATE void sqlite3Pragma( ** compiler (eg. count_changes). So add an opcode to expire all ** compiled SQL statements after modifying a pragma value. */ - sqlite3VdbeAddOp2(v, OP_Expire, 0, 0); + sqlite3VdbeAddOp0(v, OP_Expire); setAllPagerFlags(db); } break; @@ -111058,7 +111697,7 @@ SQLITE_PRIVATE void sqlite3Pragma( */ case PragTyp_TABLE_INFO: if( zRight ){ Table *pTab; - pTab = sqlite3FindTable(db, zRight, zDb); + pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb); if( pTab ){ static const char *azCol[] = { "cid", "name", "type", "notnull", "dflt_value", "pk" @@ -111340,12 +111979,10 @@ SQLITE_PRIVATE void sqlite3Pragma( sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow); sqlite3ColumnDefault(v, pTab, iKey, regRow); sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk); VdbeCoverage(v); - sqlite3VdbeAddOp2(v, OP_MustBeInt, regRow, - sqlite3VdbeCurrentAddr(v)+3); VdbeCoverage(v); }else{ sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow); } - sqlite3VdbeAddOp3(v, OP_NotExists, i, 0, regRow); VdbeCoverage(v); + sqlite3VdbeAddOp3(v, OP_SeekRowid, i, 0, regRow); VdbeCoverage(v); sqlite3VdbeGoto(v, addrOk); sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2); }else{ @@ -112741,7 +113378,7 @@ SQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){ ** and the statement is automatically recompiled if an schema change ** occurs. */ -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( +SQLITE_API int sqlite3_prepare( sqlite3 *db, /* Database handle. */ const char *zSql, /* UTF-8 encoded SQL statement. */ int nBytes, /* Length of zSql in bytes. */ @@ -112753,7 +113390,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare( assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( +SQLITE_API int sqlite3_prepare_v2( sqlite3 *db, /* Database handle. */ const char *zSql, /* UTF-8 encoded SQL statement. */ int nBytes, /* Length of zSql in bytes. */ @@ -112829,7 +113466,7 @@ static int sqlite3Prepare16( ** and the statement is automatically recompiled if an schema change ** occurs. */ -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( +SQLITE_API int sqlite3_prepare16( sqlite3 *db, /* Database handle. */ const void *zSql, /* UTF-16 encoded SQL statement. */ int nBytes, /* Length of zSql in bytes. */ @@ -112841,7 +113478,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( +SQLITE_API int sqlite3_prepare16_v2( sqlite3 *db, /* Database handle. */ const void *zSql, /* UTF-16 encoded SQL statement. */ int nBytes, /* Length of zSql in bytes. */ @@ -112916,6 +113553,7 @@ struct SortCtx { int addrSortIndex; /* Address of the OP_SorterOpen or OP_OpenEphemeral */ int labelDone; /* Jump here when done, ex: LIMIT reached */ u8 sortFlags; /* Zero or more SORTFLAG_* bits */ + u8 bOrderedInnerLoop; /* ORDER BY correctly sorts the inner loop */ }; #define SORTFLAG_UseSorter 0x01 /* Use SorterOpen instead of OpenEphemeral */ @@ -113449,9 +114087,30 @@ static void pushOntoSorter( sqlite3VdbeAddOp2(v, op, pSort->iECursor, regRecord); if( iLimit ){ int addr; + int r1 = 0; + /* Fill the sorter until it contains LIMIT+OFFSET entries. (The iLimit + ** register is initialized with value of LIMIT+OFFSET.) After the sorter + ** fills up, delete the least entry in the sorter after each insert. + ** Thus we never hold more than the LIMIT+OFFSET rows in memory at once */ addr = sqlite3VdbeAddOp3(v, OP_IfNotZero, iLimit, 0, 1); VdbeCoverage(v); sqlite3VdbeAddOp1(v, OP_Last, pSort->iECursor); + if( pSort->bOrderedInnerLoop ){ + r1 = ++pParse->nMem; + sqlite3VdbeAddOp3(v, OP_Column, pSort->iECursor, nExpr, r1); + VdbeComment((v, "seq")); + } sqlite3VdbeAddOp1(v, OP_Delete, pSort->iECursor); + if( pSort->bOrderedInnerLoop ){ + /* If the inner loop is driven by an index such that values from + ** the same iteration of the inner loop are in sorted order, then + ** immediately jump to the next iteration of an inner loop if the + ** entry from the current iteration does not fit into the top + ** LIMIT+OFFSET entries of the sorter. */ + int iBrk = sqlite3VdbeCurrentAddr(v) + 2; + sqlite3VdbeAddOp3(v, OP_Eq, regBase+nExpr, iBrk, r1); + sqlite3VdbeChangeP5(v, SQLITE_NULLEQ); + VdbeCoverage(v); + } sqlite3VdbeJumpHere(v, addr); } } @@ -113866,7 +114525,7 @@ static void selectInnerLoop( */ SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){ int nExtra = (N+X)*(sizeof(CollSeq*)+1); - KeyInfo *p = sqlite3Malloc(sizeof(KeyInfo) + nExtra); + KeyInfo *p = sqlite3DbMallocRaw(db, sizeof(KeyInfo) + nExtra); if( p ){ p->aSortOrder = (u8*)&p->aColl[N+X]; p->nField = (u16)N; @@ -113888,7 +114547,7 @@ SQLITE_PRIVATE void sqlite3KeyInfoUnref(KeyInfo *p){ if( p ){ assert( p->nRef>0 ); p->nRef--; - if( p->nRef==0 ) sqlite3DbFree(0, p); + if( p->nRef==0 ) sqlite3DbFree(p->db, p); } } @@ -118036,6 +118695,7 @@ SQLITE_PRIVATE int sqlite3Select( } if( sSort.pOrderBy ){ sSort.nOBSat = sqlite3WhereIsOrdered(pWInfo); + sSort.bOrderedInnerLoop = sqlite3WhereOrderedInnerLoop(pWInfo); if( sSort.nOBSat==sSort.pOrderBy->nExpr ){ sSort.pOrderBy = 0; } @@ -118661,7 +119321,7 @@ malloc_failed: ** Instead, the entire table should be passed to sqlite3_free_table() when ** the calling procedure is finished using it. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( +SQLITE_API int sqlite3_get_table( sqlite3 *db, /* The database on which the SQL executes */ const char *zSql, /* The SQL to be executed */ char ***pazResult, /* Write the result table here */ @@ -118730,7 +119390,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_table( /* ** This routine frees the space the sqlite3_get_table() malloced. */ -SQLITE_API void SQLITE_STDCALL sqlite3_free_table( +SQLITE_API void sqlite3_free_table( char **azResult /* Result returned from sqlite3_get_table() */ ){ if( azResult ){ @@ -120805,7 +121465,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ int saved_flags; /* Saved value of the db->flags */ int saved_nChange; /* Saved value of db->nChange */ int saved_nTotalChange; /* Saved value of db->nTotalChange */ - void (*saved_xTrace)(void*,const char*); /* Saved db->xTrace */ + u8 saved_mTrace; /* Saved trace settings */ Db *pDb = 0; /* Database to detach at end of vacuum */ int isMemDb; /* True if vacuuming a :memory: database */ int nRes; /* Bytes of reserved space at the end of each page */ @@ -120826,10 +121486,10 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ saved_flags = db->flags; saved_nChange = db->nChange; saved_nTotalChange = db->nTotalChange; - saved_xTrace = db->xTrace; + saved_mTrace = db->mTrace; db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks | SQLITE_PreferBuiltin; db->flags &= ~(SQLITE_ForeignKeys | SQLITE_ReverseOrder); - db->xTrace = 0; + db->mTrace = 0; pMain = db->aDb[0].pBt; isMemDb = sqlite3PagerIsMemdb(sqlite3BtreePager(pMain)); @@ -120881,6 +121541,8 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ } #endif + sqlite3BtreeSetCacheSize(pTemp, db->aDb[0].pSchema->cache_size); + sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0)); rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF"); if( rc!=SQLITE_OK ) goto end_of_vacuum; @@ -121029,7 +121691,7 @@ end_of_vacuum: db->flags = saved_flags; db->nChange = saved_nChange; db->nTotalChange = saved_nTotalChange; - db->xTrace = saved_xTrace; + db->mTrace = saved_mTrace; sqlite3BtreeSetPageSize(pMain, -1, -1, 1); /* Currently there is an SQL level transaction open on the vacuum @@ -121138,7 +121800,7 @@ static int createModule( /* ** External API function used to create a new virtual-table module. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( +SQLITE_API int sqlite3_create_module( sqlite3 *db, /* Database in which module is registered */ const char *zName, /* Name assigned to this module */ const sqlite3_module *pModule, /* The definition of the module */ @@ -121153,7 +121815,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_module( /* ** External API function used to create a new virtual-table module. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( +SQLITE_API int sqlite3_create_module_v2( sqlite3 *db, /* Database in which module is registered */ const char *zName, /* Name assigned to this module */ const sqlite3_module *pModule, /* The definition of the module */ @@ -121478,7 +122140,7 @@ SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){ v = sqlite3GetVdbe(pParse); sqlite3ChangeCookie(pParse, iDb); - sqlite3VdbeAddOp2(v, OP_Expire, 0, 0); + sqlite3VdbeAddOp0(v, OP_Expire); zWhere = sqlite3MPrintf(db, "name='%q' AND type='table'", pTab->zName); sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere); @@ -121777,7 +122439,7 @@ SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, ** valid to call this function from within the xCreate() or xConnect() of a ** virtual table module. */ -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ +SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ VtabCtx *pCtx; Parse *pParse; int rc = SQLITE_OK; @@ -121814,10 +122476,24 @@ SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCre && (pParse->pNewTable->tabFlags & TF_Virtual)==0 ){ if( !pTab->aCol ){ - pTab->aCol = pParse->pNewTable->aCol; - pTab->nCol = pParse->pNewTable->nCol; - pParse->pNewTable->nCol = 0; - pParse->pNewTable->aCol = 0; + Table *pNew = pParse->pNewTable; + Index *pIdx; + pTab->aCol = pNew->aCol; + pTab->nCol = pNew->nCol; + pTab->tabFlags |= pNew->tabFlags & (TF_WithoutRowid|TF_NoVisibleRowid); + pNew->nCol = 0; + pNew->aCol = 0; + assert( pTab->pIndex==0 ); + if( !HasRowid(pNew) && pCtx->pVTable->pMod->pModule->xUpdate!=0 ){ + rc = SQLITE_ERROR; + } + pIdx = pNew->pIndex; + if( pIdx ){ + assert( pIdx->pNext==0 ); + pTab->pIndex = pIdx; + pNew->pIndex = 0; + pIdx->pTable = pTab; + } } pCtx->bDeclared = 1; }else{ @@ -121853,7 +122529,7 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab Table *pTab; pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName); - if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){ + if( pTab!=0 && ALWAYS(pTab->pVTable!=0) ){ VTable *p; int (*xDestroy)(sqlite3_vtab *); for(p=pTab->pVTable; p; p=p->pNext){ @@ -121993,7 +122669,10 @@ SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){ if( rc==SQLITE_OK ){ int iSvpt = db->nStatement + db->nSavepoint; addToVTrans(db, pVTab); - if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1); + if( iSvpt && pModule->xSavepoint ){ + pVTab->iSavepoint = iSvpt; + rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1); + } } } } @@ -122147,7 +122826,7 @@ SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){ } /* -** Check to see if virtual tale module pMod can be have an eponymous +** Check to see if virtual table module pMod can be have an eponymous ** virtual table instance. If it can, create one if one does not already ** exist. Return non-zero if the eponymous virtual table instance exists ** when this routine returns, and return zero if it does not exist. @@ -122164,17 +122843,18 @@ SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse *pParse, Module *pMod){ const sqlite3_module *pModule = pMod->pModule; Table *pTab; char *zErr = 0; - int nName; int rc; sqlite3 *db = pParse->db; if( pMod->pEpoTab ) return 1; if( pModule->xCreate!=0 && pModule->xCreate!=pModule->xConnect ) return 0; - nName = sqlite3Strlen30(pMod->zName) + 1; - pTab = sqlite3DbMallocZero(db, sizeof(Table) + nName); + pTab = sqlite3DbMallocZero(db, sizeof(Table)); if( pTab==0 ) return 0; + pTab->zName = sqlite3DbStrDup(db, pMod->zName); + if( pTab->zName==0 ){ + sqlite3DbFree(db, pTab); + return 0; + } pMod->pEpoTab = pTab; - pTab->zName = (char*)&pTab[1]; - memcpy(pTab->zName, pMod->zName, nName); pTab->nRef = 1; pTab->pSchema = db->aDb[0].pSchema; pTab->tabFlags |= TF_Virtual; @@ -122200,9 +122880,11 @@ SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse *pParse, Module *pMod){ SQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3 *db, Module *pMod){ Table *pTab = pMod->pEpoTab; if( pTab!=0 ){ - sqlite3DeleteColumnNames(db, pTab); - sqlite3VtabClear(db, pTab); - sqlite3DbFree(db, pTab); + /* Mark the table as Ephemeral prior to deleting it, so that the + ** sqlite3DeleteTable() routine will know that it is not stored in + ** the schema. */ + pTab->tabFlags |= TF_Ephemeral; + sqlite3DeleteTable(db, pTab); pMod->pEpoTab = 0; } } @@ -122214,7 +122896,7 @@ SQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3 *db, Module *pMod){ ** The results of this routine are undefined unless it is called from ** within an xUpdate method. */ -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){ static const unsigned char aMap[] = { SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE }; @@ -122232,7 +122914,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ ** the SQLite core with additional information about the behavior ** of the virtual table being implemented. */ -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){ +SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){ va_list ap; int rc = SQLITE_OK; @@ -122709,8 +123391,9 @@ struct WhereInfo { u8 sorted; /* True if really sorted (not just grouped) */ u8 eOnePass; /* ONEPASS_OFF, or _SINGLE, or _MULTI */ u8 untestedTerms; /* Not all WHERE terms resolved by outer loop */ - u8 eDistinct; /* One of the WHERE_DISTINCT_* values below */ + u8 eDistinct; /* One of the WHERE_DISTINCT_* values */ u8 nLevel; /* Number of nested loop */ + u8 bOrderedInnerLoop; /* True if only the inner-most loop is ordered */ int iTop; /* The very beginning of the WHERE loop */ int iContinue; /* Jump here to continue with next record */ int iBreak; /* Jump here to break out of the loop */ @@ -122727,6 +123410,9 @@ struct WhereInfo { ** where.c: */ SQLITE_PRIVATE Bitmask sqlite3WhereGetMask(WhereMaskSet*,int); +#ifdef WHERETRACE_ENABLED +SQLITE_PRIVATE void sqlite3WhereClausePrint(WhereClause *pWC); +#endif SQLITE_PRIVATE WhereTerm *sqlite3WhereFindTerm( WhereClause *pWC, /* The WHERE clause to be searched */ int iCur, /* Cursor number of LHS */ @@ -122943,7 +123629,7 @@ SQLITE_PRIVATE int sqlite3WhereExplainOneScan( pLoop = pLevel->pWLoop; flags = pLoop->wsFlags; - if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return 0; + if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_OR_SUBCLAUSE) ) return 0; isSearch = (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0 || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0)) @@ -123353,9 +124039,15 @@ static int codeAllEqualityTerms( sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j); } } - testcase( pTerm->eOperator & WO_ISNULL ); - testcase( pTerm->eOperator & WO_IN ); - if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){ + if( (pTerm->eOperator & WO_IN)!=0 ){ + if( pTerm->pExpr->flags & EP_xIsSelect ){ + /* No affinity ever needs to be (or should be) applied to a value + ** from the RHS of an "? IN (SELECT ...)" expression. The + ** sqlite3FindInIndex() routine has already ensured that the + ** affinity of the comparison has been applied to the value. */ + if( zAff ) zAff[j] = SQLITE_AFF_BLOB; + } + }else if( (pTerm->eOperator & WO_ISNULL)==0 ){ Expr *pRight = pTerm->pExpr->pRight; if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){ sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk); @@ -123386,7 +124078,7 @@ static int codeAllEqualityTerms( ** expression: "x>='ABC' AND x<'abd'". But this requires that the range ** scan loop run twice, once for strings and a second time for BLOBs. ** The OP_String opcodes on the second pass convert the upper and lower -** bound string contants to blobs. This routine makes the necessary changes +** bound string constants to blobs. This routine makes the necessary changes ** to the OP_String opcodes for that to happen. ** ** Except, of course, if SQLITE_LIKE_DOESNT_MATCH_BLOBS is defined, then @@ -123443,6 +124135,38 @@ static int codeCursorHintCheckExpr(Walker *pWalker, Expr *pExpr){ return WRC_Continue; } +/* +** Test whether or not expression pExpr, which was part of a WHERE clause, +** should be included in the cursor-hint for a table that is on the rhs +** of a LEFT JOIN. Set Walker.eCode to non-zero before returning if the +** expression is not suitable. +** +** An expression is unsuitable if it might evaluate to non NULL even if +** a TK_COLUMN node that does affect the value of the expression is set +** to NULL. For example: +** +** col IS NULL +** col IS NOT NULL +** coalesce(col, 1) +** CASE WHEN col THEN 0 ELSE 1 END +*/ +static int codeCursorHintIsOrFunction(Walker *pWalker, Expr *pExpr){ + if( pExpr->op==TK_IS + || pExpr->op==TK_ISNULL || pExpr->op==TK_ISNOT + || pExpr->op==TK_NOTNULL || pExpr->op==TK_CASE + ){ + pWalker->eCode = 1; + }else if( pExpr->op==TK_FUNCTION ){ + int d1; + char d2[3]; + if( 0==sqlite3IsLikeFunction(pWalker->pParse->db, pExpr, &d1, d2) ){ + pWalker->eCode = 1; + } + } + + return WRC_Continue; +} + /* ** This function is called on every node of an expression tree used as an @@ -123495,6 +124219,7 @@ static int codeCursorHintFixExpr(Walker *pWalker, Expr *pExpr){ ** Insert an OP_CursorHint instruction if it is appropriate to do so. */ static void codeCursorHint( + struct SrcList_item *pTabItem, /* FROM clause item */ WhereInfo *pWInfo, /* The where clause */ WhereLevel *pLevel, /* Which loop to provide hints for */ WhereTerm *pEndRange /* Hint this end-of-scan boundary term if not NULL */ @@ -123525,7 +124250,42 @@ static void codeCursorHint( pTerm = &pWC->a[i]; if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue; if( pTerm->prereqAll & pLevel->notReady ) continue; - if( ExprHasProperty(pTerm->pExpr, EP_FromJoin) ) continue; + + /* Any terms specified as part of the ON(...) clause for any LEFT + ** JOIN for which the current table is not the rhs are omitted + ** from the cursor-hint. + ** + ** If this table is the rhs of a LEFT JOIN, "IS" or "IS NULL" terms + ** that were specified as part of the WHERE clause must be excluded. + ** This is to address the following: + ** + ** SELECT ... t1 LEFT JOIN t2 ON (t1.a=t2.b) WHERE t2.c IS NULL; + ** + ** Say there is a single row in t2 that matches (t1.a=t2.b), but its + ** t2.c values is not NULL. If the (t2.c IS NULL) constraint is + ** pushed down to the cursor, this row is filtered out, causing + ** SQLite to synthesize a row of NULL values. Which does match the + ** WHERE clause, and so the query returns a row. Which is incorrect. + ** + ** For the same reason, WHERE terms such as: + ** + ** WHERE 1 = (t2.c IS NULL) + ** + ** are also excluded. See codeCursorHintIsOrFunction() for details. + */ + if( pTabItem->fg.jointype & JT_LEFT ){ + Expr *pExpr = pTerm->pExpr; + if( !ExprHasProperty(pExpr, EP_FromJoin) + || pExpr->iRightJoinTable!=pTabItem->iCursor + ){ + sWalker.eCode = 0; + sWalker.xExprCallback = codeCursorHintIsOrFunction; + sqlite3WalkExpr(&sWalker, pTerm->pExpr); + if( sWalker.eCode ) continue; + } + }else{ + if( ExprHasProperty(pTerm->pExpr, EP_FromJoin) ) continue; + } /* All terms in pWLoop->aLTerm[] except pEndRange are used to initialize ** the cursor. These terms are not needed as hints for a pure range @@ -123559,7 +124319,7 @@ static void codeCursorHint( } } #else -# define codeCursorHint(A,B,C) /* No-op */ +# define codeCursorHint(A,B,C,D) /* No-op */ #endif /* SQLITE_ENABLE_CURSOR_HINTS */ /* @@ -123593,7 +124353,7 @@ static void codeDeferredSeek( assert( pIdx->aiColumn[pIdx->nColumn-1]==-1 ); sqlite3VdbeAddOp3(v, OP_Seek, iIdxCur, 0, iCur); - if( (pWInfo->wctrlFlags & WHERE_FORCE_TABLE) + if( (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE) && DbMaskAllZero(sqlite3ParseToplevel(pParse)->writeMask) ){ int i; @@ -123648,7 +124408,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( pLevel->notReady = notReady & ~sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur); bRev = (pWInfo->revMask>>iLevel)&1; omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0 - && (pWInfo->wctrlFlags & WHERE_FORCE_TABLE)==0; + && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0; VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName)); /* Create labels for the "break" and "continue" instructions @@ -123788,8 +124548,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg); if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg); addrNxt = pLevel->addrNxt; - sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt); VdbeCoverage(v); - sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg); + sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg); VdbeCoverage(v); sqlite3ExprCacheAffinityChange(pParse, iRowidReg, 1); sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg); @@ -123816,7 +124575,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( pStart = pEnd; pEnd = pTerm; } - codeCursorHint(pWInfo, pLevel, pEnd); + codeCursorHint(pTabItem, pWInfo, pLevel, pEnd); if( pStart ){ Expr *pX; /* The expression that defines the start bound */ int r1, rTemp; /* Registers for holding the start boundary */ @@ -124030,7 +124789,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( ** and store the values of those terms in an array of registers ** starting at regBase. */ - codeCursorHint(pWInfo, pLevel, pRangeEnd); + codeCursorHint(pTabItem, pWInfo, pLevel, pRangeEnd); regBase = codeAllEqualityTerms(pParse,pLevel,bRev,nExtraReg,&zStartAff); assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq ); if( zStartAff ) cEndAff = zStartAff[nEq]; @@ -124069,6 +124828,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( } nConstraint++; testcase( pRangeStart->wtFlags & TERM_VIRTUAL ); + bSeekPastNull = 0; }else if( bSeekPastNull ){ sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq); nConstraint++; @@ -124334,11 +125094,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( ** eliminating duplicates from other WHERE clauses, the action for each ** sub-WHERE clause is to to invoke the main loop body as a subroutine. */ - wctrlFlags = WHERE_OMIT_OPEN_CLOSE - | WHERE_FORCE_TABLE - | WHERE_ONETABLE_ONLY - | WHERE_NO_AUTOINDEX - | (pWInfo->wctrlFlags & WHERE_SEEK_TABLE); + wctrlFlags = WHERE_OR_SUBCLAUSE | (pWInfo->wctrlFlags & WHERE_SEEK_TABLE); for(ii=0; iinTerm; ii++){ WhereTerm *pOrTerm = &pOrWc->a[ii]; if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){ @@ -124446,7 +125202,6 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( ){ assert( pSubWInfo->a[0].iIdxCur==iCovCur ); pCov = pSubLoop->u.btree.pIndex; - wctrlFlags |= WHERE_REOPEN_IDX; }else{ pCov = 0; } @@ -124483,7 +125238,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( ** a pseudo-cursor. No need to Rewind or Next such cursors. */ pLevel->op = OP_Noop; }else{ - codeCursorHint(pWInfo, pLevel, 0); + codeCursorHint(pTabItem, pWInfo, pLevel, 0); pLevel->op = aStep[bRev]; pLevel->p1 = iCur; pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk); @@ -124508,7 +125263,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue; if( (pTerm->prereqAll & pLevel->notReady)!=0 ){ testcase( pWInfo->untestedTerms==0 - && (pWInfo->wctrlFlags & WHERE_ONETABLE_ONLY)!=0 ); + && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 ); pWInfo->untestedTerms = 1; continue; } @@ -125170,7 +125925,9 @@ static void exprAnalyzeOrTerm( if( !db->mallocFailed ){ for(j=0, pAndTerm=pAndWC->a; jnTerm; j++, pAndTerm++){ assert( pAndTerm->pExpr ); - if( allowedOp(pAndTerm->pExpr->op) ){ + if( allowedOp(pAndTerm->pExpr->op) + || pAndTerm->eOperator==WO_MATCH + ){ b |= sqlite3WhereGetMask(&pWInfo->sMaskSet, pAndTerm->leftCursor); } } @@ -125385,12 +126142,10 @@ static int termIsEquivalence(Parse *pParse, Expr *pExpr){ pColl = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight); if( pColl==0 || sqlite3StrICmp(pColl->zName, "BINARY")==0 ) return 1; pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft); - /* Since pLeft and pRight are both a column references, their collating - ** sequence should always be defined. */ - zColl1 = ALWAYS(pColl) ? pColl->zName : 0; + zColl1 = pColl ? pColl->zName : 0; pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight); - zColl2 = ALWAYS(pColl) ? pColl->zName : 0; - return sqlite3StrICmp(zColl1, zColl2)==0; + zColl2 = pColl ? pColl->zName : 0; + return sqlite3_stricmp(zColl1, zColl2)==0; } /* @@ -125724,7 +126479,7 @@ static void exprAnalyze( ** virtual tables. The native query optimizer does not attempt ** to do anything with MATCH functions. */ - if( isMatchOfColumn(pExpr, &eOp2) ){ + if( pWC->op==TK_AND && isMatchOfColumn(pExpr, &eOp2) ){ int idxNew; Expr *pRight, *pLeft; WhereTerm *pNewTerm; @@ -126017,6 +126772,18 @@ SQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo *pWInfo){ return pWInfo->nOBSat; } +/* +** Return TRUE if the innermost loop of the WHERE clause implementation +** returns rows in ORDER BY order for complete run of the inner loop. +** +** Across multiple iterations of outer loops, the output rows need not be +** sorted. As long as rows are sorted for just the innermost loop, this +** routine can return TRUE. +*/ +SQLITE_PRIVATE int sqlite3WhereOrderedInnerLoop(WhereInfo *pWInfo){ + return pWInfo->bOrderedInnerLoop; +} + /* ** Return the VDBE address or label to jump to in order to continue ** immediately with the next row of a WHERE clause. @@ -127602,19 +128369,41 @@ static void whereTermPrint(WhereTerm *pTerm, int iTerm){ sqlite3DebugPrintf("TERM-%-3d NULL\n", iTerm); }else{ char zType[4]; + char zLeft[50]; memcpy(zType, "...", 4); if( pTerm->wtFlags & TERM_VIRTUAL ) zType[0] = 'V'; if( pTerm->eOperator & WO_EQUIV ) zType[1] = 'E'; if( ExprHasProperty(pTerm->pExpr, EP_FromJoin) ) zType[2] = 'L'; + if( pTerm->eOperator & WO_SINGLE ){ + sqlite3_snprintf(sizeof(zLeft),zLeft,"left={%d:%d}", + pTerm->leftCursor, pTerm->u.leftColumn); + }else if( (pTerm->eOperator & WO_OR)!=0 && pTerm->u.pOrInfo!=0 ){ + sqlite3_snprintf(sizeof(zLeft),zLeft,"indexable=0x%lld", + pTerm->u.pOrInfo->indexable); + }else{ + sqlite3_snprintf(sizeof(zLeft),zLeft,"left=%d", pTerm->leftCursor); + } sqlite3DebugPrintf( - "TERM-%-3d %p %s cursor=%-3d prob=%-3d op=0x%03x wtFlags=0x%04x\n", - iTerm, pTerm, zType, pTerm->leftCursor, pTerm->truthProb, + "TERM-%-3d %p %s %-12s prob=%-3d op=0x%03x wtFlags=0x%04x\n", + iTerm, pTerm, zType, zLeft, pTerm->truthProb, pTerm->eOperator, pTerm->wtFlags); sqlite3TreeViewExpr(0, pTerm->pExpr, 0); } } #endif +#ifdef WHERETRACE_ENABLED +/* +** Show the complete content of a WhereClause +*/ +SQLITE_PRIVATE void sqlite3WhereClausePrint(WhereClause *pWC){ + int i; + for(i=0; inTerm; i++){ + whereTermPrint(&pWC->a[i], i); + } +} +#endif + #ifdef WHERETRACE_ENABLED /* ** Print a WhereLoop object for debugging purposes @@ -128601,7 +129390,7 @@ static int whereLoopAddBtree( #ifndef SQLITE_OMIT_AUTOMATIC_INDEX /* Automatic indexes */ if( !pBuilder->pOrSet /* Not part of an OR optimization */ - && (pWInfo->wctrlFlags & WHERE_NO_AUTOINDEX)==0 + && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 && (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0 && pSrc->pIBIndex==0 /* Has no INDEXED BY clause */ && !pSrc->fg.notIndexed /* Has no NOT INDEXED clause */ @@ -128633,6 +129422,7 @@ static int whereLoopAddBtree( pNew->rSetup += 24; } ApplyCostMultiplier(pNew->rSetup, pTab->costMult); + if( pNew->rSetup<0 ) pNew->rSetup = 0; /* TUNING: Each index lookup yields 20 rows in the table. This ** is more than the usual guess of 10 rows, since we have no way ** of knowing how selective the index will ultimately be. It would @@ -128693,6 +129483,7 @@ static int whereLoopAddBtree( /* Full scan via index */ if( b || !HasRowid(pTab) + || pProbe->pPartIdxWhere!=0 || ( m==0 && pProbe->bUnordered==0 && (pProbe->szIdxRowszTabRow) @@ -128705,11 +129496,34 @@ static int whereLoopAddBtree( /* The cost of visiting the index rows is N*K, where K is ** between 1.1 and 3.0, depending on the relative sizes of the - ** index and table rows. If this is a non-covering index scan, - ** also add the cost of visiting table rows (N*3.0). */ + ** index and table rows. */ pNew->rRun = rSize + 1 + (15*pProbe->szIdxRow)/pTab->szTabRow; if( m!=0 ){ - pNew->rRun = sqlite3LogEstAdd(pNew->rRun, rSize+16); + /* If this is a non-covering index scan, add in the cost of + ** doing table lookups. The cost will be 3x the number of + ** lookups. Take into account WHERE clause terms that can be + ** satisfied using just the index, and that do not require a + ** table lookup. */ + LogEst nLookup = rSize + 16; /* Base cost: N*3 */ + int ii; + int iCur = pSrc->iCursor; + WhereClause *pWC2 = &pWInfo->sWC; + for(ii=0; iinTerm; ii++){ + WhereTerm *pTerm = &pWC2->a[ii]; + if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){ + break; + } + /* pTerm can be evaluated using just the index. So reduce + ** the expected number of table lookups accordingly */ + if( pTerm->truthProb<=0 ){ + nLookup += pTerm->truthProb; + }else{ + nLookup--; + if( pTerm->eOperator & (WO_EQ|WO_IS) ) nLookup -= 19; + } + } + + pNew->rRun = sqlite3LogEstAdd(pNew->rRun, nLookup); } ApplyCostMultiplier(pNew->rRun, pTab->costMult); whereLoopOutputAdjust(pWC, pNew, rSize); @@ -129078,9 +129892,7 @@ static int whereLoopAddOr( WHERETRACE(0x200, ("OR-term %d of %p has %d subterms:\n", (int)(pOrTerm-pOrWC->a), pTerm, sSubBuild.pWC->nTerm)); if( sqlite3WhereTrace & 0x400 ){ - for(i=0; inTerm; i++){ - whereTermPrint(&sSubBuild.pWC->a[i], i); - } + sqlite3WhereClausePrint(sSubBuild.pWC); } #endif #ifndef SQLITE_OMIT_VIRTUALTABLE @@ -129173,6 +129985,7 @@ static int whereLoopAddAll(WhereLoopBuilder *pBuilder){ mPrereq = mPrior; } priorJointype = pItem->fg.jointype; +#ifndef SQLITE_OMIT_VIRTUALTABLE if( IsVirtual(pItem->pTab) ){ struct SrcList_item *p; for(p=&pItem[1]; paLoop[] */ WhereLoop *pLast, /* Add this WhereLoop to the end of pPath->aLoop[] */ Bitmask *pRevMask /* OUT: Mask of WhereLoops to run in reverse order */ @@ -129227,6 +130042,7 @@ static i8 wherePathSatisfiesOrderBy( u8 isOrderDistinct; /* All prior WhereLoops are order-distinct */ u8 distinctColumns; /* True if the loop has UNIQUE NOT NULL columns */ u8 isMatch; /* iColumn matches a term of the ORDER BY clause */ + u16 eqOpMask; /* Allowed equality operators */ u16 nKeyCol; /* Number of key columns in pIndex */ u16 nColumn; /* Total number of ordered columns in the index */ u16 nOrderBy; /* Number terms in the ORDER BY clause */ @@ -129277,9 +130093,16 @@ static i8 wherePathSatisfiesOrderBy( obDone = MASKBIT(nOrderBy)-1; orderDistinctMask = 0; ready = 0; + eqOpMask = WO_EQ | WO_IS | WO_ISNULL; + if( wctrlFlags & WHERE_ORDERBY_LIMIT ) eqOpMask |= WO_IN; for(iLoop=0; isOrderDistinct && obSat0 ) ready |= pLoop->maskSelf; - pLoop = iLoopaLoop[iLoop] : pLast; + if( iLoopaLoop[iLoop]; + if( wctrlFlags & WHERE_ORDERBY_LIMIT ) continue; + }else{ + pLoop = pLast; + } if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){ if( pLoop->u.vtab.isOrdered ) obSat = obDone; break; @@ -129297,8 +130120,16 @@ static i8 wherePathSatisfiesOrderBy( if( pOBExpr->op!=TK_COLUMN ) continue; if( pOBExpr->iTable!=iCur ) continue; pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn, - ~ready, WO_EQ|WO_ISNULL|WO_IS, 0); + ~ready, eqOpMask, 0); if( pTerm==0 ) continue; + if( pTerm->eOperator==WO_IN ){ + /* IN terms are only valid for sorting in the ORDER BY LIMIT + ** optimization, and then only if they are actually used + ** by the query plan */ + assert( wctrlFlags & WHERE_ORDERBY_LIMIT ); + for(j=0; jnLTerm && pTerm!=pLoop->aLTerm[j]; j++){} + if( j>=pLoop->nLTerm ) continue; + } if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){ const char *z1, *z2; pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr); @@ -129337,10 +130168,12 @@ static i8 wherePathSatisfiesOrderBy( for(j=0; ju.btree.nEq && pLoop->nSkip==0 - && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL|WO_IS))!=0 + && ((i = pLoop->aLTerm[j]->eOperator) & eqOpMask)!=0 ){ if( i & WO_ISNULL ){ testcase( isOrderDistinct ); @@ -129864,8 +130697,19 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ } }else{ pWInfo->nOBSat = pFrom->isOrdered; - if( pWInfo->nOBSat<0 ) pWInfo->nOBSat = 0; pWInfo->revMask = pFrom->revLoop; + if( pWInfo->nOBSat<=0 ){ + pWInfo->nOBSat = 0; + if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){ + Bitmask m = 0; + int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, + WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); + if( rc==pWInfo->pOrderBy->nExpr ){ + pWInfo->bOrderedInnerLoop = 1; + pWInfo->revMask = m; + } + } + } } if( (pWInfo->wctrlFlags & WHERE_SORTBYGROUP) && pWInfo->nOBSat==pWInfo->pOrderBy->nExpr && nLoop>0 @@ -129913,7 +130757,7 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){ Index *pIdx; pWInfo = pBuilder->pWInfo; - if( pWInfo->wctrlFlags & WHERE_FORCE_TABLE ) return 0; + if( pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE ) return 0; assert( pWInfo->pTabList->nSrc>=1 ); pItem = pWInfo->pTabList->a; pTab = pItem->pTab; @@ -130060,7 +130904,7 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){ ** is called from an UPDATE or DELETE statement, then pOrderBy is NULL. ** ** The iIdxCur parameter is the cursor number of an index. If -** WHERE_ONETABLE_ONLY is set, iIdxCur is the cursor number of an index +** WHERE_OR_SUBCLAUSE is set, iIdxCur is the cursor number of an index ** to use for OR clause processing. The WHERE clause should use this ** specific cursor. If WHERE_ONEPASS_DESIRED is set, then iIdxCur is ** the first cursor in an array of cursors for all indices. iIdxCur should @@ -130074,7 +130918,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( ExprList *pOrderBy, /* An ORDER BY (or GROUP BY) clause, or NULL */ ExprList *pDistinctSet, /* Try not to output two rows that duplicate these */ u16 wctrlFlags, /* The WHERE_* flags defined in sqliteInt.h */ - int iAuxArg /* If WHERE_ONETABLE_ONLY is set, index cursor number + int iAuxArg /* If WHERE_OR_SUBCLAUSE is set, index cursor number ** If WHERE_USE_LIMIT, then the limit amount */ ){ int nByteWInfo; /* Num. bytes allocated for WhereInfo struct */ @@ -130093,11 +130937,11 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( assert( (wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || ( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 - && (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 + && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 )); - /* Only one of WHERE_ONETABLE_ONLY or WHERE_USE_LIMIT */ - assert( (wctrlFlags & WHERE_ONETABLE_ONLY)==0 + /* Only one of WHERE_OR_SUBCLAUSE or WHERE_USE_LIMIT */ + assert( (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 || (wctrlFlags & WHERE_USE_LIMIT)==0 ); /* Variable initialization */ @@ -130125,11 +130969,11 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( } /* This function normally generates a nested loop for all tables in - ** pTabList. But if the WHERE_ONETABLE_ONLY flag is set, then we should + ** pTabList. But if the WHERE_OR_SUBCLAUSE flag is set, then we should ** only generate code for the first table in pTabList and assume that ** any cursors associated with subsequent tables are uninitialized. */ - nTabList = (wctrlFlags & WHERE_ONETABLE_ONLY) ? 1 : pTabList->nSrc; + nTabList = (wctrlFlags & WHERE_OR_SUBCLAUSE) ? 1 : pTabList->nSrc; /* Allocate and initialize the WhereInfo structure that will become the ** return value. A single allocation is used to store the WhereInfo @@ -130205,7 +131049,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( ** Note that bitmasks are created for all pTabList->nSrc tables in ** pTabList, not just the first nTabList tables. nTabList is normally ** equal to pTabList->nSrc but might be shortened to 1 if the - ** WHERE_ONETABLE_ONLY flag is set. + ** WHERE_OR_SUBCLAUSE flag is set. */ for(ii=0; iinSrc; ii++){ createMask(pMaskSet, pTabList->a[ii].iCursor); @@ -130243,10 +131087,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( sqlite3DebugPrintf(")\n"); } if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */ - int i; - for(i=0; inTerm; i++){ - whereTermPrint(&sWLB.pWC->a[i], i); - } + sqlite3WhereClausePrint(sWLB.pWC); } #endif @@ -130388,7 +131229,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( }else #endif if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 - && (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 ){ + && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 ){ int op = OP_OpenRead; if( pWInfo->eOnePass!=ONEPASS_OFF ){ op = OP_OpenWrite; @@ -130427,7 +131268,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( /* iAuxArg is always set if to a positive value if ONEPASS is possible */ assert( iAuxArg!=0 || (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 ); if( !HasRowid(pTab) && IsPrimaryKeyIndex(pIx) - && (wctrlFlags & WHERE_ONETABLE_ONLY)!=0 + && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 ){ /* This is one term of an OR-optimization using the PRIMARY KEY of a ** WITHOUT ROWID table. No need for a separate index */ @@ -130443,9 +131284,9 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( } op = OP_OpenWrite; pWInfo->aiCurOnePass[1] = iIndexCur; - }else if( iAuxArg && (wctrlFlags & WHERE_ONETABLE_ONLY)!=0 ){ + }else if( iAuxArg && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 ){ iIndexCur = iAuxArg; - if( wctrlFlags & WHERE_REOPEN_IDX ) op = OP_ReopenIdx; + op = OP_ReopenIdx; }else{ iIndexCur = pParse->nTab++; } @@ -130507,7 +131348,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( pLevel->addrBody = sqlite3VdbeCurrentAddr(v); notReady = sqlite3WhereCodeOneLoopStart(pWInfo, ii, notReady); pWInfo->iContinue = pLevel->addrCont; - if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_ONETABLE_ONLY)==0 ){ + if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_OR_SUBCLAUSE)==0 ){ sqlite3WhereAddScanStatus(v, pTabList, pLevel, addrExplain); } } @@ -130630,12 +131471,12 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ /* Close all of the cursors that were opened by sqlite3WhereBegin. ** Except, do not close cursors that will be reused by the OR optimization - ** (WHERE_OMIT_OPEN_CLOSE). And do not close the OP_OpenWrite cursors + ** (WHERE_OR_SUBCLAUSE). And do not close the OP_OpenWrite cursors ** created for the ONEPASS optimization. */ if( (pTab->tabFlags & TF_Ephemeral)==0 && pTab->pSelect==0 - && (pWInfo->wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 + && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 ){ int ws = pLoop->wsFlags; if( pWInfo->eOnePass==ONEPASS_OFF && (ws & WHERE_IDX_ONLY)==0 ){ @@ -130982,26 +131823,26 @@ static void disableLookaside(Parse *pParse){ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char -#define YYNOCODE 251 +#define YYNOCODE 252 #define YYACTIONTYPE unsigned short int #define YYWILDCARD 96 #define sqlite3ParserTOKENTYPE Token typedef union { int yyinit; sqlite3ParserTOKENTYPE yy0; - struct LimitVal yy64; - Expr* yy122; - Select* yy159; - IdList* yy180; - struct {int value; int mask;} yy207; - struct LikeOp yy318; - TriggerStep* yy327; - With* yy331; - ExprSpan yy342; - SrcList* yy347; - int yy392; - struct TrigEvent yy410; - ExprList* yy442; + Expr* yy72; + TriggerStep* yy145; + ExprList* yy148; + SrcList* yy185; + ExprSpan yy190; + int yy194; + Select* yy243; + IdList* yy254; + With* yy285; + struct TrigEvent yy332; + struct LimitVal yy354; + struct LikeOp yy392; + struct {int value; int mask;} yy497; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -131011,16 +131852,16 @@ typedef union { #define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse #define sqlite3ParserARG_STORE yypParser->pParse = pParse #define YYFALLBACK 1 -#define YYNSTATE 440 -#define YYNRULE 326 -#define YY_MAX_SHIFT 439 -#define YY_MIN_SHIFTREDUCE 649 -#define YY_MAX_SHIFTREDUCE 974 -#define YY_MIN_REDUCE 975 -#define YY_MAX_REDUCE 1300 -#define YY_ERROR_ACTION 1301 -#define YY_ACCEPT_ACTION 1302 -#define YY_NO_ACTION 1303 +#define YYNSTATE 443 +#define YYNRULE 328 +#define YY_MAX_SHIFT 442 +#define YY_MIN_SHIFTREDUCE 653 +#define YY_MAX_SHIFTREDUCE 980 +#define YY_MIN_REDUCE 981 +#define YY_MAX_REDUCE 1308 +#define YY_ERROR_ACTION 1309 +#define YY_ACCEPT_ACTION 1310 +#define YY_NO_ACTION 1311 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -131088,159 +131929,159 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1501) +#define YY_ACTTAB_COUNT (1507) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 315, 810, 339, 804, 5, 194, 194, 798, 92, 93, - /* 10 */ 83, 819, 819, 831, 834, 823, 823, 90, 90, 91, - /* 20 */ 91, 91, 91, 290, 89, 89, 89, 89, 88, 88, - /* 30 */ 87, 87, 87, 86, 339, 315, 952, 952, 803, 803, - /* 40 */ 803, 922, 342, 92, 93, 83, 819, 819, 831, 834, - /* 50 */ 823, 823, 90, 90, 91, 91, 91, 91, 123, 89, - /* 60 */ 89, 89, 89, 88, 88, 87, 87, 87, 86, 339, - /* 70 */ 88, 88, 87, 87, 87, 86, 339, 772, 952, 952, - /* 80 */ 315, 87, 87, 87, 86, 339, 773, 68, 92, 93, - /* 90 */ 83, 819, 819, 831, 834, 823, 823, 90, 90, 91, - /* 100 */ 91, 91, 91, 434, 89, 89, 89, 89, 88, 88, - /* 110 */ 87, 87, 87, 86, 339, 1302, 146, 921, 2, 315, - /* 120 */ 427, 24, 679, 953, 48, 86, 339, 92, 93, 83, - /* 130 */ 819, 819, 831, 834, 823, 823, 90, 90, 91, 91, - /* 140 */ 91, 91, 94, 89, 89, 89, 89, 88, 88, 87, - /* 150 */ 87, 87, 86, 339, 933, 933, 315, 259, 412, 398, - /* 160 */ 396, 57, 733, 733, 92, 93, 83, 819, 819, 831, - /* 170 */ 834, 823, 823, 90, 90, 91, 91, 91, 91, 56, - /* 180 */ 89, 89, 89, 89, 88, 88, 87, 87, 87, 86, - /* 190 */ 339, 315, 1245, 922, 342, 268, 934, 935, 241, 92, - /* 200 */ 93, 83, 819, 819, 831, 834, 823, 823, 90, 90, - /* 210 */ 91, 91, 91, 91, 291, 89, 89, 89, 89, 88, - /* 220 */ 88, 87, 87, 87, 86, 339, 315, 913, 1295, 682, - /* 230 */ 687, 1295, 233, 397, 92, 93, 83, 819, 819, 831, - /* 240 */ 834, 823, 823, 90, 90, 91, 91, 91, 91, 326, - /* 250 */ 89, 89, 89, 89, 88, 88, 87, 87, 87, 86, - /* 260 */ 339, 315, 85, 82, 168, 680, 431, 938, 939, 92, - /* 270 */ 93, 83, 819, 819, 831, 834, 823, 823, 90, 90, - /* 280 */ 91, 91, 91, 91, 291, 89, 89, 89, 89, 88, - /* 290 */ 88, 87, 87, 87, 86, 339, 315, 319, 913, 1296, - /* 300 */ 797, 911, 1296, 681, 92, 93, 83, 819, 819, 831, - /* 310 */ 834, 823, 823, 90, 90, 91, 91, 91, 91, 335, - /* 320 */ 89, 89, 89, 89, 88, 88, 87, 87, 87, 86, - /* 330 */ 339, 315, 876, 876, 373, 85, 82, 168, 944, 92, - /* 340 */ 93, 83, 819, 819, 831, 834, 823, 823, 90, 90, - /* 350 */ 91, 91, 91, 91, 896, 89, 89, 89, 89, 88, - /* 360 */ 88, 87, 87, 87, 86, 339, 315, 370, 307, 973, - /* 370 */ 367, 1, 911, 433, 92, 93, 83, 819, 819, 831, - /* 380 */ 834, 823, 823, 90, 90, 91, 91, 91, 91, 189, - /* 390 */ 89, 89, 89, 89, 88, 88, 87, 87, 87, 86, - /* 400 */ 339, 315, 720, 948, 933, 933, 149, 718, 948, 92, - /* 410 */ 93, 83, 819, 819, 831, 834, 823, 823, 90, 90, - /* 420 */ 91, 91, 91, 91, 434, 89, 89, 89, 89, 88, - /* 430 */ 88, 87, 87, 87, 86, 339, 338, 938, 939, 947, - /* 440 */ 694, 940, 974, 315, 953, 48, 934, 935, 715, 689, - /* 450 */ 71, 92, 93, 83, 819, 819, 831, 834, 823, 823, - /* 460 */ 90, 90, 91, 91, 91, 91, 320, 89, 89, 89, - /* 470 */ 89, 88, 88, 87, 87, 87, 86, 339, 315, 412, - /* 480 */ 403, 820, 820, 832, 835, 74, 92, 81, 83, 819, - /* 490 */ 819, 831, 834, 823, 823, 90, 90, 91, 91, 91, - /* 500 */ 91, 698, 89, 89, 89, 89, 88, 88, 87, 87, - /* 510 */ 87, 86, 339, 315, 259, 654, 655, 656, 393, 111, - /* 520 */ 331, 153, 93, 83, 819, 819, 831, 834, 823, 823, - /* 530 */ 90, 90, 91, 91, 91, 91, 434, 89, 89, 89, - /* 540 */ 89, 88, 88, 87, 87, 87, 86, 339, 315, 188, - /* 550 */ 187, 186, 824, 937, 328, 219, 953, 48, 83, 819, - /* 560 */ 819, 831, 834, 823, 823, 90, 90, 91, 91, 91, - /* 570 */ 91, 956, 89, 89, 89, 89, 88, 88, 87, 87, - /* 580 */ 87, 86, 339, 79, 429, 738, 3, 1174, 955, 348, - /* 590 */ 737, 332, 792, 933, 933, 937, 79, 429, 730, 3, - /* 600 */ 203, 160, 278, 391, 273, 390, 190, 892, 434, 400, - /* 610 */ 741, 76, 77, 271, 287, 253, 353, 242, 78, 340, - /* 620 */ 340, 85, 82, 168, 76, 77, 233, 397, 953, 48, - /* 630 */ 432, 78, 340, 340, 277, 934, 935, 185, 439, 651, - /* 640 */ 388, 385, 384, 432, 234, 276, 107, 418, 349, 337, - /* 650 */ 336, 383, 893, 728, 215, 949, 123, 971, 308, 810, - /* 660 */ 418, 436, 435, 412, 394, 798, 400, 873, 894, 123, - /* 670 */ 721, 872, 810, 889, 436, 435, 215, 949, 798, 351, - /* 680 */ 722, 697, 380, 434, 771, 371, 22, 434, 400, 79, - /* 690 */ 429, 232, 3, 189, 413, 870, 803, 803, 803, 805, - /* 700 */ 18, 54, 148, 953, 48, 956, 113, 953, 9, 803, - /* 710 */ 803, 803, 805, 18, 310, 123, 748, 76, 77, 742, - /* 720 */ 123, 325, 955, 866, 78, 340, 340, 113, 350, 359, - /* 730 */ 85, 82, 168, 343, 960, 960, 432, 770, 412, 414, - /* 740 */ 407, 23, 1240, 1240, 79, 429, 357, 3, 166, 91, - /* 750 */ 91, 91, 91, 418, 89, 89, 89, 89, 88, 88, - /* 760 */ 87, 87, 87, 86, 339, 810, 434, 436, 435, 792, - /* 770 */ 320, 798, 76, 77, 789, 271, 123, 434, 360, 78, - /* 780 */ 340, 340, 864, 85, 82, 168, 953, 9, 395, 743, - /* 790 */ 360, 432, 253, 358, 252, 933, 933, 953, 30, 889, - /* 800 */ 327, 216, 803, 803, 803, 805, 18, 113, 418, 89, - /* 810 */ 89, 89, 89, 88, 88, 87, 87, 87, 86, 339, - /* 820 */ 810, 113, 436, 435, 792, 185, 798, 288, 388, 385, - /* 830 */ 384, 123, 113, 920, 2, 796, 696, 934, 935, 383, - /* 840 */ 69, 429, 434, 3, 218, 110, 738, 253, 358, 252, - /* 850 */ 434, 737, 933, 933, 892, 359, 222, 803, 803, 803, - /* 860 */ 805, 18, 953, 47, 933, 933, 933, 933, 76, 77, - /* 870 */ 953, 9, 366, 904, 217, 78, 340, 340, 677, 305, - /* 880 */ 304, 303, 206, 301, 224, 259, 664, 432, 337, 336, - /* 890 */ 434, 228, 247, 144, 934, 935, 933, 933, 667, 893, - /* 900 */ 324, 1259, 96, 434, 418, 796, 934, 935, 934, 935, - /* 910 */ 953, 48, 401, 148, 289, 894, 810, 417, 436, 435, - /* 920 */ 677, 759, 798, 953, 9, 314, 220, 162, 161, 170, - /* 930 */ 402, 239, 953, 8, 194, 683, 683, 410, 934, 935, - /* 940 */ 238, 959, 933, 933, 225, 408, 945, 365, 957, 212, - /* 950 */ 958, 172, 757, 803, 803, 803, 805, 18, 173, 365, - /* 960 */ 176, 123, 171, 113, 244, 952, 246, 434, 356, 796, - /* 970 */ 372, 365, 236, 960, 960, 810, 290, 804, 191, 165, - /* 980 */ 852, 798, 259, 316, 934, 935, 237, 953, 34, 404, - /* 990 */ 91, 91, 91, 91, 84, 89, 89, 89, 89, 88, - /* 1000 */ 88, 87, 87, 87, 86, 339, 701, 952, 434, 240, - /* 1010 */ 347, 758, 803, 803, 803, 434, 245, 1179, 434, 389, - /* 1020 */ 434, 376, 434, 895, 167, 434, 405, 702, 953, 35, - /* 1030 */ 673, 321, 221, 434, 333, 953, 11, 434, 953, 26, - /* 1040 */ 953, 36, 953, 37, 251, 953, 38, 434, 259, 434, - /* 1050 */ 757, 434, 329, 953, 27, 434, 223, 953, 28, 434, - /* 1060 */ 690, 434, 67, 434, 65, 434, 862, 953, 39, 953, - /* 1070 */ 40, 953, 41, 423, 434, 953, 10, 434, 772, 953, - /* 1080 */ 42, 953, 98, 953, 43, 953, 44, 773, 434, 346, - /* 1090 */ 434, 75, 434, 73, 953, 31, 434, 953, 45, 434, - /* 1100 */ 259, 434, 690, 434, 757, 434, 887, 434, 953, 46, - /* 1110 */ 953, 32, 953, 115, 434, 266, 953, 116, 951, 953, - /* 1120 */ 117, 953, 52, 953, 33, 953, 99, 953, 49, 726, - /* 1130 */ 434, 909, 434, 19, 953, 100, 434, 344, 434, 113, - /* 1140 */ 434, 258, 692, 434, 259, 434, 670, 434, 20, 434, - /* 1150 */ 953, 101, 953, 97, 434, 259, 953, 114, 953, 112, - /* 1160 */ 953, 105, 113, 953, 104, 953, 102, 953, 103, 953, - /* 1170 */ 51, 434, 148, 434, 953, 53, 167, 434, 259, 113, - /* 1180 */ 300, 307, 912, 363, 311, 860, 248, 261, 209, 264, - /* 1190 */ 416, 953, 50, 953, 25, 420, 727, 953, 29, 430, - /* 1200 */ 321, 424, 757, 428, 322, 124, 1269, 214, 165, 710, - /* 1210 */ 859, 908, 806, 794, 309, 158, 193, 361, 254, 723, - /* 1220 */ 364, 67, 381, 269, 735, 199, 67, 70, 113, 700, - /* 1230 */ 699, 707, 708, 884, 113, 766, 113, 855, 193, 883, - /* 1240 */ 199, 869, 869, 675, 868, 868, 109, 368, 255, 260, - /* 1250 */ 263, 280, 859, 265, 806, 974, 267, 711, 695, 272, - /* 1260 */ 764, 282, 795, 284, 150, 744, 755, 415, 292, 293, - /* 1270 */ 802, 678, 672, 661, 660, 662, 927, 6, 306, 386, - /* 1280 */ 352, 786, 243, 250, 886, 362, 163, 286, 419, 298, - /* 1290 */ 930, 159, 968, 196, 126, 903, 901, 965, 55, 58, - /* 1300 */ 323, 275, 857, 136, 147, 694, 856, 121, 65, 354, - /* 1310 */ 355, 379, 175, 61, 151, 369, 180, 871, 375, 129, - /* 1320 */ 257, 756, 210, 181, 145, 131, 132, 377, 262, 663, - /* 1330 */ 133, 134, 139, 783, 791, 182, 392, 183, 312, 330, - /* 1340 */ 714, 888, 713, 851, 692, 195, 712, 406, 686, 705, - /* 1350 */ 313, 685, 64, 839, 274, 72, 684, 334, 942, 95, - /* 1360 */ 752, 279, 281, 704, 753, 751, 422, 283, 411, 750, - /* 1370 */ 426, 66, 204, 409, 21, 285, 928, 669, 437, 205, - /* 1380 */ 207, 208, 438, 658, 657, 652, 118, 108, 119, 226, - /* 1390 */ 650, 341, 157, 235, 169, 345, 106, 734, 790, 296, - /* 1400 */ 294, 295, 120, 297, 867, 865, 127, 128, 130, 724, - /* 1410 */ 229, 174, 249, 882, 137, 230, 138, 135, 885, 231, - /* 1420 */ 59, 60, 177, 881, 7, 178, 12, 179, 256, 874, - /* 1430 */ 140, 193, 962, 374, 141, 152, 666, 378, 276, 184, - /* 1440 */ 270, 122, 142, 382, 387, 62, 13, 14, 703, 63, - /* 1450 */ 125, 317, 318, 227, 809, 808, 837, 732, 15, 164, - /* 1460 */ 736, 4, 765, 211, 399, 213, 192, 143, 760, 70, - /* 1470 */ 67, 16, 17, 838, 836, 891, 841, 890, 198, 197, - /* 1480 */ 917, 154, 421, 923, 918, 155, 200, 977, 425, 840, - /* 1490 */ 156, 201, 807, 676, 80, 302, 299, 977, 202, 1261, - /* 1500 */ 1260, + /* 0 */ 317, 814, 341, 808, 5, 195, 195, 802, 93, 94, + /* 10 */ 84, 823, 823, 835, 838, 827, 827, 91, 91, 92, + /* 20 */ 92, 92, 92, 293, 90, 90, 90, 90, 89, 89, + /* 30 */ 88, 88, 88, 87, 341, 317, 958, 958, 807, 807, + /* 40 */ 807, 928, 344, 93, 94, 84, 823, 823, 835, 838, + /* 50 */ 827, 827, 91, 91, 92, 92, 92, 92, 328, 90, + /* 60 */ 90, 90, 90, 89, 89, 88, 88, 88, 87, 341, + /* 70 */ 89, 89, 88, 88, 88, 87, 341, 776, 958, 958, + /* 80 */ 317, 88, 88, 88, 87, 341, 777, 69, 93, 94, + /* 90 */ 84, 823, 823, 835, 838, 827, 827, 91, 91, 92, + /* 100 */ 92, 92, 92, 437, 90, 90, 90, 90, 89, 89, + /* 110 */ 88, 88, 88, 87, 341, 1310, 147, 147, 2, 317, + /* 120 */ 76, 25, 74, 49, 49, 87, 341, 93, 94, 84, + /* 130 */ 823, 823, 835, 838, 827, 827, 91, 91, 92, 92, + /* 140 */ 92, 92, 95, 90, 90, 90, 90, 89, 89, 88, + /* 150 */ 88, 88, 87, 341, 939, 939, 317, 260, 415, 400, + /* 160 */ 398, 58, 737, 737, 93, 94, 84, 823, 823, 835, + /* 170 */ 838, 827, 827, 91, 91, 92, 92, 92, 92, 57, + /* 180 */ 90, 90, 90, 90, 89, 89, 88, 88, 88, 87, + /* 190 */ 341, 317, 1253, 928, 344, 269, 940, 941, 242, 93, + /* 200 */ 94, 84, 823, 823, 835, 838, 827, 827, 91, 91, + /* 210 */ 92, 92, 92, 92, 293, 90, 90, 90, 90, 89, + /* 220 */ 89, 88, 88, 88, 87, 341, 317, 919, 1303, 793, + /* 230 */ 691, 1303, 724, 724, 93, 94, 84, 823, 823, 835, + /* 240 */ 838, 827, 827, 91, 91, 92, 92, 92, 92, 337, + /* 250 */ 90, 90, 90, 90, 89, 89, 88, 88, 88, 87, + /* 260 */ 341, 317, 114, 919, 1304, 684, 395, 1304, 124, 93, + /* 270 */ 94, 84, 823, 823, 835, 838, 827, 827, 91, 91, + /* 280 */ 92, 92, 92, 92, 683, 90, 90, 90, 90, 89, + /* 290 */ 89, 88, 88, 88, 87, 341, 317, 86, 83, 169, + /* 300 */ 801, 917, 234, 399, 93, 94, 84, 823, 823, 835, + /* 310 */ 838, 827, 827, 91, 91, 92, 92, 92, 92, 686, + /* 320 */ 90, 90, 90, 90, 89, 89, 88, 88, 88, 87, + /* 330 */ 341, 317, 436, 742, 86, 83, 169, 917, 741, 93, + /* 340 */ 94, 84, 823, 823, 835, 838, 827, 827, 91, 91, + /* 350 */ 92, 92, 92, 92, 902, 90, 90, 90, 90, 89, + /* 360 */ 89, 88, 88, 88, 87, 341, 317, 321, 434, 434, + /* 370 */ 434, 1, 722, 722, 93, 94, 84, 823, 823, 835, + /* 380 */ 838, 827, 827, 91, 91, 92, 92, 92, 92, 190, + /* 390 */ 90, 90, 90, 90, 89, 89, 88, 88, 88, 87, + /* 400 */ 341, 317, 685, 292, 939, 939, 150, 977, 310, 93, + /* 410 */ 94, 84, 823, 823, 835, 838, 827, 827, 91, 91, + /* 420 */ 92, 92, 92, 92, 437, 90, 90, 90, 90, 89, + /* 430 */ 89, 88, 88, 88, 87, 341, 926, 2, 372, 719, + /* 440 */ 698, 369, 950, 317, 49, 49, 940, 941, 719, 177, + /* 450 */ 72, 93, 94, 84, 823, 823, 835, 838, 827, 827, + /* 460 */ 91, 91, 92, 92, 92, 92, 322, 90, 90, 90, + /* 470 */ 90, 89, 89, 88, 88, 88, 87, 341, 317, 415, + /* 480 */ 405, 824, 824, 836, 839, 75, 93, 82, 84, 823, + /* 490 */ 823, 835, 838, 827, 827, 91, 91, 92, 92, 92, + /* 500 */ 92, 430, 90, 90, 90, 90, 89, 89, 88, 88, + /* 510 */ 88, 87, 341, 317, 340, 340, 340, 658, 659, 660, + /* 520 */ 333, 288, 94, 84, 823, 823, 835, 838, 827, 827, + /* 530 */ 91, 91, 92, 92, 92, 92, 437, 90, 90, 90, + /* 540 */ 90, 89, 89, 88, 88, 88, 87, 341, 317, 882, + /* 550 */ 882, 375, 828, 66, 330, 409, 49, 49, 84, 823, + /* 560 */ 823, 835, 838, 827, 827, 91, 91, 92, 92, 92, + /* 570 */ 92, 351, 90, 90, 90, 90, 89, 89, 88, 88, + /* 580 */ 88, 87, 341, 80, 432, 742, 3, 1180, 351, 350, + /* 590 */ 741, 334, 796, 939, 939, 761, 80, 432, 278, 3, + /* 600 */ 204, 161, 279, 393, 274, 392, 191, 362, 437, 277, + /* 610 */ 745, 77, 78, 272, 800, 254, 355, 243, 79, 342, + /* 620 */ 342, 86, 83, 169, 77, 78, 234, 399, 49, 49, + /* 630 */ 435, 79, 342, 342, 437, 940, 941, 186, 442, 655, + /* 640 */ 390, 387, 386, 435, 235, 213, 108, 421, 761, 351, + /* 650 */ 437, 385, 167, 732, 10, 10, 124, 124, 671, 814, + /* 660 */ 421, 439, 438, 415, 414, 802, 362, 168, 327, 124, + /* 670 */ 49, 49, 814, 219, 439, 438, 800, 186, 802, 326, + /* 680 */ 390, 387, 386, 437, 1248, 1248, 23, 939, 939, 80, + /* 690 */ 432, 385, 3, 761, 416, 876, 807, 807, 807, 809, + /* 700 */ 19, 290, 149, 49, 49, 415, 396, 260, 910, 807, + /* 710 */ 807, 807, 809, 19, 312, 237, 145, 77, 78, 746, + /* 720 */ 168, 702, 437, 149, 79, 342, 342, 114, 358, 940, + /* 730 */ 941, 302, 223, 397, 345, 313, 435, 260, 415, 417, + /* 740 */ 858, 374, 31, 31, 80, 432, 761, 3, 348, 92, + /* 750 */ 92, 92, 92, 421, 90, 90, 90, 90, 89, 89, + /* 760 */ 88, 88, 88, 87, 341, 814, 114, 439, 438, 796, + /* 770 */ 367, 802, 77, 78, 701, 796, 124, 1187, 220, 79, + /* 780 */ 342, 342, 124, 747, 734, 939, 939, 775, 404, 939, + /* 790 */ 939, 435, 254, 360, 253, 402, 895, 346, 254, 360, + /* 800 */ 253, 774, 807, 807, 807, 809, 19, 800, 421, 90, + /* 810 */ 90, 90, 90, 89, 89, 88, 88, 88, 87, 341, + /* 820 */ 814, 114, 439, 438, 939, 939, 802, 940, 941, 114, + /* 830 */ 437, 940, 941, 86, 83, 169, 192, 166, 309, 979, + /* 840 */ 70, 432, 700, 3, 382, 870, 238, 86, 83, 169, + /* 850 */ 10, 10, 361, 406, 763, 190, 222, 807, 807, 807, + /* 860 */ 809, 19, 870, 872, 329, 24, 940, 941, 77, 78, + /* 870 */ 359, 437, 335, 260, 218, 79, 342, 342, 437, 307, + /* 880 */ 306, 305, 207, 303, 339, 338, 668, 435, 339, 338, + /* 890 */ 407, 10, 10, 762, 216, 216, 939, 939, 49, 49, + /* 900 */ 437, 260, 97, 241, 421, 225, 402, 189, 188, 187, + /* 910 */ 309, 918, 980, 149, 221, 898, 814, 868, 439, 438, + /* 920 */ 10, 10, 802, 870, 915, 316, 898, 163, 162, 171, + /* 930 */ 249, 240, 322, 410, 412, 687, 687, 272, 940, 941, + /* 940 */ 239, 965, 901, 437, 226, 403, 226, 437, 963, 367, + /* 950 */ 964, 173, 248, 807, 807, 807, 809, 19, 174, 367, + /* 960 */ 899, 124, 172, 48, 48, 9, 9, 35, 35, 966, + /* 970 */ 966, 899, 363, 966, 966, 814, 900, 808, 725, 939, + /* 980 */ 939, 802, 895, 318, 980, 324, 125, 900, 726, 420, + /* 990 */ 92, 92, 92, 92, 85, 90, 90, 90, 90, 89, + /* 1000 */ 89, 88, 88, 88, 87, 341, 216, 216, 437, 946, + /* 1010 */ 349, 292, 807, 807, 807, 114, 291, 693, 402, 705, + /* 1020 */ 890, 940, 941, 437, 245, 889, 247, 437, 36, 36, + /* 1030 */ 437, 353, 391, 437, 260, 252, 260, 437, 361, 437, + /* 1040 */ 706, 437, 370, 12, 12, 224, 437, 27, 27, 437, + /* 1050 */ 37, 37, 437, 38, 38, 752, 368, 39, 39, 28, + /* 1060 */ 28, 29, 29, 215, 166, 331, 40, 40, 437, 41, + /* 1070 */ 41, 437, 42, 42, 437, 866, 246, 731, 437, 879, + /* 1080 */ 437, 256, 437, 878, 437, 267, 437, 261, 11, 11, + /* 1090 */ 437, 43, 43, 437, 99, 99, 437, 373, 44, 44, + /* 1100 */ 45, 45, 32, 32, 46, 46, 47, 47, 437, 426, + /* 1110 */ 33, 33, 776, 116, 116, 437, 117, 117, 437, 124, + /* 1120 */ 437, 777, 437, 260, 437, 957, 437, 352, 118, 118, + /* 1130 */ 437, 195, 437, 111, 437, 53, 53, 264, 34, 34, + /* 1140 */ 100, 100, 50, 50, 101, 101, 102, 102, 437, 260, + /* 1150 */ 98, 98, 115, 115, 113, 113, 437, 262, 437, 265, + /* 1160 */ 437, 943, 958, 437, 727, 437, 681, 437, 106, 106, + /* 1170 */ 68, 437, 893, 730, 437, 365, 105, 105, 103, 103, + /* 1180 */ 104, 104, 217, 52, 52, 54, 54, 51, 51, 694, + /* 1190 */ 259, 26, 26, 266, 30, 30, 677, 323, 433, 323, + /* 1200 */ 674, 423, 427, 943, 958, 114, 114, 431, 681, 865, + /* 1210 */ 1277, 233, 366, 714, 112, 20, 154, 704, 703, 810, + /* 1220 */ 914, 55, 159, 311, 798, 255, 383, 194, 68, 200, + /* 1230 */ 21, 694, 268, 114, 114, 114, 270, 711, 712, 68, + /* 1240 */ 114, 739, 770, 715, 71, 194, 861, 875, 875, 200, + /* 1250 */ 696, 865, 874, 874, 679, 699, 273, 110, 229, 419, + /* 1260 */ 768, 810, 799, 378, 748, 759, 418, 210, 294, 281, + /* 1270 */ 295, 806, 283, 682, 676, 665, 664, 666, 933, 151, + /* 1280 */ 285, 7, 1267, 308, 251, 790, 354, 244, 892, 364, + /* 1290 */ 287, 422, 300, 164, 160, 936, 974, 127, 197, 137, + /* 1300 */ 909, 907, 971, 388, 276, 863, 862, 56, 698, 325, + /* 1310 */ 148, 59, 122, 66, 356, 381, 357, 176, 152, 62, + /* 1320 */ 371, 130, 877, 181, 377, 760, 211, 182, 132, 133, + /* 1330 */ 134, 135, 258, 146, 140, 795, 787, 263, 183, 379, + /* 1340 */ 667, 394, 184, 332, 894, 314, 718, 717, 857, 716, + /* 1350 */ 696, 315, 709, 690, 65, 196, 6, 408, 289, 708, + /* 1360 */ 275, 689, 688, 948, 756, 757, 280, 282, 425, 755, + /* 1370 */ 284, 336, 73, 67, 754, 429, 411, 96, 286, 413, + /* 1380 */ 205, 934, 673, 22, 209, 440, 119, 120, 109, 206, + /* 1390 */ 208, 441, 662, 661, 656, 843, 654, 343, 158, 236, + /* 1400 */ 170, 347, 107, 227, 121, 738, 873, 298, 296, 297, + /* 1410 */ 299, 871, 794, 128, 129, 728, 230, 131, 175, 250, + /* 1420 */ 888, 136, 138, 231, 232, 139, 60, 61, 891, 178, + /* 1430 */ 179, 887, 8, 13, 180, 257, 880, 968, 194, 141, + /* 1440 */ 142, 376, 153, 670, 380, 185, 143, 277, 63, 384, + /* 1450 */ 14, 707, 271, 15, 389, 64, 319, 320, 126, 228, + /* 1460 */ 813, 812, 841, 736, 123, 16, 401, 740, 4, 769, + /* 1470 */ 165, 212, 214, 193, 144, 764, 71, 68, 17, 18, + /* 1480 */ 856, 842, 840, 897, 845, 896, 199, 198, 923, 155, + /* 1490 */ 424, 929, 924, 156, 201, 202, 428, 844, 157, 203, + /* 1500 */ 811, 680, 81, 1269, 1268, 301, 304, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 19, 95, 53, 97, 22, 24, 24, 101, 27, 28, @@ -131248,14 +132089,14 @@ static const YYCODETYPE yy_lookahead[] = { /* 20 */ 39, 40, 41, 152, 43, 44, 45, 46, 47, 48, /* 30 */ 49, 50, 51, 52, 53, 19, 55, 55, 132, 133, /* 40 */ 134, 1, 2, 27, 28, 29, 30, 31, 32, 33, - /* 50 */ 34, 35, 36, 37, 38, 39, 40, 41, 92, 43, + /* 50 */ 34, 35, 36, 37, 38, 39, 40, 41, 187, 43, /* 60 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 70 */ 47, 48, 49, 50, 51, 52, 53, 61, 97, 97, /* 80 */ 19, 49, 50, 51, 52, 53, 70, 26, 27, 28, /* 90 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, /* 100 */ 39, 40, 41, 152, 43, 44, 45, 46, 47, 48, /* 110 */ 49, 50, 51, 52, 53, 144, 145, 146, 147, 19, - /* 120 */ 249, 22, 172, 172, 173, 52, 53, 27, 28, 29, + /* 120 */ 137, 22, 139, 172, 173, 52, 53, 27, 28, 29, /* 130 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 140 */ 40, 41, 81, 43, 44, 45, 46, 47, 48, 49, /* 150 */ 50, 51, 52, 53, 55, 56, 19, 152, 207, 208, @@ -131265,269 +132106,271 @@ static const YYCODETYPE yy_lookahead[] = { /* 190 */ 53, 19, 0, 1, 2, 23, 97, 98, 193, 27, /* 200 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, /* 210 */ 38, 39, 40, 41, 152, 43, 44, 45, 46, 47, - /* 220 */ 48, 49, 50, 51, 52, 53, 19, 22, 23, 172, - /* 230 */ 23, 26, 119, 120, 27, 28, 29, 30, 31, 32, + /* 220 */ 48, 49, 50, 51, 52, 53, 19, 22, 23, 163, + /* 230 */ 23, 26, 190, 191, 27, 28, 29, 30, 31, 32, /* 240 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 187, /* 250 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - /* 260 */ 53, 19, 221, 222, 223, 23, 168, 169, 170, 27, + /* 260 */ 53, 19, 196, 22, 23, 23, 49, 26, 92, 27, /* 270 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - /* 280 */ 38, 39, 40, 41, 152, 43, 44, 45, 46, 47, - /* 290 */ 48, 49, 50, 51, 52, 53, 19, 157, 22, 23, - /* 300 */ 23, 96, 26, 172, 27, 28, 29, 30, 31, 32, - /* 310 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 187, + /* 280 */ 38, 39, 40, 41, 172, 43, 44, 45, 46, 47, + /* 290 */ 48, 49, 50, 51, 52, 53, 19, 221, 222, 223, + /* 300 */ 23, 96, 119, 120, 27, 28, 29, 30, 31, 32, + /* 310 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 172, /* 320 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - /* 330 */ 53, 19, 108, 109, 110, 221, 222, 223, 185, 27, + /* 330 */ 53, 19, 152, 116, 221, 222, 223, 96, 121, 27, /* 340 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - /* 350 */ 38, 39, 40, 41, 240, 43, 44, 45, 46, 47, - /* 360 */ 48, 49, 50, 51, 52, 53, 19, 227, 22, 23, - /* 370 */ 230, 22, 96, 152, 27, 28, 29, 30, 31, 32, + /* 350 */ 38, 39, 40, 41, 241, 43, 44, 45, 46, 47, + /* 360 */ 48, 49, 50, 51, 52, 53, 19, 157, 168, 169, + /* 370 */ 170, 22, 190, 191, 27, 28, 29, 30, 31, 32, /* 380 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 30, /* 390 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - /* 400 */ 53, 19, 190, 191, 55, 56, 24, 190, 191, 27, + /* 400 */ 53, 19, 172, 152, 55, 56, 24, 247, 248, 27, /* 410 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, /* 420 */ 38, 39, 40, 41, 152, 43, 44, 45, 46, 47, - /* 430 */ 48, 49, 50, 51, 52, 53, 168, 169, 170, 179, - /* 440 */ 180, 171, 96, 19, 172, 173, 97, 98, 188, 179, + /* 430 */ 48, 49, 50, 51, 52, 53, 146, 147, 228, 179, + /* 440 */ 180, 231, 185, 19, 172, 173, 97, 98, 188, 26, /* 450 */ 138, 27, 28, 29, 30, 31, 32, 33, 34, 35, /* 460 */ 36, 37, 38, 39, 40, 41, 107, 43, 44, 45, /* 470 */ 46, 47, 48, 49, 50, 51, 52, 53, 19, 207, /* 480 */ 208, 30, 31, 32, 33, 138, 27, 28, 29, 30, /* 490 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - /* 500 */ 41, 181, 43, 44, 45, 46, 47, 48, 49, 50, - /* 510 */ 51, 52, 53, 19, 152, 7, 8, 9, 49, 22, - /* 520 */ 19, 24, 28, 29, 30, 31, 32, 33, 34, 35, + /* 500 */ 41, 250, 43, 44, 45, 46, 47, 48, 49, 50, + /* 510 */ 51, 52, 53, 19, 168, 169, 170, 7, 8, 9, + /* 520 */ 19, 152, 28, 29, 30, 31, 32, 33, 34, 35, /* 530 */ 36, 37, 38, 39, 40, 41, 152, 43, 44, 45, /* 540 */ 46, 47, 48, 49, 50, 51, 52, 53, 19, 108, - /* 550 */ 109, 110, 101, 55, 53, 193, 172, 173, 29, 30, + /* 550 */ 109, 110, 101, 130, 53, 152, 172, 173, 29, 30, /* 560 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 570 */ 41, 152, 43, 44, 45, 46, 47, 48, 49, 50, /* 580 */ 51, 52, 53, 19, 20, 116, 22, 23, 169, 170, - /* 590 */ 121, 207, 85, 55, 56, 97, 19, 20, 195, 22, - /* 600 */ 99, 100, 101, 102, 103, 104, 105, 12, 152, 206, + /* 590 */ 121, 207, 85, 55, 56, 26, 19, 20, 101, 22, + /* 600 */ 99, 100, 101, 102, 103, 104, 105, 152, 152, 112, /* 610 */ 210, 47, 48, 112, 152, 108, 109, 110, 54, 55, /* 620 */ 56, 221, 222, 223, 47, 48, 119, 120, 172, 173, - /* 630 */ 66, 54, 55, 56, 101, 97, 98, 99, 148, 149, - /* 640 */ 102, 103, 104, 66, 154, 112, 156, 83, 229, 47, - /* 650 */ 48, 113, 57, 163, 194, 195, 92, 246, 247, 95, - /* 660 */ 83, 97, 98, 207, 208, 101, 206, 59, 73, 92, - /* 670 */ 75, 63, 95, 163, 97, 98, 194, 195, 101, 219, - /* 680 */ 85, 181, 19, 152, 175, 77, 196, 152, 206, 19, - /* 690 */ 20, 199, 22, 30, 163, 11, 132, 133, 134, 135, - /* 700 */ 136, 209, 152, 172, 173, 152, 196, 172, 173, 132, - /* 710 */ 133, 134, 135, 136, 164, 92, 213, 47, 48, 49, - /* 720 */ 92, 186, 169, 170, 54, 55, 56, 196, 100, 219, - /* 730 */ 221, 222, 223, 243, 132, 133, 66, 175, 207, 208, - /* 740 */ 152, 231, 119, 120, 19, 20, 236, 22, 152, 38, + /* 630 */ 66, 54, 55, 56, 152, 97, 98, 99, 148, 149, + /* 640 */ 102, 103, 104, 66, 154, 23, 156, 83, 26, 230, + /* 650 */ 152, 113, 152, 163, 172, 173, 92, 92, 21, 95, + /* 660 */ 83, 97, 98, 207, 208, 101, 152, 98, 186, 92, + /* 670 */ 172, 173, 95, 218, 97, 98, 152, 99, 101, 217, + /* 680 */ 102, 103, 104, 152, 119, 120, 196, 55, 56, 19, + /* 690 */ 20, 113, 22, 124, 163, 11, 132, 133, 134, 135, + /* 700 */ 136, 152, 152, 172, 173, 207, 208, 152, 152, 132, + /* 710 */ 133, 134, 135, 136, 164, 152, 84, 47, 48, 49, + /* 720 */ 98, 181, 152, 152, 54, 55, 56, 196, 91, 97, + /* 730 */ 98, 160, 218, 163, 244, 164, 66, 152, 207, 208, + /* 740 */ 103, 217, 172, 173, 19, 20, 124, 22, 193, 38, /* 750 */ 39, 40, 41, 83, 43, 44, 45, 46, 47, 48, - /* 760 */ 49, 50, 51, 52, 53, 95, 152, 97, 98, 85, - /* 770 */ 107, 101, 47, 48, 163, 112, 92, 152, 152, 54, - /* 780 */ 55, 56, 229, 221, 222, 223, 172, 173, 163, 49, - /* 790 */ 152, 66, 108, 109, 110, 55, 56, 172, 173, 163, - /* 800 */ 186, 22, 132, 133, 134, 135, 136, 196, 83, 43, + /* 760 */ 49, 50, 51, 52, 53, 95, 196, 97, 98, 85, + /* 770 */ 152, 101, 47, 48, 181, 85, 92, 140, 193, 54, + /* 780 */ 55, 56, 92, 49, 195, 55, 56, 175, 163, 55, + /* 790 */ 56, 66, 108, 109, 110, 206, 163, 242, 108, 109, + /* 800 */ 110, 175, 132, 133, 134, 135, 136, 152, 83, 43, /* 810 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - /* 820 */ 95, 196, 97, 98, 85, 99, 101, 152, 102, 103, - /* 830 */ 104, 92, 196, 146, 147, 152, 181, 97, 98, 113, - /* 840 */ 19, 20, 152, 22, 218, 22, 116, 108, 109, 110, - /* 850 */ 152, 121, 55, 56, 12, 219, 218, 132, 133, 134, - /* 860 */ 135, 136, 172, 173, 55, 56, 55, 56, 47, 48, - /* 870 */ 172, 173, 236, 152, 5, 54, 55, 56, 55, 10, - /* 880 */ 11, 12, 13, 14, 186, 152, 17, 66, 47, 48, - /* 890 */ 152, 210, 16, 84, 97, 98, 55, 56, 21, 57, - /* 900 */ 217, 122, 22, 152, 83, 152, 97, 98, 97, 98, - /* 910 */ 172, 173, 152, 152, 224, 73, 95, 75, 97, 98, - /* 920 */ 97, 124, 101, 172, 173, 164, 193, 47, 48, 60, - /* 930 */ 163, 62, 172, 173, 24, 55, 56, 186, 97, 98, - /* 940 */ 71, 100, 55, 56, 183, 207, 185, 152, 107, 23, - /* 950 */ 109, 82, 26, 132, 133, 134, 135, 136, 89, 152, - /* 960 */ 26, 92, 93, 196, 88, 55, 90, 152, 91, 152, - /* 970 */ 217, 152, 152, 132, 133, 95, 152, 97, 211, 212, - /* 980 */ 103, 101, 152, 114, 97, 98, 152, 172, 173, 19, + /* 820 */ 95, 196, 97, 98, 55, 56, 101, 97, 98, 196, + /* 830 */ 152, 97, 98, 221, 222, 223, 211, 212, 22, 23, + /* 840 */ 19, 20, 181, 22, 19, 152, 152, 221, 222, 223, + /* 850 */ 172, 173, 219, 19, 124, 30, 238, 132, 133, 134, + /* 860 */ 135, 136, 169, 170, 186, 232, 97, 98, 47, 48, + /* 870 */ 237, 152, 217, 152, 5, 54, 55, 56, 152, 10, + /* 880 */ 11, 12, 13, 14, 47, 48, 17, 66, 47, 48, + /* 890 */ 56, 172, 173, 124, 194, 195, 55, 56, 172, 173, + /* 900 */ 152, 152, 22, 152, 83, 186, 206, 108, 109, 110, + /* 910 */ 22, 23, 96, 152, 193, 12, 95, 152, 97, 98, + /* 920 */ 172, 173, 101, 230, 152, 164, 12, 47, 48, 60, + /* 930 */ 152, 62, 107, 207, 186, 55, 56, 112, 97, 98, + /* 940 */ 71, 100, 193, 152, 183, 152, 185, 152, 107, 152, + /* 950 */ 109, 82, 16, 132, 133, 134, 135, 136, 89, 152, + /* 960 */ 57, 92, 93, 172, 173, 172, 173, 172, 173, 132, + /* 970 */ 133, 57, 152, 132, 133, 95, 73, 97, 75, 55, + /* 980 */ 56, 101, 163, 114, 96, 245, 246, 73, 85, 75, /* 990 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - /* 1000 */ 48, 49, 50, 51, 52, 53, 65, 97, 152, 152, - /* 1010 */ 141, 124, 132, 133, 134, 152, 140, 140, 152, 78, - /* 1020 */ 152, 233, 152, 193, 98, 152, 56, 86, 172, 173, - /* 1030 */ 166, 167, 237, 152, 217, 172, 173, 152, 172, 173, - /* 1040 */ 172, 173, 172, 173, 237, 172, 173, 152, 152, 152, - /* 1050 */ 124, 152, 111, 172, 173, 152, 237, 172, 173, 152, - /* 1060 */ 55, 152, 26, 152, 130, 152, 152, 172, 173, 172, - /* 1070 */ 173, 172, 173, 249, 152, 172, 173, 152, 61, 172, - /* 1080 */ 173, 172, 173, 172, 173, 172, 173, 70, 152, 193, - /* 1090 */ 152, 137, 152, 139, 172, 173, 152, 172, 173, 152, - /* 1100 */ 152, 152, 97, 152, 26, 152, 163, 152, 172, 173, - /* 1110 */ 172, 173, 172, 173, 152, 16, 172, 173, 26, 172, - /* 1120 */ 173, 172, 173, 172, 173, 172, 173, 172, 173, 163, - /* 1130 */ 152, 152, 152, 22, 172, 173, 152, 241, 152, 196, - /* 1140 */ 152, 193, 106, 152, 152, 152, 163, 152, 37, 152, - /* 1150 */ 172, 173, 172, 173, 152, 152, 172, 173, 172, 173, - /* 1160 */ 172, 173, 196, 172, 173, 172, 173, 172, 173, 172, - /* 1170 */ 173, 152, 152, 152, 172, 173, 98, 152, 152, 196, - /* 1180 */ 160, 22, 23, 19, 164, 193, 152, 88, 232, 90, - /* 1190 */ 191, 172, 173, 172, 173, 163, 193, 172, 173, 166, - /* 1200 */ 167, 163, 124, 163, 244, 245, 23, 211, 212, 26, - /* 1210 */ 55, 23, 55, 23, 26, 123, 26, 152, 23, 193, - /* 1220 */ 56, 26, 23, 23, 23, 26, 26, 26, 196, 100, - /* 1230 */ 101, 7, 8, 152, 196, 23, 196, 23, 26, 152, - /* 1240 */ 26, 132, 133, 23, 132, 133, 26, 152, 152, 152, - /* 1250 */ 152, 210, 97, 152, 97, 96, 152, 152, 152, 152, - /* 1260 */ 152, 210, 152, 210, 197, 152, 152, 152, 152, 152, - /* 1270 */ 152, 152, 152, 152, 152, 152, 152, 198, 150, 176, - /* 1280 */ 214, 201, 214, 238, 201, 238, 184, 214, 226, 200, - /* 1290 */ 155, 198, 67, 122, 242, 159, 159, 69, 239, 239, - /* 1300 */ 159, 175, 175, 22, 220, 180, 175, 27, 130, 18, - /* 1310 */ 159, 18, 158, 137, 220, 159, 158, 235, 74, 189, - /* 1320 */ 234, 159, 159, 158, 22, 192, 192, 177, 159, 159, - /* 1330 */ 192, 192, 189, 201, 189, 158, 107, 158, 177, 76, - /* 1340 */ 174, 201, 174, 201, 106, 159, 174, 125, 174, 182, - /* 1350 */ 177, 176, 107, 159, 174, 137, 174, 53, 174, 129, - /* 1360 */ 216, 215, 215, 182, 216, 216, 177, 215, 126, 216, - /* 1370 */ 177, 128, 25, 127, 26, 215, 13, 162, 161, 153, - /* 1380 */ 153, 6, 151, 151, 151, 151, 165, 178, 165, 178, - /* 1390 */ 4, 3, 22, 142, 15, 94, 16, 205, 120, 202, - /* 1400 */ 204, 203, 165, 201, 23, 23, 131, 111, 123, 20, - /* 1410 */ 225, 125, 16, 1, 131, 228, 111, 123, 56, 228, - /* 1420 */ 37, 37, 64, 1, 5, 122, 22, 107, 140, 80, - /* 1430 */ 80, 26, 87, 72, 107, 24, 20, 19, 112, 105, - /* 1440 */ 23, 68, 22, 79, 79, 22, 22, 22, 58, 22, - /* 1450 */ 245, 248, 248, 79, 23, 23, 23, 116, 22, 122, - /* 1460 */ 23, 22, 56, 23, 26, 23, 64, 22, 124, 26, - /* 1470 */ 26, 64, 64, 23, 23, 23, 11, 23, 22, 26, - /* 1480 */ 23, 22, 24, 1, 23, 22, 26, 250, 24, 23, - /* 1490 */ 22, 122, 23, 23, 22, 15, 23, 250, 122, 122, - /* 1500 */ 122, + /* 1000 */ 48, 49, 50, 51, 52, 53, 194, 195, 152, 171, + /* 1010 */ 141, 152, 132, 133, 134, 196, 225, 179, 206, 65, + /* 1020 */ 152, 97, 98, 152, 88, 152, 90, 152, 172, 173, + /* 1030 */ 152, 219, 78, 152, 152, 238, 152, 152, 219, 152, + /* 1040 */ 86, 152, 152, 172, 173, 238, 152, 172, 173, 152, + /* 1050 */ 172, 173, 152, 172, 173, 213, 237, 172, 173, 172, + /* 1060 */ 173, 172, 173, 211, 212, 111, 172, 173, 152, 172, + /* 1070 */ 173, 152, 172, 173, 152, 193, 140, 193, 152, 59, + /* 1080 */ 152, 152, 152, 63, 152, 16, 152, 152, 172, 173, + /* 1090 */ 152, 172, 173, 152, 172, 173, 152, 77, 172, 173, + /* 1100 */ 172, 173, 172, 173, 172, 173, 172, 173, 152, 250, + /* 1110 */ 172, 173, 61, 172, 173, 152, 172, 173, 152, 92, + /* 1120 */ 152, 70, 152, 152, 152, 26, 152, 100, 172, 173, + /* 1130 */ 152, 24, 152, 22, 152, 172, 173, 152, 172, 173, + /* 1140 */ 172, 173, 172, 173, 172, 173, 172, 173, 152, 152, + /* 1150 */ 172, 173, 172, 173, 172, 173, 152, 88, 152, 90, + /* 1160 */ 152, 55, 55, 152, 193, 152, 55, 152, 172, 173, + /* 1170 */ 26, 152, 163, 163, 152, 19, 172, 173, 172, 173, + /* 1180 */ 172, 173, 22, 172, 173, 172, 173, 172, 173, 55, + /* 1190 */ 193, 172, 173, 152, 172, 173, 166, 167, 166, 167, + /* 1200 */ 163, 163, 163, 97, 97, 196, 196, 163, 97, 55, + /* 1210 */ 23, 199, 56, 26, 22, 22, 24, 100, 101, 55, + /* 1220 */ 23, 209, 123, 26, 23, 23, 23, 26, 26, 26, + /* 1230 */ 37, 97, 152, 196, 196, 196, 23, 7, 8, 26, + /* 1240 */ 196, 23, 23, 152, 26, 26, 23, 132, 133, 26, + /* 1250 */ 106, 97, 132, 133, 23, 152, 152, 26, 210, 191, + /* 1260 */ 152, 97, 152, 234, 152, 152, 152, 233, 152, 210, + /* 1270 */ 152, 152, 210, 152, 152, 152, 152, 152, 152, 197, + /* 1280 */ 210, 198, 122, 150, 239, 201, 214, 214, 201, 239, + /* 1290 */ 214, 227, 200, 184, 198, 155, 67, 243, 122, 22, + /* 1300 */ 159, 159, 69, 176, 175, 175, 175, 240, 180, 159, + /* 1310 */ 220, 240, 27, 130, 18, 18, 159, 158, 220, 137, + /* 1320 */ 159, 189, 236, 158, 74, 159, 159, 158, 192, 192, + /* 1330 */ 192, 192, 235, 22, 189, 189, 201, 159, 158, 177, + /* 1340 */ 159, 107, 158, 76, 201, 177, 174, 174, 201, 174, + /* 1350 */ 106, 177, 182, 174, 107, 159, 22, 125, 159, 182, + /* 1360 */ 174, 176, 174, 174, 216, 216, 215, 215, 177, 216, + /* 1370 */ 215, 53, 137, 128, 216, 177, 127, 129, 215, 126, + /* 1380 */ 25, 13, 162, 26, 6, 161, 165, 165, 178, 153, + /* 1390 */ 153, 151, 151, 151, 151, 224, 4, 3, 22, 142, + /* 1400 */ 15, 94, 16, 178, 165, 205, 23, 202, 204, 203, + /* 1410 */ 201, 23, 120, 131, 111, 20, 226, 123, 125, 16, + /* 1420 */ 1, 123, 131, 229, 229, 111, 37, 37, 56, 64, + /* 1430 */ 122, 1, 5, 22, 107, 140, 80, 87, 26, 80, + /* 1440 */ 107, 72, 24, 20, 19, 105, 22, 112, 22, 79, + /* 1450 */ 22, 58, 23, 22, 79, 22, 249, 249, 246, 79, + /* 1460 */ 23, 23, 23, 116, 68, 22, 26, 23, 22, 56, + /* 1470 */ 122, 23, 23, 64, 22, 124, 26, 26, 64, 64, + /* 1480 */ 23, 23, 23, 23, 11, 23, 22, 26, 23, 22, + /* 1490 */ 24, 1, 23, 22, 26, 122, 24, 23, 22, 122, + /* 1500 */ 23, 23, 22, 122, 122, 23, 15, }; #define YY_SHIFT_USE_DFLT (-95) -#define YY_SHIFT_COUNT (439) +#define YY_SHIFT_COUNT (442) #define YY_SHIFT_MIN (-94) -#define YY_SHIFT_MAX (1482) +#define YY_SHIFT_MAX (1491) static const short yy_shift_ofst[] = { - /* 0 */ 40, 564, 869, 577, 725, 725, 725, 739, -19, 16, - /* 10 */ 16, 100, 725, 725, 725, 725, 725, 725, 725, 841, - /* 20 */ 841, 538, 507, 684, 623, 61, 137, 172, 207, 242, - /* 30 */ 277, 312, 347, 382, 424, 424, 424, 424, 424, 424, - /* 40 */ 424, 424, 424, 424, 424, 424, 424, 424, 424, 459, - /* 50 */ 424, 494, 529, 529, 670, 725, 725, 725, 725, 725, + /* 0 */ 40, 564, 869, 577, 725, 725, 725, 725, 690, -19, + /* 10 */ 16, 16, 100, 725, 725, 725, 725, 725, 725, 725, + /* 20 */ 841, 841, 538, 507, 684, 565, 61, 137, 172, 207, + /* 30 */ 242, 277, 312, 347, 382, 424, 424, 424, 424, 424, + /* 40 */ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, + /* 50 */ 459, 424, 494, 529, 529, 670, 725, 725, 725, 725, /* 60 */ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, /* 70 */ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, - /* 80 */ 725, 725, 725, 821, 725, 725, 725, 725, 725, 725, - /* 90 */ 725, 725, 725, 725, 725, 725, 725, 952, 711, 711, - /* 100 */ 711, 711, 711, 766, 23, 32, 811, 877, 663, 602, - /* 110 */ 602, 811, 73, 113, -51, -95, -95, -95, 501, 501, - /* 120 */ 501, 595, 595, 809, 205, 276, 811, 811, 811, 811, - /* 130 */ 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, - /* 140 */ 811, 811, 811, 811, 811, 811, 192, 628, 498, 498, - /* 150 */ 113, -34, -34, -34, -34, -34, -34, -95, -95, -95, - /* 160 */ 880, -94, -94, 726, 740, 99, 797, 887, 349, 811, - /* 170 */ 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, - /* 180 */ 811, 811, 811, 811, 811, 811, 941, 941, 941, 811, - /* 190 */ 811, 926, 811, 811, 811, -18, 811, 811, 842, 811, - /* 200 */ 811, 811, 811, 811, 811, 811, 811, 811, 811, 224, - /* 210 */ 608, 910, 910, 910, 1078, 45, 469, 508, 934, 970, - /* 220 */ 970, 1164, 934, 1164, 1036, 1183, 359, 1017, 970, 954, - /* 230 */ 1017, 1017, 1092, 730, 497, 1225, 1171, 1171, 1228, 1228, - /* 240 */ 1171, 1281, 1280, 1178, 1291, 1291, 1291, 1291, 1171, 1293, - /* 250 */ 1178, 1281, 1280, 1280, 1178, 1171, 1293, 1176, 1244, 1171, - /* 260 */ 1171, 1293, 1302, 1171, 1293, 1171, 1293, 1302, 1229, 1229, - /* 270 */ 1229, 1263, 1302, 1229, 1238, 1229, 1263, 1229, 1229, 1222, - /* 280 */ 1245, 1222, 1245, 1222, 1245, 1222, 1245, 1171, 1171, 1218, - /* 290 */ 1302, 1304, 1304, 1302, 1230, 1242, 1243, 1246, 1178, 1347, - /* 300 */ 1348, 1363, 1363, 1375, 1375, 1375, 1375, -95, -95, -95, - /* 310 */ -95, -95, -95, -95, -95, 451, 876, 346, 1159, 1099, - /* 320 */ 441, 823, 1188, 1111, 1190, 1195, 1199, 1200, 1005, 1129, - /* 330 */ 1224, 533, 1201, 1212, 1155, 1214, 1109, 1112, 1220, 1157, - /* 340 */ 779, 1386, 1388, 1370, 1251, 1379, 1301, 1380, 1381, 1382, - /* 350 */ 1278, 1275, 1296, 1285, 1389, 1286, 1396, 1412, 1294, 1283, - /* 360 */ 1383, 1384, 1305, 1362, 1358, 1303, 1422, 1419, 1404, 1320, - /* 370 */ 1288, 1349, 1405, 1350, 1345, 1361, 1327, 1411, 1416, 1418, - /* 380 */ 1326, 1334, 1420, 1364, 1423, 1424, 1417, 1425, 1365, 1390, - /* 390 */ 1427, 1374, 1373, 1431, 1432, 1433, 1341, 1436, 1437, 1439, - /* 400 */ 1438, 1337, 1440, 1442, 1406, 1402, 1445, 1344, 1443, 1407, - /* 410 */ 1444, 1408, 1443, 1450, 1451, 1452, 1453, 1454, 1456, 1465, - /* 420 */ 1457, 1459, 1458, 1460, 1461, 1463, 1464, 1460, 1466, 1468, - /* 430 */ 1469, 1470, 1472, 1369, 1376, 1377, 1378, 1473, 1480, 1482, + /* 80 */ 725, 725, 725, 725, 821, 725, 725, 725, 725, 725, + /* 90 */ 725, 725, 725, 725, 725, 725, 725, 725, 952, 711, + /* 100 */ 711, 711, 711, 711, 766, 23, 32, 924, 637, 825, + /* 110 */ 837, 837, 924, 73, 183, -51, -95, -95, -95, 501, + /* 120 */ 501, 501, 903, 903, 632, 205, 241, 924, 924, 924, + /* 130 */ 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, + /* 140 */ 924, 924, 924, 924, 924, 924, 924, 192, 1027, 1106, + /* 150 */ 1106, 183, 176, 176, 176, 176, 176, 176, -95, -95, + /* 160 */ -95, 880, -94, -94, 578, 734, 99, 730, 769, 349, + /* 170 */ 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, + /* 180 */ 924, 924, 924, 924, 924, 924, 924, 954, 954, 954, + /* 190 */ 924, 924, 622, 924, 924, 924, -18, 924, 924, 914, + /* 200 */ 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, + /* 210 */ 441, 1020, 1107, 1107, 1107, 569, 45, 217, 510, 423, + /* 220 */ 834, 834, 1156, 423, 1156, 1144, 1187, 359, 1051, 834, + /* 230 */ -17, 1051, 1051, 1099, 469, 1192, 1229, 1176, 1176, 1233, + /* 240 */ 1233, 1176, 1277, 1285, 1183, 1296, 1296, 1296, 1296, 1176, + /* 250 */ 1297, 1183, 1277, 1285, 1285, 1183, 1176, 1297, 1182, 1250, + /* 260 */ 1176, 1176, 1297, 1311, 1176, 1297, 1176, 1297, 1311, 1234, + /* 270 */ 1234, 1234, 1267, 1311, 1234, 1244, 1234, 1267, 1234, 1234, + /* 280 */ 1232, 1247, 1232, 1247, 1232, 1247, 1232, 1247, 1176, 1334, + /* 290 */ 1176, 1235, 1311, 1318, 1318, 1311, 1248, 1253, 1245, 1249, + /* 300 */ 1183, 1355, 1357, 1368, 1368, 1378, 1378, 1378, 1378, -95, + /* 310 */ -95, -95, -95, -95, -95, -95, -95, 451, 936, 816, + /* 320 */ 888, 1069, 799, 1111, 1197, 1193, 1201, 1202, 1203, 1213, + /* 330 */ 1134, 1117, 1230, 497, 1218, 1219, 1154, 1223, 1115, 1120, + /* 340 */ 1231, 1164, 1160, 1392, 1394, 1376, 1257, 1385, 1307, 1386, + /* 350 */ 1383, 1388, 1292, 1282, 1303, 1294, 1395, 1293, 1403, 1419, + /* 360 */ 1298, 1291, 1389, 1390, 1314, 1372, 1365, 1308, 1430, 1427, + /* 370 */ 1411, 1327, 1295, 1356, 1412, 1359, 1350, 1369, 1333, 1418, + /* 380 */ 1423, 1425, 1335, 1340, 1424, 1370, 1426, 1428, 1429, 1431, + /* 390 */ 1375, 1393, 1433, 1380, 1396, 1437, 1438, 1439, 1347, 1443, + /* 400 */ 1444, 1446, 1440, 1348, 1448, 1449, 1413, 1409, 1452, 1351, + /* 410 */ 1450, 1414, 1451, 1415, 1457, 1450, 1458, 1459, 1460, 1461, + /* 420 */ 1462, 1464, 1473, 1465, 1467, 1466, 1468, 1469, 1471, 1472, + /* 430 */ 1468, 1474, 1476, 1477, 1478, 1480, 1373, 1377, 1381, 1382, + /* 440 */ 1482, 1491, 1490, }; #define YY_REDUCE_USE_DFLT (-130) -#define YY_REDUCE_COUNT (314) +#define YY_REDUCE_COUNT (316) #define YY_REDUCE_MIN (-129) -#define YY_REDUCE_MAX (1237) +#define YY_REDUCE_MAX (1243) static const short yy_reduce_ofst[] = { - /* 0 */ -29, 531, 490, 625, -49, 272, 456, 510, 400, 509, - /* 10 */ 562, 114, 535, 614, 698, 384, 738, 751, 690, 419, - /* 20 */ 553, 761, 460, 636, 767, 41, 41, 41, 41, 41, - /* 30 */ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - /* 40 */ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - /* 50 */ 41, 41, 41, 41, 760, 815, 856, 863, 866, 868, - /* 60 */ 870, 873, 881, 885, 895, 897, 899, 903, 907, 909, - /* 70 */ 911, 913, 922, 925, 936, 938, 940, 944, 947, 949, - /* 80 */ 951, 953, 955, 962, 978, 980, 984, 986, 988, 991, - /* 90 */ 993, 995, 997, 1002, 1019, 1021, 1025, 41, 41, 41, - /* 100 */ 41, 41, 41, 41, 41, 41, 896, 140, 260, 98, - /* 110 */ 268, 1020, 41, 482, 41, 41, 41, 41, 270, 270, - /* 120 */ 270, 212, 217, -129, 411, 411, 550, 5, 626, 362, - /* 130 */ 733, 830, 992, 1003, 1026, 795, 683, 807, 638, 819, - /* 140 */ 753, 948, 62, 817, 824, 132, 687, 611, 864, 1033, - /* 150 */ 403, 943, 966, 983, 1032, 1038, 1040, 960, 996, 492, - /* 160 */ -50, 57, 131, 153, 221, 462, 588, 596, 675, 721, - /* 170 */ 820, 834, 857, 914, 979, 1034, 1065, 1081, 1087, 1095, - /* 180 */ 1096, 1097, 1098, 1101, 1104, 1105, 320, 500, 655, 1106, - /* 190 */ 1107, 503, 1108, 1110, 1113, 681, 1114, 1115, 999, 1116, - /* 200 */ 1117, 1118, 221, 1119, 1120, 1121, 1122, 1123, 1124, 788, - /* 210 */ 956, 1041, 1051, 1053, 503, 1067, 1079, 1128, 1080, 1066, - /* 220 */ 1068, 1045, 1083, 1047, 1103, 1102, 1125, 1126, 1073, 1062, - /* 230 */ 1127, 1131, 1089, 1093, 1135, 1052, 1136, 1137, 1059, 1060, - /* 240 */ 1141, 1084, 1130, 1132, 1133, 1134, 1138, 1139, 1151, 1154, - /* 250 */ 1140, 1094, 1143, 1145, 1142, 1156, 1158, 1082, 1086, 1162, - /* 260 */ 1163, 1165, 1150, 1169, 1177, 1170, 1179, 1161, 1166, 1168, - /* 270 */ 1172, 1167, 1173, 1174, 1175, 1180, 1181, 1182, 1184, 1144, - /* 280 */ 1146, 1148, 1147, 1149, 1152, 1153, 1160, 1186, 1194, 1185, - /* 290 */ 1189, 1187, 1191, 1193, 1192, 1196, 1198, 1197, 1202, 1215, - /* 300 */ 1217, 1226, 1227, 1231, 1232, 1233, 1234, 1203, 1204, 1205, - /* 310 */ 1221, 1223, 1209, 1211, 1237, + /* 0 */ -29, 531, 490, 570, -49, 272, 456, 498, 633, 400, + /* 10 */ 612, 626, 113, 482, 678, 719, 384, 726, 748, 791, + /* 20 */ 419, 693, 761, 812, 819, 625, 76, 76, 76, 76, + /* 30 */ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + /* 40 */ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + /* 50 */ 76, 76, 76, 76, 76, 793, 795, 856, 871, 875, + /* 60 */ 878, 881, 885, 887, 889, 894, 897, 900, 916, 919, + /* 70 */ 922, 926, 928, 930, 932, 934, 938, 941, 944, 956, + /* 80 */ 963, 966, 968, 970, 972, 974, 978, 980, 982, 996, + /* 90 */ 1004, 1006, 1008, 1011, 1013, 1015, 1019, 1022, 76, 76, + /* 100 */ 76, 76, 76, 76, 76, 76, 76, 555, 210, 260, + /* 110 */ 200, 346, 571, 76, 700, 76, 76, 76, 76, 838, + /* 120 */ 838, 838, 42, 182, 251, 160, 160, 550, 5, 455, + /* 130 */ 585, 721, 749, 882, 884, 971, 618, 462, 797, 514, + /* 140 */ 807, 524, 997, -129, 655, 859, 62, 290, 66, 1030, + /* 150 */ 1032, 589, 1009, 1010, 1037, 1038, 1039, 1044, 740, 852, + /* 160 */ 1012, 112, 147, 230, 257, 180, 369, 403, 500, 549, + /* 170 */ 556, 563, 694, 751, 765, 772, 778, 820, 868, 873, + /* 180 */ 890, 929, 935, 985, 1041, 1080, 1091, 540, 593, 661, + /* 190 */ 1103, 1104, 842, 1108, 1110, 1112, 1048, 1113, 1114, 1068, + /* 200 */ 1116, 1118, 1119, 180, 1121, 1122, 1123, 1124, 1125, 1126, + /* 210 */ 1029, 1034, 1059, 1062, 1070, 842, 1082, 1083, 1133, 1084, + /* 220 */ 1072, 1073, 1045, 1087, 1050, 1127, 1109, 1128, 1129, 1076, + /* 230 */ 1064, 1130, 1131, 1092, 1096, 1140, 1054, 1141, 1142, 1067, + /* 240 */ 1071, 1150, 1090, 1132, 1135, 1136, 1137, 1138, 1139, 1157, + /* 250 */ 1159, 1143, 1098, 1145, 1146, 1147, 1161, 1165, 1086, 1097, + /* 260 */ 1166, 1167, 1169, 1162, 1178, 1180, 1181, 1184, 1168, 1172, + /* 270 */ 1173, 1175, 1170, 1174, 1179, 1185, 1186, 1177, 1188, 1189, + /* 280 */ 1148, 1151, 1149, 1152, 1153, 1155, 1158, 1163, 1196, 1171, + /* 290 */ 1199, 1190, 1191, 1194, 1195, 1198, 1200, 1204, 1206, 1205, + /* 300 */ 1209, 1220, 1224, 1236, 1237, 1240, 1241, 1242, 1243, 1207, + /* 310 */ 1208, 1212, 1221, 1222, 1210, 1225, 1239, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1250, 1240, 1240, 1240, 1174, 1174, 1174, 1240, 1071, 1100, - /* 10 */ 1100, 1224, 1301, 1301, 1301, 1301, 1301, 1301, 1173, 1301, - /* 20 */ 1301, 1301, 1301, 1240, 1075, 1106, 1301, 1301, 1301, 1301, - /* 30 */ 1301, 1301, 1301, 1301, 1223, 1225, 1114, 1113, 1206, 1087, - /* 40 */ 1111, 1104, 1108, 1175, 1169, 1170, 1168, 1172, 1176, 1301, - /* 50 */ 1107, 1138, 1153, 1137, 1301, 1301, 1301, 1301, 1301, 1301, - /* 60 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 70 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 80 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 90 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1147, 1152, 1159, - /* 100 */ 1151, 1148, 1140, 1139, 1141, 1142, 1301, 994, 1042, 1301, - /* 110 */ 1301, 1301, 1143, 1301, 1144, 1156, 1155, 1154, 1231, 1258, - /* 120 */ 1257, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 130 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 140 */ 1301, 1301, 1301, 1301, 1301, 1301, 1250, 1240, 1000, 1000, - /* 150 */ 1301, 1240, 1240, 1240, 1240, 1240, 1240, 1236, 1075, 1066, - /* 160 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 170 */ 1228, 1226, 1301, 1187, 1301, 1301, 1301, 1301, 1301, 1301, - /* 180 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 190 */ 1301, 1301, 1301, 1301, 1301, 1071, 1301, 1301, 1301, 1301, - /* 200 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1252, 1301, - /* 210 */ 1201, 1071, 1071, 1071, 1073, 1055, 1065, 979, 1110, 1089, - /* 220 */ 1089, 1290, 1110, 1290, 1017, 1272, 1014, 1100, 1089, 1171, - /* 230 */ 1100, 1100, 1072, 1065, 1301, 1293, 1080, 1080, 1292, 1292, - /* 240 */ 1080, 1119, 1045, 1110, 1051, 1051, 1051, 1051, 1080, 991, - /* 250 */ 1110, 1119, 1045, 1045, 1110, 1080, 991, 1205, 1287, 1080, - /* 260 */ 1080, 991, 1180, 1080, 991, 1080, 991, 1180, 1043, 1043, - /* 270 */ 1043, 1032, 1180, 1043, 1017, 1043, 1032, 1043, 1043, 1093, - /* 280 */ 1088, 1093, 1088, 1093, 1088, 1093, 1088, 1080, 1080, 1301, - /* 290 */ 1180, 1184, 1184, 1180, 1105, 1094, 1103, 1101, 1110, 997, - /* 300 */ 1035, 1255, 1255, 1251, 1251, 1251, 1251, 1298, 1298, 1236, - /* 310 */ 1267, 1267, 1019, 1019, 1267, 1301, 1301, 1301, 1301, 1301, - /* 320 */ 1301, 1262, 1301, 1189, 1301, 1301, 1301, 1301, 1301, 1301, - /* 330 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 340 */ 1125, 1301, 975, 1233, 1301, 1301, 1232, 1301, 1301, 1301, - /* 350 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 360 */ 1301, 1301, 1301, 1301, 1301, 1289, 1301, 1301, 1301, 1301, - /* 370 */ 1301, 1301, 1204, 1203, 1301, 1301, 1301, 1301, 1301, 1301, - /* 380 */ 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 390 */ 1301, 1301, 1301, 1301, 1301, 1301, 1057, 1301, 1301, 1301, - /* 400 */ 1276, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1102, 1301, - /* 410 */ 1095, 1301, 1280, 1301, 1301, 1301, 1301, 1301, 1301, 1301, - /* 420 */ 1301, 1301, 1301, 1242, 1301, 1301, 1301, 1241, 1301, 1301, - /* 430 */ 1301, 1301, 1301, 1127, 1301, 1126, 1130, 1301, 985, 1301, + /* 0 */ 1258, 1248, 1248, 1248, 1180, 1180, 1180, 1180, 1248, 1077, + /* 10 */ 1106, 1106, 1232, 1309, 1309, 1309, 1309, 1309, 1309, 1179, + /* 20 */ 1309, 1309, 1309, 1309, 1248, 1081, 1112, 1309, 1309, 1309, + /* 30 */ 1309, 1309, 1309, 1309, 1309, 1231, 1233, 1120, 1119, 1214, + /* 40 */ 1093, 1117, 1110, 1114, 1181, 1175, 1176, 1174, 1178, 1182, + /* 50 */ 1309, 1113, 1144, 1159, 1143, 1309, 1309, 1309, 1309, 1309, + /* 60 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 70 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 80 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 90 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1153, 1158, + /* 100 */ 1165, 1157, 1154, 1146, 1145, 1147, 1148, 1309, 1000, 1048, + /* 110 */ 1309, 1309, 1309, 1149, 1309, 1150, 1162, 1161, 1160, 1239, + /* 120 */ 1266, 1265, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 130 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 140 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1258, 1248, 1006, + /* 150 */ 1006, 1309, 1248, 1248, 1248, 1248, 1248, 1248, 1244, 1081, + /* 160 */ 1072, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 170 */ 1309, 1236, 1234, 1309, 1195, 1309, 1309, 1309, 1309, 1309, + /* 180 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 190 */ 1309, 1309, 1309, 1309, 1309, 1309, 1077, 1309, 1309, 1309, + /* 200 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1260, + /* 210 */ 1309, 1209, 1077, 1077, 1077, 1079, 1061, 1071, 985, 1116, + /* 220 */ 1095, 1095, 1298, 1116, 1298, 1023, 1280, 1020, 1106, 1095, + /* 230 */ 1177, 1106, 1106, 1078, 1071, 1309, 1301, 1086, 1086, 1300, + /* 240 */ 1300, 1086, 1125, 1051, 1116, 1057, 1057, 1057, 1057, 1086, + /* 250 */ 997, 1116, 1125, 1051, 1051, 1116, 1086, 997, 1213, 1295, + /* 260 */ 1086, 1086, 997, 1188, 1086, 997, 1086, 997, 1188, 1049, + /* 270 */ 1049, 1049, 1038, 1188, 1049, 1023, 1049, 1038, 1049, 1049, + /* 280 */ 1099, 1094, 1099, 1094, 1099, 1094, 1099, 1094, 1086, 1183, + /* 290 */ 1086, 1309, 1188, 1192, 1192, 1188, 1111, 1100, 1109, 1107, + /* 300 */ 1116, 1003, 1041, 1263, 1263, 1259, 1259, 1259, 1259, 1306, + /* 310 */ 1306, 1244, 1275, 1275, 1025, 1025, 1275, 1309, 1309, 1309, + /* 320 */ 1309, 1309, 1309, 1270, 1309, 1197, 1309, 1309, 1309, 1309, + /* 330 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 340 */ 1309, 1309, 1131, 1309, 981, 1241, 1309, 1309, 1240, 1309, + /* 350 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 360 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1297, 1309, 1309, + /* 370 */ 1309, 1309, 1309, 1309, 1212, 1211, 1309, 1309, 1309, 1309, + /* 380 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 390 */ 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1309, 1063, 1309, + /* 400 */ 1309, 1309, 1284, 1309, 1309, 1309, 1309, 1309, 1309, 1309, + /* 410 */ 1108, 1309, 1101, 1309, 1309, 1288, 1309, 1309, 1309, 1309, + /* 420 */ 1309, 1309, 1309, 1309, 1309, 1309, 1250, 1309, 1309, 1309, + /* 430 */ 1249, 1309, 1309, 1309, 1309, 1309, 1133, 1309, 1132, 1136, + /* 440 */ 1309, 991, 1309, }; /********** End of lemon-generated parsing tables *****************************/ @@ -131674,9 +132517,9 @@ typedef struct yyStackEntry yyStackEntry; /* The state of the parser is completely contained in an instance of ** the following structure */ struct yyParser { - int yyidx; /* Index of top element in stack */ + yyStackEntry *yytos; /* Pointer to top element of the stack */ #ifdef YYTRACKMAXSTACKDEPTH - int yyidxMax; /* Maximum value of yyidx */ + int yyhwm; /* High-water mark of the stack */ #endif #ifndef YYNOERRORRECOVERY int yyerrcnt; /* Shifts left before out of the error */ @@ -131685,6 +132528,7 @@ struct yyParser { #if YYSTACKDEPTH<=0 int yystksz; /* Current side of the stack */ yyStackEntry *yystack; /* The parser's stack */ + yyStackEntry yystk0; /* First stack entry */ #else yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ #endif @@ -131783,13 +132627,13 @@ static const char *const yyTokenName[] = { "stl_prefix", "joinop", "indexed_opt", "on_opt", "using_opt", "idlist", "setlist", "insert_cmd", "idlist_opt", "likeop", "between_op", "in_op", - "case_operand", "case_exprlist", "case_else", "uniqueflag", - "collate", "nmnum", "trigger_decl", "trigger_cmd_list", - "trigger_time", "trigger_event", "foreach_clause", "when_clause", - "trigger_cmd", "trnm", "tridxby", "database_kw_opt", - "key_opt", "add_column_fullname", "kwcolumn_opt", "create_vtab", - "vtabarglist", "vtabarg", "vtabargtoken", "lp", - "anylist", "wqlist", + "paren_exprlist", "case_operand", "case_exprlist", "case_else", + "uniqueflag", "collate", "nmnum", "trigger_decl", + "trigger_cmd_list", "trigger_time", "trigger_event", "foreach_clause", + "when_clause", "trigger_cmd", "trnm", "tridxby", + "database_kw_opt", "key_opt", "add_column_fullname", "kwcolumn_opt", + "create_vtab", "vtabarglist", "vtabarg", "vtabargtoken", + "lp", "anylist", "wqlist", }; #endif /* NDEBUG */ @@ -131987,7 +132831,7 @@ static const char *const yyRuleName[] = { /* 187 */ "expr ::= expr in_op LP exprlist RP", /* 188 */ "expr ::= LP select RP", /* 189 */ "expr ::= expr in_op LP select RP", - /* 190 */ "expr ::= expr in_op nm dbnm", + /* 190 */ "expr ::= expr in_op nm dbnm paren_exprlist", /* 191 */ "expr ::= EXISTS LP select RP", /* 192 */ "expr ::= CASE case_operand case_exprlist case_else END", /* 193 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", @@ -131999,154 +132843,166 @@ static const char *const yyRuleName[] = { /* 199 */ "exprlist ::=", /* 200 */ "nexprlist ::= nexprlist COMMA expr", /* 201 */ "nexprlist ::= expr", - /* 202 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", - /* 203 */ "uniqueflag ::= UNIQUE", - /* 204 */ "uniqueflag ::=", - /* 205 */ "eidlist_opt ::=", - /* 206 */ "eidlist_opt ::= LP eidlist RP", - /* 207 */ "eidlist ::= eidlist COMMA nm collate sortorder", - /* 208 */ "eidlist ::= nm collate sortorder", - /* 209 */ "collate ::=", - /* 210 */ "collate ::= COLLATE ID|STRING", - /* 211 */ "cmd ::= DROP INDEX ifexists fullname", - /* 212 */ "cmd ::= VACUUM", - /* 213 */ "cmd ::= VACUUM nm", - /* 214 */ "cmd ::= PRAGMA nm dbnm", - /* 215 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", - /* 216 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", - /* 217 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", - /* 218 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", - /* 219 */ "plus_num ::= PLUS INTEGER|FLOAT", - /* 220 */ "minus_num ::= MINUS INTEGER|FLOAT", - /* 221 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", - /* 222 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", - /* 223 */ "trigger_time ::= BEFORE", - /* 224 */ "trigger_time ::= AFTER", - /* 225 */ "trigger_time ::= INSTEAD OF", - /* 226 */ "trigger_time ::=", - /* 227 */ "trigger_event ::= DELETE|INSERT", - /* 228 */ "trigger_event ::= UPDATE", - /* 229 */ "trigger_event ::= UPDATE OF idlist", - /* 230 */ "when_clause ::=", - /* 231 */ "when_clause ::= WHEN expr", - /* 232 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", - /* 233 */ "trigger_cmd_list ::= trigger_cmd SEMI", - /* 234 */ "trnm ::= nm DOT nm", - /* 235 */ "tridxby ::= INDEXED BY nm", - /* 236 */ "tridxby ::= NOT INDEXED", - /* 237 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt", - /* 238 */ "trigger_cmd ::= insert_cmd INTO trnm idlist_opt select", - /* 239 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt", - /* 240 */ "trigger_cmd ::= select", - /* 241 */ "expr ::= RAISE LP IGNORE RP", - /* 242 */ "expr ::= RAISE LP raisetype COMMA nm RP", - /* 243 */ "raisetype ::= ROLLBACK", - /* 244 */ "raisetype ::= ABORT", - /* 245 */ "raisetype ::= FAIL", - /* 246 */ "cmd ::= DROP TRIGGER ifexists fullname", - /* 247 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", - /* 248 */ "cmd ::= DETACH database_kw_opt expr", - /* 249 */ "key_opt ::=", - /* 250 */ "key_opt ::= KEY expr", - /* 251 */ "cmd ::= REINDEX", - /* 252 */ "cmd ::= REINDEX nm dbnm", - /* 253 */ "cmd ::= ANALYZE", - /* 254 */ "cmd ::= ANALYZE nm dbnm", - /* 255 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", - /* 256 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", - /* 257 */ "add_column_fullname ::= fullname", - /* 258 */ "cmd ::= create_vtab", - /* 259 */ "cmd ::= create_vtab LP vtabarglist RP", - /* 260 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", - /* 261 */ "vtabarg ::=", - /* 262 */ "vtabargtoken ::= ANY", - /* 263 */ "vtabargtoken ::= lp anylist RP", - /* 264 */ "lp ::= LP", - /* 265 */ "with ::=", - /* 266 */ "with ::= WITH wqlist", - /* 267 */ "with ::= WITH RECURSIVE wqlist", - /* 268 */ "wqlist ::= nm eidlist_opt AS LP select RP", - /* 269 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP", - /* 270 */ "input ::= cmdlist", - /* 271 */ "cmdlist ::= cmdlist ecmd", - /* 272 */ "cmdlist ::= ecmd", - /* 273 */ "ecmd ::= SEMI", - /* 274 */ "ecmd ::= explain cmdx SEMI", - /* 275 */ "explain ::=", - /* 276 */ "trans_opt ::=", - /* 277 */ "trans_opt ::= TRANSACTION", - /* 278 */ "trans_opt ::= TRANSACTION nm", - /* 279 */ "savepoint_opt ::= SAVEPOINT", - /* 280 */ "savepoint_opt ::=", - /* 281 */ "cmd ::= create_table create_table_args", - /* 282 */ "columnlist ::= columnlist COMMA columnname carglist", - /* 283 */ "columnlist ::= columnname carglist", - /* 284 */ "nm ::= ID|INDEXED", - /* 285 */ "nm ::= STRING", - /* 286 */ "nm ::= JOIN_KW", - /* 287 */ "typetoken ::= typename", - /* 288 */ "typename ::= ID|STRING", - /* 289 */ "signed ::= plus_num", - /* 290 */ "signed ::= minus_num", - /* 291 */ "carglist ::= carglist ccons", - /* 292 */ "carglist ::=", - /* 293 */ "ccons ::= NULL onconf", - /* 294 */ "conslist_opt ::= COMMA conslist", - /* 295 */ "conslist ::= conslist tconscomma tcons", - /* 296 */ "conslist ::= tcons", - /* 297 */ "tconscomma ::=", - /* 298 */ "defer_subclause_opt ::= defer_subclause", - /* 299 */ "resolvetype ::= raisetype", - /* 300 */ "selectnowith ::= oneselect", - /* 301 */ "oneselect ::= values", - /* 302 */ "sclp ::= selcollist COMMA", - /* 303 */ "as ::= ID|STRING", - /* 304 */ "expr ::= term", - /* 305 */ "exprlist ::= nexprlist", - /* 306 */ "nmnum ::= plus_num", - /* 307 */ "nmnum ::= nm", - /* 308 */ "nmnum ::= ON", - /* 309 */ "nmnum ::= DELETE", - /* 310 */ "nmnum ::= DEFAULT", - /* 311 */ "plus_num ::= INTEGER|FLOAT", - /* 312 */ "foreach_clause ::=", - /* 313 */ "foreach_clause ::= FOR EACH ROW", - /* 314 */ "trnm ::= nm", - /* 315 */ "tridxby ::=", - /* 316 */ "database_kw_opt ::= DATABASE", - /* 317 */ "database_kw_opt ::=", - /* 318 */ "kwcolumn_opt ::=", - /* 319 */ "kwcolumn_opt ::= COLUMNKW", - /* 320 */ "vtabarglist ::= vtabarg", - /* 321 */ "vtabarglist ::= vtabarglist COMMA vtabarg", - /* 322 */ "vtabarg ::= vtabarg vtabargtoken", - /* 323 */ "anylist ::=", - /* 324 */ "anylist ::= anylist LP anylist RP", - /* 325 */ "anylist ::= anylist ANY", + /* 202 */ "paren_exprlist ::=", + /* 203 */ "paren_exprlist ::= LP exprlist RP", + /* 204 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", + /* 205 */ "uniqueflag ::= UNIQUE", + /* 206 */ "uniqueflag ::=", + /* 207 */ "eidlist_opt ::=", + /* 208 */ "eidlist_opt ::= LP eidlist RP", + /* 209 */ "eidlist ::= eidlist COMMA nm collate sortorder", + /* 210 */ "eidlist ::= nm collate sortorder", + /* 211 */ "collate ::=", + /* 212 */ "collate ::= COLLATE ID|STRING", + /* 213 */ "cmd ::= DROP INDEX ifexists fullname", + /* 214 */ "cmd ::= VACUUM", + /* 215 */ "cmd ::= VACUUM nm", + /* 216 */ "cmd ::= PRAGMA nm dbnm", + /* 217 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", + /* 218 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", + /* 219 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", + /* 220 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", + /* 221 */ "plus_num ::= PLUS INTEGER|FLOAT", + /* 222 */ "minus_num ::= MINUS INTEGER|FLOAT", + /* 223 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", + /* 224 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", + /* 225 */ "trigger_time ::= BEFORE", + /* 226 */ "trigger_time ::= AFTER", + /* 227 */ "trigger_time ::= INSTEAD OF", + /* 228 */ "trigger_time ::=", + /* 229 */ "trigger_event ::= DELETE|INSERT", + /* 230 */ "trigger_event ::= UPDATE", + /* 231 */ "trigger_event ::= UPDATE OF idlist", + /* 232 */ "when_clause ::=", + /* 233 */ "when_clause ::= WHEN expr", + /* 234 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", + /* 235 */ "trigger_cmd_list ::= trigger_cmd SEMI", + /* 236 */ "trnm ::= nm DOT nm", + /* 237 */ "tridxby ::= INDEXED BY nm", + /* 238 */ "tridxby ::= NOT INDEXED", + /* 239 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt", + /* 240 */ "trigger_cmd ::= insert_cmd INTO trnm idlist_opt select", + /* 241 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt", + /* 242 */ "trigger_cmd ::= select", + /* 243 */ "expr ::= RAISE LP IGNORE RP", + /* 244 */ "expr ::= RAISE LP raisetype COMMA nm RP", + /* 245 */ "raisetype ::= ROLLBACK", + /* 246 */ "raisetype ::= ABORT", + /* 247 */ "raisetype ::= FAIL", + /* 248 */ "cmd ::= DROP TRIGGER ifexists fullname", + /* 249 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", + /* 250 */ "cmd ::= DETACH database_kw_opt expr", + /* 251 */ "key_opt ::=", + /* 252 */ "key_opt ::= KEY expr", + /* 253 */ "cmd ::= REINDEX", + /* 254 */ "cmd ::= REINDEX nm dbnm", + /* 255 */ "cmd ::= ANALYZE", + /* 256 */ "cmd ::= ANALYZE nm dbnm", + /* 257 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", + /* 258 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", + /* 259 */ "add_column_fullname ::= fullname", + /* 260 */ "cmd ::= create_vtab", + /* 261 */ "cmd ::= create_vtab LP vtabarglist RP", + /* 262 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", + /* 263 */ "vtabarg ::=", + /* 264 */ "vtabargtoken ::= ANY", + /* 265 */ "vtabargtoken ::= lp anylist RP", + /* 266 */ "lp ::= LP", + /* 267 */ "with ::=", + /* 268 */ "with ::= WITH wqlist", + /* 269 */ "with ::= WITH RECURSIVE wqlist", + /* 270 */ "wqlist ::= nm eidlist_opt AS LP select RP", + /* 271 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP", + /* 272 */ "input ::= cmdlist", + /* 273 */ "cmdlist ::= cmdlist ecmd", + /* 274 */ "cmdlist ::= ecmd", + /* 275 */ "ecmd ::= SEMI", + /* 276 */ "ecmd ::= explain cmdx SEMI", + /* 277 */ "explain ::=", + /* 278 */ "trans_opt ::=", + /* 279 */ "trans_opt ::= TRANSACTION", + /* 280 */ "trans_opt ::= TRANSACTION nm", + /* 281 */ "savepoint_opt ::= SAVEPOINT", + /* 282 */ "savepoint_opt ::=", + /* 283 */ "cmd ::= create_table create_table_args", + /* 284 */ "columnlist ::= columnlist COMMA columnname carglist", + /* 285 */ "columnlist ::= columnname carglist", + /* 286 */ "nm ::= ID|INDEXED", + /* 287 */ "nm ::= STRING", + /* 288 */ "nm ::= JOIN_KW", + /* 289 */ "typetoken ::= typename", + /* 290 */ "typename ::= ID|STRING", + /* 291 */ "signed ::= plus_num", + /* 292 */ "signed ::= minus_num", + /* 293 */ "carglist ::= carglist ccons", + /* 294 */ "carglist ::=", + /* 295 */ "ccons ::= NULL onconf", + /* 296 */ "conslist_opt ::= COMMA conslist", + /* 297 */ "conslist ::= conslist tconscomma tcons", + /* 298 */ "conslist ::= tcons", + /* 299 */ "tconscomma ::=", + /* 300 */ "defer_subclause_opt ::= defer_subclause", + /* 301 */ "resolvetype ::= raisetype", + /* 302 */ "selectnowith ::= oneselect", + /* 303 */ "oneselect ::= values", + /* 304 */ "sclp ::= selcollist COMMA", + /* 305 */ "as ::= ID|STRING", + /* 306 */ "expr ::= term", + /* 307 */ "exprlist ::= nexprlist", + /* 308 */ "nmnum ::= plus_num", + /* 309 */ "nmnum ::= nm", + /* 310 */ "nmnum ::= ON", + /* 311 */ "nmnum ::= DELETE", + /* 312 */ "nmnum ::= DEFAULT", + /* 313 */ "plus_num ::= INTEGER|FLOAT", + /* 314 */ "foreach_clause ::=", + /* 315 */ "foreach_clause ::= FOR EACH ROW", + /* 316 */ "trnm ::= nm", + /* 317 */ "tridxby ::=", + /* 318 */ "database_kw_opt ::= DATABASE", + /* 319 */ "database_kw_opt ::=", + /* 320 */ "kwcolumn_opt ::=", + /* 321 */ "kwcolumn_opt ::= COLUMNKW", + /* 322 */ "vtabarglist ::= vtabarg", + /* 323 */ "vtabarglist ::= vtabarglist COMMA vtabarg", + /* 324 */ "vtabarg ::= vtabarg vtabargtoken", + /* 325 */ "anylist ::=", + /* 326 */ "anylist ::= anylist LP anylist RP", + /* 327 */ "anylist ::= anylist ANY", }; #endif /* NDEBUG */ #if YYSTACKDEPTH<=0 /* -** Try to increase the size of the parser stack. +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. */ -static void yyGrowStack(yyParser *p){ +static int yyGrowStack(yyParser *p){ int newSize; + int idx; yyStackEntry *pNew; newSize = p->yystksz*2 + 100; - pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; + if( p->yystack==&p->yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->yystk0; + }else{ + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + } if( pNew ){ p->yystack = pNew; - p->yystksz = newSize; + p->yytos = &p->yystack[idx]; #ifndef NDEBUG if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sStack grows to %d entries!\n", - yyTracePrompt, p->yystksz); + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, p->yystksz, newSize); } #endif + p->yystksz = newSize; } + return pNew==0; } #endif @@ -132175,15 +133031,24 @@ SQLITE_PRIVATE void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ yyParser *pParser; pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); if( pParser ){ - pParser->yyidx = -1; #ifdef YYTRACKMAXSTACKDEPTH - pParser->yyidxMax = 0; + pParser->yyhwm = 0; #endif #if YYSTACKDEPTH<=0 + pParser->yytos = NULL; pParser->yystack = NULL; pParser->yystksz = 0; - yyGrowStack(pParser); + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } #endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; } return pParser; } @@ -132218,13 +133083,13 @@ static void yy_destructor( case 195: /* oneselect */ case 206: /* values */ { -sqlite3SelectDelete(pParse->db, (yypminor->yy159)); +sqlite3SelectDelete(pParse->db, (yypminor->yy243)); } break; case 172: /* term */ case 173: /* expr */ { -sqlite3ExprDelete(pParse->db, (yypminor->yy342).pExpr); +sqlite3ExprDelete(pParse->db, (yypminor->yy190).pExpr); } break; case 177: /* eidlist_opt */ @@ -132237,9 +133102,10 @@ sqlite3ExprDelete(pParse->db, (yypminor->yy342).pExpr); case 208: /* exprlist */ case 209: /* sclp */ case 218: /* setlist */ - case 225: /* case_exprlist */ + case 224: /* paren_exprlist */ + case 226: /* case_exprlist */ { -sqlite3ExprListDelete(pParse->db, (yypminor->yy442)); +sqlite3ExprListDelete(pParse->db, (yypminor->yy148)); } break; case 193: /* fullname */ @@ -132247,42 +133113,42 @@ sqlite3ExprListDelete(pParse->db, (yypminor->yy442)); case 211: /* seltablist */ case 212: /* stl_prefix */ { -sqlite3SrcListDelete(pParse->db, (yypminor->yy347)); +sqlite3SrcListDelete(pParse->db, (yypminor->yy185)); } break; case 196: /* with */ - case 249: /* wqlist */ + case 250: /* wqlist */ { -sqlite3WithDelete(pParse->db, (yypminor->yy331)); +sqlite3WithDelete(pParse->db, (yypminor->yy285)); } break; case 201: /* where_opt */ case 203: /* having_opt */ case 215: /* on_opt */ - case 224: /* case_operand */ - case 226: /* case_else */ - case 235: /* when_clause */ - case 240: /* key_opt */ + case 225: /* case_operand */ + case 227: /* case_else */ + case 236: /* when_clause */ + case 241: /* key_opt */ { -sqlite3ExprDelete(pParse->db, (yypminor->yy122)); +sqlite3ExprDelete(pParse->db, (yypminor->yy72)); } break; case 216: /* using_opt */ case 217: /* idlist */ case 220: /* idlist_opt */ { -sqlite3IdListDelete(pParse->db, (yypminor->yy180)); +sqlite3IdListDelete(pParse->db, (yypminor->yy254)); } break; - case 231: /* trigger_cmd_list */ - case 236: /* trigger_cmd */ + case 232: /* trigger_cmd_list */ + case 237: /* trigger_cmd */ { -sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy327)); +sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy145)); } break; - case 233: /* trigger_event */ + case 234: /* trigger_event */ { -sqlite3IdListDelete(pParse->db, (yypminor->yy410).b); +sqlite3IdListDelete(pParse->db, (yypminor->yy332).b); } break; /********* End destructor definitions *****************************************/ @@ -132298,8 +133164,9 @@ sqlite3IdListDelete(pParse->db, (yypminor->yy410).b); */ static void yy_pop_parser_stack(yyParser *pParser){ yyStackEntry *yytos; - assert( pParser->yyidx>=0 ); - yytos = &pParser->yystack[pParser->yyidx--]; + assert( pParser->yytos!=0 ); + assert( pParser->yytos > pParser->yystack ); + yytos = pParser->yytos--; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sPopping %s\n", @@ -132326,9 +133193,9 @@ SQLITE_PRIVATE void sqlite3ParserFree( #ifndef YYPARSEFREENEVERNULL if( pParser==0 ) return; #endif - while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser); + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); #if YYSTACKDEPTH<=0 - free(pParser->yystack); + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); #endif (*freeProc)((void*)pParser); } @@ -132339,7 +133206,7 @@ SQLITE_PRIVATE void sqlite3ParserFree( #ifdef YYTRACKMAXSTACKDEPTH SQLITE_PRIVATE int sqlite3ParserStackPeak(void *p){ yyParser *pParser = (yyParser*)p; - return pParser->yyidxMax; + return pParser->yyhwm; } #endif @@ -132352,7 +133219,7 @@ static unsigned int yy_find_shift_action( YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; - int stateno = pParser->yystack[pParser->yyidx].stateno; + int stateno = pParser->yytos->stateno; if( stateno>=YY_MIN_REDUCE ) return stateno; assert( stateno <= YY_SHIFT_COUNT ); @@ -132445,13 +133312,13 @@ static int yy_find_reduce_action( */ static void yyStackOverflow(yyParser *yypParser){ sqlite3ParserARG_FETCH; - yypParser->yyidx--; + yypParser->yytos--; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); } #endif - while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ @@ -132469,11 +133336,11 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState){ if( yyTraceFILE ){ if( yyNewStateyystack[yypParser->yyidx].major], + yyTracePrompt,yyTokenName[yypParser->yytos->major], yyNewState); }else{ fprintf(yyTraceFILE,"%sShift '%s'\n", - yyTracePrompt,yyTokenName[yypParser->yystack[yypParser->yyidx].major]); + yyTracePrompt,yyTokenName[yypParser->yytos->major]); } } } @@ -132491,27 +133358,30 @@ static void yy_shift( sqlite3ParserTOKENTYPE yyMinor /* The minor token to shift in */ ){ yyStackEntry *yytos; - yypParser->yyidx++; + yypParser->yytos++; #ifdef YYTRACKMAXSTACKDEPTH - if( yypParser->yyidx>yypParser->yyidxMax ){ - yypParser->yyidxMax = yypParser->yyidx; + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); } #endif #if YYSTACKDEPTH>0 - if( yypParser->yyidx>=YYSTACKDEPTH ){ + if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH] ){ yyStackOverflow(yypParser); return; } #else - if( yypParser->yyidx>=yypParser->yystksz ){ - yyGrowStack(yypParser); - if( yypParser->yyidx>=yypParser->yystksz ){ + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); return; } } #endif - yytos = &yypParser->yystack[yypParser->yyidx]; + if( yyNewState > YY_MAX_SHIFT ){ + yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } + yytos = yypParser->yytos; yytos->stateno = (YYACTIONTYPE)yyNewState; yytos->major = (YYCODETYPE)yyMajor; yytos->minor.yy0 = yyMinor; @@ -132715,27 +133585,29 @@ static const struct { { 173, 5 }, { 173, 3 }, { 173, 5 }, - { 173, 4 }, + { 173, 5 }, { 173, 4 }, { 173, 5 }, - { 225, 5 }, - { 225, 4 }, - { 226, 2 }, - { 226, 0 }, - { 224, 1 }, - { 224, 0 }, + { 226, 5 }, + { 226, 4 }, + { 227, 2 }, + { 227, 0 }, + { 225, 1 }, + { 225, 0 }, { 208, 0 }, { 207, 3 }, { 207, 1 }, + { 224, 0 }, + { 224, 3 }, { 149, 12 }, - { 227, 1 }, - { 227, 0 }, + { 228, 1 }, + { 228, 0 }, { 177, 0 }, { 177, 3 }, { 187, 5 }, { 187, 3 }, - { 228, 0 }, - { 228, 2 }, + { 229, 0 }, + { 229, 2 }, { 149, 4 }, { 149, 1 }, { 149, 2 }, @@ -132747,25 +133619,25 @@ static const struct { { 169, 2 }, { 170, 2 }, { 149, 5 }, - { 230, 11 }, - { 232, 1 }, - { 232, 1 }, + { 231, 11 }, + { 233, 1 }, + { 233, 1 }, + { 233, 2 }, + { 233, 0 }, + { 234, 1 }, + { 234, 1 }, + { 234, 3 }, + { 236, 0 }, + { 236, 2 }, + { 232, 3 }, { 232, 2 }, - { 232, 0 }, - { 233, 1 }, - { 233, 1 }, - { 233, 3 }, - { 235, 0 }, - { 235, 2 }, - { 231, 3 }, - { 231, 2 }, - { 237, 3 }, { 238, 3 }, - { 238, 2 }, - { 236, 7 }, - { 236, 5 }, - { 236, 5 }, - { 236, 1 }, + { 239, 3 }, + { 239, 2 }, + { 237, 7 }, + { 237, 5 }, + { 237, 5 }, + { 237, 1 }, { 173, 4 }, { 173, 6 }, { 191, 1 }, @@ -132774,27 +133646,27 @@ static const struct { { 149, 4 }, { 149, 6 }, { 149, 3 }, - { 240, 0 }, - { 240, 2 }, + { 241, 0 }, + { 241, 2 }, { 149, 1 }, { 149, 3 }, { 149, 1 }, { 149, 3 }, { 149, 6 }, { 149, 7 }, - { 241, 1 }, + { 242, 1 }, { 149, 1 }, { 149, 4 }, - { 243, 8 }, - { 245, 0 }, - { 246, 1 }, - { 246, 3 }, + { 244, 8 }, + { 246, 0 }, { 247, 1 }, + { 247, 3 }, + { 248, 1 }, { 196, 0 }, { 196, 2 }, { 196, 3 }, - { 249, 6 }, - { 249, 8 }, + { 250, 6 }, + { 250, 8 }, { 144, 1 }, { 145, 2 }, { 145, 1 }, @@ -132831,26 +133703,26 @@ static const struct { { 210, 1 }, { 173, 1 }, { 208, 1 }, - { 229, 1 }, - { 229, 1 }, - { 229, 1 }, - { 229, 1 }, - { 229, 1 }, + { 230, 1 }, + { 230, 1 }, + { 230, 1 }, + { 230, 1 }, + { 230, 1 }, { 169, 1 }, - { 234, 0 }, - { 234, 3 }, - { 237, 1 }, - { 238, 0 }, - { 239, 1 }, + { 235, 0 }, + { 235, 3 }, + { 238, 1 }, { 239, 0 }, - { 242, 0 }, - { 242, 1 }, - { 244, 1 }, - { 244, 3 }, - { 245, 2 }, - { 248, 0 }, - { 248, 4 }, - { 248, 2 }, + { 240, 1 }, + { 240, 0 }, + { 243, 0 }, + { 243, 1 }, + { 245, 1 }, + { 245, 3 }, + { 246, 2 }, + { 249, 0 }, + { 249, 4 }, + { 249, 2 }, }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -132868,7 +133740,7 @@ static void yy_reduce( yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ sqlite3ParserARG_FETCH; - yymsp = &yypParser->yystack[yypParser->yyidx]; + yymsp = yypParser->yytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ yysize = yyRuleInfo[yyruleno].nrhs; @@ -132882,22 +133754,23 @@ static void yy_reduce( ** enough on the stack to push the LHS value */ if( yyRuleInfo[yyruleno].nrhs==0 ){ #ifdef YYTRACKMAXSTACKDEPTH - if( yypParser->yyidx>yypParser->yyidxMax ){ - yypParser->yyidxMax = yypParser->yyidx; + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); } #endif #if YYSTACKDEPTH>0 - if( yypParser->yyidx>=YYSTACKDEPTH-1 ){ + if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH-1] ){ yyStackOverflow(yypParser); return; } #else - if( yypParser->yyidx>=yypParser->yystksz-1 ){ - yyGrowStack(yypParser); - if( yypParser->yyidx>=yypParser->yystksz-1 ){ + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); return; } + yymsp = yypParser->yytos; } #endif } @@ -132923,15 +133796,15 @@ static void yy_reduce( { sqlite3FinishCoding(pParse); } break; case 3: /* cmd ::= BEGIN transtype trans_opt */ -{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy392);} +{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy194);} break; case 4: /* transtype ::= */ -{yymsp[1].minor.yy392 = TK_DEFERRED;} +{yymsp[1].minor.yy194 = TK_DEFERRED;} break; case 5: /* transtype ::= DEFERRED */ case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6); case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7); -{yymsp[0].minor.yy392 = yymsp[0].major; /*A-overwrites-X*/} +{yymsp[0].minor.yy194 = yymsp[0].major; /*A-overwrites-X*/} break; case 8: /* cmd ::= COMMIT trans_opt */ case 9: /* cmd ::= END trans_opt */ yytestcase(yyruleno==9); @@ -132957,7 +133830,7 @@ static void yy_reduce( break; case 14: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ { - sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy392,0,0,yymsp[-2].minor.yy392); + sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy194,0,0,yymsp[-2].minor.yy194); } break; case 15: /* createkw ::= CREATE */ @@ -132971,33 +133844,33 @@ static void yy_reduce( case 67: /* defer_subclause_opt ::= */ yytestcase(yyruleno==67); case 76: /* ifexists ::= */ yytestcase(yyruleno==76); case 90: /* distinct ::= */ yytestcase(yyruleno==90); - case 209: /* collate ::= */ yytestcase(yyruleno==209); -{yymsp[1].minor.yy392 = 0;} + case 211: /* collate ::= */ yytestcase(yyruleno==211); +{yymsp[1].minor.yy194 = 0;} break; case 17: /* ifnotexists ::= IF NOT EXISTS */ -{yymsp[-2].minor.yy392 = 1;} +{yymsp[-2].minor.yy194 = 1;} break; case 18: /* temp ::= TEMP */ case 43: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==43); -{yymsp[0].minor.yy392 = 1;} +{yymsp[0].minor.yy194 = 1;} break; case 20: /* create_table_args ::= LP columnlist conslist_opt RP table_options */ { - sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy392,0); + sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy194,0); } break; case 21: /* create_table_args ::= AS select */ { - sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy159); - sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy159); + sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy243); + sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy243); } break; case 23: /* table_options ::= WITHOUT nm */ { if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){ - yymsp[-1].minor.yy392 = TF_WithoutRowid | TF_NoVisibleRowid; + yymsp[-1].minor.yy194 = TF_WithoutRowid | TF_NoVisibleRowid; }else{ - yymsp[-1].minor.yy392 = 0; + yymsp[-1].minor.yy194 = 0; sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z); } } @@ -133029,17 +133902,17 @@ static void yy_reduce( break; case 30: /* ccons ::= DEFAULT term */ case 32: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==32); -{sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy342);} +{sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy190);} break; case 31: /* ccons ::= DEFAULT LP expr RP */ -{sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy342);} +{sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy190);} break; case 33: /* ccons ::= DEFAULT MINUS term */ { ExprSpan v; - v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy342.pExpr, 0, 0); + v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy190.pExpr, 0, 0); v.zStart = yymsp[-1].minor.yy0.z; - v.zEnd = yymsp[0].minor.yy342.zEnd; + v.zEnd = yymsp[0].minor.yy190.zEnd; sqlite3AddDefaultValue(pParse,&v); } break; @@ -133051,147 +133924,149 @@ static void yy_reduce( } break; case 35: /* ccons ::= NOT NULL onconf */ -{sqlite3AddNotNull(pParse, yymsp[0].minor.yy392);} +{sqlite3AddNotNull(pParse, yymsp[0].minor.yy194);} break; case 36: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ -{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy392,yymsp[0].minor.yy392,yymsp[-2].minor.yy392);} +{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy194,yymsp[0].minor.yy194,yymsp[-2].minor.yy194);} break; case 37: /* ccons ::= UNIQUE onconf */ -{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy392,0,0,0,0);} +{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy194,0,0,0,0, + SQLITE_IDXTYPE_UNIQUE);} break; case 38: /* ccons ::= CHECK LP expr RP */ -{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy342.pExpr);} +{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy190.pExpr);} break; case 39: /* ccons ::= REFERENCES nm eidlist_opt refargs */ -{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy442,yymsp[0].minor.yy392);} +{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy148,yymsp[0].minor.yy194);} break; case 40: /* ccons ::= defer_subclause */ -{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy392);} +{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy194);} break; case 41: /* ccons ::= COLLATE ID|STRING */ {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} break; case 44: /* refargs ::= */ -{ yymsp[1].minor.yy392 = OE_None*0x0101; /* EV: R-19803-45884 */} +{ yymsp[1].minor.yy194 = OE_None*0x0101; /* EV: R-19803-45884 */} break; case 45: /* refargs ::= refargs refarg */ -{ yymsp[-1].minor.yy392 = (yymsp[-1].minor.yy392 & ~yymsp[0].minor.yy207.mask) | yymsp[0].minor.yy207.value; } +{ yymsp[-1].minor.yy194 = (yymsp[-1].minor.yy194 & ~yymsp[0].minor.yy497.mask) | yymsp[0].minor.yy497.value; } break; case 46: /* refarg ::= MATCH nm */ -{ yymsp[-1].minor.yy207.value = 0; yymsp[-1].minor.yy207.mask = 0x000000; } +{ yymsp[-1].minor.yy497.value = 0; yymsp[-1].minor.yy497.mask = 0x000000; } break; case 47: /* refarg ::= ON INSERT refact */ -{ yymsp[-2].minor.yy207.value = 0; yymsp[-2].minor.yy207.mask = 0x000000; } +{ yymsp[-2].minor.yy497.value = 0; yymsp[-2].minor.yy497.mask = 0x000000; } break; case 48: /* refarg ::= ON DELETE refact */ -{ yymsp[-2].minor.yy207.value = yymsp[0].minor.yy392; yymsp[-2].minor.yy207.mask = 0x0000ff; } +{ yymsp[-2].minor.yy497.value = yymsp[0].minor.yy194; yymsp[-2].minor.yy497.mask = 0x0000ff; } break; case 49: /* refarg ::= ON UPDATE refact */ -{ yymsp[-2].minor.yy207.value = yymsp[0].minor.yy392<<8; yymsp[-2].minor.yy207.mask = 0x00ff00; } +{ yymsp[-2].minor.yy497.value = yymsp[0].minor.yy194<<8; yymsp[-2].minor.yy497.mask = 0x00ff00; } break; case 50: /* refact ::= SET NULL */ -{ yymsp[-1].minor.yy392 = OE_SetNull; /* EV: R-33326-45252 */} +{ yymsp[-1].minor.yy194 = OE_SetNull; /* EV: R-33326-45252 */} break; case 51: /* refact ::= SET DEFAULT */ -{ yymsp[-1].minor.yy392 = OE_SetDflt; /* EV: R-33326-45252 */} +{ yymsp[-1].minor.yy194 = OE_SetDflt; /* EV: R-33326-45252 */} break; case 52: /* refact ::= CASCADE */ -{ yymsp[0].minor.yy392 = OE_Cascade; /* EV: R-33326-45252 */} +{ yymsp[0].minor.yy194 = OE_Cascade; /* EV: R-33326-45252 */} break; case 53: /* refact ::= RESTRICT */ -{ yymsp[0].minor.yy392 = OE_Restrict; /* EV: R-33326-45252 */} +{ yymsp[0].minor.yy194 = OE_Restrict; /* EV: R-33326-45252 */} break; case 54: /* refact ::= NO ACTION */ -{ yymsp[-1].minor.yy392 = OE_None; /* EV: R-33326-45252 */} +{ yymsp[-1].minor.yy194 = OE_None; /* EV: R-33326-45252 */} break; case 55: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ -{yymsp[-2].minor.yy392 = 0;} +{yymsp[-2].minor.yy194 = 0;} break; case 56: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ case 71: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==71); case 142: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==142); -{yymsp[-1].minor.yy392 = yymsp[0].minor.yy392;} +{yymsp[-1].minor.yy194 = yymsp[0].minor.yy194;} break; case 58: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ case 75: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==75); case 183: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==183); case 186: /* in_op ::= NOT IN */ yytestcase(yyruleno==186); - case 210: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==210); -{yymsp[-1].minor.yy392 = 1;} + case 212: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==212); +{yymsp[-1].minor.yy194 = 1;} break; case 59: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ -{yymsp[-1].minor.yy392 = 0;} +{yymsp[-1].minor.yy194 = 0;} break; case 61: /* tconscomma ::= COMMA */ {pParse->constraintName.n = 0;} break; case 63: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ -{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy442,yymsp[0].minor.yy392,yymsp[-2].minor.yy392,0);} +{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy148,yymsp[0].minor.yy194,yymsp[-2].minor.yy194,0);} break; case 64: /* tcons ::= UNIQUE LP sortlist RP onconf */ -{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy442,yymsp[0].minor.yy392,0,0,0,0);} +{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy148,yymsp[0].minor.yy194,0,0,0,0, + SQLITE_IDXTYPE_UNIQUE);} break; case 65: /* tcons ::= CHECK LP expr RP onconf */ -{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy342.pExpr);} +{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy190.pExpr);} break; case 66: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ { - sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy442, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy442, yymsp[-1].minor.yy392); - sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy392); + sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy148, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy148, yymsp[-1].minor.yy194); + sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy194); } break; case 68: /* onconf ::= */ case 70: /* orconf ::= */ yytestcase(yyruleno==70); -{yymsp[1].minor.yy392 = OE_Default;} +{yymsp[1].minor.yy194 = OE_Default;} break; case 69: /* onconf ::= ON CONFLICT resolvetype */ -{yymsp[-2].minor.yy392 = yymsp[0].minor.yy392;} +{yymsp[-2].minor.yy194 = yymsp[0].minor.yy194;} break; case 72: /* resolvetype ::= IGNORE */ -{yymsp[0].minor.yy392 = OE_Ignore;} +{yymsp[0].minor.yy194 = OE_Ignore;} break; case 73: /* resolvetype ::= REPLACE */ case 143: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==143); -{yymsp[0].minor.yy392 = OE_Replace;} +{yymsp[0].minor.yy194 = OE_Replace;} break; case 74: /* cmd ::= DROP TABLE ifexists fullname */ { - sqlite3DropTable(pParse, yymsp[0].minor.yy347, 0, yymsp[-1].minor.yy392); + sqlite3DropTable(pParse, yymsp[0].minor.yy185, 0, yymsp[-1].minor.yy194); } break; case 77: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ { - sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy442, yymsp[0].minor.yy159, yymsp[-7].minor.yy392, yymsp[-5].minor.yy392); + sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy148, yymsp[0].minor.yy243, yymsp[-7].minor.yy194, yymsp[-5].minor.yy194); } break; case 78: /* cmd ::= DROP VIEW ifexists fullname */ { - sqlite3DropTable(pParse, yymsp[0].minor.yy347, 1, yymsp[-1].minor.yy392); + sqlite3DropTable(pParse, yymsp[0].minor.yy185, 1, yymsp[-1].minor.yy194); } break; case 79: /* cmd ::= select */ { SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0}; - sqlite3Select(pParse, yymsp[0].minor.yy159, &dest); - sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy159); + sqlite3Select(pParse, yymsp[0].minor.yy243, &dest); + sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy243); } break; case 80: /* select ::= with selectnowith */ { - Select *p = yymsp[0].minor.yy159; + Select *p = yymsp[0].minor.yy243; if( p ){ - p->pWith = yymsp[-1].minor.yy331; + p->pWith = yymsp[-1].minor.yy285; parserDoubleLinkSelect(pParse, p); }else{ - sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy331); + sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy285); } - yymsp[-1].minor.yy159 = p; /*A-overwrites-W*/ + yymsp[-1].minor.yy243 = p; /*A-overwrites-W*/ } break; case 81: /* selectnowith ::= selectnowith multiselect_op oneselect */ { - Select *pRhs = yymsp[0].minor.yy159; - Select *pLhs = yymsp[-2].minor.yy159; + Select *pRhs = yymsp[0].minor.yy243; + Select *pLhs = yymsp[-2].minor.yy243; if( pRhs && pRhs->pPrior ){ SrcList *pFrom; Token x; @@ -133201,30 +134076,30 @@ static void yy_reduce( pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0,0); } if( pRhs ){ - pRhs->op = (u8)yymsp[-1].minor.yy392; + pRhs->op = (u8)yymsp[-1].minor.yy194; pRhs->pPrior = pLhs; if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue; pRhs->selFlags &= ~SF_MultiValue; - if( yymsp[-1].minor.yy392!=TK_ALL ) pParse->hasCompound = 1; + if( yymsp[-1].minor.yy194!=TK_ALL ) pParse->hasCompound = 1; }else{ sqlite3SelectDelete(pParse->db, pLhs); } - yymsp[-2].minor.yy159 = pRhs; + yymsp[-2].minor.yy243 = pRhs; } break; case 82: /* multiselect_op ::= UNION */ case 84: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==84); -{yymsp[0].minor.yy392 = yymsp[0].major; /*A-overwrites-OP*/} +{yymsp[0].minor.yy194 = yymsp[0].major; /*A-overwrites-OP*/} break; case 83: /* multiselect_op ::= UNION ALL */ -{yymsp[-1].minor.yy392 = TK_ALL;} +{yymsp[-1].minor.yy194 = TK_ALL;} break; case 85: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ { #if SELECTTRACE_ENABLED Token s = yymsp[-8].minor.yy0; /*A-overwrites-S*/ #endif - yymsp[-8].minor.yy159 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy442,yymsp[-5].minor.yy347,yymsp[-4].minor.yy122,yymsp[-3].minor.yy442,yymsp[-2].minor.yy122,yymsp[-1].minor.yy442,yymsp[-7].minor.yy392,yymsp[0].minor.yy64.pLimit,yymsp[0].minor.yy64.pOffset); + yymsp[-8].minor.yy243 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy148,yymsp[-5].minor.yy185,yymsp[-4].minor.yy72,yymsp[-3].minor.yy148,yymsp[-2].minor.yy72,yymsp[-1].minor.yy148,yymsp[-7].minor.yy194,yymsp[0].minor.yy354.pLimit,yymsp[0].minor.yy354.pOffset); #if SELECTTRACE_ENABLED /* Populate the Select.zSelName[] string that is used to help with ** query planner debugging, to differentiate between multiple Select @@ -133235,17 +134110,17 @@ static void yy_reduce( ** comment to be the zSelName value. Otherwise, the label is #N where ** is an integer that is incremented with each SELECT statement seen. */ - if( yymsp[-8].minor.yy159!=0 ){ + if( yymsp[-8].minor.yy243!=0 ){ const char *z = s.z+6; int i; - sqlite3_snprintf(sizeof(yymsp[-8].minor.yy159->zSelName), yymsp[-8].minor.yy159->zSelName, "#%d", + sqlite3_snprintf(sizeof(yymsp[-8].minor.yy243->zSelName), yymsp[-8].minor.yy243->zSelName, "#%d", ++pParse->nSelect); while( z[0]==' ' ) z++; if( z[0]=='/' && z[1]=='*' ){ z += 2; while( z[0]==' ' ) z++; for(i=0; sqlite3Isalnum(z[i]); i++){} - sqlite3_snprintf(sizeof(yymsp[-8].minor.yy159->zSelName), yymsp[-8].minor.yy159->zSelName, "%.*s", i, z); + sqlite3_snprintf(sizeof(yymsp[-8].minor.yy243->zSelName), yymsp[-8].minor.yy243->zSelName, "%.*s", i, z); } } #endif /* SELECTRACE_ENABLED */ @@ -133253,47 +134128,48 @@ static void yy_reduce( break; case 86: /* values ::= VALUES LP nexprlist RP */ { - yymsp[-3].minor.yy159 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy442,0,0,0,0,0,SF_Values,0,0); + yymsp[-3].minor.yy243 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy148,0,0,0,0,0,SF_Values,0,0); } break; case 87: /* values ::= values COMMA LP exprlist RP */ { - Select *pRight, *pLeft = yymsp[-4].minor.yy159; - pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy442,0,0,0,0,0,SF_Values|SF_MultiValue,0,0); + Select *pRight, *pLeft = yymsp[-4].minor.yy243; + pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy148,0,0,0,0,0,SF_Values|SF_MultiValue,0,0); if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue; if( pRight ){ pRight->op = TK_ALL; pRight->pPrior = pLeft; - yymsp[-4].minor.yy159 = pRight; + yymsp[-4].minor.yy243 = pRight; }else{ - yymsp[-4].minor.yy159 = pLeft; + yymsp[-4].minor.yy243 = pLeft; } } break; case 88: /* distinct ::= DISTINCT */ -{yymsp[0].minor.yy392 = SF_Distinct;} +{yymsp[0].minor.yy194 = SF_Distinct;} break; case 89: /* distinct ::= ALL */ -{yymsp[0].minor.yy392 = SF_All;} +{yymsp[0].minor.yy194 = SF_All;} break; case 91: /* sclp ::= */ case 119: /* orderby_opt ::= */ yytestcase(yyruleno==119); case 126: /* groupby_opt ::= */ yytestcase(yyruleno==126); case 199: /* exprlist ::= */ yytestcase(yyruleno==199); - case 205: /* eidlist_opt ::= */ yytestcase(yyruleno==205); -{yymsp[1].minor.yy442 = 0;} + case 202: /* paren_exprlist ::= */ yytestcase(yyruleno==202); + case 207: /* eidlist_opt ::= */ yytestcase(yyruleno==207); +{yymsp[1].minor.yy148 = 0;} break; case 92: /* selcollist ::= sclp expr as */ { - yymsp[-2].minor.yy442 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy442, yymsp[-1].minor.yy342.pExpr); - if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-2].minor.yy442, &yymsp[0].minor.yy0, 1); - sqlite3ExprListSetSpan(pParse,yymsp[-2].minor.yy442,&yymsp[-1].minor.yy342); + yymsp[-2].minor.yy148 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy148, yymsp[-1].minor.yy190.pExpr); + if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-2].minor.yy148, &yymsp[0].minor.yy0, 1); + sqlite3ExprListSetSpan(pParse,yymsp[-2].minor.yy148,&yymsp[-1].minor.yy190); } break; case 93: /* selcollist ::= sclp STAR */ { Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0); - yymsp[-1].minor.yy442 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy442, p); + yymsp[-1].minor.yy148 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy148, p); } break; case 94: /* selcollist ::= sclp nm DOT STAR */ @@ -133301,70 +134177,70 @@ static void yy_reduce( Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0, &yymsp[0].minor.yy0); Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); - yymsp[-3].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy442, pDot); + yymsp[-3].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy148, pDot); } break; case 95: /* as ::= AS nm */ case 106: /* dbnm ::= DOT nm */ yytestcase(yyruleno==106); - case 219: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==219); - case 220: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==220); + case 221: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==221); + case 222: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==222); {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;} break; case 97: /* from ::= */ -{yymsp[1].minor.yy347 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy347));} +{yymsp[1].minor.yy185 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy185));} break; case 98: /* from ::= FROM seltablist */ { - yymsp[-1].minor.yy347 = yymsp[0].minor.yy347; - sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy347); + yymsp[-1].minor.yy185 = yymsp[0].minor.yy185; + sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy185); } break; case 99: /* stl_prefix ::= seltablist joinop */ { - if( ALWAYS(yymsp[-1].minor.yy347 && yymsp[-1].minor.yy347->nSrc>0) ) yymsp[-1].minor.yy347->a[yymsp[-1].minor.yy347->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy392; + if( ALWAYS(yymsp[-1].minor.yy185 && yymsp[-1].minor.yy185->nSrc>0) ) yymsp[-1].minor.yy185->a[yymsp[-1].minor.yy185->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy194; } break; case 100: /* stl_prefix ::= */ -{yymsp[1].minor.yy347 = 0;} +{yymsp[1].minor.yy185 = 0;} break; case 101: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ { - yymsp[-6].minor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); - sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy347, &yymsp[-2].minor.yy0); + yymsp[-6].minor.yy185 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy185,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy72,yymsp[0].minor.yy254); + sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy185, &yymsp[-2].minor.yy0); } break; case 102: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */ { - yymsp[-8].minor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy347,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); - sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy347, yymsp[-4].minor.yy442); + yymsp[-8].minor.yy185 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy185,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy72,yymsp[0].minor.yy254); + sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy185, yymsp[-4].minor.yy148); } break; case 103: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ { - yymsp[-6].minor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy159,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); + yymsp[-6].minor.yy185 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy185,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy243,yymsp[-1].minor.yy72,yymsp[0].minor.yy254); } break; case 104: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ { - if( yymsp[-6].minor.yy347==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy122==0 && yymsp[0].minor.yy180==0 ){ - yymsp[-6].minor.yy347 = yymsp[-4].minor.yy347; - }else if( yymsp[-4].minor.yy347->nSrc==1 ){ - yymsp[-6].minor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); - if( yymsp[-6].minor.yy347 ){ - struct SrcList_item *pNew = &yymsp[-6].minor.yy347->a[yymsp[-6].minor.yy347->nSrc-1]; - struct SrcList_item *pOld = yymsp[-4].minor.yy347->a; + if( yymsp[-6].minor.yy185==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy72==0 && yymsp[0].minor.yy254==0 ){ + yymsp[-6].minor.yy185 = yymsp[-4].minor.yy185; + }else if( yymsp[-4].minor.yy185->nSrc==1 ){ + yymsp[-6].minor.yy185 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy185,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy72,yymsp[0].minor.yy254); + if( yymsp[-6].minor.yy185 ){ + struct SrcList_item *pNew = &yymsp[-6].minor.yy185->a[yymsp[-6].minor.yy185->nSrc-1]; + struct SrcList_item *pOld = yymsp[-4].minor.yy185->a; pNew->zName = pOld->zName; pNew->zDatabase = pOld->zDatabase; pNew->pSelect = pOld->pSelect; pOld->zName = pOld->zDatabase = 0; pOld->pSelect = 0; } - sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy347); + sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy185); }else{ Select *pSubquery; - sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy347); - pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy347,0,0,0,0,SF_NestedFrom,0,0); - yymsp[-6].minor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); + sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy185); + pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy185,0,0,0,0,SF_NestedFrom,0,0); + yymsp[-6].minor.yy185 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy185,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy72,yymsp[0].minor.yy254); } } break; @@ -133373,32 +134249,32 @@ static void yy_reduce( {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;} break; case 107: /* fullname ::= nm dbnm */ -{yymsp[-1].minor.yy347 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/} +{yymsp[-1].minor.yy185 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/} break; case 108: /* joinop ::= COMMA|JOIN */ -{ yymsp[0].minor.yy392 = JT_INNER; } +{ yymsp[0].minor.yy194 = JT_INNER; } break; case 109: /* joinop ::= JOIN_KW JOIN */ -{yymsp[-1].minor.yy392 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/} +{yymsp[-1].minor.yy194 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/} break; case 110: /* joinop ::= JOIN_KW nm JOIN */ -{yymsp[-2].minor.yy392 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/} +{yymsp[-2].minor.yy194 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/} break; case 111: /* joinop ::= JOIN_KW nm nm JOIN */ -{yymsp[-3].minor.yy392 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/} +{yymsp[-3].minor.yy194 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/} break; case 112: /* on_opt ::= ON expr */ case 129: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==129); case 136: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==136); case 195: /* case_else ::= ELSE expr */ yytestcase(yyruleno==195); -{yymsp[-1].minor.yy122 = yymsp[0].minor.yy342.pExpr;} +{yymsp[-1].minor.yy72 = yymsp[0].minor.yy190.pExpr;} break; case 113: /* on_opt ::= */ case 128: /* having_opt ::= */ yytestcase(yyruleno==128); case 135: /* where_opt ::= */ yytestcase(yyruleno==135); case 196: /* case_else ::= */ yytestcase(yyruleno==196); case 198: /* case_operand ::= */ yytestcase(yyruleno==198); -{yymsp[1].minor.yy122 = 0;} +{yymsp[1].minor.yy72 = 0;} break; case 115: /* indexed_opt ::= INDEXED BY nm */ {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;} @@ -133407,116 +134283,116 @@ static void yy_reduce( {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;} break; case 117: /* using_opt ::= USING LP idlist RP */ -{yymsp[-3].minor.yy180 = yymsp[-1].minor.yy180;} +{yymsp[-3].minor.yy254 = yymsp[-1].minor.yy254;} break; case 118: /* using_opt ::= */ case 144: /* idlist_opt ::= */ yytestcase(yyruleno==144); -{yymsp[1].minor.yy180 = 0;} +{yymsp[1].minor.yy254 = 0;} break; case 120: /* orderby_opt ::= ORDER BY sortlist */ case 127: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==127); -{yymsp[-2].minor.yy442 = yymsp[0].minor.yy442;} +{yymsp[-2].minor.yy148 = yymsp[0].minor.yy148;} break; case 121: /* sortlist ::= sortlist COMMA expr sortorder */ { - yymsp[-3].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy442,yymsp[-1].minor.yy342.pExpr); - sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy442,yymsp[0].minor.yy392); + yymsp[-3].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy148,yymsp[-1].minor.yy190.pExpr); + sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy148,yymsp[0].minor.yy194); } break; case 122: /* sortlist ::= expr sortorder */ { - yymsp[-1].minor.yy442 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy342.pExpr); /*A-overwrites-Y*/ - sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy442,yymsp[0].minor.yy392); + yymsp[-1].minor.yy148 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy190.pExpr); /*A-overwrites-Y*/ + sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy148,yymsp[0].minor.yy194); } break; case 123: /* sortorder ::= ASC */ -{yymsp[0].minor.yy392 = SQLITE_SO_ASC;} +{yymsp[0].minor.yy194 = SQLITE_SO_ASC;} break; case 124: /* sortorder ::= DESC */ -{yymsp[0].minor.yy392 = SQLITE_SO_DESC;} +{yymsp[0].minor.yy194 = SQLITE_SO_DESC;} break; case 125: /* sortorder ::= */ -{yymsp[1].minor.yy392 = SQLITE_SO_UNDEFINED;} +{yymsp[1].minor.yy194 = SQLITE_SO_UNDEFINED;} break; case 130: /* limit_opt ::= */ -{yymsp[1].minor.yy64.pLimit = 0; yymsp[1].minor.yy64.pOffset = 0;} +{yymsp[1].minor.yy354.pLimit = 0; yymsp[1].minor.yy354.pOffset = 0;} break; case 131: /* limit_opt ::= LIMIT expr */ -{yymsp[-1].minor.yy64.pLimit = yymsp[0].minor.yy342.pExpr; yymsp[-1].minor.yy64.pOffset = 0;} +{yymsp[-1].minor.yy354.pLimit = yymsp[0].minor.yy190.pExpr; yymsp[-1].minor.yy354.pOffset = 0;} break; case 132: /* limit_opt ::= LIMIT expr OFFSET expr */ -{yymsp[-3].minor.yy64.pLimit = yymsp[-2].minor.yy342.pExpr; yymsp[-3].minor.yy64.pOffset = yymsp[0].minor.yy342.pExpr;} +{yymsp[-3].minor.yy354.pLimit = yymsp[-2].minor.yy190.pExpr; yymsp[-3].minor.yy354.pOffset = yymsp[0].minor.yy190.pExpr;} break; case 133: /* limit_opt ::= LIMIT expr COMMA expr */ -{yymsp[-3].minor.yy64.pOffset = yymsp[-2].minor.yy342.pExpr; yymsp[-3].minor.yy64.pLimit = yymsp[0].minor.yy342.pExpr;} +{yymsp[-3].minor.yy354.pOffset = yymsp[-2].minor.yy190.pExpr; yymsp[-3].minor.yy354.pLimit = yymsp[0].minor.yy190.pExpr;} break; case 134: /* cmd ::= with DELETE FROM fullname indexed_opt where_opt */ { - sqlite3WithPush(pParse, yymsp[-5].minor.yy331, 1); - sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy347, &yymsp[-1].minor.yy0); - sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy347,yymsp[0].minor.yy122); + sqlite3WithPush(pParse, yymsp[-5].minor.yy285, 1); + sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy185, &yymsp[-1].minor.yy0); + sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy185,yymsp[0].minor.yy72); } break; case 137: /* cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt */ { - sqlite3WithPush(pParse, yymsp[-7].minor.yy331, 1); - sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy347, &yymsp[-3].minor.yy0); - sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy442,"set list"); - sqlite3Update(pParse,yymsp[-4].minor.yy347,yymsp[-1].minor.yy442,yymsp[0].minor.yy122,yymsp[-5].minor.yy392); + sqlite3WithPush(pParse, yymsp[-7].minor.yy285, 1); + sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy185, &yymsp[-3].minor.yy0); + sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy148,"set list"); + sqlite3Update(pParse,yymsp[-4].minor.yy185,yymsp[-1].minor.yy148,yymsp[0].minor.yy72,yymsp[-5].minor.yy194); } break; case 138: /* setlist ::= setlist COMMA nm EQ expr */ { - yymsp[-4].minor.yy442 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy442, yymsp[0].minor.yy342.pExpr); - sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy442, &yymsp[-2].minor.yy0, 1); + yymsp[-4].minor.yy148 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy148, yymsp[0].minor.yy190.pExpr); + sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy148, &yymsp[-2].minor.yy0, 1); } break; case 139: /* setlist ::= nm EQ expr */ { - yylhsminor.yy442 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy342.pExpr); - sqlite3ExprListSetName(pParse, yylhsminor.yy442, &yymsp[-2].minor.yy0, 1); + yylhsminor.yy148 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy190.pExpr); + sqlite3ExprListSetName(pParse, yylhsminor.yy148, &yymsp[-2].minor.yy0, 1); } - yymsp[-2].minor.yy442 = yylhsminor.yy442; + yymsp[-2].minor.yy148 = yylhsminor.yy148; break; case 140: /* cmd ::= with insert_cmd INTO fullname idlist_opt select */ { - sqlite3WithPush(pParse, yymsp[-5].minor.yy331, 1); - sqlite3Insert(pParse, yymsp[-2].minor.yy347, yymsp[0].minor.yy159, yymsp[-1].minor.yy180, yymsp[-4].minor.yy392); + sqlite3WithPush(pParse, yymsp[-5].minor.yy285, 1); + sqlite3Insert(pParse, yymsp[-2].minor.yy185, yymsp[0].minor.yy243, yymsp[-1].minor.yy254, yymsp[-4].minor.yy194); } break; case 141: /* cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES */ { - sqlite3WithPush(pParse, yymsp[-6].minor.yy331, 1); - sqlite3Insert(pParse, yymsp[-3].minor.yy347, 0, yymsp[-2].minor.yy180, yymsp[-5].minor.yy392); + sqlite3WithPush(pParse, yymsp[-6].minor.yy285, 1); + sqlite3Insert(pParse, yymsp[-3].minor.yy185, 0, yymsp[-2].minor.yy254, yymsp[-5].minor.yy194); } break; case 145: /* idlist_opt ::= LP idlist RP */ -{yymsp[-2].minor.yy180 = yymsp[-1].minor.yy180;} +{yymsp[-2].minor.yy254 = yymsp[-1].minor.yy254;} break; case 146: /* idlist ::= idlist COMMA nm */ -{yymsp[-2].minor.yy180 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy180,&yymsp[0].minor.yy0);} +{yymsp[-2].minor.yy254 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy254,&yymsp[0].minor.yy0);} break; case 147: /* idlist ::= nm */ -{yymsp[0].minor.yy180 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/} +{yymsp[0].minor.yy254 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/} break; case 148: /* expr ::= LP expr RP */ -{spanSet(&yymsp[-2].minor.yy342,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ yymsp[-2].minor.yy342.pExpr = yymsp[-1].minor.yy342.pExpr;} +{spanSet(&yymsp[-2].minor.yy190,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ yymsp[-2].minor.yy190.pExpr = yymsp[-1].minor.yy190.pExpr;} break; case 149: /* term ::= NULL */ case 154: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==154); case 155: /* term ::= STRING */ yytestcase(yyruleno==155); -{spanExpr(&yymsp[0].minor.yy342,pParse,yymsp[0].major,yymsp[0].minor.yy0);/*A-overwrites-X*/} +{spanExpr(&yymsp[0].minor.yy190,pParse,yymsp[0].major,yymsp[0].minor.yy0);/*A-overwrites-X*/} break; case 150: /* expr ::= ID|INDEXED */ case 151: /* expr ::= JOIN_KW */ yytestcase(yyruleno==151); -{spanExpr(&yymsp[0].minor.yy342,pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/} +{spanExpr(&yymsp[0].minor.yy190,pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/} break; case 152: /* expr ::= nm DOT nm */ { Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); - spanSet(&yymsp[-2].minor.yy342,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ - yymsp[-2].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); + spanSet(&yymsp[-2].minor.yy190,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ + yymsp[-2].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); } break; case 153: /* expr ::= nm DOT nm DOT nm */ @@ -133525,70 +134401,70 @@ static void yy_reduce( Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0); - spanSet(&yymsp[-4].minor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); + spanSet(&yymsp[-4].minor.yy190,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); } break; case 156: /* expr ::= VARIABLE */ { if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){ - spanExpr(&yymsp[0].minor.yy342, pParse, TK_VARIABLE, yymsp[0].minor.yy0); - sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy342.pExpr); + spanExpr(&yymsp[0].minor.yy190, pParse, TK_VARIABLE, yymsp[0].minor.yy0); + sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy190.pExpr); }else{ /* When doing a nested parse, one can include terms in an expression ** that look like this: #1 #2 ... These terms refer to registers ** in the virtual machine. #N is the N-th register. */ Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/ assert( t.n>=2 ); - spanSet(&yymsp[0].minor.yy342, &t, &t); + spanSet(&yymsp[0].minor.yy190, &t, &t); if( pParse->nested==0 ){ sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t); - yymsp[0].minor.yy342.pExpr = 0; + yymsp[0].minor.yy190.pExpr = 0; }else{ - yymsp[0].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &t); - if( yymsp[0].minor.yy342.pExpr ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy342.pExpr->iTable); + yymsp[0].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &t); + if( yymsp[0].minor.yy190.pExpr ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy190.pExpr->iTable); } } } break; case 157: /* expr ::= expr COLLATE ID|STRING */ { - yymsp[-2].minor.yy342.pExpr = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy342.pExpr, &yymsp[0].minor.yy0, 1); - yymsp[-2].minor.yy342.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; + yymsp[-2].minor.yy190.pExpr = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy190.pExpr, &yymsp[0].minor.yy0, 1); + yymsp[-2].minor.yy190.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } break; case 158: /* expr ::= CAST LP expr AS typetoken RP */ { - spanSet(&yymsp[-5].minor.yy342,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ - yymsp[-5].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy342.pExpr, 0, &yymsp[-1].minor.yy0); + spanSet(&yymsp[-5].minor.yy190,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ + yymsp[-5].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy190.pExpr, 0, &yymsp[-1].minor.yy0); } break; case 159: /* expr ::= ID|INDEXED LP distinct exprlist RP */ { - if( yymsp[-1].minor.yy442 && yymsp[-1].minor.yy442->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ + if( yymsp[-1].minor.yy148 && yymsp[-1].minor.yy148->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); } - yylhsminor.yy342.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy442, &yymsp[-4].minor.yy0); - spanSet(&yylhsminor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); - if( yymsp[-2].minor.yy392==SF_Distinct && yylhsminor.yy342.pExpr ){ - yylhsminor.yy342.pExpr->flags |= EP_Distinct; + yylhsminor.yy190.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy148, &yymsp[-4].minor.yy0); + spanSet(&yylhsminor.yy190,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); + if( yymsp[-2].minor.yy194==SF_Distinct && yylhsminor.yy190.pExpr ){ + yylhsminor.yy190.pExpr->flags |= EP_Distinct; } } - yymsp[-4].minor.yy342 = yylhsminor.yy342; + yymsp[-4].minor.yy190 = yylhsminor.yy190; break; case 160: /* expr ::= ID|INDEXED LP STAR RP */ { - yylhsminor.yy342.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); - spanSet(&yylhsminor.yy342,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); + yylhsminor.yy190.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); + spanSet(&yylhsminor.yy190,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } - yymsp[-3].minor.yy342 = yylhsminor.yy342; + yymsp[-3].minor.yy190 = yylhsminor.yy190; break; case 161: /* term ::= CTIME_KW */ { - yylhsminor.yy342.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0); - spanSet(&yylhsminor.yy342, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy190.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0); + spanSet(&yylhsminor.yy190, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy342 = yylhsminor.yy342; + yymsp[0].minor.yy190 = yylhsminor.yy190; break; case 162: /* expr ::= expr AND expr */ case 163: /* expr ::= expr OR expr */ yytestcase(yyruleno==163); @@ -133598,86 +134474,86 @@ static void yy_reduce( case 167: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==167); case 168: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==168); case 169: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==169); -{spanBinaryExpr(pParse,yymsp[-1].major,&yymsp[-2].minor.yy342,&yymsp[0].minor.yy342);} +{spanBinaryExpr(pParse,yymsp[-1].major,&yymsp[-2].minor.yy190,&yymsp[0].minor.yy190);} break; case 170: /* likeop ::= LIKE_KW|MATCH */ -{yymsp[0].minor.yy318.eOperator = yymsp[0].minor.yy0; yymsp[0].minor.yy318.bNot = 0;/*A-overwrites-X*/} +{yymsp[0].minor.yy392.eOperator = yymsp[0].minor.yy0; yymsp[0].minor.yy392.bNot = 0;/*A-overwrites-X*/} break; case 171: /* likeop ::= NOT LIKE_KW|MATCH */ -{yymsp[-1].minor.yy318.eOperator = yymsp[0].minor.yy0; yymsp[-1].minor.yy318.bNot = 1;} +{yymsp[-1].minor.yy392.eOperator = yymsp[0].minor.yy0; yymsp[-1].minor.yy392.bNot = 1;} break; case 172: /* expr ::= expr likeop expr */ { ExprList *pList; - pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy342.pExpr); - pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy342.pExpr); - yymsp[-2].minor.yy342.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy318.eOperator); - exprNot(pParse, yymsp[-1].minor.yy318.bNot, &yymsp[-2].minor.yy342); - yymsp[-2].minor.yy342.zEnd = yymsp[0].minor.yy342.zEnd; - if( yymsp[-2].minor.yy342.pExpr ) yymsp[-2].minor.yy342.pExpr->flags |= EP_InfixFunc; + pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy190.pExpr); + pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy190.pExpr); + yymsp[-2].minor.yy190.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy392.eOperator); + exprNot(pParse, yymsp[-1].minor.yy392.bNot, &yymsp[-2].minor.yy190); + yymsp[-2].minor.yy190.zEnd = yymsp[0].minor.yy190.zEnd; + if( yymsp[-2].minor.yy190.pExpr ) yymsp[-2].minor.yy190.pExpr->flags |= EP_InfixFunc; } break; case 173: /* expr ::= expr likeop expr ESCAPE expr */ { ExprList *pList; - pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy342.pExpr); - pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy342.pExpr); - pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy342.pExpr); - yymsp[-4].minor.yy342.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy318.eOperator); - exprNot(pParse, yymsp[-3].minor.yy318.bNot, &yymsp[-4].minor.yy342); - yymsp[-4].minor.yy342.zEnd = yymsp[0].minor.yy342.zEnd; - if( yymsp[-4].minor.yy342.pExpr ) yymsp[-4].minor.yy342.pExpr->flags |= EP_InfixFunc; + pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy190.pExpr); + pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy190.pExpr); + pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy190.pExpr); + yymsp[-4].minor.yy190.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy392.eOperator); + exprNot(pParse, yymsp[-3].minor.yy392.bNot, &yymsp[-4].minor.yy190); + yymsp[-4].minor.yy190.zEnd = yymsp[0].minor.yy190.zEnd; + if( yymsp[-4].minor.yy190.pExpr ) yymsp[-4].minor.yy190.pExpr->flags |= EP_InfixFunc; } break; case 174: /* expr ::= expr ISNULL|NOTNULL */ -{spanUnaryPostfix(pParse,yymsp[0].major,&yymsp[-1].minor.yy342,&yymsp[0].minor.yy0);} +{spanUnaryPostfix(pParse,yymsp[0].major,&yymsp[-1].minor.yy190,&yymsp[0].minor.yy0);} break; case 175: /* expr ::= expr NOT NULL */ -{spanUnaryPostfix(pParse,TK_NOTNULL,&yymsp[-2].minor.yy342,&yymsp[0].minor.yy0);} +{spanUnaryPostfix(pParse,TK_NOTNULL,&yymsp[-2].minor.yy190,&yymsp[0].minor.yy0);} break; case 176: /* expr ::= expr IS expr */ { - spanBinaryExpr(pParse,TK_IS,&yymsp[-2].minor.yy342,&yymsp[0].minor.yy342); - binaryToUnaryIfNull(pParse, yymsp[0].minor.yy342.pExpr, yymsp[-2].minor.yy342.pExpr, TK_ISNULL); + spanBinaryExpr(pParse,TK_IS,&yymsp[-2].minor.yy190,&yymsp[0].minor.yy190); + binaryToUnaryIfNull(pParse, yymsp[0].minor.yy190.pExpr, yymsp[-2].minor.yy190.pExpr, TK_ISNULL); } break; case 177: /* expr ::= expr IS NOT expr */ { - spanBinaryExpr(pParse,TK_ISNOT,&yymsp[-3].minor.yy342,&yymsp[0].minor.yy342); - binaryToUnaryIfNull(pParse, yymsp[0].minor.yy342.pExpr, yymsp[-3].minor.yy342.pExpr, TK_NOTNULL); + spanBinaryExpr(pParse,TK_ISNOT,&yymsp[-3].minor.yy190,&yymsp[0].minor.yy190); + binaryToUnaryIfNull(pParse, yymsp[0].minor.yy190.pExpr, yymsp[-3].minor.yy190.pExpr, TK_NOTNULL); } break; case 178: /* expr ::= NOT expr */ case 179: /* expr ::= BITNOT expr */ yytestcase(yyruleno==179); -{spanUnaryPrefix(&yymsp[-1].minor.yy342,pParse,yymsp[-1].major,&yymsp[0].minor.yy342,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} +{spanUnaryPrefix(&yymsp[-1].minor.yy190,pParse,yymsp[-1].major,&yymsp[0].minor.yy190,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} break; case 180: /* expr ::= MINUS expr */ -{spanUnaryPrefix(&yymsp[-1].minor.yy342,pParse,TK_UMINUS,&yymsp[0].minor.yy342,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} +{spanUnaryPrefix(&yymsp[-1].minor.yy190,pParse,TK_UMINUS,&yymsp[0].minor.yy190,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} break; case 181: /* expr ::= PLUS expr */ -{spanUnaryPrefix(&yymsp[-1].minor.yy342,pParse,TK_UPLUS,&yymsp[0].minor.yy342,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} +{spanUnaryPrefix(&yymsp[-1].minor.yy190,pParse,TK_UPLUS,&yymsp[0].minor.yy190,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} break; case 182: /* between_op ::= BETWEEN */ case 185: /* in_op ::= IN */ yytestcase(yyruleno==185); -{yymsp[0].minor.yy392 = 0;} +{yymsp[0].minor.yy194 = 0;} break; case 184: /* expr ::= expr between_op expr AND expr */ { - ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy342.pExpr); - pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy342.pExpr); - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy342.pExpr, 0, 0); - if( yymsp[-4].minor.yy342.pExpr ){ - yymsp[-4].minor.yy342.pExpr->x.pList = pList; + ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy190.pExpr); + pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy190.pExpr); + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy190.pExpr, 0, 0); + if( yymsp[-4].minor.yy190.pExpr ){ + yymsp[-4].minor.yy190.pExpr->x.pList = pList; }else{ sqlite3ExprListDelete(pParse->db, pList); } - exprNot(pParse, yymsp[-3].minor.yy392, &yymsp[-4].minor.yy342); - yymsp[-4].minor.yy342.zEnd = yymsp[0].minor.yy342.zEnd; + exprNot(pParse, yymsp[-3].minor.yy194, &yymsp[-4].minor.yy190); + yymsp[-4].minor.yy190.zEnd = yymsp[0].minor.yy190.zEnd; } break; case 187: /* expr ::= expr in_op LP exprlist RP */ { - if( yymsp[-1].minor.yy442==0 ){ + if( yymsp[-1].minor.yy148==0 ){ /* Expressions of the form ** ** expr1 IN () @@ -133686,9 +134562,9 @@ static void yy_reduce( ** simplify to constants 0 (false) and 1 (true), respectively, ** regardless of the value of expr1. */ - sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy342.pExpr); - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[yymsp[-3].minor.yy392]); - }else if( yymsp[-1].minor.yy442->nExpr==1 ){ + sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy190.pExpr); + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[yymsp[-3].minor.yy194]); + }else if( yymsp[-1].minor.yy148->nExpr==1 ){ /* Expressions of the form: ** ** expr1 IN (?1) @@ -133705,200 +134581,202 @@ static void yy_reduce( ** affinity or the collating sequence to use for comparison. Otherwise, ** the semantics would be subtly different from IN or NOT IN. */ - Expr *pRHS = yymsp[-1].minor.yy442->a[0].pExpr; - yymsp[-1].minor.yy442->a[0].pExpr = 0; - sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy442); + Expr *pRHS = yymsp[-1].minor.yy148->a[0].pExpr; + yymsp[-1].minor.yy148->a[0].pExpr = 0; + sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy148); /* pRHS cannot be NULL because a malloc error would have been detected ** before now and control would have never reached this point */ if( ALWAYS(pRHS) ){ pRHS->flags &= ~EP_Collate; pRHS->flags |= EP_Generic; } - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, yymsp[-3].minor.yy392 ? TK_NE : TK_EQ, yymsp[-4].minor.yy342.pExpr, pRHS, 0); + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, yymsp[-3].minor.yy194 ? TK_NE : TK_EQ, yymsp[-4].minor.yy190.pExpr, pRHS, 0); }else{ - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy342.pExpr, 0, 0); - if( yymsp[-4].minor.yy342.pExpr ){ - yymsp[-4].minor.yy342.pExpr->x.pList = yymsp[-1].minor.yy442; - sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy342.pExpr); + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy190.pExpr, 0, 0); + if( yymsp[-4].minor.yy190.pExpr ){ + yymsp[-4].minor.yy190.pExpr->x.pList = yymsp[-1].minor.yy148; + sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy190.pExpr); }else{ - sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy442); + sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy148); } - exprNot(pParse, yymsp[-3].minor.yy392, &yymsp[-4].minor.yy342); + exprNot(pParse, yymsp[-3].minor.yy194, &yymsp[-4].minor.yy190); } - yymsp[-4].minor.yy342.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; + yymsp[-4].minor.yy190.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } break; case 188: /* expr ::= LP select RP */ { - spanSet(&yymsp[-2].minor.yy342,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ - yymsp[-2].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); - sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy342.pExpr, yymsp[-1].minor.yy159); + spanSet(&yymsp[-2].minor.yy190,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ + yymsp[-2].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); + sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy190.pExpr, yymsp[-1].minor.yy243); } break; case 189: /* expr ::= expr in_op LP select RP */ { - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy342.pExpr, 0, 0); - sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy342.pExpr, yymsp[-1].minor.yy159); - exprNot(pParse, yymsp[-3].minor.yy392, &yymsp[-4].minor.yy342); - yymsp[-4].minor.yy342.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy190.pExpr, 0, 0); + sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy190.pExpr, yymsp[-1].minor.yy243); + exprNot(pParse, yymsp[-3].minor.yy194, &yymsp[-4].minor.yy190); + yymsp[-4].minor.yy190.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } break; - case 190: /* expr ::= expr in_op nm dbnm */ + case 190: /* expr ::= expr in_op nm dbnm paren_exprlist */ { - SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); + SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0); - yymsp[-3].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy342.pExpr, 0, 0); - sqlite3PExprAddSelect(pParse, yymsp[-3].minor.yy342.pExpr, pSelect); - exprNot(pParse, yymsp[-2].minor.yy392, &yymsp[-3].minor.yy342); - yymsp[-3].minor.yy342.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]; + if( yymsp[0].minor.yy148 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy148); + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy190.pExpr, 0, 0); + sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy190.pExpr, pSelect); + exprNot(pParse, yymsp[-3].minor.yy194, &yymsp[-4].minor.yy190); + yymsp[-4].minor.yy190.zEnd = yymsp[-1].minor.yy0.z ? &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n] : &yymsp[-2].minor.yy0.z[yymsp[-2].minor.yy0.n]; } break; case 191: /* expr ::= EXISTS LP select RP */ { Expr *p; - spanSet(&yymsp[-3].minor.yy342,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ - p = yymsp[-3].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); - sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy159); + spanSet(&yymsp[-3].minor.yy190,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ + p = yymsp[-3].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); + sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy243); } break; case 192: /* expr ::= CASE case_operand case_exprlist case_else END */ { - spanSet(&yymsp[-4].minor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-C*/ - yymsp[-4].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy122, 0, 0); - if( yymsp[-4].minor.yy342.pExpr ){ - yymsp[-4].minor.yy342.pExpr->x.pList = yymsp[-1].minor.yy122 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy442,yymsp[-1].minor.yy122) : yymsp[-2].minor.yy442; - sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy342.pExpr); + spanSet(&yymsp[-4].minor.yy190,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-C*/ + yymsp[-4].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy72, 0, 0); + if( yymsp[-4].minor.yy190.pExpr ){ + yymsp[-4].minor.yy190.pExpr->x.pList = yymsp[-1].minor.yy72 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy148,yymsp[-1].minor.yy72) : yymsp[-2].minor.yy148; + sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy190.pExpr); }else{ - sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy442); - sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy122); + sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy148); + sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy72); } } break; case 193: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ { - yymsp[-4].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy442, yymsp[-2].minor.yy342.pExpr); - yymsp[-4].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy442, yymsp[0].minor.yy342.pExpr); + yymsp[-4].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy148, yymsp[-2].minor.yy190.pExpr); + yymsp[-4].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy148, yymsp[0].minor.yy190.pExpr); } break; case 194: /* case_exprlist ::= WHEN expr THEN expr */ { - yymsp[-3].minor.yy442 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy342.pExpr); - yymsp[-3].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy442, yymsp[0].minor.yy342.pExpr); + yymsp[-3].minor.yy148 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy190.pExpr); + yymsp[-3].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy148, yymsp[0].minor.yy190.pExpr); } break; case 197: /* case_operand ::= expr */ -{yymsp[0].minor.yy122 = yymsp[0].minor.yy342.pExpr; /*A-overwrites-X*/} +{yymsp[0].minor.yy72 = yymsp[0].minor.yy190.pExpr; /*A-overwrites-X*/} break; case 200: /* nexprlist ::= nexprlist COMMA expr */ -{yymsp[-2].minor.yy442 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy442,yymsp[0].minor.yy342.pExpr);} +{yymsp[-2].minor.yy148 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy148,yymsp[0].minor.yy190.pExpr);} break; case 201: /* nexprlist ::= expr */ -{yymsp[0].minor.yy442 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy342.pExpr); /*A-overwrites-Y*/} +{yymsp[0].minor.yy148 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy190.pExpr); /*A-overwrites-Y*/} break; - case 202: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ + case 203: /* paren_exprlist ::= LP exprlist RP */ + case 208: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==208); +{yymsp[-2].minor.yy148 = yymsp[-1].minor.yy148;} + break; + case 204: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ { sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, - sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy442, yymsp[-10].minor.yy392, - &yymsp[-11].minor.yy0, yymsp[0].minor.yy122, SQLITE_SO_ASC, yymsp[-8].minor.yy392); + sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy148, yymsp[-10].minor.yy194, + &yymsp[-11].minor.yy0, yymsp[0].minor.yy72, SQLITE_SO_ASC, yymsp[-8].minor.yy194, SQLITE_IDXTYPE_APPDEF); } break; - case 203: /* uniqueflag ::= UNIQUE */ - case 244: /* raisetype ::= ABORT */ yytestcase(yyruleno==244); -{yymsp[0].minor.yy392 = OE_Abort;} + case 205: /* uniqueflag ::= UNIQUE */ + case 246: /* raisetype ::= ABORT */ yytestcase(yyruleno==246); +{yymsp[0].minor.yy194 = OE_Abort;} break; - case 204: /* uniqueflag ::= */ -{yymsp[1].minor.yy392 = OE_None;} + case 206: /* uniqueflag ::= */ +{yymsp[1].minor.yy194 = OE_None;} break; - case 206: /* eidlist_opt ::= LP eidlist RP */ -{yymsp[-2].minor.yy442 = yymsp[-1].minor.yy442;} - break; - case 207: /* eidlist ::= eidlist COMMA nm collate sortorder */ + case 209: /* eidlist ::= eidlist COMMA nm collate sortorder */ { - yymsp[-4].minor.yy442 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy442, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); + yymsp[-4].minor.yy148 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy148, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy194, yymsp[0].minor.yy194); } break; - case 208: /* eidlist ::= nm collate sortorder */ + case 210: /* eidlist ::= nm collate sortorder */ { - yymsp[-2].minor.yy442 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); /*A-overwrites-Y*/ + yymsp[-2].minor.yy148 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy194, yymsp[0].minor.yy194); /*A-overwrites-Y*/ } break; - case 211: /* cmd ::= DROP INDEX ifexists fullname */ -{sqlite3DropIndex(pParse, yymsp[0].minor.yy347, yymsp[-1].minor.yy392);} + case 213: /* cmd ::= DROP INDEX ifexists fullname */ +{sqlite3DropIndex(pParse, yymsp[0].minor.yy185, yymsp[-1].minor.yy194);} break; - case 212: /* cmd ::= VACUUM */ - case 213: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==213); + case 214: /* cmd ::= VACUUM */ + case 215: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==215); {sqlite3Vacuum(pParse);} break; - case 214: /* cmd ::= PRAGMA nm dbnm */ + case 216: /* cmd ::= PRAGMA nm dbnm */ {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} break; - case 215: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ + case 217: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} break; - case 216: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ + case 218: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} break; - case 217: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ + case 219: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} break; - case 218: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ + case 220: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} break; - case 221: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ + case 223: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ { Token all; all.z = yymsp[-3].minor.yy0.z; all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; - sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy327, &all); + sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy145, &all); } break; - case 222: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ + case 224: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ { - sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy392, yymsp[-4].minor.yy410.a, yymsp[-4].minor.yy410.b, yymsp[-2].minor.yy347, yymsp[0].minor.yy122, yymsp[-10].minor.yy392, yymsp[-8].minor.yy392); + sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy194, yymsp[-4].minor.yy332.a, yymsp[-4].minor.yy332.b, yymsp[-2].minor.yy185, yymsp[0].minor.yy72, yymsp[-10].minor.yy194, yymsp[-8].minor.yy194); yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/ } break; - case 223: /* trigger_time ::= BEFORE */ -{ yymsp[0].minor.yy392 = TK_BEFORE; } + case 225: /* trigger_time ::= BEFORE */ +{ yymsp[0].minor.yy194 = TK_BEFORE; } break; - case 224: /* trigger_time ::= AFTER */ -{ yymsp[0].minor.yy392 = TK_AFTER; } + case 226: /* trigger_time ::= AFTER */ +{ yymsp[0].minor.yy194 = TK_AFTER; } break; - case 225: /* trigger_time ::= INSTEAD OF */ -{ yymsp[-1].minor.yy392 = TK_INSTEAD;} + case 227: /* trigger_time ::= INSTEAD OF */ +{ yymsp[-1].minor.yy194 = TK_INSTEAD;} break; - case 226: /* trigger_time ::= */ -{ yymsp[1].minor.yy392 = TK_BEFORE; } + case 228: /* trigger_time ::= */ +{ yymsp[1].minor.yy194 = TK_BEFORE; } break; - case 227: /* trigger_event ::= DELETE|INSERT */ - case 228: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==228); -{yymsp[0].minor.yy410.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy410.b = 0;} + case 229: /* trigger_event ::= DELETE|INSERT */ + case 230: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==230); +{yymsp[0].minor.yy332.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy332.b = 0;} break; - case 229: /* trigger_event ::= UPDATE OF idlist */ -{yymsp[-2].minor.yy410.a = TK_UPDATE; yymsp[-2].minor.yy410.b = yymsp[0].minor.yy180;} + case 231: /* trigger_event ::= UPDATE OF idlist */ +{yymsp[-2].minor.yy332.a = TK_UPDATE; yymsp[-2].minor.yy332.b = yymsp[0].minor.yy254;} break; - case 230: /* when_clause ::= */ - case 249: /* key_opt ::= */ yytestcase(yyruleno==249); -{ yymsp[1].minor.yy122 = 0; } + case 232: /* when_clause ::= */ + case 251: /* key_opt ::= */ yytestcase(yyruleno==251); +{ yymsp[1].minor.yy72 = 0; } break; - case 231: /* when_clause ::= WHEN expr */ - case 250: /* key_opt ::= KEY expr */ yytestcase(yyruleno==250); -{ yymsp[-1].minor.yy122 = yymsp[0].minor.yy342.pExpr; } + case 233: /* when_clause ::= WHEN expr */ + case 252: /* key_opt ::= KEY expr */ yytestcase(yyruleno==252); +{ yymsp[-1].minor.yy72 = yymsp[0].minor.yy190.pExpr; } break; - case 232: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + case 234: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ { - assert( yymsp[-2].minor.yy327!=0 ); - yymsp[-2].minor.yy327->pLast->pNext = yymsp[-1].minor.yy327; - yymsp[-2].minor.yy327->pLast = yymsp[-1].minor.yy327; + assert( yymsp[-2].minor.yy145!=0 ); + yymsp[-2].minor.yy145->pLast->pNext = yymsp[-1].minor.yy145; + yymsp[-2].minor.yy145->pLast = yymsp[-1].minor.yy145; } break; - case 233: /* trigger_cmd_list ::= trigger_cmd SEMI */ + case 235: /* trigger_cmd_list ::= trigger_cmd SEMI */ { - assert( yymsp[-1].minor.yy327!=0 ); - yymsp[-1].minor.yy327->pLast = yymsp[-1].minor.yy327; + assert( yymsp[-1].minor.yy145!=0 ); + yymsp[-1].minor.yy145->pLast = yymsp[-1].minor.yy145; } break; - case 234: /* trnm ::= nm DOT nm */ + case 236: /* trnm ::= nm DOT nm */ { yymsp[-2].minor.yy0 = yymsp[0].minor.yy0; sqlite3ErrorMsg(pParse, @@ -133906,195 +134784,195 @@ static void yy_reduce( "statements within triggers"); } break; - case 235: /* tridxby ::= INDEXED BY nm */ + case 237: /* tridxby ::= INDEXED BY nm */ { sqlite3ErrorMsg(pParse, "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " "within triggers"); } break; - case 236: /* tridxby ::= NOT INDEXED */ + case 238: /* tridxby ::= NOT INDEXED */ { sqlite3ErrorMsg(pParse, "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " "within triggers"); } break; - case 237: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ -{yymsp[-6].minor.yy327 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy442, yymsp[0].minor.yy122, yymsp[-5].minor.yy392);} + case 239: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ +{yymsp[-6].minor.yy145 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy148, yymsp[0].minor.yy72, yymsp[-5].minor.yy194);} break; - case 238: /* trigger_cmd ::= insert_cmd INTO trnm idlist_opt select */ -{yymsp[-4].minor.yy327 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy180, yymsp[0].minor.yy159, yymsp[-4].minor.yy392);/*A-overwrites-R*/} + case 240: /* trigger_cmd ::= insert_cmd INTO trnm idlist_opt select */ +{yymsp[-4].minor.yy145 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy254, yymsp[0].minor.yy243, yymsp[-4].minor.yy194);/*A-overwrites-R*/} break; - case 239: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ -{yymsp[-4].minor.yy327 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy122);} + case 241: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ +{yymsp[-4].minor.yy145 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy72);} break; - case 240: /* trigger_cmd ::= select */ -{yymsp[0].minor.yy327 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy159); /*A-overwrites-X*/} + case 242: /* trigger_cmd ::= select */ +{yymsp[0].minor.yy145 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy243); /*A-overwrites-X*/} break; - case 241: /* expr ::= RAISE LP IGNORE RP */ + case 243: /* expr ::= RAISE LP IGNORE RP */ { - spanSet(&yymsp[-3].minor.yy342,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ - yymsp[-3].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); - if( yymsp[-3].minor.yy342.pExpr ){ - yymsp[-3].minor.yy342.pExpr->affinity = OE_Ignore; + spanSet(&yymsp[-3].minor.yy190,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ + yymsp[-3].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); + if( yymsp[-3].minor.yy190.pExpr ){ + yymsp[-3].minor.yy190.pExpr->affinity = OE_Ignore; } } break; - case 242: /* expr ::= RAISE LP raisetype COMMA nm RP */ + case 244: /* expr ::= RAISE LP raisetype COMMA nm RP */ { - spanSet(&yymsp[-5].minor.yy342,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ - yymsp[-5].minor.yy342.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); - if( yymsp[-5].minor.yy342.pExpr ) { - yymsp[-5].minor.yy342.pExpr->affinity = (char)yymsp[-3].minor.yy392; + spanSet(&yymsp[-5].minor.yy190,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ + yymsp[-5].minor.yy190.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); + if( yymsp[-5].minor.yy190.pExpr ) { + yymsp[-5].minor.yy190.pExpr->affinity = (char)yymsp[-3].minor.yy194; } } break; - case 243: /* raisetype ::= ROLLBACK */ -{yymsp[0].minor.yy392 = OE_Rollback;} + case 245: /* raisetype ::= ROLLBACK */ +{yymsp[0].minor.yy194 = OE_Rollback;} break; - case 245: /* raisetype ::= FAIL */ -{yymsp[0].minor.yy392 = OE_Fail;} + case 247: /* raisetype ::= FAIL */ +{yymsp[0].minor.yy194 = OE_Fail;} break; - case 246: /* cmd ::= DROP TRIGGER ifexists fullname */ + case 248: /* cmd ::= DROP TRIGGER ifexists fullname */ { - sqlite3DropTrigger(pParse,yymsp[0].minor.yy347,yymsp[-1].minor.yy392); + sqlite3DropTrigger(pParse,yymsp[0].minor.yy185,yymsp[-1].minor.yy194); } break; - case 247: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + case 249: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ { - sqlite3Attach(pParse, yymsp[-3].minor.yy342.pExpr, yymsp[-1].minor.yy342.pExpr, yymsp[0].minor.yy122); + sqlite3Attach(pParse, yymsp[-3].minor.yy190.pExpr, yymsp[-1].minor.yy190.pExpr, yymsp[0].minor.yy72); } break; - case 248: /* cmd ::= DETACH database_kw_opt expr */ + case 250: /* cmd ::= DETACH database_kw_opt expr */ { - sqlite3Detach(pParse, yymsp[0].minor.yy342.pExpr); + sqlite3Detach(pParse, yymsp[0].minor.yy190.pExpr); } break; - case 251: /* cmd ::= REINDEX */ + case 253: /* cmd ::= REINDEX */ {sqlite3Reindex(pParse, 0, 0);} break; - case 252: /* cmd ::= REINDEX nm dbnm */ + case 254: /* cmd ::= REINDEX nm dbnm */ {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} break; - case 253: /* cmd ::= ANALYZE */ + case 255: /* cmd ::= ANALYZE */ {sqlite3Analyze(pParse, 0, 0);} break; - case 254: /* cmd ::= ANALYZE nm dbnm */ + case 256: /* cmd ::= ANALYZE nm dbnm */ {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} break; - case 255: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ + case 257: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ { - sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy347,&yymsp[0].minor.yy0); + sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy185,&yymsp[0].minor.yy0); } break; - case 256: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ + case 258: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ { yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n; sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0); } break; - case 257: /* add_column_fullname ::= fullname */ + case 259: /* add_column_fullname ::= fullname */ { disableLookaside(pParse); - sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy347); + sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy185); } break; - case 258: /* cmd ::= create_vtab */ + case 260: /* cmd ::= create_vtab */ {sqlite3VtabFinishParse(pParse,0);} break; - case 259: /* cmd ::= create_vtab LP vtabarglist RP */ + case 261: /* cmd ::= create_vtab LP vtabarglist RP */ {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} break; - case 260: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + case 262: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ { - sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy392); + sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy194); } break; - case 261: /* vtabarg ::= */ + case 263: /* vtabarg ::= */ {sqlite3VtabArgInit(pParse);} break; - case 262: /* vtabargtoken ::= ANY */ - case 263: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==263); - case 264: /* lp ::= LP */ yytestcase(yyruleno==264); + case 264: /* vtabargtoken ::= ANY */ + case 265: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==265); + case 266: /* lp ::= LP */ yytestcase(yyruleno==266); {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} break; - case 265: /* with ::= */ -{yymsp[1].minor.yy331 = 0;} + case 267: /* with ::= */ +{yymsp[1].minor.yy285 = 0;} break; - case 266: /* with ::= WITH wqlist */ -{ yymsp[-1].minor.yy331 = yymsp[0].minor.yy331; } + case 268: /* with ::= WITH wqlist */ +{ yymsp[-1].minor.yy285 = yymsp[0].minor.yy285; } break; - case 267: /* with ::= WITH RECURSIVE wqlist */ -{ yymsp[-2].minor.yy331 = yymsp[0].minor.yy331; } + case 269: /* with ::= WITH RECURSIVE wqlist */ +{ yymsp[-2].minor.yy285 = yymsp[0].minor.yy285; } break; - case 268: /* wqlist ::= nm eidlist_opt AS LP select RP */ + case 270: /* wqlist ::= nm eidlist_opt AS LP select RP */ { - yymsp[-5].minor.yy331 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy442, yymsp[-1].minor.yy159); /*A-overwrites-X*/ + yymsp[-5].minor.yy285 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy148, yymsp[-1].minor.yy243); /*A-overwrites-X*/ } break; - case 269: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ + case 271: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ { - yymsp[-7].minor.yy331 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy331, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy442, yymsp[-1].minor.yy159); + yymsp[-7].minor.yy285 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy285, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy148, yymsp[-1].minor.yy243); } break; default: - /* (270) input ::= cmdlist */ yytestcase(yyruleno==270); - /* (271) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==271); - /* (272) cmdlist ::= ecmd */ yytestcase(yyruleno==272); - /* (273) ecmd ::= SEMI */ yytestcase(yyruleno==273); - /* (274) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==274); - /* (275) explain ::= */ yytestcase(yyruleno==275); - /* (276) trans_opt ::= */ yytestcase(yyruleno==276); - /* (277) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==277); - /* (278) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==278); - /* (279) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==279); - /* (280) savepoint_opt ::= */ yytestcase(yyruleno==280); - /* (281) cmd ::= create_table create_table_args */ yytestcase(yyruleno==281); - /* (282) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==282); - /* (283) columnlist ::= columnname carglist */ yytestcase(yyruleno==283); - /* (284) nm ::= ID|INDEXED */ yytestcase(yyruleno==284); - /* (285) nm ::= STRING */ yytestcase(yyruleno==285); - /* (286) nm ::= JOIN_KW */ yytestcase(yyruleno==286); - /* (287) typetoken ::= typename */ yytestcase(yyruleno==287); - /* (288) typename ::= ID|STRING */ yytestcase(yyruleno==288); - /* (289) signed ::= plus_num */ yytestcase(yyruleno==289); - /* (290) signed ::= minus_num */ yytestcase(yyruleno==290); - /* (291) carglist ::= carglist ccons */ yytestcase(yyruleno==291); - /* (292) carglist ::= */ yytestcase(yyruleno==292); - /* (293) ccons ::= NULL onconf */ yytestcase(yyruleno==293); - /* (294) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==294); - /* (295) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==295); - /* (296) conslist ::= tcons */ yytestcase(yyruleno==296); - /* (297) tconscomma ::= */ yytestcase(yyruleno==297); - /* (298) defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==298); - /* (299) resolvetype ::= raisetype */ yytestcase(yyruleno==299); - /* (300) selectnowith ::= oneselect */ yytestcase(yyruleno==300); - /* (301) oneselect ::= values */ yytestcase(yyruleno==301); - /* (302) sclp ::= selcollist COMMA */ yytestcase(yyruleno==302); - /* (303) as ::= ID|STRING */ yytestcase(yyruleno==303); - /* (304) expr ::= term */ yytestcase(yyruleno==304); - /* (305) exprlist ::= nexprlist */ yytestcase(yyruleno==305); - /* (306) nmnum ::= plus_num */ yytestcase(yyruleno==306); - /* (307) nmnum ::= nm */ yytestcase(yyruleno==307); - /* (308) nmnum ::= ON */ yytestcase(yyruleno==308); - /* (309) nmnum ::= DELETE */ yytestcase(yyruleno==309); - /* (310) nmnum ::= DEFAULT */ yytestcase(yyruleno==310); - /* (311) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==311); - /* (312) foreach_clause ::= */ yytestcase(yyruleno==312); - /* (313) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==313); - /* (314) trnm ::= nm */ yytestcase(yyruleno==314); - /* (315) tridxby ::= */ yytestcase(yyruleno==315); - /* (316) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==316); - /* (317) database_kw_opt ::= */ yytestcase(yyruleno==317); - /* (318) kwcolumn_opt ::= */ yytestcase(yyruleno==318); - /* (319) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==319); - /* (320) vtabarglist ::= vtabarg */ yytestcase(yyruleno==320); - /* (321) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==321); - /* (322) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==322); - /* (323) anylist ::= */ yytestcase(yyruleno==323); - /* (324) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==324); - /* (325) anylist ::= anylist ANY */ yytestcase(yyruleno==325); + /* (272) input ::= cmdlist */ yytestcase(yyruleno==272); + /* (273) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==273); + /* (274) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=274); + /* (275) ecmd ::= SEMI */ yytestcase(yyruleno==275); + /* (276) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==276); + /* (277) explain ::= */ yytestcase(yyruleno==277); + /* (278) trans_opt ::= */ yytestcase(yyruleno==278); + /* (279) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==279); + /* (280) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==280); + /* (281) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==281); + /* (282) savepoint_opt ::= */ yytestcase(yyruleno==282); + /* (283) cmd ::= create_table create_table_args */ yytestcase(yyruleno==283); + /* (284) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==284); + /* (285) columnlist ::= columnname carglist */ yytestcase(yyruleno==285); + /* (286) nm ::= ID|INDEXED */ yytestcase(yyruleno==286); + /* (287) nm ::= STRING */ yytestcase(yyruleno==287); + /* (288) nm ::= JOIN_KW */ yytestcase(yyruleno==288); + /* (289) typetoken ::= typename */ yytestcase(yyruleno==289); + /* (290) typename ::= ID|STRING */ yytestcase(yyruleno==290); + /* (291) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=291); + /* (292) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=292); + /* (293) carglist ::= carglist ccons */ yytestcase(yyruleno==293); + /* (294) carglist ::= */ yytestcase(yyruleno==294); + /* (295) ccons ::= NULL onconf */ yytestcase(yyruleno==295); + /* (296) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==296); + /* (297) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==297); + /* (298) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=298); + /* (299) tconscomma ::= */ yytestcase(yyruleno==299); + /* (300) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=300); + /* (301) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=301); + /* (302) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=302); + /* (303) oneselect ::= values */ yytestcase(yyruleno==303); + /* (304) sclp ::= selcollist COMMA */ yytestcase(yyruleno==304); + /* (305) as ::= ID|STRING */ yytestcase(yyruleno==305); + /* (306) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=306); + /* (307) exprlist ::= nexprlist */ yytestcase(yyruleno==307); + /* (308) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=308); + /* (309) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=309); + /* (310) nmnum ::= ON */ yytestcase(yyruleno==310); + /* (311) nmnum ::= DELETE */ yytestcase(yyruleno==311); + /* (312) nmnum ::= DEFAULT */ yytestcase(yyruleno==312); + /* (313) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==313); + /* (314) foreach_clause ::= */ yytestcase(yyruleno==314); + /* (315) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==315); + /* (316) trnm ::= nm */ yytestcase(yyruleno==316); + /* (317) tridxby ::= */ yytestcase(yyruleno==317); + /* (318) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==318); + /* (319) database_kw_opt ::= */ yytestcase(yyruleno==319); + /* (320) kwcolumn_opt ::= */ yytestcase(yyruleno==320); + /* (321) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==321); + /* (322) vtabarglist ::= vtabarg */ yytestcase(yyruleno==322); + /* (323) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==323); + /* (324) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==324); + /* (325) anylist ::= */ yytestcase(yyruleno==325); + /* (326) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==326); + /* (327) anylist ::= anylist ANY */ yytestcase(yyruleno==327); break; /********** End reduce actions ************************************************/ }; @@ -134103,15 +134981,17 @@ static void yy_reduce( yysize = yyRuleInfo[yyruleno].nrhs; yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto); if( yyact <= YY_MAX_SHIFTREDUCE ){ - if( yyact>YY_MAX_SHIFT ) yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; - yypParser->yyidx -= yysize - 1; + if( yyact>YY_MAX_SHIFT ){ + yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } yymsp -= yysize-1; + yypParser->yytos = yymsp; yymsp->stateno = (YYACTIONTYPE)yyact; yymsp->major = (YYCODETYPE)yygoto; yyTraceShift(yypParser, yyact); }else{ assert( yyact == YY_ACCEPT_ACTION ); - yypParser->yyidx -= yysize; + yypParser->yytos -= yysize; yy_accept(yypParser); } } @@ -134129,7 +135009,7 @@ static void yy_parse_failed( fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); } #endif - while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will be executed whenever the ** parser fails */ /************ Begin %parse_failure code ***************************************/ @@ -134169,7 +135049,10 @@ static void yy_accept( fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); } #endif - while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + assert( yypParser->yytos==yypParser->yystack ); /* Here code is inserted which will be executed whenever the ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ @@ -134212,28 +135095,8 @@ SQLITE_PRIVATE void sqlite3Parser( #endif yyParser *yypParser; /* The parser */ - /* (re)initialize the parser, if necessary */ yypParser = (yyParser*)yyp; - if( yypParser->yyidx<0 ){ -#if YYSTACKDEPTH<=0 - if( yypParser->yystksz <=0 ){ - yyStackOverflow(yypParser); - return; - } -#endif - yypParser->yyidx = 0; -#ifndef YYNOERRORRECOVERY - yypParser->yyerrcnt = -1; -#endif - yypParser->yystack[0].stateno = 0; - yypParser->yystack[0].major = 0; -#ifndef NDEBUG - if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sInitialize. Empty stack. State 0\n", - yyTracePrompt); - } -#endif - } + assert( yypParser->yytos!=0 ); #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) yyendofinput = (yymajor==0); #endif @@ -134248,7 +135111,6 @@ SQLITE_PRIVATE void sqlite3Parser( do{ yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); if( yyact <= YY_MAX_SHIFTREDUCE ){ - if( yyact > YY_MAX_SHIFT ) yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; yy_shift(yypParser,yyact,yymajor,yyminor); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt--; @@ -134290,7 +135152,7 @@ SQLITE_PRIVATE void sqlite3Parser( if( yypParser->yyerrcnt<0 ){ yy_syntax_error(yypParser,yymajor,yyminor); } - yymx = yypParser->yystack[yypParser->yyidx].major; + yymx = yypParser->yytos->major; if( yymx==YYERRORSYMBOL || yyerrorhit ){ #ifndef NDEBUG if( yyTraceFILE ){ @@ -134301,18 +135163,20 @@ SQLITE_PRIVATE void sqlite3Parser( yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ - while( - yypParser->yyidx >= 0 && - yymx != YYERRORSYMBOL && - (yyact = yy_find_reduce_action( - yypParser->yystack[yypParser->yyidx].stateno, + while( yypParser->yytos >= &yypParser->yystack + && yymx != YYERRORSYMBOL + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, YYERRORSYMBOL)) >= YY_MIN_REDUCE ){ yy_pop_parser_stack(yypParser); } - if( yypParser->yyidx < 0 || yymajor==0 ){ + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif yymajor = YYNOCODE; }else if( yymx!=YYERRORSYMBOL ){ yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); @@ -134349,18 +135213,23 @@ SQLITE_PRIVATE void sqlite3Parser( yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); if( yyendofinput ){ yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif } yymajor = YYNOCODE; #endif } - }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 ); + }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ - int i; + yyStackEntry *i; + char cDiv = '['; fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); - for(i=1; i<=yypParser->yyidx; i++) - fprintf(yyTraceFILE,"%c%s", i==1 ? '[' : ' ', - yyTokenName[yypParser->yystack[i].major]); + for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ + fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); + cDiv = ' '; + } fprintf(yyTraceFILE,"]\n"); } #endif @@ -135366,7 +136235,7 @@ SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[]; ** to recognize the end of a trigger can be omitted. All we have to do ** is look for a semicolon that is not part of an string or comment. */ -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ +SQLITE_API int sqlite3_complete(const char *zSql){ u8 state = 0; /* Current state, using numbers defined in header comment */ u8 token; /* Value of the next token */ @@ -135531,7 +136400,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ ** above, except that the parameter is required to be UTF-16 encoded, not ** UTF-8. */ -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ +SQLITE_API int sqlite3_complete16(const void *zSql){ sqlite3_value *pVal; char const *zSql8; int rc; @@ -135691,24 +136560,24 @@ SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns ** a pointer to the to the sqlite3_version[] string constant. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } +SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; } /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a ** pointer to a string constant whose value is the same as the ** SQLITE_SOURCE_ID C preprocessor macro. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } +SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function ** returns an integer equal to SQLITE_VERSION_NUMBER. */ -SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } +SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns ** zero if and only if SQLite was compiled with mutexing code omitted due to ** the SQLITE_THREADSAFE compile-time option being set to 0. */ -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } +SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } /* ** When compiling the test fixture or with debugging enabled (on Win32), @@ -135781,7 +136650,7 @@ SQLITE_API char *sqlite3_data_directory = 0; ** * Recursive calls to this routine from thread X return immediately ** without blocking. */ -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ +SQLITE_API int sqlite3_initialize(void){ MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ int rc; /* Result code */ #ifdef SQLITE_EXTRA_INIT @@ -135947,7 +136816,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ ** on when SQLite is already shut down. If SQLite is already shut down ** when this routine is invoked, then this routine is a harmless no-op. */ -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ +SQLITE_API int sqlite3_shutdown(void){ #ifdef SQLITE_OMIT_WSD int rc = sqlite3_wsd_init(4096, 24); if( rc!=SQLITE_OK ){ @@ -136001,7 +136870,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ ** threadsafe. Failure to heed these warnings can lead to unpredictable ** behavior. */ -SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){ +SQLITE_API int sqlite3_config(int op, ...){ va_list ap; int rc = SQLITE_OK; @@ -136366,7 +137235,7 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){ /* ** Return the mutex associated with a database connection. */ -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -136380,7 +137249,7 @@ SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ ** Free up as much memory as we can from the given database ** connection. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ +SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){ int i; #ifdef SQLITE_ENABLE_API_ARMOR @@ -136404,7 +137273,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ ** Flush any dirty pages in the pager-cache for any attached database ** to disk. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ +SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){ int i; int rc = SQLITE_OK; int bSeenBusy = 0; @@ -136433,7 +137302,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ /* ** Configuration settings for an individual database connection */ -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){ +SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){ va_list ap; int rc; va_start(ap, op); @@ -136554,7 +137423,7 @@ static int nocaseCollatingFunc( /* ** Return the ROWID of the most recent insert */ -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ +SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -136567,7 +137436,7 @@ SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ /* ** Return the number of changes in the most recent call to sqlite3_exec(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ +SQLITE_API int sqlite3_changes(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -136580,7 +137449,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ /* ** Return the number of changes since the database handle was opened. */ -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ +SQLITE_API int sqlite3_total_changes(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -136682,6 +137551,9 @@ static int sqlite3Close(sqlite3 *db, int forceZombie){ return SQLITE_MISUSE_BKPT; } sqlite3_mutex_enter(db->mutex); + if( db->mTrace & SQLITE_TRACE_CLOSE ){ + db->xTrace(SQLITE_TRACE_CLOSE, db->pTraceArg, db, 0); + } /* Force xDisconnect calls on all virtual tables */ disconnectAllVtab(db); @@ -136728,8 +137600,8 @@ static int sqlite3Close(sqlite3 *db, int forceZombie){ ** unclosed resources, and arranges for deallocation when the last ** prepare statement or sqlite3_backup closes. */ -SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } -SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } +SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } +SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } /* @@ -137136,7 +138008,7 @@ SQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler *p){ ** This routine sets the busy callback for an Sqlite database to the ** given callback function with the given argument. */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( +SQLITE_API int sqlite3_busy_handler( sqlite3 *db, int (*xBusy)(void*,int), void *pArg @@ -137159,7 +138031,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( ** given callback function with the given argument. The progress callback will ** be invoked every nOps opcodes. */ -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( +SQLITE_API void sqlite3_progress_handler( sqlite3 *db, int nOps, int (*xProgress)(void*), @@ -137190,7 +138062,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( ** This routine installs a default busy handler that waits for the ** specified number of milliseconds before returning 0. */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ +SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; #endif @@ -137206,7 +138078,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ /* ** Cause any pending operation to stop at its earliest opportunity. */ -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ +SQLITE_API void sqlite3_interrupt(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -137322,7 +138194,7 @@ SQLITE_PRIVATE int sqlite3CreateFunc( /* ** Create new user functions. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( +SQLITE_API int sqlite3_create_function( sqlite3 *db, const char *zFunc, int nArg, @@ -137336,7 +138208,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function( xFinal, 0); } -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( +SQLITE_API int sqlite3_create_function_v2( sqlite3 *db, const char *zFunc, int nArg, @@ -137379,7 +138251,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( } #ifndef SQLITE_OMIT_UTF16 -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( +SQLITE_API int sqlite3_create_function16( sqlite3 *db, const void *zFunctionName, int nArg, @@ -137419,7 +138291,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( ** A global function must exist in order for name resolution to work ** properly. */ -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( +SQLITE_API int sqlite3_overload_function( sqlite3 *db, const char *zName, int nArg @@ -137450,7 +138322,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( ** trace is a pointer to a function that is invoked at the start of each ** SQL statement. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){ +#ifndef SQLITE_OMIT_DEPRECATED +SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ void *pOld; #ifdef SQLITE_ENABLE_API_ARMOR @@ -137461,11 +138334,38 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void (*xTrace)(void*, #endif sqlite3_mutex_enter(db->mutex); pOld = db->pTraceArg; - db->xTrace = xTrace; + db->mTrace = xTrace ? SQLITE_TRACE_LEGACY : 0; + db->xTrace = (int(*)(u32,void*,void*,void*))xTrace; db->pTraceArg = pArg; sqlite3_mutex_leave(db->mutex); return pOld; } +#endif /* SQLITE_OMIT_DEPRECATED */ + +/* Register a trace callback using the version-2 interface. +*/ +SQLITE_API int sqlite3_trace_v2( + sqlite3 *db, /* Trace this connection */ + unsigned mTrace, /* Mask of events to be traced */ + int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ + void *pArg /* Context */ +){ +#ifdef SQLITE_ENABLE_API_ARMOR + if( !sqlite3SafetyCheckOk(db) ){ + return SQLITE_MISUSE_BKPT; + } +#endif + sqlite3_mutex_enter(db->mutex); + if( mTrace==0 ) xTrace = 0; + if( xTrace==0 ) mTrace = 0; + db->mTrace = mTrace; + db->xTrace = xTrace; + db->pTraceArg = pArg; + sqlite3_mutex_leave(db->mutex); + return SQLITE_OK; +} + +#ifndef SQLITE_OMIT_DEPRECATED /* ** Register a profile function. The pArg from the previously registered ** profile function is returned. @@ -137474,7 +138374,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void (*xTrace)(void*, ** profile is a pointer to a function that is invoked at the conclusion of ** each SQL statement that is run. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_profile( +SQLITE_API void *sqlite3_profile( sqlite3 *db, void (*xProfile)(void*,const char*,sqlite_uint64), void *pArg @@ -137494,6 +138394,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_profile( sqlite3_mutex_leave(db->mutex); return pOld; } +#endif /* SQLITE_OMIT_DEPRECATED */ #endif /* SQLITE_OMIT_TRACE */ /* @@ -137501,7 +138402,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_profile( ** If the invoked function returns non-zero, then the commit becomes a ** rollback. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( +SQLITE_API void *sqlite3_commit_hook( sqlite3 *db, /* Attach the hook to this database */ int (*xCallback)(void*), /* Function to invoke on each commit */ void *pArg /* Argument to the function */ @@ -137526,7 +138427,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( ** Register a callback to be invoked each time a row is updated, ** inserted or deleted using this database connection. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( +SQLITE_API void *sqlite3_update_hook( sqlite3 *db, /* Attach the hook to this database */ void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), void *pArg /* Argument to the function */ @@ -137551,7 +138452,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( ** Register a callback to be invoked each time a transaction is rolled ** back by this database connection. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( +SQLITE_API void *sqlite3_rollback_hook( sqlite3 *db, /* Attach the hook to this database */ void (*xCallback)(void*), /* Callback function */ void *pArg /* Argument to the function */ @@ -137577,7 +138478,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( ** Register a callback to be invoked each time a row is updated, ** inserted or deleted using this database connection. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( +SQLITE_API void *sqlite3_preupdate_hook( sqlite3 *db, /* Attach the hook to this database */ void(*xCallback)( /* Callback function */ void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), @@ -137626,7 +138527,7 @@ SQLITE_PRIVATE int sqlite3WalDefaultHook( ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism ** configured by this function. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ #ifdef SQLITE_OMIT_WAL UNUSED_PARAMETER(db); UNUSED_PARAMETER(nFrame); @@ -137647,7 +138548,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame ** Register a callback to be invoked each time a transaction is written ** into the write-ahead-log by this database connection. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( +SQLITE_API void *sqlite3_wal_hook( sqlite3 *db, /* Attach the hook to this db handle */ int(*xCallback)(void *, sqlite3*, const char*, int), void *pArg /* First argument passed to xCallback() */ @@ -137674,7 +138575,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( /* ** Checkpoint database zDb. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( +SQLITE_API int sqlite3_wal_checkpoint_v2( sqlite3 *db, /* Database handle */ const char *zDb, /* Name of attached database (or NULL) */ int eMode, /* SQLITE_CHECKPOINT_* value */ @@ -137729,7 +138630,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( ** to contains a zero-length string, all attached databases are ** checkpointed. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ +SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); @@ -137820,7 +138721,7 @@ SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){ ** Return UTF-8 encoded English language explanation of the most recent ** error. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ +SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ const char *z; if( !db ){ return sqlite3ErrStr(SQLITE_NOMEM_BKPT); @@ -137848,7 +138749,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ ** Return UTF-16 encoded English language explanation of the most recent ** error. */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ +SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){ static const u16 outOfMem[] = { 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 }; @@ -137893,7 +138794,7 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ ** Return the most recent error code generated by an SQLite routine. If NULL is ** passed to this function, we assume a malloc() failed during sqlite3_open(). */ -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ +SQLITE_API int sqlite3_errcode(sqlite3 *db){ if( db && !sqlite3SafetyCheckSickOrOk(db) ){ return SQLITE_MISUSE_BKPT; } @@ -137902,7 +138803,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ } return db->errCode & db->errMask; } -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){ if( db && !sqlite3SafetyCheckSickOrOk(db) ){ return SQLITE_MISUSE_BKPT; } @@ -137911,7 +138812,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ } return db->errCode; } -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ +SQLITE_API int sqlite3_system_errno(sqlite3 *db){ return db ? db->iSysErrno : 0; } @@ -137920,7 +138821,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ ** argument. For now, this simply calls the internal sqlite3ErrStr() ** function. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ +SQLITE_API const char *sqlite3_errstr(int rc){ return sqlite3ErrStr(rc); } @@ -138068,7 +138969,7 @@ static const int aHardLimit[] = { ** It merely prevents new constructs that exceed the limit ** from forming. */ -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ +SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ int oldLimit; #ifdef SQLITE_ENABLE_API_ARMOR @@ -138692,14 +139593,14 @@ opendb_out: /* ** Open a new database handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_open( +SQLITE_API int sqlite3_open( const char *zFilename, sqlite3 **ppDb ){ return openDatabase(zFilename, ppDb, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); } -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( +SQLITE_API int sqlite3_open_v2( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb, /* OUT: SQLite db handle */ int flags, /* Flags */ @@ -138712,7 +139613,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( /* ** Open a new database handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3_open16( +SQLITE_API int sqlite3_open16( const void *zFilename, sqlite3 **ppDb ){ @@ -138751,7 +139652,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open16( /* ** Register a new collation sequence with the database handle db. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( +SQLITE_API int sqlite3_create_collation( sqlite3* db, const char *zName, int enc, @@ -138764,7 +139665,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( /* ** Register a new collation sequence with the database handle db. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( +SQLITE_API int sqlite3_create_collation_v2( sqlite3* db, const char *zName, int enc, @@ -138789,7 +139690,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( /* ** Register a new collation sequence with the database handle db. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( +SQLITE_API int sqlite3_create_collation16( sqlite3* db, const void *zName, int enc, @@ -138819,7 +139720,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( ** Register a collation sequence factory callback with the database handle ** db. Replace any previously installed collation sequence factory. */ -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( +SQLITE_API int sqlite3_collation_needed( sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) @@ -138840,7 +139741,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( ** Register a collation sequence factory callback with the database handle ** db. Replace any previously installed collation sequence factory. */ -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( +SQLITE_API int sqlite3_collation_needed16( sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) @@ -138862,7 +139763,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( ** This function is now an anachronism. It used to be used to recover from a ** malloc() failure, but SQLite now does this automatically. */ -SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ +SQLITE_API int sqlite3_global_recover(void){ return SQLITE_OK; } #endif @@ -138873,7 +139774,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ ** by default. Autocommit is disabled by a BEGIN statement and reenabled ** by the next COMMIT or ROLLBACK. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ +SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ (void)SQLITE_MISUSE_BKPT; @@ -138930,7 +139831,7 @@ SQLITE_PRIVATE int sqlite3IoerrnomemError(int lineno){ ** SQLite no longer uses thread-specific data so this routine is now a ** no-op. It is retained for historical compatibility. */ -SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ +SQLITE_API void sqlite3_thread_cleanup(void){ } #endif @@ -138938,7 +139839,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ ** Return meta information about a specific column of a database table. ** See comment in sqlite3.h (sqlite.h.in) for details. */ -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( +SQLITE_API int sqlite3_table_column_metadata( sqlite3 *db, /* Connection handle */ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ @@ -139056,7 +139957,7 @@ error_out: /* ** Sleep for a little while. Return the amount of time slept. */ -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ +SQLITE_API int sqlite3_sleep(int ms){ sqlite3_vfs *pVfs; int rc; pVfs = sqlite3_vfs_find(0); @@ -139072,7 +139973,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ /* ** Enable or disable the extended result codes. */ -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ +SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; #endif @@ -139085,7 +139986,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int ono /* ** Invoke the xFileControl method on a particular database. */ -SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ +SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ int rc = SQLITE_ERROR; Btree *pBtree; @@ -139125,7 +140026,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbN /* ** Interface to the testing logic. */ -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){ +SQLITE_API int sqlite3_test_control(int op, ...){ int rc = 0; #ifdef SQLITE_OMIT_BUILTIN_TEST UNUSED_PARAMETER(op); @@ -139470,7 +140371,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){ ** parameter if it exists. If the parameter does not exist, this routine ** returns a NULL pointer. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ +SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){ if( zFilename==0 || zParam==0 ) return 0; zFilename += sqlite3Strlen30(zFilename) + 1; while( zFilename[0] ){ @@ -139485,7 +140386,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilenam /* ** Return a boolean value for a query parameter. */ -SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ +SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ const char *z = sqlite3_uri_parameter(zFilename, zParam); bDflt = bDflt!=0; return z ? sqlite3GetBoolean(z, bDflt) : bDflt; @@ -139494,7 +140395,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const c /* ** Return a 64-bit integer value for a query parameter. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( +SQLITE_API sqlite3_int64 sqlite3_uri_int64( const char *zFilename, /* Filename as passed to xOpen */ const char *zParam, /* URI parameter sought */ sqlite3_int64 bDflt /* return if parameter is missing */ @@ -139526,7 +140427,7 @@ SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){ ** Return the filename of the database associated with a database ** connection. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ +SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){ Btree *pBt; #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ @@ -139542,7 +140443,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const cha ** Return 1 if database is read-only or 0 if read/write. Return -1 if ** no such database exists. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ +SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ Btree *pBt; #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ){ @@ -139559,7 +140460,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbNa ** Obtain a snapshot handle for the snapshot of database zDb currently ** being read by handle db. */ -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( +SQLITE_API int sqlite3_snapshot_get( sqlite3 *db, const char *zDb, sqlite3_snapshot **ppSnapshot @@ -139594,7 +140495,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( /* ** Open a read-transaction on the snapshot idendified by pSnapshot. */ -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( +SQLITE_API int sqlite3_snapshot_open( sqlite3 *db, const char *zDb, sqlite3_snapshot *pSnapshot @@ -139631,7 +140532,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( /* ** Free a snapshot handle obtained from sqlite3_snapshot_get(). */ -SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ +SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ sqlite3_free(pSnapshot); } #endif /* SQLITE_ENABLE_SNAPSHOT */ @@ -139785,7 +140686,7 @@ static void leaveMutex(void){ ** on the same "db". If xNotify==0 then any prior callbacks are immediately ** cancelled. */ -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( +SQLITE_API int sqlite3_unlock_notify( sqlite3 *db, void (*xNotify)(void **, int), void *pArg @@ -146788,7 +147689,7 @@ SQLITE_PRIVATE int sqlite3Fts3Corrupt(){ #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( +SQLITE_API int sqlite3_fts3_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -149944,7 +150845,11 @@ SQLITE_PRIVATE int sqlite3Fts3InitTokenizer( #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* #include */ /* @@ -161883,6 +162788,53 @@ static RtreeValue rtreeValueUp(sqlite3_value *v){ } #endif /* !defined(SQLITE_RTREE_INT_ONLY) */ +/* +** A constraint has failed while inserting a row into an rtree table. +** Assuming no OOM error occurs, this function sets the error message +** (at pRtree->base.zErrMsg) to an appropriate value and returns +** SQLITE_CONSTRAINT. +** +** Parameter iCol is the index of the leftmost column involved in the +** constraint failure. If it is 0, then the constraint that failed is +** the unique constraint on the id column. Otherwise, it is the rtree +** (c1<=c2) constraint on columns iCol and iCol+1 that has failed. +** +** If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. +*/ +static int rtreeConstraintError(Rtree *pRtree, int iCol){ + sqlite3_stmt *pStmt = 0; + char *zSql; + int rc; + + assert( iCol==0 || iCol%2 ); + zSql = sqlite3_mprintf("SELECT * FROM %Q.%Q", pRtree->zDb, pRtree->zName); + if( zSql ){ + rc = sqlite3_prepare_v2(pRtree->db, zSql, -1, &pStmt, 0); + }else{ + rc = SQLITE_NOMEM; + } + sqlite3_free(zSql); + + if( rc==SQLITE_OK ){ + if( iCol==0 ){ + const char *zCol = sqlite3_column_name(pStmt, 0); + pRtree->base.zErrMsg = sqlite3_mprintf( + "UNIQUE constraint failed: %s.%s", pRtree->zName, zCol + ); + }else{ + const char *zCol1 = sqlite3_column_name(pStmt, iCol); + const char *zCol2 = sqlite3_column_name(pStmt, iCol+1); + pRtree->base.zErrMsg = sqlite3_mprintf( + "rtree constraint failed: %s.(%s<=%s)", pRtree->zName, zCol1, zCol2 + ); + } + } + + sqlite3_finalize(pStmt); + return (rc==SQLITE_OK ? SQLITE_CONSTRAINT : rc); +} + + /* ** The xUpdate method for rtree module virtual tables. @@ -161933,7 +162885,7 @@ static int rtreeUpdate( cell.aCoord[ii].f = rtreeValueDown(azData[ii+3]); cell.aCoord[ii+1].f = rtreeValueUp(azData[ii+4]); if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){ - rc = SQLITE_CONSTRAINT; + rc = rtreeConstraintError(pRtree, ii+1); goto constraint; } } @@ -161944,7 +162896,7 @@ static int rtreeUpdate( cell.aCoord[ii].i = sqlite3_value_int(azData[ii+3]); cell.aCoord[ii+1].i = sqlite3_value_int(azData[ii+4]); if( cell.aCoord[ii].i>cell.aCoord[ii+1].i ){ - rc = SQLITE_CONSTRAINT; + rc = rtreeConstraintError(pRtree, ii+1); goto constraint; } } @@ -161965,7 +162917,7 @@ static int rtreeUpdate( if( sqlite3_vtab_on_conflict(pRtree->db)==SQLITE_REPLACE ){ rc = rtreeDeleteRowid(pRtree, cell.iRowid); }else{ - rc = SQLITE_CONSTRAINT; + rc = rtreeConstraintError(pRtree, 0); goto constraint; } } @@ -162048,6 +163000,11 @@ static int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){ int rc; i64 nRow = 0; + if( sqlite3_table_column_metadata(db,pRtree->zDb,"sqlite_stat1", + 0,0,0,0,0,0)==SQLITE_ERROR ){ + pRtree->nRowEst = RTREE_DEFAULT_ROWEST; + return SQLITE_OK; + } zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName); if( zSql==0 ){ rc = SQLITE_NOMEM; @@ -162533,7 +163490,7 @@ static void geomCallback(sqlite3_context *ctx, int nArg, sqlite3_value **aArg){ /* ** Register a new geometry function for use with the r-tree MATCH operator. */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( +SQLITE_API int sqlite3_rtree_geometry_callback( sqlite3 *db, /* Register SQL function on this connection */ const char *zGeom, /* Name of the new SQL function */ int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ @@ -162557,7 +163514,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( ** Register a new 2nd-generation geometry function for use with the ** r-tree MATCH operator. */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( +SQLITE_API int sqlite3_rtree_query_callback( sqlite3 *db, /* Register SQL function on this connection */ const char *zQueryFunc, /* Name of new SQL function */ int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ @@ -162582,7 +163539,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( +SQLITE_API int sqlite3_rtree_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -163133,7 +164090,7 @@ SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){ #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( +SQLITE_API int sqlite3_icu_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -163813,7 +164770,7 @@ typedef struct sqlite3rbu sqlite3rbu; ** not work out of the box with zipvfs. Refer to the comment describing ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. */ -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( +SQLITE_API sqlite3rbu *sqlite3rbu_open( const char *zTarget, const char *zRbu, const char *zState @@ -163846,7 +164803,7 @@ SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( ** a description of the complications associated with using RBU with ** zipvfs databases. */ -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( const char *zTarget, const char *zState ); @@ -163882,7 +164839,7 @@ SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( ** Database handles returned by this function remain valid until the next ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu); /* ** Do some work towards applying the RBU update to the target db. @@ -163896,7 +164853,7 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops ** that immediately return the same value. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); +SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu); /* ** Force RBU to save its state to disk. @@ -163908,7 +164865,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); ** ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu); /* ** Close an RBU handle. @@ -163928,14 +164885,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); ** update has been partially applied, or SQLITE_DONE if it has been ** completely applied. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); +SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); /* ** Return the total number of key-value operations (inserts, deletes or ** updates) that have been performed on the target database since the ** current RBU update was started. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu); /* ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) @@ -163977,7 +164934,45 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); ** table exists but is not correctly populated, the value of the *pnOne ** output variable during stage 1 is undefined. */ -SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); +SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); + +/* +** Obtain an indication as to the current stage of an RBU update or vacuum. +** This function always returns one of the SQLITE_RBU_STATE_XXX constants +** defined in this file. Return values should be interpreted as follows: +** +** SQLITE_RBU_STATE_OAL: +** RBU is currently building a *-oal file. The next call to sqlite3rbu_step() +** may either add further data to the *-oal file, or compute data that will +** be added by a subsequent call. +** +** SQLITE_RBU_STATE_MOVE: +** RBU has finished building the *-oal file. The next call to sqlite3rbu_step() +** will move the *-oal file to the equivalent *-wal path. If the current +** operation is an RBU update, then the updated version of the database +** file will become visible to ordinary SQLite clients following the next +** call to sqlite3rbu_step(). +** +** SQLITE_RBU_STATE_CHECKPOINT: +** RBU is currently performing an incremental checkpoint. The next call to +** sqlite3rbu_step() will copy a page of data from the *-wal file into +** the target database file. +** +** SQLITE_RBU_STATE_DONE: +** The RBU operation has finished. Any subsequent calls to sqlite3rbu_step() +** will immediately return SQLITE_DONE. +** +** SQLITE_RBU_STATE_ERROR: +** An error has occurred. Any subsequent calls to sqlite3rbu_step() will +** immediately return the SQLite error code associated with the error. +*/ +#define SQLITE_RBU_STATE_OAL 1 +#define SQLITE_RBU_STATE_MOVE 2 +#define SQLITE_RBU_STATE_CHECKPOINT 3 +#define SQLITE_RBU_STATE_DONE 4 +#define SQLITE_RBU_STATE_ERROR 5 + +SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu); /* ** Create an RBU VFS named zName that accesses the underlying file-system @@ -164021,7 +165016,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnO ** file-system via "rbu" all the time, even if it only uses RBU functionality ** occasionally. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); +SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent); /* ** Deregister and destroy an RBU vfs created by an earlier call to @@ -164031,7 +165026,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const cha ** before all database handles that use it have been closed, the results ** are undefined. */ -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName); #if 0 } /* end of the 'extern "C"' block */ @@ -164874,12 +165869,14 @@ static int rbuObjIterFirst(sqlite3rbu *p, RbuObjIter *pIter){ int rc; memset(pIter, 0, sizeof(RbuObjIter)); - rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg, + rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg, + sqlite3_mprintf( "SELECT rbu_target_name(name, type='view') AS target, name " "FROM sqlite_master " "WHERE type IN ('table', 'view') AND target IS NOT NULL " + " %s " "ORDER BY name" - ); + , rbuIsVacuum(p) ? "AND rootpage!=0 AND rootpage IS NOT NULL" : "")); if( rc==SQLITE_OK ){ rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg, @@ -166458,9 +167455,9 @@ static void rbuFileSuffix3(const char *zBase, char *z){ #endif { int i, sz; - sz = sqlite3Strlen30(z); + sz = (int)strlen(z)&0xffffff; for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){} - if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4); + if( z[i]=='.' && sz>i+4 ) memmove(&z[i+1], &z[sz-3], 4); } #endif } @@ -167123,7 +168120,7 @@ static void rbuCreateTargetSchema(sqlite3rbu *p){ /* ** Step the RBU object. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ +SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){ if( p ){ switch( p->eStage ){ case RBU_STAGE_OAL: { @@ -167506,30 +168503,7 @@ static sqlite3rbu *openRbuHandle( if( p->rc==SQLITE_OK ){ if( p->eStage==RBU_STAGE_OAL ){ sqlite3 *db = p->dbMain; - - if( pState->eStage==0 && rbuIsVacuum(p) ){ - rbuCopyPragma(p, "page_size"); - rbuCopyPragma(p, "auto_vacuum"); - } - - /* Open transactions both databases. The *-oal file is opened or - ** created at this point. */ - if( p->rc==SQLITE_OK ){ - p->rc = sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, &p->zErrmsg); - } - if( p->rc==SQLITE_OK ){ - p->rc = sqlite3_exec(p->dbRbu, "BEGIN", 0, 0, &p->zErrmsg); - } - - /* Check if the main database is a zipvfs db. If it is, set the upper - ** level pager to use "journal_mode=off". This prevents it from - ** generating a large journal using a temp file. */ - if( p->rc==SQLITE_OK ){ - int frc = sqlite3_file_control(db, "main", SQLITE_FCNTL_ZIPVFS, 0); - if( frc==SQLITE_OK ){ - p->rc = sqlite3_exec(db, "PRAGMA journal_mode=off",0,0,&p->zErrmsg); - } - } + p->rc = sqlite3_exec(p->dbRbu, "BEGIN", 0, 0, &p->zErrmsg); /* Point the object iterator at the first object */ if( p->rc==SQLITE_OK ){ @@ -167540,12 +168514,34 @@ static sqlite3rbu *openRbuHandle( ** update finished. */ if( p->rc==SQLITE_OK && p->objiter.zTbl==0 ){ p->rc = SQLITE_DONE; - } + p->eStage = RBU_STAGE_DONE; + }else{ + if( p->rc==SQLITE_OK && pState->eStage==0 && rbuIsVacuum(p) ){ + rbuCopyPragma(p, "page_size"); + rbuCopyPragma(p, "auto_vacuum"); + } - if( p->rc==SQLITE_OK ){ - rbuSetupOal(p, pState); - } + /* Open transactions both databases. The *-oal file is opened or + ** created at this point. */ + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, &p->zErrmsg); + } + /* Check if the main database is a zipvfs db. If it is, set the upper + ** level pager to use "journal_mode=off". This prevents it from + ** generating a large journal using a temp file. */ + if( p->rc==SQLITE_OK ){ + int frc = sqlite3_file_control(db, "main", SQLITE_FCNTL_ZIPVFS, 0); + if( frc==SQLITE_OK ){ + p->rc = sqlite3_exec( + db, "PRAGMA journal_mode=off",0,0,&p->zErrmsg); + } + } + + if( p->rc==SQLITE_OK ){ + rbuSetupOal(p, pState); + } + } }else if( p->eStage==RBU_STAGE_MOVE ){ /* no-op */ }else if( p->eStage==RBU_STAGE_CKPT ){ @@ -167566,7 +168562,7 @@ static sqlite3rbu *openRbuHandle( /* ** Open and return a new RBU handle. */ -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( +SQLITE_API sqlite3rbu *sqlite3rbu_open( const char *zTarget, const char *zRbu, const char *zState @@ -167578,7 +168574,7 @@ SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( /* ** Open a handle to begin or resume an RBU VACUUM operation. */ -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( const char *zTarget, const char *zState ){ @@ -167589,7 +168585,7 @@ SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( /* ** Return the database handle used by pRbu. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ sqlite3 *db = 0; if( pRbu ){ db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); @@ -167621,7 +168617,7 @@ static void rbuEditErrmsg(sqlite3rbu *p){ /* ** Close the RBU handle. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ +SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ int rc; if( p ){ @@ -167672,7 +168668,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ ** updates) that have been performed on the target database since the ** current RBU update was started. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){ return pRbu->nProgress; } @@ -167680,7 +168676,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ ** Return permyriadage progress indications for the two main stages of ** an RBU update. */ -SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ +SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ const int MAX_PROGRESS = 10000; switch( p->eStage ){ case RBU_STAGE_OAL: @@ -167712,9 +168708,39 @@ SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, } } -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ +/* +** Return the current state of the RBU vacuum or update operation. +*/ +SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){ + int aRes[] = { + 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, + 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE + }; + + assert( RBU_STAGE_OAL==1 ); + assert( RBU_STAGE_MOVE==2 ); + assert( RBU_STAGE_CKPT==4 ); + assert( RBU_STAGE_DONE==5 ); + assert( aRes[RBU_STAGE_OAL]==SQLITE_RBU_STATE_OAL ); + assert( aRes[RBU_STAGE_MOVE]==SQLITE_RBU_STATE_MOVE ); + assert( aRes[RBU_STAGE_CKPT]==SQLITE_RBU_STATE_CHECKPOINT ); + assert( aRes[RBU_STAGE_DONE]==SQLITE_RBU_STATE_DONE ); + + if( p->rc!=SQLITE_OK && p->rc!=SQLITE_DONE ){ + return SQLITE_RBU_STATE_ERROR; + }else{ + assert( p->rc!=SQLITE_DONE || p->eStage==RBU_STAGE_DONE ); + assert( p->eStage==RBU_STAGE_OAL + || p->eStage==RBU_STAGE_MOVE + || p->eStage==RBU_STAGE_CKPT + || p->eStage==RBU_STAGE_DONE + ); + return aRes[p->eStage]; + } +} + +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){ int rc = p->rc; - if( rc==SQLITE_DONE ) return SQLITE_OK; assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); @@ -168540,7 +169566,7 @@ static int rbuVfsGetLastError(sqlite3_vfs *pVfs, int a, char *b){ ** Deregister and destroy an RBU vfs created by an earlier call to ** sqlite3rbu_create_vfs(). */ -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){ sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); if( pVfs && pVfs->xOpen==rbuVfsOpen ){ sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); @@ -168554,7 +169580,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ ** via existing VFS zParent. The new object is registered as a non-default ** VFS with SQLite before returning. */ -SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ +SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){ /* Template for VFS */ static sqlite3_vfs vfs_template = { @@ -168696,10 +169722,10 @@ SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const cha */ #define VTAB_SCHEMA \ "CREATE TABLE xx( " \ - " name STRING, /* Name of table or index */" \ - " path INTEGER, /* Path to page from root */" \ + " name TEXT, /* Name of table or index */" \ + " path TEXT, /* Path to page from root */" \ " pageno INTEGER, /* Page number */" \ - " pagetype STRING, /* 'internal', 'leaf' or 'overflow' */" \ + " pagetype TEXT, /* 'internal', 'leaf' or 'overflow' */" \ " ncell INTEGER, /* Cells on page (0 for overflow) */" \ " payload INTEGER, /* Bytes of payload on this page */" \ " unused INTEGER, /* Bytes of unused space on this page */" \ @@ -170799,7 +171825,7 @@ static int sessionDiffFindModified( return rc; } -SQLITE_API int SQLITE_STDCALL sqlite3session_diff( +SQLITE_API int sqlite3session_diff( sqlite3_session *pSession, const char *zFrom, const char *zTbl, @@ -170893,7 +171919,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_diff( ** Create a session object. This session object will record changes to ** database zDb attached to connection db. */ -SQLITE_API int SQLITE_STDCALL sqlite3session_create( +SQLITE_API int sqlite3session_create( sqlite3 *db, /* Database handle */ const char *zDb, /* Name of db (e.g. "main") */ sqlite3_session **ppSession /* OUT: New session object */ @@ -170955,7 +171981,7 @@ static void sessionDeleteTable(SessionTable *pList){ /* ** Delete a session object previously allocated using sqlite3session_create(). */ -SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ +SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){ sqlite3 *db = pSession->db; sqlite3_session *pHead; sqlite3_session **pp; @@ -170984,7 +172010,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ /* ** Set a table filter on a Session Object. */ -SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( +SQLITE_API void sqlite3session_table_filter( sqlite3_session *pSession, int(*xFilter)(void*, const char*), void *pCtx /* First argument passed to xFilter */ @@ -171002,7 +172028,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) ** or not. */ -SQLITE_API int SQLITE_STDCALL sqlite3session_attach( +SQLITE_API int sqlite3session_attach( sqlite3_session *pSession, /* Session object */ const char *zName /* Table name */ ){ @@ -171692,7 +172718,7 @@ static int sessionGenerateChangeset( ** It is the responsibility of the caller to eventually free the buffer ** using sqlite3_free(). */ -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( +SQLITE_API int sqlite3session_changeset( sqlite3_session *pSession, /* Session object */ int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ void **ppChangeset /* OUT: Buffer containing changeset */ @@ -171703,7 +172729,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( /* ** Streaming version of sqlite3session_changeset(). */ -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( +SQLITE_API int sqlite3session_changeset_strm( sqlite3_session *pSession, int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut @@ -171714,7 +172740,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( /* ** Streaming version of sqlite3session_patchset(). */ -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( +SQLITE_API int sqlite3session_patchset_strm( sqlite3_session *pSession, int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut @@ -171729,7 +172755,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( ** It is the responsibility of the caller to eventually free the buffer ** using sqlite3_free(). */ -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( +SQLITE_API int sqlite3session_patchset( sqlite3_session *pSession, /* Session object */ int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ void **ppPatchset /* OUT: Buffer containing changeset */ @@ -171740,7 +172766,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( /* ** Enable or disable the session object passed as the first argument. */ -SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ +SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){ int ret; sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); if( bEnable>=0 ){ @@ -171754,7 +172780,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, i /* ** Enable or disable the session object passed as the first argument. */ -SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ +SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ int ret; sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); if( bIndirect>=0 ){ @@ -171769,7 +172795,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, ** Return true if there have been no changes to monitored tables recorded ** by the session object passed as the only argument. */ -SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ +SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){ int ret = 0; SessionTable *pTab; @@ -171819,7 +172845,7 @@ static int sessionChangesetStart( /* ** Create an iterator used to iterate through the contents of a changeset. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( +SQLITE_API int sqlite3changeset_start( sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ int nChangeset, /* Size of buffer pChangeset in bytes */ void *pChangeset /* Pointer to buffer containing changeset */ @@ -171830,7 +172856,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( /* ** Streaming version of sqlite3changeset_start(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( +SQLITE_API int sqlite3changeset_start_strm( sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn @@ -172251,7 +173277,7 @@ static int sessionChangesetNext( ** This function may not be called on iterators passed to a conflict handler ** callback by changeset_apply(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ +SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){ return sessionChangesetNext(p, 0, 0); } @@ -172260,7 +173286,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ ** from a changeset iterator. It may only be called after changeset_next() ** has returned SQLITE_ROW. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( +SQLITE_API int sqlite3changeset_op( sqlite3_changeset_iter *pIter, /* Iterator handle */ const char **pzTab, /* OUT: Pointer to table name */ int *pnCol, /* OUT: Number of columns in table */ @@ -172280,7 +173306,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( ** to. This function may only be called after changeset_next() returns ** SQLITE_ROW. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( +SQLITE_API int sqlite3changeset_pk( sqlite3_changeset_iter *pIter, /* Iterator object */ unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ int *pnCol /* OUT: Number of entries in output array */ @@ -172303,7 +173329,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is ** not modified. Otherwise, SQLITE_OK. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( +SQLITE_API int sqlite3changeset_old( sqlite3_changeset_iter *pIter, /* Changeset iterator */ int iVal, /* Index of old.* value to retrieve */ sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ @@ -172331,7 +173357,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is ** not modified. Otherwise, SQLITE_OK. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( +SQLITE_API int sqlite3changeset_new( sqlite3_changeset_iter *pIter, /* Changeset iterator */ int iVal, /* Index of new.* value to retrieve */ sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ @@ -172365,7 +173391,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( ** If value iVal is out-of-range or some other error occurs, an SQLite error ** code is returned. Otherwise, SQLITE_OK. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( +SQLITE_API int sqlite3changeset_conflict( sqlite3_changeset_iter *pIter, /* Changeset iterator */ int iVal, /* Index of conflict record value to fetch */ sqlite3_value **ppValue /* OUT: Value from conflicting row */ @@ -172388,7 +173414,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( ** ** In all other cases this function returns SQLITE_MISUSE. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( +SQLITE_API int sqlite3changeset_fk_conflicts( sqlite3_changeset_iter *pIter, /* Changeset iterator */ int *pnOut /* OUT: Number of FK violations */ ){ @@ -172406,7 +173432,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( ** This function may not be called on iterators passed to a conflict handler ** callback by changeset_apply(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ +SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){ int rc = SQLITE_OK; if( p ){ int i; /* Used to iterate through p->apValue[] */ @@ -172580,7 +173606,7 @@ static int sessionChangesetInvert( /* ** Invert a changeset object. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( +SQLITE_API int sqlite3changeset_invert( int nChangeset, /* Number of bytes in input */ const void *pChangeset, /* Input changeset */ int *pnInverted, /* OUT: Number of bytes in output changeset */ @@ -172599,7 +173625,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( /* ** Streaming version of sqlite3changeset_invert(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( +SQLITE_API int sqlite3changeset_invert_strm( int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn, int (*xOutput)(void *pOut, const void *pData, int nData), @@ -173479,7 +174505,7 @@ static int sessionChangesetApply( ** attached to handle "db". Invoke the supplied conflict handler callback ** to resolve any conflicts encountered while applying the change. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( +SQLITE_API int sqlite3changeset_apply( sqlite3 *db, /* Apply change to "main" db of this handle */ int nChangeset, /* Size of changeset in bytes */ void *pChangeset, /* Changeset blob */ @@ -173507,7 +174533,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( ** attached to handle "db". Invoke the supplied conflict handler callback ** to resolve any conflicts encountered while applying the change. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( +SQLITE_API int sqlite3changeset_apply_strm( sqlite3 *db, /* Apply change to "main" db of this handle */ int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ void *pIn, /* First arg for xInput */ @@ -173842,7 +174868,7 @@ static int sessionChangegroupOutput( /* ** Allocate a new, empty, sqlite3_changegroup. */ -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ +SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){ int rc = SQLITE_OK; /* Return code */ sqlite3_changegroup *p; /* New object */ p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); @@ -173859,7 +174885,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ ** Add the changeset currently stored in buffer pData, size nData bytes, ** to changeset-group p. */ -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ +SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ int rc; /* Return code */ @@ -173875,7 +174901,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, ** Obtain a buffer containing a changeset representing the concatenation ** of all changesets added to the group so far. */ -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( +SQLITE_API int sqlite3changegroup_output( sqlite3_changegroup *pGrp, int *pnData, void **ppData @@ -173886,7 +174912,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( /* ** Streaming versions of changegroup_add(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( +SQLITE_API int sqlite3changegroup_add_strm( sqlite3_changegroup *pGrp, int (*xInput)(void *pIn, void *pData, int *pnData), void *pIn @@ -173905,7 +174931,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( /* ** Streaming versions of changegroup_output(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( +SQLITE_API int sqlite3changegroup_output_strm( sqlite3_changegroup *pGrp, int (*xOutput)(void *pOut, const void *pData, int nData), void *pOut @@ -173916,7 +174942,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( /* ** Delete a changegroup object. */ -SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ +SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ if( pGrp ){ sessionDeleteTable(pGrp->pList); sqlite3_free(pGrp); @@ -173926,7 +174952,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pG /* ** Combine two changesets together. */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( +SQLITE_API int sqlite3changeset_concat( int nLeft, /* Number of bytes in lhs input */ void *pLeft, /* Lhs input changeset */ int nRight /* Number of bytes in rhs input */, @@ -173955,7 +174981,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( /* ** Streaming version of sqlite3changeset_concat(). */ -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( +SQLITE_API int sqlite3changeset_concat_strm( int (*xInputA)(void *pIn, void *pData, int *pnData), void *pInA, int (*xInputB)(void *pIn, void *pData, int *pnData), @@ -175198,6 +176224,26 @@ static void jsonTest1Func( ** Scalar SQL function implementations ****************************************************************************/ +/* +** Implementation of the json_QUOTE(VALUE) function. Return a JSON value +** corresponding to the SQL value input. Mostly this means putting +** double-quotes around strings and returning the unquoted string "null" +** when given a NULL input. +*/ +static void jsonQuoteFunc( + sqlite3_context *ctx, + int argc, + sqlite3_value **argv +){ + JsonString jx; + UNUSED_PARAM(argc); + + jsonInit(&jx, ctx); + jsonAppendValue(&jx, argv[0]); + jsonResult(&jx); + sqlite3_result_subtype(ctx, JSON_SUBTYPE); +} + /* ** Implementation of the json_array(VALUE,...) function. Return a JSON ** array that contains all values given in arguments. Or if any argument @@ -176111,6 +177157,7 @@ SQLITE_PRIVATE int sqlite3Json1Init(sqlite3 *db){ { "json_extract", -1, 0, jsonExtractFunc }, { "json_insert", -1, 0, jsonSetFunc }, { "json_object", -1, 0, jsonObjectFunc }, + { "json_quote", 1, 0, jsonQuoteFunc }, { "json_remove", -1, 0, jsonRemoveFunc }, { "json_replace", -1, 0, jsonReplaceFunc }, { "json_set", -1, 1, jsonSetFunc }, @@ -176166,7 +177213,7 @@ SQLITE_PRIVATE int sqlite3Json1Init(sqlite3 *db){ #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_json_init( +SQLITE_API int sqlite3_json_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -176511,7 +177558,7 @@ struct Fts5ExtensionApi { ** behaviour. The structure methods are expected to function as follows: ** ** xCreate: -** This function is used to allocate and inititalize a tokenizer instance. +** This function is used to allocate and initialize a tokenizer instance. ** A tokenizer instance is required to actually tokenize text. ** ** The first argument passed to this function is a copy of the (void*) @@ -176771,7 +177818,6 @@ struct fts5_api { #endif /* _FTS5_H */ - /* ** 2014 May 31 ** @@ -177460,7 +178506,6 @@ static int sqlite3Fts5ExprPopulatePoslists( Fts5Config*, Fts5Expr*, Fts5PoslistPopulator*, int, const char*, int ); static void sqlite3Fts5ExprCheckPoslists(Fts5Expr*, i64); -static void sqlite3Fts5ExprClearEof(Fts5Expr*); static int sqlite3Fts5ExprClonePhrase(Fts5Expr*, int, Fts5Expr**); @@ -177876,9 +178921,9 @@ typedef struct fts5yyStackEntry fts5yyStackEntry; /* The state of the parser is completely contained in an instance of ** the following structure */ struct fts5yyParser { - int fts5yyidx; /* Index of top element in stack */ + fts5yyStackEntry *fts5yytos; /* Pointer to top element of the stack */ #ifdef fts5YYTRACKMAXSTACKDEPTH - int fts5yyidxMax; /* Maximum value of fts5yyidx */ + int fts5yyhwm; /* High-water mark of the stack */ #endif #ifndef fts5YYNOERRORRECOVERY int fts5yyerrcnt; /* Shifts left before out of the error */ @@ -177887,6 +178932,7 @@ struct fts5yyParser { #if fts5YYSTACKDEPTH<=0 int fts5yystksz; /* Current side of the stack */ fts5yyStackEntry *fts5yystack; /* The parser's stack */ + fts5yyStackEntry fts5yystk0; /* First stack entry */ #else fts5yyStackEntry fts5yystack[fts5YYSTACKDEPTH]; /* The parser's stack */ #endif @@ -177973,24 +179019,34 @@ static const char *const fts5yyRuleName[] = { #if fts5YYSTACKDEPTH<=0 /* -** Try to increase the size of the parser stack. +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. */ -static void fts5yyGrowStack(fts5yyParser *p){ +static int fts5yyGrowStack(fts5yyParser *p){ int newSize; + int idx; fts5yyStackEntry *pNew; newSize = p->fts5yystksz*2 + 100; - pNew = realloc(p->fts5yystack, newSize*sizeof(pNew[0])); + idx = p->fts5yytos ? (int)(p->fts5yytos - p->fts5yystack) : 0; + if( p->fts5yystack==&p->fts5yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->fts5yystk0; + }else{ + pNew = realloc(p->fts5yystack, newSize*sizeof(pNew[0])); + } if( pNew ){ p->fts5yystack = pNew; - p->fts5yystksz = newSize; + p->fts5yytos = &p->fts5yystack[idx]; #ifndef NDEBUG if( fts5yyTraceFILE ){ - fprintf(fts5yyTraceFILE,"%sStack grows to %d entries!\n", - fts5yyTracePrompt, p->fts5yystksz); + fprintf(fts5yyTraceFILE,"%sStack grows from %d to %d entries.\n", + fts5yyTracePrompt, p->fts5yystksz, newSize); } #endif + p->fts5yystksz = newSize; } + return pNew==0; } #endif @@ -178019,15 +179075,24 @@ static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(fts5YYMALLOCARGTYPE)){ fts5yyParser *pParser; pParser = (fts5yyParser*)(*mallocProc)( (fts5YYMALLOCARGTYPE)sizeof(fts5yyParser) ); if( pParser ){ - pParser->fts5yyidx = -1; #ifdef fts5YYTRACKMAXSTACKDEPTH - pParser->fts5yyidxMax = 0; + pParser->fts5yyhwm = 0; #endif #if fts5YYSTACKDEPTH<=0 + pParser->fts5yytos = NULL; pParser->fts5yystack = NULL; pParser->fts5yystksz = 0; - fts5yyGrowStack(pParser); + if( fts5yyGrowStack(pParser) ){ + pParser->fts5yystack = &pParser->fts5yystk0; + pParser->fts5yystksz = 1; + } #endif +#ifndef fts5YYNOERRORRECOVERY + pParser->fts5yyerrcnt = -1; +#endif + pParser->fts5yytos = pParser->fts5yystack; + pParser->fts5yystack[0].stateno = 0; + pParser->fts5yystack[0].major = 0; } return pParser; } @@ -178099,8 +179164,9 @@ static void fts5yy_destructor( */ static void fts5yy_pop_parser_stack(fts5yyParser *pParser){ fts5yyStackEntry *fts5yytos; - assert( pParser->fts5yyidx>=0 ); - fts5yytos = &pParser->fts5yystack[pParser->fts5yyidx--]; + assert( pParser->fts5yytos!=0 ); + assert( pParser->fts5yytos > pParser->fts5yystack ); + fts5yytos = pParser->fts5yytos--; #ifndef NDEBUG if( fts5yyTraceFILE ){ fprintf(fts5yyTraceFILE,"%sPopping %s\n", @@ -178127,9 +179193,9 @@ static void sqlite3Fts5ParserFree( #ifndef fts5YYPARSEFREENEVERNULL if( pParser==0 ) return; #endif - while( pParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(pParser); + while( pParser->fts5yytos>pParser->fts5yystack ) fts5yy_pop_parser_stack(pParser); #if fts5YYSTACKDEPTH<=0 - free(pParser->fts5yystack); + if( pParser->fts5yystack!=&pParser->fts5yystk0 ) free(pParser->fts5yystack); #endif (*freeProc)((void*)pParser); } @@ -178140,7 +179206,7 @@ static void sqlite3Fts5ParserFree( #ifdef fts5YYTRACKMAXSTACKDEPTH static int sqlite3Fts5ParserStackPeak(void *p){ fts5yyParser *pParser = (fts5yyParser*)p; - return pParser->fts5yyidxMax; + return pParser->fts5yyhwm; } #endif @@ -178153,7 +179219,7 @@ static unsigned int fts5yy_find_shift_action( fts5YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; - int stateno = pParser->fts5yystack[pParser->fts5yyidx].stateno; + int stateno = pParser->fts5yytos->stateno; if( stateno>=fts5YY_MIN_REDUCE ) return stateno; assert( stateno <= fts5YY_SHIFT_COUNT ); @@ -178246,13 +179312,13 @@ static int fts5yy_find_reduce_action( */ static void fts5yyStackOverflow(fts5yyParser *fts5yypParser){ sqlite3Fts5ParserARG_FETCH; - fts5yypParser->fts5yyidx--; + fts5yypParser->fts5yytos--; #ifndef NDEBUG if( fts5yyTraceFILE ){ fprintf(fts5yyTraceFILE,"%sStack Overflow!\n",fts5yyTracePrompt); } #endif - while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser); + while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ @@ -178270,11 +179336,11 @@ static void fts5yyTraceShift(fts5yyParser *fts5yypParser, int fts5yyNewState){ if( fts5yyTraceFILE ){ if( fts5yyNewStatefts5yystack[fts5yypParser->fts5yyidx].major], + fts5yyTracePrompt,fts5yyTokenName[fts5yypParser->fts5yytos->major], fts5yyNewState); }else{ fprintf(fts5yyTraceFILE,"%sShift '%s'\n", - fts5yyTracePrompt,fts5yyTokenName[fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx].major]); + fts5yyTracePrompt,fts5yyTokenName[fts5yypParser->fts5yytos->major]); } } } @@ -178292,27 +179358,30 @@ static void fts5yy_shift( sqlite3Fts5ParserFTS5TOKENTYPE fts5yyMinor /* The minor token to shift in */ ){ fts5yyStackEntry *fts5yytos; - fts5yypParser->fts5yyidx++; + fts5yypParser->fts5yytos++; #ifdef fts5YYTRACKMAXSTACKDEPTH - if( fts5yypParser->fts5yyidx>fts5yypParser->fts5yyidxMax ){ - fts5yypParser->fts5yyidxMax = fts5yypParser->fts5yyidx; + if( (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack)>fts5yypParser->fts5yyhwm ){ + fts5yypParser->fts5yyhwm++; + assert( fts5yypParser->fts5yyhwm == (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack) ); } #endif #if fts5YYSTACKDEPTH>0 - if( fts5yypParser->fts5yyidx>=fts5YYSTACKDEPTH ){ + if( fts5yypParser->fts5yytos>=&fts5yypParser->fts5yystack[fts5YYSTACKDEPTH] ){ fts5yyStackOverflow(fts5yypParser); return; } #else - if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz ){ - fts5yyGrowStack(fts5yypParser); - if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz ){ + if( fts5yypParser->fts5yytos>=&fts5yypParser->fts5yystack[fts5yypParser->fts5yystksz] ){ + if( fts5yyGrowStack(fts5yypParser) ){ fts5yyStackOverflow(fts5yypParser); return; } } #endif - fts5yytos = &fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx]; + if( fts5yyNewState > fts5YY_MAX_SHIFT ){ + fts5yyNewState += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE; + } + fts5yytos = fts5yypParser->fts5yytos; fts5yytos->stateno = (fts5YYACTIONTYPE)fts5yyNewState; fts5yytos->major = (fts5YYCODETYPE)fts5yyMajor; fts5yytos->minor.fts5yy0 = fts5yyMinor; @@ -178367,7 +179436,7 @@ static void fts5yy_reduce( fts5yyStackEntry *fts5yymsp; /* The top of the parser's stack */ int fts5yysize; /* Amount to pop the stack */ sqlite3Fts5ParserARG_FETCH; - fts5yymsp = &fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx]; + fts5yymsp = fts5yypParser->fts5yytos; #ifndef NDEBUG if( fts5yyTraceFILE && fts5yyruleno<(int)(sizeof(fts5yyRuleName)/sizeof(fts5yyRuleName[0])) ){ fts5yysize = fts5yyRuleInfo[fts5yyruleno].nrhs; @@ -178381,22 +179450,23 @@ static void fts5yy_reduce( ** enough on the stack to push the LHS value */ if( fts5yyRuleInfo[fts5yyruleno].nrhs==0 ){ #ifdef fts5YYTRACKMAXSTACKDEPTH - if( fts5yypParser->fts5yyidx>fts5yypParser->fts5yyidxMax ){ - fts5yypParser->fts5yyidxMax = fts5yypParser->fts5yyidx; + if( (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack)>fts5yypParser->fts5yyhwm ){ + fts5yypParser->fts5yyhwm++; + assert( fts5yypParser->fts5yyhwm == (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack)); } #endif #if fts5YYSTACKDEPTH>0 - if( fts5yypParser->fts5yyidx>=fts5YYSTACKDEPTH-1 ){ + if( fts5yypParser->fts5yytos>=&fts5yypParser->fts5yystack[fts5YYSTACKDEPTH-1] ){ fts5yyStackOverflow(fts5yypParser); return; } #else - if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz-1 ){ - fts5yyGrowStack(fts5yypParser); - if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz-1 ){ + if( fts5yypParser->fts5yytos>=&fts5yypParser->fts5yystack[fts5yypParser->fts5yystksz-1] ){ + if( fts5yyGrowStack(fts5yypParser) ){ fts5yyStackOverflow(fts5yypParser); return; } + fts5yymsp = fts5yypParser->fts5yytos; } #endif } @@ -178537,15 +179607,17 @@ static void fts5yy_reduce( fts5yysize = fts5yyRuleInfo[fts5yyruleno].nrhs; fts5yyact = fts5yy_find_reduce_action(fts5yymsp[-fts5yysize].stateno,(fts5YYCODETYPE)fts5yygoto); if( fts5yyact <= fts5YY_MAX_SHIFTREDUCE ){ - if( fts5yyact>fts5YY_MAX_SHIFT ) fts5yyact += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE; - fts5yypParser->fts5yyidx -= fts5yysize - 1; + if( fts5yyact>fts5YY_MAX_SHIFT ){ + fts5yyact += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE; + } fts5yymsp -= fts5yysize-1; + fts5yypParser->fts5yytos = fts5yymsp; fts5yymsp->stateno = (fts5YYACTIONTYPE)fts5yyact; fts5yymsp->major = (fts5YYCODETYPE)fts5yygoto; fts5yyTraceShift(fts5yypParser, fts5yyact); }else{ assert( fts5yyact == fts5YY_ACCEPT_ACTION ); - fts5yypParser->fts5yyidx -= fts5yysize; + fts5yypParser->fts5yytos -= fts5yysize; fts5yy_accept(fts5yypParser); } } @@ -178563,7 +179635,7 @@ static void fts5yy_parse_failed( fprintf(fts5yyTraceFILE,"%sFail!\n",fts5yyTracePrompt); } #endif - while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser); + while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser); /* Here code is inserted which will be executed whenever the ** parser fails */ /************ Begin %parse_failure code ***************************************/ @@ -178604,7 +179676,10 @@ static void fts5yy_accept( fprintf(fts5yyTraceFILE,"%sAccept!\n",fts5yyTracePrompt); } #endif - while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser); +#ifndef fts5YYNOERRORRECOVERY + fts5yypParser->fts5yyerrcnt = -1; +#endif + assert( fts5yypParser->fts5yytos==fts5yypParser->fts5yystack ); /* Here code is inserted which will be executed whenever the ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ @@ -178647,28 +179722,8 @@ static void sqlite3Fts5Parser( #endif fts5yyParser *fts5yypParser; /* The parser */ - /* (re)initialize the parser, if necessary */ fts5yypParser = (fts5yyParser*)fts5yyp; - if( fts5yypParser->fts5yyidx<0 ){ -#if fts5YYSTACKDEPTH<=0 - if( fts5yypParser->fts5yystksz <=0 ){ - fts5yyStackOverflow(fts5yypParser); - return; - } -#endif - fts5yypParser->fts5yyidx = 0; -#ifndef fts5YYNOERRORRECOVERY - fts5yypParser->fts5yyerrcnt = -1; -#endif - fts5yypParser->fts5yystack[0].stateno = 0; - fts5yypParser->fts5yystack[0].major = 0; -#ifndef NDEBUG - if( fts5yyTraceFILE ){ - fprintf(fts5yyTraceFILE,"%sInitialize. Empty stack. State 0\n", - fts5yyTracePrompt); - } -#endif - } + assert( fts5yypParser->fts5yytos!=0 ); #if !defined(fts5YYERRORSYMBOL) && !defined(fts5YYNOERRORRECOVERY) fts5yyendofinput = (fts5yymajor==0); #endif @@ -178683,7 +179738,6 @@ static void sqlite3Fts5Parser( do{ fts5yyact = fts5yy_find_shift_action(fts5yypParser,(fts5YYCODETYPE)fts5yymajor); if( fts5yyact <= fts5YY_MAX_SHIFTREDUCE ){ - if( fts5yyact > fts5YY_MAX_SHIFT ) fts5yyact += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE; fts5yy_shift(fts5yypParser,fts5yyact,fts5yymajor,fts5yyminor); #ifndef fts5YYNOERRORRECOVERY fts5yypParser->fts5yyerrcnt--; @@ -178725,7 +179779,7 @@ static void sqlite3Fts5Parser( if( fts5yypParser->fts5yyerrcnt<0 ){ fts5yy_syntax_error(fts5yypParser,fts5yymajor,fts5yyminor); } - fts5yymx = fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx].major; + fts5yymx = fts5yypParser->fts5yytos->major; if( fts5yymx==fts5YYERRORSYMBOL || fts5yyerrorhit ){ #ifndef NDEBUG if( fts5yyTraceFILE ){ @@ -178736,18 +179790,20 @@ static void sqlite3Fts5Parser( fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion); fts5yymajor = fts5YYNOCODE; }else{ - while( - fts5yypParser->fts5yyidx >= 0 && - fts5yymx != fts5YYERRORSYMBOL && - (fts5yyact = fts5yy_find_reduce_action( - fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx].stateno, + while( fts5yypParser->fts5yytos >= &fts5yypParser->fts5yystack + && fts5yymx != fts5YYERRORSYMBOL + && (fts5yyact = fts5yy_find_reduce_action( + fts5yypParser->fts5yytos->stateno, fts5YYERRORSYMBOL)) >= fts5YY_MIN_REDUCE ){ fts5yy_pop_parser_stack(fts5yypParser); } - if( fts5yypParser->fts5yyidx < 0 || fts5yymajor==0 ){ + if( fts5yypParser->fts5yytos < fts5yypParser->fts5yystack || fts5yymajor==0 ){ fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion); fts5yy_parse_failed(fts5yypParser); +#ifndef fts5YYNOERRORRECOVERY + fts5yypParser->fts5yyerrcnt = -1; +#endif fts5yymajor = fts5YYNOCODE; }else if( fts5yymx!=fts5YYERRORSYMBOL ){ fts5yy_shift(fts5yypParser,fts5yyact,fts5YYERRORSYMBOL,fts5yyminor); @@ -178784,18 +179840,23 @@ static void sqlite3Fts5Parser( fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion); if( fts5yyendofinput ){ fts5yy_parse_failed(fts5yypParser); +#ifndef fts5YYNOERRORRECOVERY + fts5yypParser->fts5yyerrcnt = -1; +#endif } fts5yymajor = fts5YYNOCODE; #endif } - }while( fts5yymajor!=fts5YYNOCODE && fts5yypParser->fts5yyidx>=0 ); + }while( fts5yymajor!=fts5YYNOCODE && fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ); #ifndef NDEBUG if( fts5yyTraceFILE ){ - int i; + fts5yyStackEntry *i; + char cDiv = '['; fprintf(fts5yyTraceFILE,"%sReturn. Stack=",fts5yyTracePrompt); - for(i=1; i<=fts5yypParser->fts5yyidx; i++) - fprintf(fts5yyTraceFILE,"%c%s", i==1 ? '[' : ' ', - fts5yyTokenName[fts5yypParser->fts5yystack[i].major]); + for(i=&fts5yypParser->fts5yystack[1]; i<=fts5yypParser->fts5yytos; i++){ + fprintf(fts5yyTraceFILE,"%c%s", cDiv, fts5yyTokenName[i->major]); + cDiv = ' '; + } fprintf(fts5yyTraceFILE,"]\n"); } #endif @@ -183339,17 +184400,6 @@ static void sqlite3Fts5ExprCheckPoslists(Fts5Expr *pExpr, i64 iRowid){ fts5ExprCheckPoslists(pExpr->pRoot, iRowid); } -static void fts5ExprClearEof(Fts5ExprNode *pNode){ - int i; - for(i=0; inChild; i++){ - fts5ExprClearEof(pNode->apChild[i]); - } - pNode->bEof = 0; -} -static void sqlite3Fts5ExprClearEof(Fts5Expr *pExpr){ - fts5ExprClearEof(pExpr->pRoot); -} - /* ** This function is only called for detail=columns tables. */ @@ -191567,7 +192617,6 @@ static int fts5FilterMethod( pCsr->ePlan = FTS5_PLAN_SOURCE; pCsr->pExpr = pTab->pSortCsr->pExpr; rc = fts5CursorFirst(pTab, pCsr, bDesc); - sqlite3Fts5ExprClearEof(pCsr->pExpr); }else if( pMatch ){ const char *zExpr = (const char*)sqlite3_value_text(apVal[0]); if( zExpr==0 ) zExpr = ""; @@ -192996,7 +194045,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6", -1, SQLITE_TRANSIENT); } static int fts5Init(sqlite3 *db){ @@ -193084,7 +194133,7 @@ static int fts5Init(sqlite3 *db){ #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( +SQLITE_API int sqlite3_fts_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -193097,7 +194146,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( #ifdef _WIN32 __declspec(dllexport) #endif -SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( +SQLITE_API int sqlite3_fts5_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi @@ -193361,7 +194410,11 @@ static int sqlite3Fts5CreateTable( char *zErr = 0; rc = fts5ExecPrintf(pConfig->db, &zErr, "CREATE TABLE %Q.'%q_%q'(%s)%s", - pConfig->zDb, pConfig->zName, zPost, zDefn, bWithout?" WITHOUT ROWID":"" + pConfig->zDb, pConfig->zName, zPost, zDefn, +#ifndef SQLITE_FTS5_NO_WITHOUT_ROWID + bWithout?" WITHOUT ROWID": +#endif + "" ); if( zErr ){ *pzErr = sqlite3_mprintf( diff --git a/src/3rdparty/sqlite3/sqlite3.h b/src/3rdparty/sqlite3/sqlite3.h index 313b5ec3c..cfbba628e 100644 --- a/src/3rdparty/sqlite3/sqlite3.h +++ b/src/3rdparty/sqlite3/sqlite3.h @@ -30,8 +30,8 @@ ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. */ -#ifndef _SQLITE3_H_ -#define _SQLITE3_H_ +#ifndef SQLITE3_H +#define SQLITE3_H #include /* Needed for the definition of va_list */ /* @@ -54,8 +54,17 @@ extern "C" { #ifndef SQLITE_CDECL # define SQLITE_CDECL #endif +#ifndef SQLITE_APICALL +# define SQLITE_APICALL +#endif #ifndef SQLITE_STDCALL -# define SQLITE_STDCALL +# define SQLITE_STDCALL SQLITE_APICALL +#endif +#ifndef SQLITE_CALLBACK +# define SQLITE_CALLBACK +#endif +#ifndef SQLITE_SYSAPI +# define SQLITE_SYSAPI #endif /* @@ -111,9 +120,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.13.0" -#define SQLITE_VERSION_NUMBER 3013000 -#define SQLITE_SOURCE_ID "2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2" +#define SQLITE_VERSION "3.14.2" +#define SQLITE_VERSION_NUMBER 3014002 +#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -146,9 +155,9 @@ extern "C" { ** See also: [sqlite_version()] and [sqlite_source_id()]. */ SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); -SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); -SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); +SQLITE_API const char *sqlite3_libversion(void); +SQLITE_API const char *sqlite3_sourceid(void); +SQLITE_API int sqlite3_libversion_number(void); /* ** CAPI3REF: Run-Time Library Compilation Options Diagnostics @@ -173,8 +182,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); ** [sqlite_compileoption_get()] and the [compile_options pragma]. */ #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); +SQLITE_API const char *sqlite3_compileoption_get(int N); #endif /* @@ -213,7 +222,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); ** ** See the [threading mode] documentation for additional information. */ -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); +SQLITE_API int sqlite3_threadsafe(void); /* ** CAPI3REF: Database Connection Handle @@ -310,8 +319,8 @@ typedef sqlite_uint64 sqlite3_uint64; ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer ** argument is a harmless no-op. */ -SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); -SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); +SQLITE_API int sqlite3_close(sqlite3*); +SQLITE_API int sqlite3_close_v2(sqlite3*); /* ** The type for a callback function. @@ -382,7 +391,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. ** */ -SQLITE_API int SQLITE_STDCALL sqlite3_exec( +SQLITE_API int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluated */ int (*callback)(void*,int,char**,char**), /* Callback function */ @@ -506,6 +515,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec( #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) +#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) /* ** CAPI3REF: Flags For File Open Operations @@ -1035,6 +1045,16 @@ struct sqlite3_io_methods { */ typedef struct sqlite3_mutex sqlite3_mutex; +/* +** CAPI3REF: Loadable Extension Thunk +** +** A pointer to the opaque sqlite3_api_routines structure is passed as +** the third parameter to entry points of [loadable extensions]. This +** structure must be typedefed in order to work around compiler warnings +** on some platforms. +*/ +typedef struct sqlite3_api_routines sqlite3_api_routines; + /* ** CAPI3REF: OS Interface Object ** @@ -1370,10 +1390,10 @@ struct sqlite3_vfs { ** must return [SQLITE_OK] on success and some other [error code] upon ** failure. */ -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); +SQLITE_API int sqlite3_initialize(void); +SQLITE_API int sqlite3_shutdown(void); +SQLITE_API int sqlite3_os_init(void); +SQLITE_API int sqlite3_os_end(void); /* ** CAPI3REF: Configuring The SQLite Library @@ -1406,7 +1426,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); ** ^If the option is unknown or SQLite is unable to set the option ** then this routine returns a non-zero [error code]. */ -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); +SQLITE_API int sqlite3_config(int, ...); /* ** CAPI3REF: Configure database connections @@ -1425,7 +1445,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if ** the call is considered successful. */ -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); /* ** CAPI3REF: Memory Allocation Routines @@ -1939,7 +1959,7 @@ struct sqlite3_mem_methods { ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. ** There should be two additional arguments. ** When the first argument to this interface is 1, then only the C-API is -** enabled and the SQL function remains disabled. If the first argment to +** enabled and the SQL function remains disabled. If the first argument to ** this interface is 0, then both the C-API and the SQL function are disabled. ** If the first argument is -1, then no changes are made to state of either the ** C-API or the SQL function. @@ -1966,7 +1986,7 @@ struct sqlite3_mem_methods { ** [extended result codes] feature of SQLite. ^The extended result ** codes are disabled by default for historical compatibility. */ -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); /* ** CAPI3REF: Last Insert Rowid @@ -2018,7 +2038,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff) ** unpredictable and might not equal either the old or the new ** last insert [rowid]. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); /* ** CAPI3REF: Count The Number Of Rows Modified @@ -2071,7 +2091,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); ** while [sqlite3_changes()] is running then the value returned ** is unpredictable and not meaningful. */ -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); +SQLITE_API int sqlite3_changes(sqlite3*); /* ** CAPI3REF: Total Number Of Rows Modified @@ -2095,7 +2115,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); ** while [sqlite3_total_changes()] is running then the value ** returned is unpredictable and not meaningful. */ -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); +SQLITE_API int sqlite3_total_changes(sqlite3*); /* ** CAPI3REF: Interrupt A Long-Running Query @@ -2135,7 +2155,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); ** If the database connection closes while [sqlite3_interrupt()] ** is running then bad things will likely happen. */ -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); +SQLITE_API void sqlite3_interrupt(sqlite3*); /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -2170,8 +2190,8 @@ SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); ** The input to [sqlite3_complete16()] must be a zero-terminated ** UTF-16 string in native byte order. */ -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); +SQLITE_API int sqlite3_complete(const char *sql); +SQLITE_API int sqlite3_complete16(const void *sql); /* ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors @@ -2232,7 +2252,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); ** A busy handler must not close the database connection ** or [prepared statement] that invoked the busy handler. */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); +SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); /* ** CAPI3REF: Set A Busy Timeout @@ -2255,7 +2275,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), ** ** See also: [PRAGMA busy_timeout] */ -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); /* ** CAPI3REF: Convenience Routines For Running Queries @@ -2330,7 +2350,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); ** reflected in subsequent calls to [sqlite3_errcode()] or ** [sqlite3_errmsg()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( +SQLITE_API int sqlite3_get_table( sqlite3 *db, /* An open database */ const char *zSql, /* SQL to be evaluated */ char ***pazResult, /* Results of the query */ @@ -2338,7 +2358,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_table( int *pnColumn, /* Number of result columns written here */ char **pzErrmsg /* Error msg written here */ ); -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); +SQLITE_API void sqlite3_free_table(char **result); /* ** CAPI3REF: Formatted String Printing Functions @@ -2444,10 +2464,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); ** addition that after the string has been read and copied into ** the result, [sqlite3_free()] is called on the input string.)^ */ -SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); -SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); -SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); +SQLITE_API char *sqlite3_mprintf(const char*,...); +SQLITE_API char *sqlite3_vmprintf(const char*, va_list); +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); +SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); /* ** CAPI3REF: Memory Allocation Subsystem @@ -2537,12 +2557,12 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list ** a block of memory after it has been released using ** [sqlite3_free()] or [sqlite3_realloc()]. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); -SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); +SQLITE_API void *sqlite3_malloc(int); +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64); +SQLITE_API void *sqlite3_realloc(void*, int); +SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64); +SQLITE_API void sqlite3_free(void*); +SQLITE_API sqlite3_uint64 sqlite3_msize(void*); /* ** CAPI3REF: Memory Allocator Statistics @@ -2567,8 +2587,8 @@ SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); ** by [sqlite3_memory_highwater(1)] is the high-water mark ** prior to the reset. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); +SQLITE_API sqlite3_int64 sqlite3_memory_used(void); +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); /* ** CAPI3REF: Pseudo-Random Number Generator @@ -2591,7 +2611,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); ** internally and without recourse to the [sqlite3_vfs] xRandomness ** method. */ -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); +SQLITE_API void sqlite3_randomness(int N, void *P); /* ** CAPI3REF: Compile-Time Authorization Callbacks @@ -2674,7 +2694,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); ** as stated in the previous paragraph, sqlite3_step() invokes ** sqlite3_prepare_v2() to reprepare a statement after a schema change. */ -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( +SQLITE_API int sqlite3_set_authorizer( sqlite3*, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pUserData @@ -2754,6 +2774,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( ** CAPI3REF: Tracing And Profiling Functions ** METHOD: sqlite3 ** +** These routines are deprecated. Use the [sqlite3_trace_v2()] interface +** instead of the routines described here. +** ** These routines register callback functions that can be used for ** tracing and profiling the execution of SQL statements. ** @@ -2779,10 +2802,104 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( ** sqlite3_profile() function is considered experimental and is ** subject to change in future versions of SQLite. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*, +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, + void(*xTrace)(void*,const char*), void*); +SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, void(*xProfile)(void*,const char*,sqlite3_uint64), void*); +/* +** CAPI3REF: SQL Trace Event Codes +** KEYWORDS: SQLITE_TRACE +** +** These constants identify classes of events that can be monitored +** using the [sqlite3_trace_v2()] tracing logic. The third argument +** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of +** the following constants. ^The first argument to the trace callback +** is one of the following constants. +** +** New tracing constants may be added in future releases. +** +** ^A trace callback has four arguments: xCallback(T,C,P,X). +** ^The T argument is one of the integer type codes above. +** ^The C argument is a copy of the context pointer passed in as the +** fourth argument to [sqlite3_trace_v2()]. +** The P and X arguments are pointers whose meanings depend on T. +** +**
    +** [[SQLITE_TRACE_STMT]]
    SQLITE_TRACE_STMT
    +**
    ^An SQLITE_TRACE_STMT callback is invoked when a prepared statement +** first begins running and possibly at other times during the +** execution of the prepared statement, such as at the start of each +** trigger subprogram. ^The P argument is a pointer to the +** [prepared statement]. ^The X argument is a pointer to a string which +** is the unexpanded SQL text of the prepared statement or an SQL comment +** that indicates the invocation of a trigger. ^The callback can compute +** the same text that would have been returned by the legacy [sqlite3_trace()] +** interface by using the X argument when X begins with "--" and invoking +** [sqlite3_expanded_sql(P)] otherwise. +** +** [[SQLITE_TRACE_PROFILE]]
    SQLITE_TRACE_PROFILE
    +**
    ^An SQLITE_TRACE_PROFILE callback provides approximately the same +** information as is provided by the [sqlite3_profile()] callback. +** ^The P argument is a pointer to the [prepared statement] and the +** X argument points to a 64-bit integer which is the estimated of +** the number of nanosecond that the prepared statement took to run. +** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. +** +** [[SQLITE_TRACE_ROW]]
    SQLITE_TRACE_ROW
    +**
    ^An SQLITE_TRACE_ROW callback is invoked whenever a prepared +** statement generates a single row of result. +** ^The P argument is a pointer to the [prepared statement] and the +** X argument is unused. +** +** [[SQLITE_TRACE_CLOSE]]
    SQLITE_TRACE_CLOSE
    +**
    ^An SQLITE_TRACE_CLOSE callback is invoked when a database +** connection closes. +** ^The P argument is a pointer to the [database connection] object +** and the X argument is unused. +**
    +*/ +#define SQLITE_TRACE_STMT 0x01 +#define SQLITE_TRACE_PROFILE 0x02 +#define SQLITE_TRACE_ROW 0x04 +#define SQLITE_TRACE_CLOSE 0x08 + +/* +** CAPI3REF: SQL Trace Hook +** METHOD: sqlite3 +** +** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback +** function X against [database connection] D, using property mask M +** and context pointer P. ^If the X callback is +** NULL or if the M mask is zero, then tracing is disabled. The +** M argument should be the bitwise OR-ed combination of +** zero or more [SQLITE_TRACE] constants. +** +** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides +** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). +** +** ^The X callback is invoked whenever any of the events identified by +** mask M occur. ^The integer return value from the callback is currently +** ignored, though this may change in future releases. Callback +** implementations should return zero to ensure future compatibility. +** +** ^A trace callback is invoked with four arguments: callback(T,C,P,X). +** ^The T argument is one of the [SQLITE_TRACE] +** constants to indicate why the callback was invoked. +** ^The C argument is a copy of the context pointer. +** The P and X arguments are pointers whose meanings depend on T. +** +** The sqlite3_trace_v2() interface is intended to replace the legacy +** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which +** are deprecated. +*/ +SQLITE_API int sqlite3_trace_v2( + sqlite3*, + unsigned uMask, + int(*xCallback)(unsigned,void*,void*,void*), + void *pCtx +); + /* ** CAPI3REF: Query Progress Callbacks ** METHOD: sqlite3 @@ -2815,7 +2932,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*, ** database connections for the meaning of "modify" in this paragraph. ** */ -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); +SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); /* ** CAPI3REF: Opening A New Database Connection @@ -3044,15 +3161,15 @@ SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(vo ** ** See also: [sqlite3_temp_directory] */ -SQLITE_API int SQLITE_STDCALL sqlite3_open( +SQLITE_API int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_open16( +SQLITE_API int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( +SQLITE_API int sqlite3_open_v2( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb, /* OUT: SQLite db handle */ int flags, /* Flags */ @@ -3098,9 +3215,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( ** VFS method, then the behavior of this routine is undefined and probably ** undesirable. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); -SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); +SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); +SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); +SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); /* @@ -3144,11 +3261,11 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const cha ** was invoked incorrectly by the application. In that case, the ** error code and message may or may not be set. */ -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); +SQLITE_API int sqlite3_errcode(sqlite3 *db); +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); +SQLITE_API const char *sqlite3_errmsg(sqlite3*); +SQLITE_API const void *sqlite3_errmsg16(sqlite3*); +SQLITE_API const char *sqlite3_errstr(int); /* ** CAPI3REF: Prepared Statement Object @@ -3216,7 +3333,7 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** ** New run-time limit categories may be added in future releases. */ -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); /* ** CAPI3REF: Run-Time Limit Categories @@ -3368,28 +3485,28 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); **
  • ** */ -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( +SQLITE_API int sqlite3_prepare( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( +SQLITE_API int sqlite3_prepare_v2( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( +SQLITE_API int sqlite3_prepare16( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const void **pzTail /* OUT: Pointer to unused portion of zSql */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( +SQLITE_API int sqlite3_prepare16_v2( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ @@ -3401,11 +3518,35 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( ** CAPI3REF: Retrieving Statement SQL ** METHOD: sqlite3_stmt ** -** ^This interface can be used to retrieve a saved copy of the original -** SQL text used to create a [prepared statement] if that statement was -** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. +** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8 +** SQL text used to create [prepared statement] P if P was +** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. +** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 +** string containing the SQL text of prepared statement P with +** [bound parameters] expanded. +** +** ^(For example, if a prepared statement is created using the SQL +** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 +** and parameter :xyz is unbound, then sqlite3_sql() will return +** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql() +** will return "SELECT 2345,NULL".)^ +** +** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory +** is available to hold the result, or if the result would exceed the +** the maximum string length determined by the [SQLITE_LIMIT_LENGTH]. +** +** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of +** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time +** option causes sqlite3_expanded_sql() to always return NULL. +** +** ^The string returned by sqlite3_sql(P) is managed by SQLite and is +** automatically freed when the prepared statement is finalized. +** ^The string returned by sqlite3_expanded_sql(P), on the other hand, +** is obtained from [sqlite3_malloc()] and must be free by the application +** by passing it to [sqlite3_free()]. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); /* ** CAPI3REF: Determine If An SQL Statement Writes The Database @@ -3437,7 +3578,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); ** change the configuration of a database connection, they do not make ** changes to the content of the database files on disk. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset @@ -3458,7 +3599,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); ** for example, in diagnostic routines to search for prepared ** statements that are holding a transaction open. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); /* ** CAPI3REF: Dynamically Typed Value Object @@ -3622,20 +3763,20 @@ typedef struct sqlite3_context sqlite3_context; ** See also: [sqlite3_bind_parameter_count()], ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, +SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); +SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, +SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); +SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); +SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); +SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); +SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, void(*)(void*), unsigned char encoding); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); +SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); +SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); /* ** CAPI3REF: Number Of SQL Parameters @@ -3656,7 +3797,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite ** [sqlite3_bind_parameter_name()], and ** [sqlite3_bind_parameter_index()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); /* ** CAPI3REF: Name Of A Host Parameter @@ -3684,7 +3825,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_index()]. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); /* ** CAPI3REF: Index Of A Parameter With A Given Name @@ -3701,7 +3842,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_name()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); /* ** CAPI3REF: Reset All Bindings On A Prepared Statement @@ -3711,7 +3852,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. ** ^Use this routine to reset all host parameters to NULL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); /* ** CAPI3REF: Number Of Columns In A Result Set @@ -3723,7 +3864,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); ** ** See also: [sqlite3_data_count()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Column Names In A Result Set @@ -3752,8 +3893,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); ** then the name of the column is unspecified and may change from ** one release of SQLite to the next. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); /* ** CAPI3REF: Source Of Data In A Query Result @@ -3801,12 +3942,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N ** for the same [prepared statement] and result column ** at the same time then the results are undefined. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); /* ** CAPI3REF: Declared Datatype Of A Query Result @@ -3838,8 +3979,8 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt* ** is associated with individual values, not with the containers ** used to hold those values. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); /* ** CAPI3REF: Evaluate An SQL Statement @@ -3919,7 +4060,7 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,in ** then the more specific [error codes] are returned directly ** by sqlite3_step(). The use of the "v2" interface is recommended. */ -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); +SQLITE_API int sqlite3_step(sqlite3_stmt*); /* ** CAPI3REF: Number of columns in a result set @@ -3940,7 +4081,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); ** ** See also: [sqlite3_column_count()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Fundamental Datatypes @@ -4130,16 +4271,16 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); ** pointer. Subsequent calls to [sqlite3_errcode()] will return ** [SQLITE_NOMEM].)^ */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); +SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); /* ** CAPI3REF: Destroy A Prepared Statement Object @@ -4167,7 +4308,7 @@ SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int ** statement after it has been finalized can result in undefined and ** undesirable behavior such as segfaults and heap corruption. */ -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); /* ** CAPI3REF: Reset A Prepared Statement Object @@ -4194,7 +4335,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); ** ^The [sqlite3_reset(S)] interface does not change the values ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. */ -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); /* ** CAPI3REF: Create Or Redefine SQL Functions @@ -4294,7 +4435,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); ** close the database connection nor finalize or reset the prepared ** statement in which the function is running. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( +SQLITE_API int sqlite3_create_function( sqlite3 *db, const char *zFunctionName, int nArg, @@ -4304,7 +4445,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function( void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( +SQLITE_API int sqlite3_create_function16( sqlite3 *db, const void *zFunctionName, int nArg, @@ -4314,7 +4455,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( +SQLITE_API int sqlite3_create_function_v2( sqlite3 *db, const char *zFunctionName, int nArg, @@ -4360,12 +4501,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( ** these functions, we will not explain what they do. */ #ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), +SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); +SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); +SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), void*,sqlite3_int64); #endif @@ -4415,18 +4556,18 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi ** These routines must be called from the same thread as ** the SQL function that supplied the [sqlite3_value*] parameters. */ -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); +SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); +SQLITE_API double sqlite3_value_double(sqlite3_value*); +SQLITE_API int sqlite3_value_int(sqlite3_value*); +SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); +SQLITE_API int sqlite3_value_type(sqlite3_value*); +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); /* ** CAPI3REF: Finding The Subtype Of SQL Values @@ -4442,7 +4583,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); ** from the result of one [application-defined SQL function] into the ** input of another. */ -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); /* ** CAPI3REF: Copy And Free SQL Values @@ -4458,8 +4599,8 @@ SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer ** then sqlite3_value_free(V) is a harmless no-op. */ -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); +SQLITE_API void sqlite3_value_free(sqlite3_value*); /* ** CAPI3REF: Obtain Aggregate Function Context @@ -4504,7 +4645,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); ** This routine must be called from the same thread in which ** the aggregate SQL function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); /* ** CAPI3REF: User Data For Functions @@ -4519,7 +4660,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int ** This routine must be called from the same thread in which ** the application-defined function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); +SQLITE_API void *sqlite3_user_data(sqlite3_context*); /* ** CAPI3REF: Database Connection For Functions @@ -4531,7 +4672,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); ** and [sqlite3_create_function16()] routines that originally ** registered the application defined function. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); /* ** CAPI3REF: Function Auxiliary Data @@ -4563,12 +4704,13 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); ** SQLite will invoke the destructor function X with parameter P exactly ** once, when the metadata is discarded. ** SQLite is free to discard the metadata at any time, including:
      -**
    • when the corresponding function parameter changes, or -**
    • when [sqlite3_reset()] or [sqlite3_finalize()] is called for the -** SQL statement, or -**
    • when sqlite3_set_auxdata() is invoked again on the same parameter, or -**
    • during the original sqlite3_set_auxdata() call when a memory -** allocation error occurs.
    )^ +**
  • ^(when the corresponding function parameter changes)^, or +**
  • ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the +** SQL statement)^, or +**
  • ^(when sqlite3_set_auxdata() is invoked again on the same +** parameter)^, or +**
  • ^(during the original sqlite3_set_auxdata() call when a memory +** allocation error occurs.)^ ** ** Note the last bullet in particular. The destructor X in ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the @@ -4584,8 +4726,8 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); ** These routines must be called from the same thread in which ** the SQL function is running. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); +SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); /* @@ -4721,27 +4863,27 @@ typedef void (*sqlite3_destructor_type)(void*); ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, +SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*, sqlite3_uint64,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, +SQLITE_API void sqlite3_result_double(sqlite3_context*, double); +SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); +SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); +SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); +SQLITE_API void sqlite3_result_null(sqlite3_context*); +SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, void(*)(void*), unsigned char encoding); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); -SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); +SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); +SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); /* @@ -4756,7 +4898,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite ** The number of subtype bytes preserved by SQLite might increase ** in future releases of SQLite. */ -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); /* ** CAPI3REF: Define New Collating Sequences @@ -4838,14 +4980,14 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned ** ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( +SQLITE_API int sqlite3_create_collation( sqlite3*, const char *zName, int eTextRep, void *pArg, int(*xCompare)(void*,int,const void*,int,const void*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( +SQLITE_API int sqlite3_create_collation_v2( sqlite3*, const char *zName, int eTextRep, @@ -4853,7 +4995,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( int(*xCompare)(void*,int,const void*,int,const void*), void(*xDestroy)(void*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( +SQLITE_API int sqlite3_create_collation16( sqlite3*, const void *zName, int eTextRep, @@ -4888,12 +5030,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or ** [sqlite3_create_collation_v2()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( +SQLITE_API int sqlite3_collation_needed( sqlite3*, void*, void(*)(void*,sqlite3*,int eTextRep,const char*) ); -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( +SQLITE_API int sqlite3_collation_needed16( sqlite3*, void*, void(*)(void*,sqlite3*,int eTextRep,const void*) @@ -4907,11 +5049,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( ** The code to implement this API is not available in the public release ** of SQLite. */ -SQLITE_API int SQLITE_STDCALL sqlite3_key( +SQLITE_API int sqlite3_key( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The key */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( +SQLITE_API int sqlite3_key_v2( sqlite3 *db, /* Database to be rekeyed */ const char *zDbName, /* Name of the database */ const void *pKey, int nKey /* The key */ @@ -4925,11 +5067,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( ** The code to implement this API is not available in the public release ** of SQLite. */ -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( +SQLITE_API int sqlite3_rekey( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( +SQLITE_API int sqlite3_rekey_v2( sqlite3 *db, /* Database to be rekeyed */ const char *zDbName, /* Name of the database */ const void *pKey, int nKey /* The new key */ @@ -4939,7 +5081,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( ** Specify the activation key for a SEE database. Unless ** activated, none of the SEE routines will work. */ -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( +SQLITE_API void sqlite3_activate_see( const char *zPassPhrase /* Activation phrase */ ); #endif @@ -4949,7 +5091,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( ** Specify the activation key for a CEROD database. Unless ** activated, none of the CEROD routines will work. */ -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( +SQLITE_API void sqlite3_activate_cerod( const char *zPassPhrase /* Activation phrase */ ); #endif @@ -4971,7 +5113,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( ** all, then the behavior of sqlite3_sleep() may deviate from the description ** in the previous paragraphs. */ -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); +SQLITE_API int sqlite3_sleep(int); /* ** CAPI3REF: Name Of The Folder Holding Temporary Files @@ -5090,7 +5232,7 @@ SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory; ** connection while this routine is running, then the return value ** is undefined. */ -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); +SQLITE_API int sqlite3_get_autocommit(sqlite3*); /* ** CAPI3REF: Find The Database Handle Of A Prepared Statement @@ -5103,7 +5245,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. */ -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); /* ** CAPI3REF: Return The Filename For A Database Connection @@ -5120,7 +5262,7 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); ** will be an absolute pathname, even if the filename used ** to open the database originally was a URI or relative pathname. */ -SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); +SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); /* ** CAPI3REF: Determine if a database is read-only @@ -5130,7 +5272,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const cha ** of connection D is read-only, 0 if it is read/write, or -1 if N is not ** the name of a database on connection D. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); +SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); /* ** CAPI3REF: Find the next prepared statement @@ -5146,7 +5288,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbNa ** [sqlite3_next_stmt(D,S)] must refer to an open database ** connection and in particular must not be a NULL pointer. */ -SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); /* ** CAPI3REF: Commit And Rollback Notification Callbacks @@ -5195,8 +5337,8 @@ SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_ ** ** See also the [sqlite3_update_hook()] interface. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); /* ** CAPI3REF: Data Change Notification Callbacks @@ -5247,7 +5389,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], ** and [sqlite3_preupdate_hook()] interfaces. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( +SQLITE_API void *sqlite3_update_hook( sqlite3*, void(*)(void *,int ,char const *,char const *,sqlite3_int64), void* @@ -5287,7 +5429,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( ** ** See Also: [SQLite Shared-Cache Mode] */ -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); +SQLITE_API int sqlite3_enable_shared_cache(int); /* ** CAPI3REF: Attempt To Free Heap Memory @@ -5303,7 +5445,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); ** ** See also: [sqlite3_db_release_memory()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); +SQLITE_API int sqlite3_release_memory(int); /* ** CAPI3REF: Free Memory Used By A Database Connection @@ -5317,7 +5459,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); ** ** See also: [sqlite3_release_memory()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); +SQLITE_API int sqlite3_db_release_memory(sqlite3*); /* ** CAPI3REF: Impose A Limit On Heap Size @@ -5369,7 +5511,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); ** The circumstances under which SQLite will enforce the soft heap limit may ** changes in future releases of SQLite. */ -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); +SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); /* ** CAPI3REF: Deprecated Soft Heap Limit Interface @@ -5380,7 +5522,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 ** only. All new applications should use the ** [sqlite3_soft_heap_limit64()] interface rather than this one. */ -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); +SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); /* @@ -5395,7 +5537,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); ** column exists. ^The sqlite3_table_column_metadata() interface returns ** SQLITE_ERROR and if the specified column does not exist. ** ^If the column-name parameter to sqlite3_table_column_metadata() is a -** NULL pointer, then this routine simply checks for the existance of the +** NULL pointer, then this routine simply checks for the existence of the ** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it ** does not. ** @@ -5450,7 +5592,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); ** parsed, if that has not already been done, and returns an error if ** any errors are encountered while loading the schema. */ -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( +SQLITE_API int sqlite3_table_column_metadata( sqlite3 *db, /* Connection handle */ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ @@ -5506,7 +5648,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( ** ** See also the [load_extension() SQL function]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( +SQLITE_API int sqlite3_load_extension( sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ @@ -5529,8 +5671,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( ** ** ^This interface enables or disables both the C-API ** [sqlite3_load_extension()] and the SQL function [load_extension()]. -** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) -** to enable or disable only the C-API. +** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) +** to enable or disable only the C-API.)^ ** ** Security warning: It is recommended that extension loading ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method @@ -5538,7 +5680,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( ** remains disabled. This will prevent SQL injections from giving attackers ** access to extension loading capabilities. */ -SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); /* ** CAPI3REF: Automatically Load Statically Linked Extensions @@ -5550,7 +5692,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono ** ** ^(Even though the function prototype shows that xEntryPoint() takes ** no arguments and returns void, SQLite invokes xEntryPoint() with three -** arguments and expects and integer result as if the signature of the +** arguments and expects an integer result as if the signature of the ** entry point where as follows: ** **
    @@ -5576,7 +5718,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
     ** See also: [sqlite3_reset_auto_extension()]
     ** and [sqlite3_cancel_auto_extension()]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
    +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
     
     /*
     ** CAPI3REF: Cancel Automatic Extension Loading
    @@ -5588,7 +5730,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
     ** unregistered and it returns 0 if X was not on the list of initialization
     ** routines.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
    +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
     
     /*
     ** CAPI3REF: Reset Automatic Extension Loading
    @@ -5596,7 +5738,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(
     ** ^This interface disables all automatic extensions previously
     ** registered using [sqlite3_auto_extension()].
     */
    -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
    +SQLITE_API void sqlite3_reset_auto_extension(void);
     
     /*
     ** The interface to the virtual-table mechanism is currently considered
    @@ -5841,13 +5983,13 @@ struct sqlite3_index_info {
     ** interface is equivalent to sqlite3_create_module_v2() with a NULL
     ** destructor.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
    +SQLITE_API int sqlite3_create_module(
       sqlite3 *db,               /* SQLite connection to register module with */
       const char *zName,         /* Name of the module */
       const sqlite3_module *p,   /* Methods for the module */
       void *pClientData          /* Client data for xCreate/xConnect */
     );
    -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
    +SQLITE_API int sqlite3_create_module_v2(
       sqlite3 *db,               /* SQLite connection to register module with */
       const char *zName,         /* Name of the module */
       const sqlite3_module *p,   /* Methods for the module */
    @@ -5910,7 +6052,7 @@ struct sqlite3_vtab_cursor {
     ** to declare the format (the names and datatypes of the columns) of
     ** the virtual tables they implement.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
    +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
     
     /*
     ** CAPI3REF: Overload A Function For A Virtual Table
    @@ -5929,7 +6071,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
     ** purpose is to be a placeholder function that can be overloaded
     ** by a [virtual table].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
    +SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
     
     /*
     ** The interface to the virtual-table mechanism defined above (back up
    @@ -6028,7 +6170,7 @@ typedef struct sqlite3_blob sqlite3_blob;
     ** To avoid a resource leak, every open [BLOB handle] should eventually
     ** be released by a call to [sqlite3_blob_close()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
    +SQLITE_API int sqlite3_blob_open(
       sqlite3*,
       const char *zDb,
       const char *zTable,
    @@ -6061,7 +6203,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
     **
     ** ^This function sets the database handle error code and message.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
    +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
     
     /*
     ** CAPI3REF: Close A BLOB Handle
    @@ -6084,7 +6226,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64)
     ** is passed a valid open blob handle, the values returned by the 
     ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
    +SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
     
     /*
     ** CAPI3REF: Return The Size Of An Open BLOB
    @@ -6100,7 +6242,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
     ** been closed by [sqlite3_blob_close()].  Passing any other pointer in
     ** to this routine results in undefined and probably undesirable behavior.
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
    +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
     
     /*
     ** CAPI3REF: Read Data From A BLOB Incrementally
    @@ -6129,7 +6271,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
     **
     ** See also: [sqlite3_blob_write()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
    +SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
     
     /*
     ** CAPI3REF: Write Data Into A BLOB Incrementally
    @@ -6171,7 +6313,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N,
     **
     ** See also: [sqlite3_blob_read()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
    +SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
     
     /*
     ** CAPI3REF: Virtual File System Objects
    @@ -6202,9 +6344,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z,
     ** ^(If the default VFS is unregistered, another VFS is chosen as
     ** the default.  The choice for the new VFS is arbitrary.)^
     */
    -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
    -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
    +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
    +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
     
     /*
     ** CAPI3REF: Mutexes
    @@ -6320,11 +6462,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
     **
     ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
     */
    -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
    -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
    +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
    +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
     
     /*
     ** CAPI3REF: Mutex Methods Object
    @@ -6434,8 +6576,8 @@ struct sqlite3_mutex_methods {
     ** interface should also return 1 when given a NULL pointer.
     */
     #ifndef NDEBUG
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
    -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
     #endif
     
     /*
    @@ -6475,7 +6617,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
     ** ^If the [threading mode] is Single-thread or Multi-thread then this
     ** routine returns a NULL pointer.
     */
    -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
    +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
     
     /*
     ** CAPI3REF: Low-Level Control Of Database Files
    @@ -6510,7 +6652,7 @@ SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
     **
     ** See also: [SQLITE_FCNTL_LOCKSTATE]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
    +SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
     
     /*
     ** CAPI3REF: Testing Interface
    @@ -6529,7 +6671,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName
     ** Unlike most of the SQLite API, this function is not guaranteed to
     ** operate consistently from one release to the next.
     */
    -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
    +SQLITE_API int sqlite3_test_control(int op, ...);
     
     /*
     ** CAPI3REF: Testing Interface Operation Codes
    @@ -6592,8 +6734,8 @@ SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
     **
     ** See also: [sqlite3_db_status()]
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    -SQLITE_API int SQLITE_STDCALL sqlite3_status64(
    +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    +SQLITE_API int sqlite3_status64(
       int op,
       sqlite3_int64 *pCurrent,
       sqlite3_int64 *pHighwater,
    @@ -6718,7 +6860,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
     **
     ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
     */
    -SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
    +SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
     
     /*
     ** CAPI3REF: Status Parameters for database connections
    @@ -6764,6 +6906,18 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
     ** memory used by all pager caches associated with the database connection.)^
     ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
     **
    +** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] 
    +** ^(
    SQLITE_DBSTATUS_CACHE_USED_SHARED
    +**
    This parameter is similar to DBSTATUS_CACHE_USED, except that if a +** pager cache is shared between two or more connections the bytes of heap +** memory used by that pager cache is divided evenly between the attached +** connections.)^ In other words, if none of the pager caches associated +** with the database connection are shared, this request returns the same +** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are +** shared, the value returned by this call will be smaller than that returned +** by DBSTATUS_CACHE_USED. ^The highwater mark associated with +** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. +** ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
    SQLITE_DBSTATUS_SCHEMA_USED
    **
    This parameter returns the approximate number of bytes of heap ** memory used to store the schema for all databases associated @@ -6821,7 +6975,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int #define SQLITE_DBSTATUS_CACHE_MISS 8 #define SQLITE_DBSTATUS_CACHE_WRITE 9 #define SQLITE_DBSTATUS_DEFERRED_FKS 10 -#define SQLITE_DBSTATUS_MAX 10 /* Largest defined DBSTATUS */ +#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11 +#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */ /* @@ -6848,7 +7003,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int ** ** See also: [sqlite3_status()] and [sqlite3_db_status()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); +SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); /* ** CAPI3REF: Status Parameters for prepared statements @@ -7317,16 +7472,16 @@ typedef struct sqlite3_backup sqlite3_backup; ** same time as another thread is invoking sqlite3_backup_step() it is ** possible that they return invalid values. */ -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( +SQLITE_API sqlite3_backup *sqlite3_backup_init( sqlite3 *pDest, /* Destination database handle */ const char *zDestName, /* Destination database name */ sqlite3 *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ ); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); /* ** CAPI3REF: Unlock Notification @@ -7443,7 +7598,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); ** the special "DROP TABLE/INDEX" case, the extended error code is just ** SQLITE_LOCKED.)^ */ -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( +SQLITE_API int sqlite3_unlock_notify( sqlite3 *pBlocked, /* Waiting connection */ void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ void *pNotifyArg /* Argument to pass to xNotify */ @@ -7458,8 +7613,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( ** strings in a case-independent fashion, using the same definition of "case ** independence" that SQLite uses internally when comparing identifiers. */ -SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); -SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); +SQLITE_API int sqlite3_stricmp(const char *, const char *); +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); /* ** CAPI3REF: String Globbing @@ -7476,7 +7631,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); ** ** See also: [sqlite3_strlike()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); +SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr); /* ** CAPI3REF: String LIKE Matching @@ -7499,7 +7654,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zSt ** ** See also: [sqlite3_strglob()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); +SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); /* ** CAPI3REF: Error Logging Interface @@ -7522,7 +7677,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zSt ** a few hundred characters, it will be truncated to the length of the ** buffer. */ -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); /* ** CAPI3REF: Write-Ahead Log Commit Hook @@ -7558,7 +7713,7 @@ SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...) ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will ** overwrite any prior [sqlite3_wal_hook()] settings. */ -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( +SQLITE_API void *sqlite3_wal_hook( sqlite3*, int(*)(void *,sqlite3*,const char*,int), void* @@ -7593,7 +7748,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( ** is only necessary if the default setting is found to be suboptimal ** for a particular application. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); /* ** CAPI3REF: Checkpoint a database @@ -7615,7 +7770,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); ** start a callback but which do not need the full power (and corresponding ** complication) of [sqlite3_wal_checkpoint_v2()]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); +SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); /* ** CAPI3REF: Checkpoint a database @@ -7709,7 +7864,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zD ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface ** from SQL. */ -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( +SQLITE_API int sqlite3_wal_checkpoint_v2( sqlite3 *db, /* Database handle */ const char *zDb, /* Name of attached database (or NULL) */ int eMode, /* SQLITE_CHECKPOINT_* value */ @@ -7745,7 +7900,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options ** may be added in the future. */ -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); /* ** CAPI3REF: Virtual Table Configuration Options @@ -7798,7 +7953,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); ** of the SQL statement that triggered the call to the [xUpdate] method of the ** [virtual table]. */ -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); /* ** CAPI3REF: Conflict resolution modes @@ -7903,7 +8058,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); ** ** See also: [sqlite3_stmt_scanstatus_reset()] */ -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( +SQLITE_API int sqlite3_stmt_scanstatus( sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ int idx, /* Index of loop to report on */ int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ @@ -7919,7 +8074,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( ** This API is only available if the library is built with pre-processor ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. */ -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); /* ** CAPI3REF: Flush caches to disk mid-transaction @@ -7951,7 +8106,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** ^This function does not set the database handle error code or message ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. */ -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); /* ** CAPI3REF: The pre-update hook. @@ -7977,7 +8132,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); ** ^The second parameter to the preupdate callback is a pointer to ** the [database connection] that registered the preupdate hook. ** ^The third parameter to the preupdate callback is one of the constants -** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the +** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the ** kind of update operation that is about to occur. ** ^(The fourth parameter to the preupdate callback is the name of the ** database within the database connection that is being modified. This @@ -8031,7 +8186,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); ** ** See also: [sqlite3_update_hook()] */ -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( sqlite3 *db, void(*xPreUpdate)( void *pCtx, /* Copy of third arg to preupdate_hook() */ @@ -8044,10 +8199,10 @@ SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( ), void* ); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *); +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); /* ** CAPI3REF: Low-level system error code @@ -8059,7 +8214,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 ** called to get back the underlying "errno" that caused the problem, such ** as ENOSPC, EAUTH, EISDIR, and so forth. */ -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); +SQLITE_API int sqlite3_system_errno(sqlite3*); /* ** CAPI3REF: Database Snapshot @@ -8109,7 +8264,7 @@ typedef struct sqlite3_snapshot sqlite3_snapshot; ** The [sqlite3_snapshot_get()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( sqlite3 *db, const char *zSchema, sqlite3_snapshot **ppSnapshot @@ -8147,7 +8302,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( ** The [sqlite3_snapshot_open()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( sqlite3 *db, const char *zSchema, sqlite3_snapshot *pSnapshot @@ -8164,7 +8319,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( ** The [sqlite3_snapshot_free()] interface is only available when the ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. */ -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); /* ** CAPI3REF: Compare the ages of two snapshot handles. @@ -8188,7 +8343,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3 ** snapshot than P2, zero if the two handles refer to the same database ** snapshot, and a positive value if P1 is a newer snapshot than P2. */ -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( sqlite3_snapshot *p1, sqlite3_snapshot *p2 ); @@ -8204,7 +8359,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( #ifdef __cplusplus } /* End of the 'extern "C"' block */ #endif -#endif /* _SQLITE3_H_ */ +#endif /* SQLITE3_H */ /******** Begin file sqlite3rtree.h *********/ /* @@ -8246,7 +8401,7 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info; ** ** SELECT ... FROM WHERE MATCH $zGeom(... params ...) */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( +SQLITE_API int sqlite3_rtree_geometry_callback( sqlite3 *db, const char *zGeom, int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), @@ -8272,7 +8427,7 @@ struct sqlite3_rtree_geometry { ** ** SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...) */ -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( +SQLITE_API int sqlite3_rtree_query_callback( sqlite3 *db, const char *zQueryFunc, int (*xQueryFunc)(sqlite3_rtree_query_info*), @@ -9924,7 +10079,7 @@ struct Fts5ExtensionApi { ** behaviour. The structure methods are expected to function as follows: ** ** xCreate: -** This function is used to allocate and inititalize a tokenizer instance. +** This function is used to allocate and initialize a tokenizer instance. ** A tokenizer instance is required to actually tokenize text. ** ** The first argument passed to this function is a copy of the (void*) @@ -10184,5 +10339,4 @@ struct fts5_api { #endif /* _FTS5_H */ - /******** End of fts5.h *********/ From fc7aaf792b26c22adaef6997bb18c58fe2c18f94 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 11 Oct 2016 20:28:14 +0200 Subject: [PATCH 83/93] Auto Start: Only set on first account setup, not all later ones --- src/gui/application.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index c05b651bf..509549218 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -336,8 +336,13 @@ void Application::slotownCloudWizardDone( int res ) _checkConnectionTimer.start(); slotCheckConnection(); - // The very first time an account is configured: enabled autostart - // TODO: Doing this every time the account wizard finishes will annoy users. + // If one account is configured: enable autostart + bool shouldSetAutoStart = (accountMan->accounts().size() == 1); +#ifdef Q_OS_MAC + // Don't auto start when not being 'installed' + shouldSetAutoStart = shouldSetAutoStart + && QCoreApplication::applicationDirPath().startsWith("/Applications/"); +#endif Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true); } } From 5000d40619b65a442845ae5f050d25ce8f43a2ca Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 12 Oct 2016 19:10:56 +0200 Subject: [PATCH 84/93] Fixup previous commit Thanks @ogoffart for spotting. --- src/gui/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 509549218..70c09c434 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -343,7 +343,7 @@ void Application::slotownCloudWizardDone( int res ) shouldSetAutoStart = shouldSetAutoStart && QCoreApplication::applicationDirPath().startsWith("/Applications/"); #endif - Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true); + Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), shouldSetAutoStart); } } From 766d9ae1acb684b069bc05e5fb9995bcb8c8e33d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 13 Oct 2016 12:02:15 +0200 Subject: [PATCH 85/93] QProgressIndicator: update copy from upstream Update from commit 05ce8a23cdc12e825532dc6de06c267fb8d48b4f from https://github.com/dragotin/QProgressIndicator Which itself is forked from commit e5ba0fd09bfd43b067ee3646d70b294c7efcb558 from upstream, with additional license header. It was relicensed to MIT according to https://github.com/mojocorp/QProgressIndicator/commit/14bb9d10e29407175fdf4b9f03ed9cc7bb124f93 Relates to issues #5180 and #5184 --- src/3rdparty/QProgressIndicator/LICENSE | 178 ++---------------- .../QProgressIndicator/QProgressIndicator.cpp | 43 +++-- .../QProgressIndicator/QProgressIndicator.h | 51 ++--- src/3rdparty/QProgressIndicator/README.md | 2 +- test/CMakeLists.txt | 2 + 5 files changed, 70 insertions(+), 206 deletions(-) diff --git a/src/3rdparty/QProgressIndicator/LICENSE b/src/3rdparty/QProgressIndicator/LICENSE index 65c5ca88a..3a66b5627 100644 --- a/src/3rdparty/QProgressIndicator/LICENSE +++ b/src/3rdparty/QProgressIndicator/LICENSE @@ -1,165 +1,21 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 +The MIT License (MIT) - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Copyright (c) 2011 Morgan Leborgne +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/3rdparty/QProgressIndicator/QProgressIndicator.cpp b/src/3rdparty/QProgressIndicator/QProgressIndicator.cpp index 425dc579f..ec2a6fe84 100644 --- a/src/3rdparty/QProgressIndicator/QProgressIndicator.cpp +++ b/src/3rdparty/QProgressIndicator/QProgressIndicator.cpp @@ -1,24 +1,27 @@ /* -* -* This file is part of QProgressIndicator, -* an open-source recent files menu widget -* -* Copyright (C) 2009 - 2010 Morgan Leborgne -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with QRecentFilesMenu. If not, see . -* -*/ + * The MIT License (MIT) + * + * Copyright (c) 2011 Morgan Leborgne + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + #include "QProgressIndicator.h" #include diff --git a/src/3rdparty/QProgressIndicator/QProgressIndicator.h b/src/3rdparty/QProgressIndicator/QProgressIndicator.h index ec81fb72b..a6178080e 100644 --- a/src/3rdparty/QProgressIndicator/QProgressIndicator.h +++ b/src/3rdparty/QProgressIndicator/QProgressIndicator.h @@ -1,24 +1,27 @@ /* -* -* This file is part of QProgressIndicator, -* an open-source recent files menu widget -* -* Copyright (C) 2009 - 2010 Morgan Leborgne -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with QRecentFilesMenu. If not, see . -* -*/ + * The MIT License (MIT) + * + * Copyright (c) 2011 Morgan Leborgne + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + #ifndef QPROGRESSINDICATOR_H #define QPROGRESSINDICATOR_H @@ -64,8 +67,8 @@ public: */ const QColor & color() const { return m_color; } - virtual QSize sizeHint() const Q_DECL_OVERRIDE; - int heightForWidth(int w) const Q_DECL_OVERRIDE; + virtual QSize sizeHint() const; + int heightForWidth(int w) const; public slots: /*! Starts the spin animation. \sa stopAnimation isAnimated @@ -95,8 +98,8 @@ public slots: */ void setColor(const QColor & color); protected: - virtual void timerEvent(QTimerEvent * event) Q_DECL_OVERRIDE; - virtual void paintEvent(QPaintEvent * event) Q_DECL_OVERRIDE; + virtual void timerEvent(QTimerEvent * event); + virtual void paintEvent(QPaintEvent * event); private: int m_angle; int m_timerId; diff --git a/src/3rdparty/QProgressIndicator/README.md b/src/3rdparty/QProgressIndicator/README.md index 4b34a3553..6c034a7df 100644 --- a/src/3rdparty/QProgressIndicator/README.md +++ b/src/3rdparty/QProgressIndicator/README.md @@ -11,4 +11,4 @@ Qt 4.4.x. ## License -LGPL +MIT diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fc130f5ce..2b2e4591d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,7 +27,9 @@ ENDIF() owncloud_add_test(FolderWatcher "${FolderWatcher_SRC}") if( UNIX AND NOT APPLE ) + if(HAVE_QT5 AND NOT BUILD_WITH_QT4) owncloud_add_test(InotifyWatcher "${FolderWatcher_SRC}") + endif(HAVE_QT5 AND NOT BUILD_WITH_QT4) endif(UNIX AND NOT APPLE) owncloud_add_test(CSyncSqlite "") From 9f2ae5dd170492fa338dc0281fd91ce400b0dee4 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 13 Oct 2016 16:22:54 +0200 Subject: [PATCH 86/93] Add a note that the source repositories need to be enabled. (#5239) * Add a note that the source repositories need to be enabled. * Fix typo, is => are. --- doc/building.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/building.rst b/doc/building.rst index 833d0f994..96059e036 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -42,7 +42,8 @@ repositories`_ to see all the Linux client repos. echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ /' >> /etc/apt/sources.list.d/owncloud-client.list -2. Install the dependencies using the following commands for your specific Linux distribution: +2. Install the dependencies using the following commands for your specific Linux +distribution. Make sure the repositories for source packages are enabled. * Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client`` * openSUSE/SLES: ``zypper ref; zypper si -d owncloud-client`` From 8c5ea8dc908a8429fbdb317e49754b5108df98e9 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 14 Oct 2016 14:23:55 +0200 Subject: [PATCH 87/93] Propagator: Also upload more in parallel (#5230) Fix for https://github.com/owncloud/client/issues/4986#issuecomment-227071801 This is before we have bundling at some point. --- src/libsync/owncloudpropagator.cpp | 2 +- src/libsync/propagateupload.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 1ff550073..e86532346 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -529,7 +529,7 @@ void OwncloudPropagator::scheduleNextJob() } } if (_activeJobList.count() < maximumActiveJob() + likelyFinishedQuicklyCount) { - qDebug() << "Can pump in another request!"; + qDebug() << "Can pump in another request! activeJobs =" << _activeJobList.count(); if (_rootJob->scheduleNextJob()) { QTimer::singleShot(0, this, SLOT(scheduleNextJob())); } diff --git a/src/libsync/propagateupload.h b/src/libsync/propagateupload.h index 2be0212e9..f3375a11c 100644 --- a/src/libsync/propagateupload.h +++ b/src/libsync/propagateupload.h @@ -195,6 +195,8 @@ public: : PropagateItemJob(propagator, item), _startChunk(0), _currentChunk(0), _chunkCount(0), _transferId(0), _finished(false), _deleteExisting(false) {} void start() Q_DECL_OVERRIDE; + bool isLikelyFinishedQuickly() Q_DECL_OVERRIDE { return _item->_size < 100*1024; } + /** * Whether an existing entity with the same name may be deleted before * the upload. From d600fdc89b8112cef94eb4b04a915fdcdae299e4 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 14 Oct 2016 14:26:31 +0200 Subject: [PATCH 88/93] OS X: Use monochrome tray icon by default (#5229) --- src/libsync/configfile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index acf3d6ad5..4c8a30bf6 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -611,7 +611,12 @@ void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles) bool ConfigFile::monoIcons() const { QSettings settings(configFile(), QSettings::IniFormat); - return settings.value(QLatin1String(monoIconsC), false).toBool(); + bool monoDefault = false; // On Mac we want bw by default +#ifdef Q_OS_MAC + // OEM themes are not obliged to ship mono icons + monoDefault = (0 == (strcmp("ownCloud",APPLICATION_NAME))); +#endif + return settings.value(QLatin1String(monoIconsC), monoDefault).toBool(); } void ConfigFile::setMonoIcons(bool useMonoIcons) From 826459eae7dcd4ea314038df64675509621d3b30 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Mon, 17 Oct 2016 01:15:13 +0200 Subject: [PATCH 89/93] [tx-robot] updated from transifex --- admin/win/nsi/l10n/Spanish.nsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/win/nsi/l10n/Spanish.nsh b/admin/win/nsi/l10n/Spanish.nsh index dc96524be..2848e68c8 100644 --- a/admin/win/nsi/l10n/Spanish.nsh +++ b/admin/win/nsi/l10n/Spanish.nsh @@ -2,7 +2,7 @@ StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar las notas de la versin" StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "El/los proceso/s ${APPLICATION_EXECUTABLE} debe/n ser detenidos.$\nQuiere que el instalador lo haga por usted?" StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Deteniendo el/los proceso/s ${APPLICATION_EXECUTABLE}." -StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Proceso para finalizar no encontrado!" +StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Proceso a finalizar no encontrado!" StrCpy $PageReinstall_NEW_Field_1 "Una versin anterior de ${APPLICATION_NAME} se encuentra instalada en el sistema. Se recomienda de instalar la versin actual antes de instalar la nueva. Seleccione la operacion deseada y haga click en Siguiente para continuar." StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar" StrCpy $PageReinstall_NEW_Field_3 "No desinstalar" From 36a19703dbc6a4a83e9e4bf5af41b431451226a4 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 12 Oct 2016 18:23:31 +0200 Subject: [PATCH 90/93] SyncEngine: Permission error in subfolder of a folder that cannnot be added is a SoftError Issue #5059 --- src/libsync/syncengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 9b9a79e51..923e39778 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -1163,7 +1163,7 @@ void SyncEngine::checkForPermission() qDebug() << "Moving of " << (*it)->_file << " canceled because no permission to add parent folder"; } (*it)->_instruction = CSYNC_INSTRUCTION_ERROR; - (*it)->_status = SyncFileItem::NormalError; + (*it)->_status = SyncFileItem::SoftError; (*it)->_errorString = tr("Not allowed because you don't have permission to add parent folder"); } From 1b0448988780128046ef12d2403fa1e764f574da Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 12 Oct 2016 10:44:38 +0200 Subject: [PATCH 91/93] Remove stale commented code These functions don't even exist anymore. --- src/gui/folder.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 87f600bc1..f58ede560 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -758,8 +758,6 @@ void Folder::startSync(const QStringList &pathList) QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection); - // disable events until syncing is done - // _watcher->setEventsEnabled(false); emit syncStarted(); } @@ -823,9 +821,6 @@ void Folder::slotSyncFinished(bool success) bubbleUpSyncResult(); bool anotherSyncNeeded = _engine->isAnotherSyncNeeded(); - // _watcher->setEventsEnabledDelayed(2000); - - if (_csyncError) { _syncResult.setStatus(SyncResult::Error); From e020a5327e10543935b7a1350f3393197143ef21 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 18 Oct 2016 11:15:13 +0200 Subject: [PATCH 92/93] Force a remote discovery when upgrading to this version #5242 A remote discovery will fix up any lingering problems caused by #5190. --- src/libsync/syncjournaldb.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp index 988646c6e..32b218520 100644 --- a/src/libsync/syncjournaldb.cpp +++ b/src/libsync/syncjournaldb.cpp @@ -331,6 +331,15 @@ bool SyncJournalDb::checkConnect() qDebug() << Q_FUNC_INFO << "possibleUpgradeFromMirall_1_8_0_or_1 detected!"; forceRemoteDiscovery = true; } + + // There was a bug in versions <2.3.0 that could lead to stale + // local files and a remote discovery will fix them. + // See #5190 #5242. + if( major == 2 && minor < 3) { + qDebug() << Q_FUNC_INFO << "upgrade form client < 2.3.0 detected! forcing remote discovery"; + forceRemoteDiscovery = true; + } + // Not comparing the BUILD id here, correct? if( !(major == MIRALL_VERSION_MAJOR && minor == MIRALL_VERSION_MINOR && patch == MIRALL_VERSION_PATCH) ) { createQuery.prepare("UPDATE version SET major=?1, minor=?2, patch =?3, custom=?4 " From 69a1e46d0c3b978990f6b14b9e5043131a12437e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 18 Oct 2016 12:29:52 +0200 Subject: [PATCH 93/93] Progress: Reset lastCompletedItem #5256 Otherwise progress listeners think it's still the last-completed item when the next sync starts. This lead to spurious entries in the "Recent Changes" list. --- src/libsync/progressdispatcher.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsync/progressdispatcher.cpp b/src/libsync/progressdispatcher.cpp index 09022e689..d630d3e4f 100644 --- a/src/libsync/progressdispatcher.cpp +++ b/src/libsync/progressdispatcher.cpp @@ -147,6 +147,7 @@ void ProgressInfo::reset() _maxBytesPerSecond = 100000.0; _maxFilesPerSecond = 2.0; _updateEstimatesTimer.stop(); + _lastCompletedItem = SyncFileItem(); } void ProgressInfo::startEstimateUpdates()