[tarantool-patches] [PATCH v1 1/1] sql: remove SQLite mentions

imeevma at tarantool.org imeevma at tarantool.org
Wed Feb 27 11:53:01 MSK 2019


---
https://github.com/tarantool/tarantool/tree/imeevma/small-patches

 extra/mkkeywordhash.c   | 21 ++++++++-------------
 src/box/execute.h       |  2 --
 src/box/sql/select.c    |  3 +--
 src/box/sql/wherecode.c |  1 -
 4 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/extra/mkkeywordhash.c b/extra/mkkeywordhash.c
index 2b21cb8..edc2ee3 100644
--- a/extra/mkkeywordhash.c
+++ b/extra/mkkeywordhash.c
@@ -17,7 +17,7 @@ static const char zHdr[] =
   "**\n"
   "** The code in this file has been automatically generated by\n"
   "**\n"
-  "**   sqlite/tool/mkkeywordhash.c\n"
+  "**   extra/mkkeywordhash.c\n"
   "**\n"
   "** The code in this file implements a function that determines whether\n"
   "** or not a given identifier is really an SQL keyword.  The same thing\n"
@@ -55,29 +55,29 @@ struct Keyword {
 */
 #define ALTER        0x00000001
 #define ALWAYS       0x00000002
-#ifdef SQLITE_OMIT_AUTOINCREMENT
+#ifdef SQL_OMIT_AUTOINCREMENT
 #  define AUTOINCR   0
 #else
 #  define AUTOINCR   0x00000010
 #endif
-#ifdef SQLITE_OMIT_CAST
+#ifdef SQL_OMIT_CAST
 #  define CAST       0
 #else
 #  define CAST       0x00000020
 #endif
-#ifdef SQLITE_OMIT_COMPOUND_SELECT
+#ifdef SQL_OMIT_COMPOUND_SELECT
 #  define COMPOUND   0
 #else
 #  define COMPOUND   0x00000040
 #endif
-#ifdef SQLITE_OMIT_CONFLICT_CLAUSE
+#ifdef SQL_OMIT_CONFLICT_CLAUSE
 #  define CONFLICT   0
 #else
 #  define CONFLICT   0x00000080
 #endif
 #define EXPLAIN      0x00000100
 #define FKEY         0x00000200
-#ifdef SQLITE_OMIT_PRAGMA
+#ifdef SQL_OMIT_PRAGMA
 #  define PRAGMA     0
 #else
 #  define PRAGMA     0x00000400
@@ -85,7 +85,7 @@ struct Keyword {
 #define SUBQUERY     0x00001000
 #  define TRIGGER    0x00002000
 #  define VIEW       0x00008000
-#ifdef SQLITE_OMIT_CTE
+#ifdef SQL_OMIT_CTE
 #  define CTE        0
 #else
 #  define CTE        0x00040000
@@ -612,11 +612,6 @@ int main(int argc, char **argv){
   printf("  }\n");
   printf("  return n;\n");
   printf("}\n");
-  printf("int sqlite3KeywordCode(const unsigned char *z, int n){\n");
-  printf("  int id = TK_ID;\n");
-  printf("  keywordCode((char*)z, n, &id, NULL);\n");
-  printf("  return id;\n");
-  printf("}\n");
-  printf("#define SQLITE_N_KEYWORD %d\n", nKeyword);
+  printf("#define SQL_N_KEYWORD %d\n", nKeyword);
   return 0;
 }
diff --git a/src/box/execute.h b/src/box/execute.h
index cfb8623..12d893a 100644
--- a/src/box/execute.h
+++ b/src/box/execute.h
@@ -67,8 +67,6 @@ struct sql_response {
  *        following format: {name: value}. Name - string name of
  *        the named parameter, value - scalar value of the
  *        parameter. Named and positioned parameters can be mixed.
- *        For more details
- *        @sa https://www.sql.org/lang_expr.html#varparam.
  * @param[out] out_bind Pointer to save decoded parameters.
  *
  * @retval  >= 0 Number of decoded parameters.
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 6a465a6..f942c0c 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -4449,8 +4449,7 @@ sqlIndexedByLookup(Parse * pParse, struct SrcList_item *pFrom)
  * This transformation is necessary because the multiSelectOrderBy() routine
  * above that generates the code for a compound SELECT with an ORDER BY clause
  * uses a merge algorithm that requires the same collating sequence on the
- * result columns as on the ORDER BY clause.  See ticket
- * http://www.sql.org/src/info/6709574d2a
+ * result columns as on the ORDER BY clause.
  *
  * This transformation is only needed for EXCEPT, INTERSECT, and UNION.
  * The UNION ALL operator works fine with multiSelectOrderBy() even when
diff --git a/src/box/sql/wherecode.c b/src/box/sql/wherecode.c
index 04b79ab..018fd8a 100644
--- a/src/box/sql/wherecode.c
+++ b/src/box/sql/wherecode.c
@@ -1417,7 +1417,6 @@ sqlWhereCodeOneLoopStart(WhereInfo * pWInfo,	/* Complete information about the W
 		 *
 		 * This optimization also only applies if the (x1 OR x2 OR ...) term
 		 * is not contained in the ON clause of a LEFT JOIN.
-		 * See ticket http://www.sql.org/src/info/f2369304e4
 		 */
 		if (pWC->nTerm > 1) {
 			int iTerm;
-- 
2.7.4





More information about the Tarantool-patches mailing list