diff --git a/src/ripple/app/data/tests/SociDB.test.cpp b/src/ripple/app/data/tests/SociDB.test.cpp index 03d4863891..b7f7c78565 100644 --- a/src/ripple/app/data/tests/SociDB.test.cpp +++ b/src/ripple/app/data/tests/SociDB.test.cpp @@ -122,7 +122,7 @@ public: // Check values in db std::vector stringResult (20 * stringData.size ()); std::vector intResult (20 * intData.size ()); - s << "SELECT StringData, IntData FROM SociTestTable", + s << "SELECT StringData, IntData FROM SociTestTable;", soci::into (stringResult), soci::into (intResult); expect (stringResult.size () == stringData.size () && intResult.size () == intData.size ()); @@ -205,7 +205,7 @@ public: std::uint32_t uig = 0; std::int64_t big = 0; std::uint64_t ubig = 0; - s << "SELECT I, UI, BI, UBI from STT", soci::into (ig), + s << "SELECT I, UI, BI, UBI from STT;", soci::into (ig), soci::into (uig), soci::into (big), soci::into (ubig); expect (ig == id[0] && uig == uid[0] && big == bid[0] && ubig == ubid[0]); @@ -220,7 +220,7 @@ public: boost::optional uig; boost::optional big; boost::optional ubig; - s << "SELECT I, UI, BI, UBI from STT", soci::into (ig), + s << "SELECT I, UI, BI, UBI from STT;", soci::into (ig), soci::into (uig), soci::into (big), soci::into (ubig); expect (*ig == id[0] && *uig == uid[0] && *big == bid[0] && *ubig == ubid[0]); diff --git a/src/ripple/app/peers/UniqueNodeList.cpp b/src/ripple/app/peers/UniqueNodeList.cpp index 214b010147..efe850ea9a 100644 --- a/src/ripple/app/peers/UniqueNodeList.cpp +++ b/src/ripple/app/peers/UniqueNodeList.cpp @@ -366,10 +366,10 @@ public: auto db = getApp().getWalletDB ().checkoutDb (); *db << str ( - boost::format ("DELETE FROM SeedNodes WHERE PublicKey=%s") % + boost::format ("DELETE FROM SeedNodes WHERE PublicKey=%s;") % sqlEscape (naNodePublic.humanNodePublic ())); *db << str ( - boost::format ("DELETE FROM TrustedNodes WHERE PublicKey=%s") % + boost::format ("DELETE FROM TrustedNodes WHERE PublicKey=%s;") % sqlEscape (naNodePublic.humanNodePublic ())); } @@ -390,7 +390,7 @@ public: { auto db = getApp().getWalletDB ().checkoutDb (); - *db << str (boost::format ("DELETE FROM SeedDomains WHERE Domain=%s") % sqlEscape (strDomain)); + *db << str (boost::format ("DELETE FROM SeedDomains WHERE Domain=%s;") % sqlEscape (strDomain)); } // YYY Only dirty on successful delete. @@ -404,8 +404,8 @@ public: { auto db = getApp().getWalletDB ().checkoutDb (); - *db << "DELETE FROM SeedDomains"; - *db << "DELETE FROM SeedNodes"; + *db << "DELETE FROM SeedDomains;"; + *db << "DELETE FROM SeedNodes;"; } fetchDirty (); diff --git a/src/ripple/peerfinder/impl/StoreSqdb.h b/src/ripple/peerfinder/impl/StoreSqdb.h index fed142ef36..1b516731de 100644 --- a/src/ripple/peerfinder/impl/StoreSqdb.h +++ b/src/ripple/peerfinder/impl/StoreSqdb.h @@ -72,7 +72,7 @@ public: "SELECT " " address, " " valence " - "FROM PeerFinder_BootstrapCache " + "FROM PeerFinder_BootstrapCache;" , soci::into (s) , soci::into (valence) ); @@ -103,7 +103,7 @@ public: { soci::transaction tr (m_session); m_session << - "DELETE FROM PeerFinder_BootstrapCache"; + "DELETE FROM PeerFinder_BootstrapCache;"; if (!v.empty ()) { @@ -145,7 +145,7 @@ public: "SELECT " " version " "FROM SchemaVersion WHERE " - " name = 'PeerFinder'" + " name = 'PeerFinder';" , soci::into (vO) ; @@ -189,7 +189,7 @@ public: std::size_t count; m_session << - "SELECT COUNT(*) FROM PeerFinder_BootstrapCache " + "SELECT COUNT(*) FROM PeerFinder_BootstrapCache;" , soci::into (count) ; @@ -203,7 +203,7 @@ public: "SELECT " " address, " " valence " - "FROM PeerFinder_BootstrapCache " + "FROM PeerFinder_BootstrapCache;" , soci::into (s) , soci::into (valence) ); @@ -254,14 +254,14 @@ public: } m_session << - "DROP TABLE IF EXISTS PeerFinder_BootstrapCache"; + "DROP TABLE IF EXISTS PeerFinder_BootstrapCache;"; m_session << - "DROP INDEX IF EXISTS PeerFinder_BootstrapCache_Index"; + "DROP INDEX IF EXISTS PeerFinder_BootstrapCache_Index;"; m_session << "ALTER TABLE PeerFinder_BootstrapCache_Next " - " RENAME TO PeerFinder_BootstrapCache"; + " RENAME TO PeerFinder_BootstrapCache;"; m_session << "CREATE INDEX IF NOT EXISTS " @@ -280,16 +280,16 @@ public: // m_session << - "DROP TABLE IF EXISTS LegacyEndpoints"; + "DROP TABLE IF EXISTS LegacyEndpoints;"; m_session << - "DROP TABLE IF EXISTS PeerFinderLegacyEndpoints"; + "DROP TABLE IF EXISTS PeerFinderLegacyEndpoints;"; m_session << - "DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints"; + "DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints;"; m_session << - "DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints_Index"; + "DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints_Index;"; } { @@ -300,7 +300,7 @@ public: " ,version " ") VALUES ( " " 'PeerFinder', :version " - ")" + ");" , soci::use (version); } @@ -311,7 +311,7 @@ private: void init () { soci::transaction tr (m_session); - m_session << "PRAGMA encoding=\"UTF-8\""; + m_session << "PRAGMA encoding=\"UTF-8\";"; m_session << "CREATE TABLE IF NOT EXISTS SchemaVersion ( " diff --git a/src/ripple/rpc/handlers/TxHistory.cpp b/src/ripple/rpc/handlers/TxHistory.cpp index f140f9f05f..c620ec37b0 100644 --- a/src/ripple/rpc/handlers/TxHistory.cpp +++ b/src/ripple/rpc/handlers/TxHistory.cpp @@ -45,7 +45,7 @@ Json::Value doTxHistory (RPC::Context& context) std::string sql = boost::str (boost::format ( "SELECT LedgerSeq, Status, RawTxn " - "FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20") + "FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20;") % startIndex); {