diff --git a/extra/mkkeywordhash.c b/extra/mkkeywordhash.c
index 2c54c183592e4e90673df68c5473eb71c1f9e818..1275b282c95639a405413f5491e8df551de8c7c9 100644
--- a/extra/mkkeywordhash.c
+++ b/extra/mkkeywordhash.c
@@ -109,6 +109,7 @@ static Keyword aKeywordTable[] = {
   { "BEFORE",                 "TK_BEFORE",      TRIGGER,          false },
   { "BEGIN",                  "TK_BEGIN",       TRIGGER,          true  },
   { "BETWEEN",                "TK_BETWEEN",     ALWAYS,           true  },
+  { "BLOB",                   "TK_BLOB",        RESERVED,         true  },
   { "BY",                     "TK_BY",          ALWAYS,           true  },
   { "CASCADE",                "TK_CASCADE",     FKEY,             false },
   { "CASE",                   "TK_CASE",        ALWAYS,           true  },
@@ -218,27 +219,29 @@ static Keyword aKeywordTable[] = {
   { "ASENSITIVE",             "TK_STANDARD",    RESERVED,         true  },
   { "BINARY",                 "TK_ID",          RESERVED,         true  },
   { "CALL",                   "TK_STANDARD",    RESERVED,         true  },
-  { "CHAR",                   "TK_ID",          RESERVED,         true  },
+  { "CHAR",                   "TK_CHAR",        RESERVED,         true  },
   { "CHARACTER",              "TK_ID",          RESERVED,         true  },
   { "CONDITION",              "TK_STANDARD",    RESERVED,         true  },
   { "CONNECT",                "TK_STANDARD",    RESERVED,         true  },
   { "CURRENT",                "TK_STANDARD",    RESERVED,         true  },
   { "CURRENT_USER",           "TK_STANDARD",    RESERVED,         true  },
   { "CURSOR",                 "TK_STANDARD",    RESERVED,         true  },
-  { "DATE",                   "TK_ID",          RESERVED,         true  },
-  { "DECIMAL",                "TK_ID",          RESERVED,         true  },
+  { "DATE",                   "TK_DATE",        RESERVED,         true  },
+  { "DATETIME",               "TK_DATETIME",    RESERVED,         true  },
+  { "DECIMAL",                "TK_DECIMAL",     RESERVED,         true  },
   { "DECLARE",                "TK_STANDARD",    RESERVED,         true  },
   { "DENSE_RANK",             "TK_STANDARD",    RESERVED,         true  },
   { "DESCRIBE",               "TK_STANDARD",    RESERVED,         true  },
   { "DETERMINISTIC",          "TK_STANDARD",    RESERVED,         true  },
-  { "DOUBLE",                 "TK_ID",          RESERVED,         true  },
+  { "DOUBLE",                 "TK_DOUBLE",      RESERVED,         true  },
   { "ELSEIF",                 "TK_STANDARD",    RESERVED,         true  },
   { "FETCH",                  "TK_STANDARD",    RESERVED,         true  },
-  { "FLOAT",                  "TK_ID",          RESERVED,         true  },
+  { "FLOAT",                  "TK_FLOAT",       RESERVED,         true  },
   { "FUNCTION",               "TK_STANDARD",    RESERVED,         true  },
   { "GET",                    "TK_STANDARD",    RESERVED,         true  },
   { "GRANT",                  "TK_STANDARD",    RESERVED,         true  },
-  { "INTEGER",                "TK_ID",          RESERVED,         true  },
+  { "INT",                    "TK_INT",         RESERVED,         true  },
+  { "INTEGER",                "TK_INTEGER",     RESERVED,         true  },
   { "INOUT",                  "TK_STANDARD",    RESERVED,         true  },
   { "INSENSITIVE",            "TK_STANDARD",    RESERVED,         true  },
   { "ITERATE",                "TK_STANDARD",    RESERVED,         true  },
@@ -246,6 +249,8 @@ static Keyword aKeywordTable[] = {
   { "LOCALTIME",              "TK_STANDARD",    RESERVED,         true  },
   { "LOCALTIMESTAMP",         "TK_STANDARD",    RESERVED,         true  },
   { "LOOP",                   "TK_STANDARD",    RESERVED,         true  },
+  { "NUM",                    "TK_NUM",         RESERVED,         true  },
+  { "NUMERIC",                "TK_NUMERIC",     RESERVED,         true  },
   { "OUT",                    "TK_STANDARD",    RESERVED,         true  },
   { "OVER",                   "TK_STANDARD",    RESERVED,         true  },
   { "PARTITION",              "TK_STANDARD",    RESERVED,         true  },
@@ -254,6 +259,7 @@ static Keyword aKeywordTable[] = {
   { "RANGE",                  "TK_STANDARD",    RESERVED,         true  },
   { "RANK",                   "TK_STANDARD",    RESERVED,         true  },
   { "READS",                  "TK_STANDARD",    RESERVED,         true  },
+  { "REAL",                   "TK_REAL",        RESERVED,         true  },
   { "REPEAT",                 "TK_STANDARD",    RESERVED,         true  },
   { "RESIGNAL",               "TK_STANDARD",    RESERVED,         true  },
   { "RETURN",                 "TK_STANDARD",    RESERVED,         true  },
@@ -267,9 +273,10 @@ static Keyword aKeywordTable[] = {
   { "SYSTEM",                 "TK_STANDARD",    RESERVED,         true  },
   { "SQL",                    "TK_STANDARD",    RESERVED,         true  },
   { "USER",                   "TK_STANDARD",    RESERVED,         true  },
-  { "VARCHAR",                "TK_ID",          RESERVED,         true  },
+  { "VARCHAR",                "TK_VARCHAR",     RESERVED,         true  },
   { "WHENEVER",               "TK_STANDARD",    RESERVED,         true  },
   { "WHILE",                  "TK_STANDARD",    RESERVED,         true  },
+  { "TEXT",                   "TK_TEXT",        RESERVED,         true  },
   { "TRUNCATE",               "TK_TRUNCATE",    ALWAYS,           true  },
 };
 
diff --git a/src/box/sql.c b/src/box/sql.c
index 9aca618ced47e935b8bd9a5e8969a202b09d0bd7..caa66144f6c922005d8cf2124b15a4ee47978814 100644
--- a/src/box/sql.c
+++ b/src/box/sql.c
@@ -1121,35 +1121,6 @@ cursor_advance(BtCursor *pCur, int *pRes)
  * format data for certain fields in _space and _index.
  */
 
-/*
- * Convert SQLite affinity value to the corresponding Tarantool type
- * string which is suitable for _index.parts field.
- */
-static const char *convertSqliteAffinity(int affinity, bool allow_nulls)
-{
-	if (allow_nulls || 1) {
-		return "scalar";
-	}
-	switch (affinity) {
-	default:
-		assert(false);
-	case AFFINITY_BLOB:
-		return "scalar";
-	case AFFINITY_TEXT:
-		return "string";
-	case AFFINITY_NUMERIC:
-	case AFFINITY_REAL:
-	  /* Tarantool workaround: to make comparators able to compare, e.g.
-	     double and int use generic type. This might be a performance issue.  */
-	  /* return "number"; */
-		return "scalar";
-	case AFFINITY_INTEGER:
-	  /* See comment above.  */
-	  /* return "integer"; */
-		return "scalar";
-	}
-}
-
 char *
 sql_encode_table(struct region *region, struct Table *table, uint32_t *size)
 {
@@ -1161,21 +1132,9 @@ sql_encode_table(struct region *region, struct Table *table, uint32_t *size)
 
 	const struct space_def *def = table->def;
 	assert(def != NULL);
-	/*
-	 * If table's PK is single column which is INTEGER, then
-	 * treat it as strict type, not affinity.
-	 */
-	struct index *pk_idx = sql_table_primary_key(table);
-	uint32_t pk_forced_int = UINT32_MAX;
-	if (pk_idx != NULL && pk_idx->def->key_def->part_count == 1) {
-		int pk = pk_idx->def->key_def->parts[0].fieldno;
-		if (def->fields[pk].type == FIELD_TYPE_INTEGER)
-			pk_forced_int = pk;
-	}
 	uint32_t field_count = def->field_count;
 	mpstream_encode_array(&stream, field_count);
 	for (uint32_t i = 0; i < field_count && !is_error; i++) {
-		const char *t;
 		uint32_t cid = def->fields[i].coll_id;
 		struct field_def *field = &def->fields[i];
 		const char *default_str = field->default_value;
@@ -1188,22 +1147,15 @@ sql_encode_table(struct region *region, struct Table *table, uint32_t *size)
 		mpstream_encode_str(&stream, "name");
 		mpstream_encode_str(&stream, field->name);
 		mpstream_encode_str(&stream, "type");
-		if (i == pk_forced_int) {
-			t = "integer";
-		} else {
-			enum affinity_type affinity = def->fields[i].affinity;
-			t = affinity == AFFINITY_BLOB ? "scalar" :
-			    convertSqliteAffinity(affinity,
-						  def->fields[i].is_nullable);
-		}
 		assert(def->fields[i].is_nullable ==
 		       action_is_nullable(def->fields[i].nullable_action));
-		mpstream_encode_str(&stream, t);
+		mpstream_encode_str(&stream, field_type_strs[field->type]);
 		mpstream_encode_str(&stream, "affinity");
 		mpstream_encode_uint(&stream, def->fields[i].affinity);
 		mpstream_encode_str(&stream, "is_nullable");
 		mpstream_encode_bool(&stream, def->fields[i].is_nullable);
 		mpstream_encode_str(&stream, "nullable_action");
+
 		assert(def->fields[i].nullable_action < on_conflict_action_MAX);
 		const char *action =
 			on_conflict_action_strs[def->fields[i].nullable_action];
@@ -1317,31 +1269,13 @@ fkey_encode_links(struct region *region, const struct fkey_def *def, int type,
 
 char *
 sql_encode_index_parts(struct region *region, const struct field_def *fields,
-		       const struct index_def *idx_def,
-		       const struct index_def *pk_def, uint32_t *size)
+		       const struct index_def *idx_def, uint32_t *size)
 {
 	size_t used = region_used(region);
 	struct mpstream stream;
 	bool is_error = false;
 	mpstream_init(&stream, region, region_reserve_cb, region_alloc_cb,
 		      set_encode_error, &is_error);
-	/*
-	 * If table's PK is single column which is INTEGER, then
-	 * treat it as strict type, not affinity.
-	 */
-	uint32_t pk_forced_int = UINT32_MAX;
-	if (pk_def->key_def->part_count == 1) {
-		int pk = pk_def->key_def->parts[0].fieldno;
-		if (fields[pk].type == FIELD_TYPE_INTEGER)
-			pk_forced_int = pk;
-	}
-
-	/* gh-2187
-	 *
-	 * Include all index columns, i.e. "key" columns followed by the
-	 * primary key columns. Query planner depends on this particular
-	 * data layout.
-	 */
 	struct key_def *key_def = idx_def->key_def;
 	struct key_part *part = key_def->parts;
 	mpstream_encode_array(&stream, key_def->part_count);
@@ -1349,20 +1283,14 @@ sql_encode_index_parts(struct region *region, const struct field_def *fields,
 		uint32_t col = part->fieldno;
 		assert(fields[col].is_nullable ==
 		       action_is_nullable(fields[col].nullable_action));
-		const char *t;
-		if (pk_forced_int == col) {
-			t = "integer";
-		} else {
-			t = convertSqliteAffinity(fields[col].affinity,
-						  fields[col].is_nullable);
-		}
 		/* Do not decode default collation. */
 		uint32_t cid = part->coll_id;
 		mpstream_encode_map(&stream, 5 + (cid != COLL_NONE));
 		mpstream_encode_str(&stream, "type");
-		mpstream_encode_str(&stream, t);
+		mpstream_encode_str(&stream, field_type_strs[fields[col].type]);
 		mpstream_encode_str(&stream, "field");
 		mpstream_encode_uint(&stream, col);
+
 		if (cid != COLL_NONE) {
 			mpstream_encode_str(&stream, "collation");
 			mpstream_encode_uint(&stream, cid);
diff --git a/src/box/sql/build.c b/src/box/sql/build.c
index 63432801db65c2db7d104b6b1352d81c4ec8e0a3..5b3348bd219f79725f0af6b4e3e673d31a1a05e3 100644
--- a/src/box/sql/build.c
+++ b/src/box/sql/build.c
@@ -485,6 +485,22 @@ sql_field_retrieve(Parse *parser, Table *table, uint32_t id)
 	return field;
 }
 
+enum field_type
+sql_affinity_to_field_type(enum affinity_type affinity)
+{
+	switch (affinity) {
+		case AFFINITY_INTEGER:
+			return FIELD_TYPE_INTEGER;
+		case AFFINITY_REAL:
+		case AFFINITY_NUMERIC:
+			return FIELD_TYPE_NUMBER;
+		case AFFINITY_TEXT:
+			return FIELD_TYPE_STRING;
+		default:
+			return FIELD_TYPE_SCALAR;
+	}
+}
+
 /*
  * Add a new column to the table currently being constructed.
  *
@@ -494,12 +510,12 @@ sql_field_retrieve(Parse *parser, Table *table, uint32_t id)
  * column.
  */
 void
-sqlite3AddColumn(Parse * pParse, Token * pName, Token * pType)
+sqlite3AddColumn(Parse * pParse, Token * pName, struct type_def *type_def)
 {
+	assert(type_def != NULL);
 	Table *p;
 	int i;
 	char *z;
-	char *zType;
 	sqlite3 *db = pParse->db;
 	if ((p = pParse->pNewTable) == 0)
 		return;
@@ -547,35 +563,8 @@ sqlite3AddColumn(Parse * pParse, Token * pName, Token * pType)
 	 */
 	column_def->nullable_action = ON_CONFLICT_ACTION_DEFAULT;
 	column_def->is_nullable = true;
-
-	if (pType->n == 0) {
-		/* If there is no type specified, columns have the default affinity
-		 * 'BLOB' and type SCALAR.
-		 * TODO: since SQL standard prohibits column creation without
-		 * specified type, the code below should emit an error.
-		 */
-		column_def->affinity = AFFINITY_BLOB;
-		column_def->type = FIELD_TYPE_SCALAR;
-	} else {
-		/* TODO: convert string of type into runtime
-		 * FIELD_TYPE value for other types.
-		 */
-		if ((sqlite3StrNICmp(pType->z, "INTEGER", 7) == 0 &&
-		     pType->n == 7) ||
-		    (sqlite3StrNICmp(pType->z, "INT", 3) == 0 &&
-		     pType->n == 3)) {
-			column_def->type = FIELD_TYPE_INTEGER;
-			column_def->affinity = AFFINITY_INTEGER;
-		} else {
-			zType = sqlite3_malloc(pType->n + 1);
-			memcpy(zType, pType->z, pType->n);
-			zType[pType->n] = 0;
-			sqlite3Dequote(zType);
-			column_def->affinity = sqlite3AffinityType(zType, 0);
-			column_def->type = FIELD_TYPE_SCALAR;
-			sqlite3_free(zType);
-		}
-	}
+	column_def->affinity = type_def->type;
+	column_def->type = sql_affinity_to_field_type(column_def->affinity);
 	p->def->field_count++;
 	pParse->constraintName.n = 0;
 }
@@ -1128,8 +1117,7 @@ getNewSpaceId(Parse * pParse)
  */
 static void
 vdbe_emit_create_index(struct Parse *parse, struct space_def *def,
-		       const struct index_def *idx_def,
-		       const struct index_def *pk_def, int space_id_reg,
+		       const struct index_def *idx_def, int space_id_reg,
 		       int index_id_reg)
 {
 	struct Vdbe *v = sqlite3GetVdbe(parse);
@@ -1148,7 +1136,7 @@ vdbe_emit_create_index(struct Parse *parse, struct space_def *def,
 		goto error;
 	uint32_t index_parts_sz = 0;
 	char *index_parts = sql_encode_index_parts(region, def->fields, idx_def,
-						   pk_def, &index_parts_sz);
+						   &index_parts_sz);
 	if (index_parts == NULL)
 		goto error;
 	char *raw = sqlite3DbMallocRaw(parse->db,
@@ -1553,12 +1541,10 @@ sqlite3EndTable(Parse * pParse,	/* Parse context */
 	createSpace(pParse, reg_space_id, stmt);
 	/* Indexes aren't required for VIEW's.. */
 	if (!p->def->opts.is_view) {
-		struct index *pk = sql_table_primary_key(p);
 		for (uint32_t i = 0; i < p->space->index_count; ++i) {
 			struct index *idx = p->space->index[i];
 			vdbe_emit_create_index(pParse, p->def, idx->def,
-					       pk->def, reg_space_id,
-					       idx->def->iid);
+					       reg_space_id, idx->def->iid);
 		}
 	}
 
@@ -2785,8 +2771,7 @@ sql_create_index(struct Parse *parse, struct Token *token,
 		assert(start != NULL);
 		int index_id = getNewIid(parse, def->id, cursor);
 		sqlite3VdbeAddOp1(vdbe, OP_Close, cursor);
-		struct index *pk = space_index(space, 0);
-		vdbe_emit_create_index(parse, def, index->def, pk->def,
+		vdbe_emit_create_index(parse, def, index->def,
 				       def->id, index_id);
 		sqlite3VdbeAddOp0(vdbe, OP_Expire);
 	}
diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c
index af5f3e5608aebf3b99ca8b1213af9936928a03f7..2d5d1ad1798ab8d3d59fdb10682ad0cddcabdd2e 100644
--- a/src/box/sql/expr.c
+++ b/src/box/sql/expr.c
@@ -72,32 +72,52 @@ sqlite3TableColumnAffinity(struct space_def *def, int idx)
 char
 sqlite3ExprAffinity(Expr * pExpr)
 {
-	int op;
 	pExpr = sqlite3ExprSkipCollate(pExpr);
 	if (pExpr->flags & EP_Generic)
 		return 0;
-	op = pExpr->op;
-	if (op == TK_SELECT) {
-		assert(pExpr->flags & EP_xIsSelect);
-		return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].
-					   pExpr);
-	}
+	uint8_t op = pExpr->op;
+	struct ExprList *el;
 	if (op == TK_REGISTER)
 		op = pExpr->op2;
-#ifndef SQLITE_OMIT_CAST
-	if (op == TK_CAST) {
+	switch (op) {
+	case TK_SELECT:
+		assert(pExpr->flags & EP_xIsSelect);
+		el = pExpr->x.pSelect->pEList;
+		return sqlite3ExprAffinity(el->a[0].pExpr);
+	case TK_CAST:
 		assert(!ExprHasProperty(pExpr, EP_IntValue));
-		return sqlite3AffinityType(pExpr->u.zToken, 0);
-	}
-#endif
-	if (op == TK_AGG_COLUMN || op == TK_COLUMN) {
+		return pExpr->affinity;
+	case TK_AGG_COLUMN:
+	case TK_COLUMN:
+		assert(pExpr->iColumn >= 0);
 		return sqlite3TableColumnAffinity(pExpr->space_def,
 						  pExpr->iColumn);
-	}
-	if (op == TK_SELECT_COLUMN) {
+	case TK_SELECT_COLUMN:
 		assert(pExpr->pLeft->flags & EP_xIsSelect);
-		return sqlite3ExprAffinity(pExpr->pLeft->x.pSelect->pEList->
-					   a[pExpr->iColumn].pExpr);
+		el = pExpr->pLeft->x.pSelect->pEList;
+		return sqlite3ExprAffinity(el->a[pExpr->iColumn].pExpr);
+	case TK_PLUS:
+	case TK_MINUS:
+	case TK_STAR:
+	case TK_SLASH:
+		assert(pExpr->pRight != NULL && pExpr->pLeft != NULL);
+		enum affinity_type lhs_aff = sqlite3ExprAffinity(pExpr->pLeft);
+		enum affinity_type rhs_aff = sqlite3ExprAffinity(pExpr->pRight);
+		return sql_affinity_result(rhs_aff, lhs_aff);
+	case TK_LT:
+	case TK_GT:
+	case TK_EQ:
+	case TK_LE:
+	case TK_NE:
+	case TK_NOT:
+	case TK_AND:
+	case TK_OR:
+		/*
+		 * FIXME: should be changed to BOOL type or
+		 * affinity when it is implemented. Now simply
+		 * return INTEGER.
+		 */
+		return AFFINITY_INTEGER;
 	}
 	return pExpr->affinity;
 }
@@ -228,15 +248,9 @@ sql_expr_coll(Parse *parse, Expr *p, bool *is_found, uint32_t *coll_id)
 	return coll;
 }
 
-/*
- * pExpr is an operand of a comparison operator.  aff2 is the
- * type affinity of the other operand.  This routine returns the
- * type affinity that should be used for the comparison operator.
- */
-char
-sqlite3CompareAffinity(Expr * pExpr, char aff2)
+enum affinity_type
+sql_affinity_result(enum affinity_type aff1, enum affinity_type aff2)
 {
-	char aff1 = sqlite3ExprAffinity(pExpr);
 	if (aff1 && aff2) {
 		/* Both sides of the comparison are columns. If one has numeric
 		 * affinity, use that. Otherwise use no affinity.
@@ -273,11 +287,12 @@ comparisonAffinity(Expr * pExpr)
 	assert(pExpr->pLeft);
 	aff = sqlite3ExprAffinity(pExpr->pLeft);
 	if (pExpr->pRight) {
-		aff = sqlite3CompareAffinity(pExpr->pRight, aff);
+		enum affinity_type rhs_aff = sqlite3ExprAffinity(pExpr->pRight);
+		aff = sql_affinity_result(rhs_aff, aff);
 	} else if (ExprHasProperty(pExpr, EP_xIsSelect)) {
-		aff =
-		    sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr,
-					   aff);
+		enum affinity_type rhs_aff =
+			sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
+		aff = sql_affinity_result(rhs_aff, aff);
 	} else {
 		aff = AFFINITY_BLOB;
 	}
@@ -311,8 +326,10 @@ sqlite3IndexAffinityOk(Expr * pExpr, char idx_affinity)
 static u8
 binaryCompareP5(Expr * pExpr1, Expr * pExpr2, int jumpIfNull)
 {
-	u8 aff = (char)sqlite3ExprAffinity(pExpr2);
-	aff = (u8) sqlite3CompareAffinity(pExpr1, aff) | (u8) jumpIfNull;
+	enum affinity_type aff2 = sqlite3ExprAffinity(pExpr2);
+	enum affinity_type aff1 = sqlite3ExprAffinity(pExpr1);
+	enum affinity_type aff = sql_affinity_result(aff1, aff2) |
+				 (u8) jumpIfNull;
 	return aff;
 }
 
@@ -2375,25 +2392,15 @@ sqlite3FindInIndex(Parse * pParse,	/* Parsing context */
 			Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);
 			int iCol = pEList->a[i].pExpr->iColumn;
 			/* RHS table */
-			char idxaff =
+			enum affinity_type idxaff =
 				sqlite3TableColumnAffinity(pTab->def, iCol);
-			char cmpaff = sqlite3CompareAffinity(pLhs, idxaff);
-			testcase(cmpaff == AFFINITY_BLOB);
-			testcase(cmpaff == AFFINITY_TEXT);
-			switch (cmpaff) {
-			case AFFINITY_BLOB:
-				break;
-			case AFFINITY_TEXT:
-				/* sqlite3CompareAffinity() only returns TEXT if one side or the
-				 * other has no affinity and the other side is TEXT.  Hence,
-				 * the only way for cmpaff to be TEXT is for idxaff to be TEXT
-				 * and for the term on the LHS of the IN to have no affinity.
-				 */
-				assert(idxaff == AFFINITY_TEXT);
-				break;
-			default:
-				affinity_ok = sqlite3IsNumericAffinity(idxaff);
-			}
+			enum affinity_type lhs_aff = sqlite3ExprAffinity(pLhs);
+			/*
+			 * Index search is possible only if types
+			 * of columns match.
+			 */
+			if (lhs_aff != idxaff)
+				affinity_ok = 0;
 		}
 
 		if (affinity_ok) {
@@ -2584,9 +2591,9 @@ exprINAffinity(Parse * pParse, Expr * pExpr)
 			Expr *pA = sqlite3VectorFieldSubexpr(pLeft, i);
 			char a = sqlite3ExprAffinity(pA);
 			if (pSelect) {
-				zRet[i] =
-				    sqlite3CompareAffinity(pSelect->pEList->
-							   a[i].pExpr, a);
+				struct Expr *e = pSelect->pEList->a[i].pExpr;
+				enum affinity_type aff = sqlite3ExprAffinity(e);
+				zRet[i] = sql_affinity_result(aff, a);
 			} else {
 				zRet[i] = a;
 			}
@@ -3115,27 +3122,7 @@ sqlite3ExprCodeIN(Parse * pParse,	/* Parsing and code generating context */
 	 * of the RHS using the LHS as a probe.  If found, the result is
 	 * true.
 	 */
-	sqlite3VdbeAddOp4(v, OP_Affinity, rLhs, nVector, 0, zAff,
-			  nVector);
-	if ((pExpr->flags & EP_xIsSelect)
-	    && !pExpr->is_ephemeral) {
-		struct SrcList *src_list = pExpr->x.pSelect->pSrc;
-		assert(src_list->nSrc == 1);
-
-		struct Table *tab = src_list->a[0].pTab;
-		assert(tab != NULL);
-		struct index *pk = space_index(tab->space, 0);
-		assert(pk != NULL);
-
-		uint32_t fieldno = pk->def->key_def->parts[0].fieldno;
-		enum affinity_type affinity =
-			tab->def->fields[fieldno].affinity;
-		if (pk->def->key_def->part_count == 1 &&
-		    affinity == AFFINITY_INTEGER && (int)fieldno < nVector) {
-			int reg_pk = rLhs + (int)fieldno;
-			sqlite3VdbeAddOp2(v, OP_MustBeInt, reg_pk, destIfFalse);
-		}
-	}
+	sqlite3VdbeAddOp4(v, OP_Affinity, rLhs, nVector, 0, zAff, nVector);
 	if (destIfFalse == destIfNull) {
 		/* Combine Step 3 and Step 5 into a single opcode */
 		sqlite3VdbeAddOp4Int(v, OP_NotFound, pExpr->iTable,
@@ -3749,9 +3736,7 @@ sqlite3ExprCodeTarget(Parse * pParse, Expr * pExpr, int target)
 				sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target);
 				inReg = target;
 			}
-			sqlite3VdbeAddOp2(v, OP_Cast, target,
-					  sqlite3AffinityType(pExpr->u.zToken,
-							      0));
+			sqlite3VdbeAddOp2(v, OP_Cast, target, pExpr->affinity);
 			testcase(usedAsColumnCache(pParse, inReg, inReg));
 			sqlite3ExprCacheAffinityChange(pParse, inReg, 1);
 			return inReg;
diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y
index 90d22aca65bf9e48f03a935a7ce7c33a5bac23ce..abaa73736cbdbde008e5aabdd54eda85f99c1915 100644
--- a/src/box/sql/parse.y
+++ b/src/box/sql/parse.y
@@ -185,7 +185,7 @@ create_table_args ::= AS select(S). {
 }
 columnlist ::= columnlist COMMA columnname carglist.
 columnlist ::= columnname carglist.
-columnname(A) ::= nm(A) typetoken(Y). {sqlite3AddColumn(pParse,&A,&Y);}
+columnname(A) ::= nm(A) typedef(Y). {sqlite3AddColumn(pParse,&A,&Y);}
 
 // An IDENTIFIER can be a generic identifier, or one of several
 // keywords.  Any non-standard keyword can also be an identifier.
@@ -229,25 +229,6 @@ nm(A) ::= id(A). {
   }
 }
 
-// A typetoken is really zero or more tokens that form a type name such
-// as can be found after the column name in a CREATE TABLE statement.
-// Multiple tokens are concatenated to form the value of the typetoken.
-//
-%type typetoken {Token}
-typetoken(A) ::= .   {A.n = 0; A.z = 0;}
-typetoken(A) ::= typename(A).
-typetoken(A) ::= typename(A) LP signed RP(Y). {
-  A.n = (int)(&Y.z[Y.n] - A.z);
-}
-typetoken(A) ::= typename(A) LP signed COMMA signed RP(Y). {
-  A.n = (int)(&Y.z[Y.n] - A.z);
-}
-%type typename {Token}
-typename(A) ::= ids(A).
-typename(A) ::= typename(A) ids(Y). {A.n=Y.n+(int)(Y.z-A.z);}
-signed ::= plus_num.
-signed ::= minus_num.
-
 // "carglist" is a list of additional constraints that come after the
 // column name and column type in a CREATE TABLE statement.
 //
@@ -837,6 +818,20 @@ idlist(A) ::= nm(Y).
     Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
     if( p ){
       memset(p, 0, sizeof(Expr));
+      switch (op) {
+      case TK_STRING:
+        p->affinity = AFFINITY_TEXT;
+        break;
+      case TK_BLOB:
+        p->affinity = AFFINITY_BLOB;
+        break;
+      case TK_INTEGER:
+        p->affinity = AFFINITY_INTEGER;
+        break;
+      case TK_FLOAT:
+        p->affinity = AFFINITY_REAL;
+        break;
+      }
       p->op = (u8)op;
       p->flags = EP_Leaf;
       p->iAgg = -1;
@@ -872,6 +867,7 @@ term(A) ::= FLOAT|BLOB(X). {spanExpr(&A,pParse,@X,X);/*A-overwrites-X*/}
 term(A) ::= STRING(X).     {spanExpr(&A,pParse,@X,X);/*A-overwrites-X*/}
 term(A) ::= INTEGER(X). {
   A.pExpr = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &X, 1);
+  A.pExpr->affinity = AFFINITY_INTEGER;
   A.zStart = X.z;
   A.zEnd = X.z + X.n;
   if( A.pExpr ) A.pExpr->flags |= EP_Leaf;
@@ -901,9 +897,10 @@ expr(A) ::= expr(A) COLLATE id(C). {
   A.zEnd = &C.z[C.n];
 }
 %ifndef SQLITE_OMIT_CAST
-expr(A) ::= CAST(X) LP expr(E) AS typetoken(T) RP(Y). {
+expr(A) ::= CAST(X) LP expr(E) AS typedef(T) RP(Y). {
   spanSet(&A,&X,&Y); /*A-overwrites-X*/
-  A.pExpr = sqlite3ExprAlloc(pParse->db, TK_CAST, &T, 1);
+  A.pExpr = sqlite3ExprAlloc(pParse->db, TK_CAST, 0, 1);
+  A.pExpr->affinity = T.type;
   sqlite3ExprAttachSubtrees(pParse->db, A.pExpr, E.pExpr, 0);
 }
 %endif  SQLITE_OMIT_CAST
@@ -917,6 +914,21 @@ expr(A) ::= id(X) LP distinct(D) exprlist(Y) RP(E). {
     A.pExpr->flags |= EP_Distinct;
   }
 }
+
+type_func(A) ::= DATE(A) .
+type_func(A) ::= DATETIME(A) .
+type_func(A) ::= CHAR(A) .
+expr(A) ::= type_func(X) LP distinct(D) exprlist(Y) RP(E). {
+  if( Y && Y->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
+    sqlite3ErrorMsg(pParse, "too many arguments on function %T", &X);
+  }
+  A.pExpr = sqlite3ExprFunction(pParse, Y, &X);
+  spanSet(&A,&X,&E);
+  if( D==SF_Distinct && A.pExpr ){
+    A.pExpr->flags |= EP_Distinct;
+  }
+}
+
 expr(A) ::= id(X) LP STAR RP(E). {
   A.pExpr = sqlite3ExprFunction(pParse, 0, &X);
   spanSet(&A,&X,&E);
@@ -1410,7 +1422,7 @@ expr(A) ::= RAISE(X) LP IGNORE RP(Y).  {
 }
 expr(A) ::= RAISE(X) LP raisetype(T) COMMA STRING(Z) RP(Y).  {
   spanSet(&A,&X,&Y);  /*A-overwrites-X*/
-  A.pExpr = sqlite3ExprAlloc(pParse->db, TK_RAISE, &Z, 1); 
+  A.pExpr = sqlite3ExprAlloc(pParse->db, TK_RAISE, &Z, 1);
   if( A.pExpr ) {
     A.pExpr->on_conflict_action = (enum on_conflict_action) T;
   }
@@ -1464,3 +1476,45 @@ wqlist(A) ::= wqlist(A) COMMA nm(X) eidlist_opt(Y) AS LP select(Z) RP. {
   A = sqlite3WithAdd(pParse, A, &X, Y, Z);
 }
 %endif  SQLITE_OMIT_CTE
+
+/* Primitive types. */
+%type typedef {struct type_def}
+typedef(A) ::= TEXT . { A.type = AFFINITY_TEXT; }
+typedef(A) ::= BLOB . { A.type = AFFINITY_BLOB; }
+typedef(A) ::= DATE . { A.type = AFFINITY_REAL; }
+typedef(A) ::= TIME . { A.type = AFFINITY_REAL; }
+typedef(A) ::= DATETIME . { A.type = AFFINITY_REAL; }
+
+%type char_len_typedef {struct type_def}
+typedef(A) ::= CHAR|VARCHAR char_len_typedef(B) . {
+  A.type = AFFINITY_TEXT;
+  (void) B;
+}
+
+char_len_typedef(A) ::= LP INTEGER(B) RP . {
+  (void) A;
+  (void) B;
+}
+
+%type number_typedef {struct type_def}
+typedef(A) ::= number_typedef(A) .
+number_typedef(A) ::= FLOAT|REAL|DOUBLE . { A.type = AFFINITY_REAL; }
+number_typedef(A) ::= INT|INTEGER . { A.type = AFFINITY_INTEGER; }
+
+%type number_len_typedef {struct type_def}
+number_typedef(A) ::= DECIMAL|NUMERIC|NUM number_len_typedef(B) . {
+  A.type = AFFINITY_REAL;
+  (void) B;
+}
+
+number_len_typedef(A) ::= . { (void) A; }
+number_len_typedef(A) ::= LP INTEGER(B) RP . {
+  (void) A;
+  (void) B;
+}
+
+number_len_typedef(A) ::= LP INTEGER(B) COMMA INTEGER(C) RP . {
+  (void) A;
+  (void) B;
+  (void) C;
+}
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 77e0c5d66f74f6c4f95d706118e597a29cb7dd5c..505c0616c8ed18158aa591832a96b51c552bbe2b 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1664,162 +1664,6 @@ generateSortTail(Parse * pParse,	/* Parsing context */
 	sqlite3VdbeResolveLabel(v, addrBreak);
 }
 
-/*
- * Return a pointer to a string containing the 'declaration type' of the
- * expression pExpr. The string may be treated as static by the caller.
- *
- * Also try to estimate the size of the returned value and return that
- * result in *pEstWidth.
- *
- * The declaration type is the exact datatype definition extracted from the
- * original CREATE TABLE statement if the expression is a column.
- * Exactly when an expression is considered a column can be complex
- * in the presence of subqueries. The result-set expression in all
- * of the following SELECT statements is considered a column by this function.
- *
- *   SELECT col FROM tbl;
- *   SELECT (SELECT col FROM tbl;
- *   SELECT (SELECT col FROM tbl);
- *   SELECT abc FROM (SELECT col AS abc FROM tbl);
- *
- * The declaration type for any expression other than a column is NULL.
- *
- * This routine has either 3 or 6 parameters depending on whether or not
- * the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used.
- */
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
-#define columnType(A,B,C,D) columnTypeImpl(A,B,C,D)
-#else				/* if !defined(SQLITE_ENABLE_COLUMN_METADATA) */
-#define columnType(A,B,C,D) columnTypeImpl(A,B)
-#endif
-static enum field_type
-columnTypeImpl(NameContext * pNC, Expr * pExpr
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
-	       , const char **pzOrigCol,
-#endif
-)
-{
-	enum field_type column_type = FIELD_TYPE_SCALAR;
-	int j;
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
-	char const *zOrigTab = 0;
-	char const *zOrigCol = 0;
-#endif
-
-	assert(pExpr != 0);
-	assert(pNC->pSrcList != 0);
-	switch (pExpr->op) {
-	case TK_AGG_COLUMN:
-	case TK_COLUMN:{
-			/* The expression is a column. Locate the table the column is being
-			 * extracted from in NameContext.pSrcList. This table may be real
-			 * database table or a subquery.
-			 */
-			Table *pTab = 0;	/* Table structure column is extracted from */
-			Select *pS = 0;	/* Select the column is extracted from */
-			int iCol = pExpr->iColumn;	/* Index of column in pTab */
-			testcase(pExpr->op == TK_AGG_COLUMN);
-			testcase(pExpr->op == TK_COLUMN);
-			while (pNC && !pTab) {
-				SrcList *pTabList = pNC->pSrcList;
-				for (j = 0;
-				     j < pTabList->nSrc
-				     && pTabList->a[j].iCursor != pExpr->iTable;
-				     j++) ;
-				if (j < pTabList->nSrc) {
-					pTab = pTabList->a[j].pTab;
-					pS = pTabList->a[j].pSelect;
-				} else {
-					pNC = pNC->pNext;
-				}
-			}
-
-			if (pTab == 0) {
-				/* At one time, code such as "SELECT new.x" within a trigger would
-				 * cause this condition to run.  Since then, we have restructured how
-				 * trigger code is generated and so this condition is no longer
-				 * possible. However, it can still be true for statements like
-				 * the following:
-				 *
-				 *   CREATE TABLE t1(col INTEGER);
-				 *   SELECT (SELECT t1.col) FROM FROM t1;
-				 *
-				 * when columnType() is called on the expression "t1.col" in the
-				 * sub-select. In this case, set the column type to NULL, even
-				 * though it should really be "INTEGER".
-				 *
-				 * This is not a problem, as the column type of "t1.col" is never
-				 * used. When columnType() is called on the expression
-				 * "(SELECT t1.col)", the correct type is returned (see the TK_SELECT
-				 * branch below.
-				 */
-				break;
-			}
-
-			assert(pTab && pExpr->space_def == pTab->def);
-			if (pS) {
-				/* The "table" is actually a sub-select or a view in the FROM clause
-				 * of the SELECT statement. Return the declaration type and origin
-				 * data for the result-set column of the sub-select.
-				 */
-				assert(iCol >= 0);
-				if (ALWAYS(iCol < pS->pEList->nExpr)) {
-					/* The ALWAYS() is because
-					 * iCol>=pS->pEList->nExpr will have been
-					 * caught already by name resolution.
-					 */
-					NameContext sNC;
-					Expr *p = pS->pEList->a[iCol].pExpr;
-					sNC.pSrcList = pS->pSrc;
-					sNC.pNext = pNC;
-					sNC.pParse = pNC->pParse;
-					column_type =
-					    columnType(&sNC, p, &zOrigTab,
-						       &zOrigCol);
-				}
-			} else {
-				/* A real table */
-				assert(!pS);
-				assert(iCol >= 0 &&
-				       iCol < (int)pTab->def->field_count);
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
-				zOrigCol = pTab->def->fields[iCol].name;
-				zType = pTab->def->fields[iCol].type;
-				zOrigTab = pTab->zName;
-#else
-				column_type = pTab->def->fields[iCol].type;
-#endif
-			}
-			break;
-		}
-	case TK_SELECT:{
-			/* The expression is a sub-select. Return the declaration type and
-			 * origin info for the single column in the result set of the SELECT
-			 * statement.
-			 */
-			NameContext sNC;
-			Select *pS = pExpr->x.pSelect;
-			Expr *p = pS->pEList->a[0].pExpr;
-			assert(ExprHasProperty(pExpr, EP_xIsSelect));
-			sNC.pSrcList = pS->pSrc;
-			sNC.pNext = pNC;
-			sNC.pParse = pNC->pParse;
-			column_type =
-			    columnType(&sNC, p, &zOrigTab, &zOrigCol);
-			break;
-		}
-	}
-
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
-	if (pzOrigTab) {
-		assert(pzOrigTab && pzOrigCol);
-		*pzOrigTab = zOrigTab;
-		*pzOrigCol = zOrigCol;
-	}
-#endif
-	return column_type;
-}
-
 /*
  * Generate code that will tell the VDBE the names of columns
  * in the result set.  This information is used to provide the
@@ -2055,15 +1899,12 @@ sqlite3SelectAddColumnTypeAndCollation(Parse * pParse,		/* Parsing contexts */
 	sNC.pSrcList = pSelect->pSrc;
 	a = pSelect->pEList->a;
 	for (uint32_t i = 0; i < pTab->def->field_count; i++) {
-		enum field_type type;
 		p = a[i].pExpr;
-		type = columnType(&sNC, p, 0, 0);
-		pTab->def->fields[i].type = type;
-
 		char affinity = sqlite3ExprAffinity(p);
 		if (affinity == 0)
 			affinity = AFFINITY_BLOB;
 		pTab->def->fields[i].affinity = affinity;
+		pTab->def->fields[i].type = sql_affinity_to_field_type(affinity);
 		bool is_found;
 		uint32_t coll_id;
 		if (pTab->def->fields[i].coll_id == COLL_NONE &&
diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h
index 2df7c82d7993e912227191f6c0f2a38932914244..4277bd9bcad153a5859ac0429da5d83f444e120b 100644
--- a/src/box/sql/sqliteInt.h
+++ b/src/box/sql/sqliteInt.h
@@ -291,6 +291,8 @@ void sqlite3Coverage(int);
  */
 #define IS_BIG_INT(X)  (((X)&~(i64)0xffffffff)!=0)
 
+#define SQLITE_LIKE_DOESNT_MATCH_BLOBS
+
 #include "hash.h"
 #include "parse.h"
 #include <stdio.h>
@@ -1620,6 +1622,15 @@ struct sqlite3 {
 #define SQLITE_MAGIC_ERROR    0xb5357930	/* An SQLITE_MISUSE error occurred */
 #define SQLITE_MAGIC_ZOMBIE   0x64cffc7f	/* Close with last statement close */
 
+/**
+ * SQL type definition. Now it is an alias to affinity, but in
+ * future it will have some attributes like number of chars in
+ * VARCHAR(<number of chars>).
+ */
+struct type_def {
+	enum affinity_type type;
+};
+
 /*
  * Each SQL function is defined by an instance of the following
  * structure.  For global built-in functions (ex: substr(), max(), count())
@@ -3328,7 +3339,7 @@ struct index *
 sql_table_primary_key(const struct Table *tab);
 
 void sqlite3StartTable(Parse *, Token *, int);
-void sqlite3AddColumn(Parse *, Token *, Token *);
+void sqlite3AddColumn(Parse *, Token *, struct type_def *);
 
 /**
  * This routine is called by the parser while in the middle of
@@ -3412,6 +3423,13 @@ sql_create_view(struct Parse *parse_context, struct Token *begin,
 		struct Token *name, struct ExprList *aliases,
 		struct Select *select, bool if_exists);
 
+/**
+ * Helper to convert SQLite affinity to corresponding
+ * Tarantool field type.
+ **/
+enum field_type
+sql_affinity_to_field_type(enum affinity_type affinity);
+
 /**
  * Compile view, i.e. create struct Select from
  * 'CREATE VIEW...' string, and assign cursors to each table from
@@ -4220,7 +4238,14 @@ sql_space_index_affinity_str(struct sqlite3 *db, struct space_def *space_def,
 void
 sql_emit_table_affinity(struct Vdbe *v, struct space_def *def, int reg);
 
-char sqlite3CompareAffinity(Expr * pExpr, char aff2);
+/**
+ * Return superposition of two affinities.
+ * This may be required for determining resulting
+ * affinity of expressions like a + '2'.
+ */
+enum affinity_type
+sql_affinity_result(enum affinity_type aff1, enum affinity_type aff2);
+
 int sqlite3IndexAffinityOk(Expr * pExpr, char idx_affinity);
 
 /**
diff --git a/src/box/sql/tarantoolInt.h b/src/box/sql/tarantoolInt.h
index daab3c84bc77955c212b7159d349beec03b420bb..c5730cb9dc737ed88689ef58b039a20e87f83e87 100644
--- a/src/box/sql/tarantoolInt.h
+++ b/src/box/sql/tarantoolInt.h
@@ -217,9 +217,7 @@ fkey_encode_links(struct region *region, const struct fkey_def *def, int type,
  */
 char *
 sql_encode_index_parts(struct region *region, const struct field_def *fields,
-		       const struct index_def *idx_def,
-		       const struct index_def *pk_def,
-		       uint32_t *size);
+		       const struct index_def *idx_def, uint32_t *size);
 
 /**
  * Encode "opts" dictionary for _index entry on @region.
diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
index d6d6b7ed8f0d0cd4c8dda3137df2cf425ffc6cc6..e61c51d66b83865d001e8a2be94447617ac5945a 100644
--- a/src/box/sql/vdbe.c
+++ b/src/box/sql/vdbe.c
@@ -286,13 +286,13 @@ allocateCursor(
  * point or exponential notation, the result is only MEM_Real, even
  * if there is an exact integer representation of the quantity.
  */
-static void
+static int
 applyNumericAffinity(Mem *pRec, int bTryForInt)
 {
 	double rValue;
 	i64 iValue;
 	assert((pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str);
-	if (sqlite3AtoF(pRec->z, &rValue, pRec->n)==0) return;
+	if (sqlite3AtoF(pRec->z, &rValue, pRec->n) == 0) return -1;
 	if (0 == sql_atoi64(pRec->z, (int64_t *)&iValue, pRec->n)) {
 		pRec->u.i = iValue;
 		pRec->flags |= MEM_Int;
@@ -301,6 +301,7 @@ applyNumericAffinity(Mem *pRec, int bTryForInt)
 		pRec->flags |= MEM_Real;
 		if (bTryForInt) sqlite3VdbeIntegerAffinity(pRec);
 	}
+	return 0;
 }
 
 /*
@@ -2114,7 +2115,14 @@ case OP_Ge: {             /* same as TK_GE, jump, in1, in3 */
 					flags3 = pIn3->flags;
 				}
 				if ((flags3 & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str) {
-					applyNumericAffinity(pIn3,0);
+					if (applyNumericAffinity(pIn3,0) != 0) {
+						sqlite3VdbeError(p,
+								 "Can't convert to numeric %s",
+								 sqlite3_value_text(pIn3));
+						rc = SQLITE_MISMATCH;
+						goto abort_due_to_error;
+					}
+
 				}
 			}
 			/* Handle the common case of integer comparison here, as an
diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c
index e0b65fef5f96a90fff83ddc807ee2fab6fc961e4..072a05066b3f1bfe0a944f6991ba01104fb78b81 100644
--- a/src/box/sql/vdbemem.c
+++ b/src/box/sql/vdbemem.c
@@ -1257,7 +1257,7 @@ valueFromExpr(sqlite3 * db,	/* The database connection */
 	assert((pExpr->flags & EP_TokenOnly) == 0 || pCtx == 0);
 
 	if (op == TK_CAST) {
-		u8 aff = sqlite3AffinityType(pExpr->u.zToken, 0);
+		u8 aff = pExpr->affinity;
 		rc = valueFromExpr(db, pExpr->pLeft, aff, ppVal, pCtx);
 		testcase(rc != SQLITE_OK);
 		if (*ppVal) {
diff --git a/src/box/sql/where.c b/src/box/sql/where.c
index 713cabaff6e9368373b161004db9cd9696b20710..8c78c0c9b5e5fc7abe7ea5facd5b7a8447f74e22 100644
--- a/src/box/sql/where.c
+++ b/src/box/sql/where.c
@@ -2254,7 +2254,8 @@ whereRangeVectorLen(Parse * pParse,	/* Parsing context */
 {
 	int nCmp = sqlite3ExprVectorSize(pTerm->pExpr->pLeft);
 	int i;
-
+	struct space *space = space_by_id(idx_def->space_id);
+	assert(space != NULL);
 	nCmp = MIN(nCmp, (int)(idx_def->key_def->part_count - nEq));
 	for (i = 1; i < nCmp; i++) {
 		/* Test if comparison i of pTerm is compatible with column (i+nEq)
@@ -2281,10 +2282,8 @@ whereRangeVectorLen(Parse * pParse,	/* Parsing context */
 		    pLhs->iColumn != (int)parts[i + nEq].fieldno ||
 		    parts[i + nEq].sort_order != parts[nEq].sort_order)
 			break;
-
-		struct space *space = space_by_id(idx_def->space_id);
-		assert(space != NULL);
-		aff = sqlite3CompareAffinity(pRhs, sqlite3ExprAffinity(pLhs));
+		enum affinity_type rhs_aff = sqlite3ExprAffinity(pRhs);
+		aff = sql_affinity_result(rhs_aff, sqlite3ExprAffinity(pLhs));
 		idxaff =
 		    sqlite3TableColumnAffinity(space->def, pLhs->iColumn);
 		if (aff != idxaff)
diff --git a/src/box/sql/wherecode.c b/src/box/sql/wherecode.c
index 8b161192eadfceecf58fc5b146034d1f12f81629..02a6d3907bdfdf7ee3abfe4d0a24642aea53a018 100644
--- a/src/box/sql/wherecode.c
+++ b/src/box/sql/wherecode.c
@@ -421,7 +421,8 @@ updateRangeAffinityStr(Expr * pRight,	/* RHS of comparison */
 	int i;
 	for (i = 0; i < n; i++) {
 		Expr *p = sqlite3VectorFieldSubexpr(pRight, i);
-		if (sqlite3CompareAffinity(p, zAff[i]) == AFFINITY_BLOB
+		enum affinity_type aff = sqlite3ExprAffinity(p);
+		if (sql_affinity_result(aff, zAff[i]) == AFFINITY_BLOB
 		    || sqlite3ExprNeedsNoAffinityChange(p, zAff[i])) {
 			zAff[i] = AFFINITY_BLOB;
 		}
@@ -774,7 +775,9 @@ codeAllEqualityTerms(Parse * pParse,	/* Parsing context */
 				VdbeCoverage(v);
 			}
 			if (zAff) {
-				if (sqlite3CompareAffinity(pRight, zAff[j]) ==
+				enum affinity_type aff =
+					sqlite3ExprAffinity(pRight);
+				if (sql_affinity_result(aff, zAff[j]) ==
 				    AFFINITY_BLOB) {
 					zAff[j] = AFFINITY_BLOB;
 				}
diff --git a/test/box/sql-update-with-nested-select.result b/test/box/sql-update-with-nested-select.result
index 419cebb611ebc8c90c4caeb912720b8cdf342834..64a4fb65673c8e355b884b646955a7e2e4a763e5 100644
--- a/test/box/sql-update-with-nested-select.result
+++ b/test/box/sql-update-with-nested-select.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);");
 ---
 ...
 -- Debug
diff --git a/test/box/sql-update-with-nested-select.test.lua b/test/box/sql-update-with-nested-select.test.lua
index 7b90968ae13a7bb1525158914f802b46bd166c89..9421a3b525c31b74722b63a0aceffc3b23ff5e1f 100644
--- a/test/box/sql-update-with-nested-select.test.lua
+++ b/test/box/sql-update-with-nested-select.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);");
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql-tap/affinity2.test.lua b/test/sql-tap/affinity2.test.lua
deleted file mode 100755
index 16cd81432997d51b475e4622219c86778bc68bd0..0000000000000000000000000000000000000000
--- a/test/sql-tap/affinity2.test.lua
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/env tarantool
-test = require("sqltester")
-test:plan(10)
-
---!./tcltestrunner.lua
--- 2015-06-02
---
--- The author disclaims copyright to this source code.  In place of
--- a legal notice, here is a blessing:
---
---    May you do good and not evil.
---    May you find forgiveness for yourself and forgive others.
---    May you share freely, never taking more than you give.
---
--------------------------------------------------------------------------
--- This file implements regression tests for SQLite library.  The
--- focus of this file is type affinity in comparison operations.
---
--- EVERYWHERE HERE WAS 'ROWID' INSTEAD OF 'ID'
--- ["set","testdir",[["file","dirname",["argv0"]]]]
--- ["source",[["testdir"],"\/tester.tcl"]]
-test:do_execsql_test(
-    "affinity2-100",
-    [[
-        CREATE TABLE t1(
-          id integer primary key,
-          xi INTEGER,
-          xr REAL,
-          xb BLOB,
-          xn NUMERIC,
-          xt TEXT
-        );
-        INSERT INTO t1(id,xi,xr,xb,xn,xt) VALUES(1,1,1,1,1,1);
-        INSERT INTO t1(id,xi,xr,xb,xn,xt) VALUES(2,'2','2','2','2','2');
-        INSERT INTO t1(id,xi,xr,xb,xn,xt) VALUES(3,'03','03','03','03','03');
-
-    ]], {
-        -- <affinity2-100>
-        
-        -- </affinity2-100>
-    })
-
-test:do_execsql_test(
-    "affinity2-110",
-    [[
-        SELECT xi, typeof(xi) FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-110>
-        1, "integer", 2, "integer", 3, "integer"
-        -- </affinity2-110>
-    })
-
-test:do_execsql_test(
-    "affinity2-120",
-    [[
-        SELECT xr, typeof(xr) FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-120>
-        1.0, "real", 2.0, "real", 3.0, "real"
-        -- </affinity2-120>
-    })
-
-test:do_execsql_test(
-    "affinity2-130",
-    [[
-        SELECT xb, typeof(xb) FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-130>
-        1, "integer", "2", "text", "03", "text"
-        -- </affinity2-130>
-    })
-
-test:do_execsql_test(
-    "affinity2-140",
-    [[
-        SELECT xn, typeof(xn) FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-140>
-        1, "integer", 2, "integer", 3, "integer"
-        -- </affinity2-140>
-    })
-
-test:do_execsql_test(
-    "affinity2-150",
-    [[
-        SELECT xt, typeof(xt) FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-150>
-        "1", "text", "2", "text", "03", "text"
-        -- </affinity2-150>
-    })
-
-test:do_execsql_test(
-    "affinity2-200",
-    [[
-        SELECT id, xi==xt, xi==xb, xi==+xt FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-200>
-        1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
-        -- </affinity2-200>
-    })
-
-test:do_execsql_test(
-    "affinity2-210",
-    [[
-        SELECT id, xr==xt, xr==xb, xr==+xt FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-210>
-        1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
-        -- </affinity2-210>
-    })
-
-test:do_execsql_test(
-    "affinity2-220",
-    [[
-        SELECT id, xn==xt, xn==xb, xn==+xt FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-220>
-        1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
-        -- </affinity2-220>
-    })
-
-test:do_execsql_test(
-    "affinity2-300",
-    [[
-        SELECT id, xt==+xi, xt==xi, xt==xb FROM t1 ORDER BY id;
-    ]], {
-        -- <affinity2-300>
-        1, 1, 1, 0, 2, 1, 1, 1, 3, 0, 1, 1
-        -- </affinity2-300>
-    })
-
-
-
-test:finish_test()
diff --git a/test/sql-tap/aggnested.test.lua b/test/sql-tap/aggnested.test.lua
index 627abdda5d851b3b2e4aa33c3a96869262921bc9..08d4bce993f708a3c7b58e723f5564b11f68cc69 100755
--- a/test/sql-tap/aggnested.test.lua
+++ b/test/sql-tap/aggnested.test.lua
@@ -223,9 +223,9 @@ test:do_execsql_test("aggnested-3.3",
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(id1, value1 PRIMARY KEY);
+        CREATE TABLE t1(id1 INT, value1 INT PRIMARY KEY);
         INSERT INTO t1 VALUES(4469,2),(4469,1);
-        CREATE TABLE t2 (value2 PRIMARY KEY);
+        CREATE TABLE t2 (value2 INT PRIMARY KEY);
         INSERT INTO t2 VALUES(1);
         SELECT (SELECT sum(value2=value1) FROM t2), max(value1)
           FROM t1
diff --git a/test/sql-tap/alias.test.lua b/test/sql-tap/alias.test.lua
index df082b6991d8d048799c2c37c9f7f11ea1d4d2a4..57e3335e90d55d4c2373e7824fc153df7a524950 100755
--- a/test/sql-tap/alias.test.lua
+++ b/test/sql-tap/alias.test.lua
@@ -38,7 +38,7 @@ test:do_test(
     "alias-1.1",
     function()
         return test:execsql([[
-            CREATE TABLE t1(x primary key);
+            CREATE TABLE t1(x INT primary key);
             INSERT INTO t1 VALUES(9);
             INSERT INTO t1 VALUES(8);
             INSERT INTO t1 VALUES(7);
diff --git a/test/sql-tap/alter.test.lua b/test/sql-tap/alter.test.lua
index 355c87a09caa350e4d8716441bdcf2643ce92ab4..098b08fede1ef0402865b9015ed1a501ff9c9ff2 100755
--- a/test/sql-tap/alter.test.lua
+++ b/test/sql-tap/alter.test.lua
@@ -5,14 +5,14 @@ test:plan(41)
 test:do_execsql_test(
     "alter-1.1",
     [[
-        CREATE TABLE t1(id PRIMARY KEY, a, b);
+        CREATE TABLE t1(id  INT PRIMARY KEY, a INT , b INT );
         INSERT INTO t1 VALUES(1, 1, 2);
-        CREATE TABLE "t1x1"(c UNIQUE, b PRIMARY KEY);
+        CREATE TABLE "t1x1"(c  INT UNIQUE, b  INT PRIMARY KEY);
         INSERT INTO "t1x1" VALUES(3, 4);
         CREATE INDEX t1i1 ON T1(B);
         CREATE INDEX t1i2 ON t1(a, b);
         CREATE INDEX i3 ON "t1x1"(b, c);
-        CREATE TABLE "Space_Table"(id PRIMARY KEY, e, f, g UNIQUE);
+        CREATE TABLE "Space_Table"(id  INT PRIMARY KEY, e INT , f INT , g  INT UNIQUE);
         INSERT INTO "Space_Table" VALUES(1, 5, 6, 7);
         SELECT 't1', * FROM t1;
         SELECT 't1x1', * FROM "t1x1";
@@ -79,7 +79,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "alter-2.2",
     [[
-        CREATE TABLE t3(id PRIMARY KEY, p, q, r);
+        CREATE TABLE t3(id  INT PRIMARY KEY, p INT , q INT , r INT );
         ALTER TABLE t2 RENAME TO t3;
     ]], {
         -- <alter-2.2>
@@ -100,8 +100,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "alter-3.1",
     [[
-        CREATE TABLE t6(id PRIMARY KEY, a, b, c);
-        CREATE TABLE tab(id PRIMARY KEY);
+        CREATE TABLE t6(id  INT PRIMARY KEY, a INT , b INT , c INT );
+        CREATE TABLE tab(id  INT PRIMARY KEY);
         CREATE TRIGGER trig1 AFTER INSERT ON T6 BEGIN INSERT INTO tab VALUES(new.id); END;
         INSERT INTO t6 VALUES(1, 1, 2, 3);
         SELECT * FROM tab;
@@ -230,7 +230,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "alter-5.1",
     [[
-        CREATE TABLE xyz(x PRIMARY KEY);
+        CREATE TABLE xyz(x  INT PRIMARY KEY);
         ALTER TABLE xyz RENAME TO "xyz1234abc";
         SELECT "name" FROM "_space" WHERE "name" GLOB 'xyz*';
     ]], {
@@ -256,9 +256,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
         DROP TRIGGER trig3;
-        CREATE TABLE t1(id PRIMARY KEY, b, c);
+        CREATE TABLE t1(id  INT PRIMARY KEY, b INT , c INT );
         INSERT INTO t1 VALUES(1,2,3), (3,2,1);
-        CREATE TABLE t2(id PRIMARY KEY);
+        CREATE TABLE t2(id  INT PRIMARY KEY);
         CREATE TRIGGER on_t1 AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(new.id + 100); END;
         CREATE TRIGGER on_t2 AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(new.id + 101); END;
         CREATE TRIGGER on_t3 AFTER INSERT ON t1 BEGIN INSERT INTO t2 values(new.id + 102); END;
@@ -313,9 +313,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t2(id PRIMARY KEY);
-        CREATE TABLE t3(id PRIMARY KEY);
-        CREATE TABLE t1(a PRIMARY KEY, b, c, FOREIGN KEY(b) REFERENCES t2(id), FOREIGN KEY(c) REFERENCES t3(id));
+        CREATE TABLE t2(id  INT PRIMARY KEY);
+        CREATE TABLE t3(id  INT PRIMARY KEY);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT , c INT , FOREIGN KEY(b) REFERENCES t2(id), FOREIGN KEY(c) REFERENCES t3(id));
         INSERT INTO t2 VALUES(1);
         INSERT INTO t3 VALUES(2);
         INSERT INTO t1 VALUES(1, 1, 2);
diff --git a/test/sql-tap/alter2.test.lua b/test/sql-tap/alter2.test.lua
index 971be197ddb051abcd39aab30b68e2390048499e..d13cfb7a038c5cc639f3ad131485b7243e35650a 100755
--- a/test/sql-tap/alter2.test.lua
+++ b/test/sql-tap/alter2.test.lua
@@ -8,7 +8,7 @@ test:plan(21)
 test:do_catchsql_test(
     "alter2-1.1",
     [[
-        CREATE TABLE t1(id PRIMARY KEY, a, b);
+        CREATE TABLE t1(id INT PRIMARY KEY, a INT, b INT);
         ALTER TABLE t1 ADD CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(id);
         ALTER TABLE t1 ADD CONSTRAINT fk2 FOREIGN KEY (a) REFERENCES t1;
         INSERT INTO t1 VALUES(1, 1, 2);
@@ -136,8 +136,8 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "alter2-2.1",
     [[
-        CREATE TABLE child (id PRIMARY KEY, a, b);
-        CREATE TABLE parent (id PRIMARY KEY, c UNIQUE, d);
+        CREATE TABLE child (id INT PRIMARY KEY, a INT, b INT);
+        CREATE TABLE parent (id INT PRIMARY KEY, c INT UNIQUE, d INT);
         ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (id) REFERENCES parent(c);
         ALTER TABLE parent ADD CONSTRAINT fk FOREIGN KEY (c) REFERENCES parent;
         INSERT INTO parent VALUES(1, 2, 3);
@@ -186,8 +186,8 @@ test:do_execsql_test(
     [[
         DROP TABLE child;
         DROP TABLE parent;
-        CREATE TABLE child (id PRIMARY KEY, a, b);
-        CREATE TABLE parent (id PRIMARY KEY, c, d);
+        CREATE TABLE child (id INT PRIMARY KEY, a INT, b INT);
+        CREATE TABLE parent (id INT PRIMARY KEY, c INT, d INT);
         ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (id) REFERENCES parent ON DELETE CASCADE MATCH FULL;
         INSERT INTO parent VALUES(1, 2, 3), (3, 4, 5), (6, 7, 8);
         INSERT INTO child VALUES(1, 1, 1), (3, 2, 2);
@@ -204,8 +204,8 @@ test:do_execsql_test(
     [[
         DROP TABLE child;
         DROP TABLE parent;
-        CREATE TABLE child (id PRIMARY KEY, a, b);
-        CREATE TABLE parent (id PRIMARY KEY, c, d);
+        CREATE TABLE child (id INT PRIMARY KEY, a INT, b INT);
+        CREATE TABLE parent (id INT PRIMARY KEY, c INT, d INT);
         ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (id) REFERENCES parent ON UPDATE CASCADE MATCH PARTIAL;
         INSERT INTO parent VALUES(1, 2, 3), (3, 4, 5), (6, 7, 8);
         INSERT INTO child VALUES(1, 1, 1), (3, 2, 2);
@@ -241,7 +241,7 @@ test:do_catchsql_test(
     "alter2-5.1",
     [[
         DROP TABLE child;
-        CREATE TABLE child (id PRIMARY KEY, a UNIQUE);
+        CREATE TABLE child (id INT PRIMARY KEY, a INT UNIQUE);
         ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (id) REFERENCES child;
         ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (a) REFERENCES child;
     ]], {
diff --git a/test/sql-tap/analyze1.test.lua b/test/sql-tap/analyze1.test.lua
index 2d8eed950ba2346ed3df8adfd4110a9b17b6d06c..ea414e9a348adb1228942aefd299ffe62c594999 100755
--- a/test/sql-tap/analyze1.test.lua
+++ b/test/sql-tap/analyze1.test.lua
@@ -94,7 +94,7 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "analyze-1.10",
     [[
-        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT );
         ANALYZE t1;
     ]], {
         -- <analyze-1.10>
@@ -192,7 +192,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "analyze-3.4",
     [[
-        CREATE TABLE t2 (id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t2 (id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT );
         INSERT INTO t2 SELECT * FROM t1;
         CREATE INDEX t2i1 ON t2(a);
         CREATE INDEX t2i2 ON t2(b);
@@ -243,7 +243,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "analyze-3.8",
     [[
-        CREATE TABLE t3 (id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c,d);
+        CREATE TABLE t3 (id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT ,d TEXT);
         INSERT INTO t3 (a,b,c,d) SELECT a, b, id AS c, 'hi' AS d FROM t1;
         CREATE INDEX t3i1 ON t3(a);
         CREATE INDEX t3i2 ON t3(a,b,c,d);
@@ -312,7 +312,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "analyze-4.0",
     [[
-        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x,y,z);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x INT ,y INT ,z INT );
         CREATE INDEX t4i1 ON t4(x);
         CREATE INDEX t4i2 ON t4(y);
         INSERT INTO t4 SELECT id,a,b,c FROM t3;
@@ -356,7 +356,7 @@ test:do_execsql_test(
     [[
         DELETE FROM t3;
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(ud INTEGER PRIMARY KEY AUTOINCREMENT, x,y,z);
+        CREATE TABLE t4(ud INTEGER PRIMARY KEY AUTOINCREMENT, x INT ,y INT ,z INT );
         CREATE INDEX t4i1 ON t4(x);
         CREATE INDEX t4i2 ON t4(y);
         INSERT INTO t3 (a,b,c,d) VALUES(1,2,3,4);
@@ -494,7 +494,7 @@ test:do_test(
     "analyze-6.1.1",
     function()
         test:execsql("DROP TABLE IF EXISTS t1 ")
-        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d, e);")
+        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT, b TEXT, c TEXT, d INT, e INT);")
         test:execsql("CREATE INDEX i1 ON t1(a, b, c, d);")
         test:execsql("CREATE INDEX i2 ON t1(e);")
 
diff --git a/test/sql-tap/analyze3.test.lua b/test/sql-tap/analyze3.test.lua
index b879429d44f8219e494febd252992b0fd9051dfd..3a995393ce9b1e61a650980a8247e7994e9e7f7e 100755
--- a/test/sql-tap/analyze3.test.lua
+++ b/test/sql-tap/analyze3.test.lua
@@ -82,7 +82,7 @@ test:do_test(
     "analyze3-1.1.1",
     function()
         test:execsql([[
-            CREATE TABLE t1(id INT PRIMARY KEY, x INTEGER, y);
+            CREATE TABLE t1(id INT PRIMARY KEY, x INTEGER, y INT );
             CREATE INDEX i1 ON t1(x);
             START TRANSACTION;
         ]])
@@ -218,7 +218,7 @@ test:do_test(
 test:do_execsql_test(
     "analyze3-1.2.1",
     [[
-        CREATE TABLE t2(id INTEGER PRIMARY KEY, x TEXT, y);
+        CREATE TABLE t2(id INTEGER PRIMARY KEY, x TEXT, y INT);
         START TRANSACTION;
           INSERT INTO t2 SELECT * FROM t1;
         COMMIT;
@@ -236,7 +236,7 @@ test:do_execsql_test(
         SELECT count(*) FROM t2 WHERE x>1 AND x<2;
     ]], {
         -- <analyze3-2.1.x>
-        200
+        0
         -- </analyze3-2.1.x>
     })
 
@@ -246,17 +246,20 @@ test:do_execsql_test(
         SELECT count(*) FROM t2 WHERE x>0 AND x<99;
     ]], {
         -- <analyze3-2.1.x>
-        990
+        0
         -- </analyze3-2.1.x>
     })
 
+-- Types of column and search value don't match, so
+-- index search can't be used here.
+--
 test:do_eqp_test(
     "analyze3-1.2.2",
     [[
         SELECT sum(y) FROM t2 WHERE x>1 AND x<2
     ]], {
         -- <analyze3-1.2.2>
-        {0, 0, 0, "SEARCH TABLE T2 USING COVERING INDEX I2 (X>? AND X<?)"}
+        {0, 0, 0, "SCAN TABLE T2"}
         -- </analyze3-1.2.2>
     })
 
@@ -268,7 +271,7 @@ test:do_eqp_test(
     ]], {
         -- <analyze3-1.2.3>
         -- 0, 0, 0, "SCAN TABLE t2"
-        {0, 0, 0, "SEARCH TABLE T2 USING COVERING INDEX I2 (X>? AND X<?)"}
+        {0, 0, 0, "SCAN TABLE T2"}
         -- </analyze3-1.2.3>
     })
 
@@ -278,7 +281,7 @@ test:do_eqp_test(
         SELECT sum(y) FROM t2 WHERE x>12 AND x<20 
     ]], {
         -- <analyze3-1.2.4>
-        81, {4760}
+        999, {""}
         -- </analyze3-1.2.4>
     })
 
@@ -298,7 +301,7 @@ test:do_test(
         return test:sf_execsql("SELECT typeof(12), typeof(20), sum(y) FROM t2 WHERE x>12 AND x<20")
     end, {
         -- <analyze3-1.2.6>
-        81, {"integer", "integer", 4760}
+        999, {"integer", "integer", ""}
         -- </analyze3-1.2.6>
     })
 
@@ -308,7 +311,7 @@ test:do_sf_execsql_test(
         SELECT sum(y) FROM t2 WHERE x>0 AND x<99 
     ]], {
         -- <analyze3-1.2.7>
-        991, {490555}
+        999, {""}
         -- </analyze3-1.2.7>
     })
 
@@ -328,7 +331,7 @@ test:do_test(
         return test:sf_execsql("SELECT typeof(0), typeof(99), sum(y) FROM t2 WHERE x>0 AND x<99")
     end, {
         -- <analyze3-1.2.9>
-        991, {"integer", "integer", 490555}
+        999, {"integer", "integer", ""}
         -- </analyze3-1.2.9>
     })
 
@@ -339,7 +342,7 @@ test:do_test(
 test:do_execsql_test(
     "analyze3-1.3.1",
     [[
-        CREATE TABLE t3(id INTEGER PRIMARY KEY, y TEXT, x INTEGER);
+        CREATE TABLE t3(id INTEGER PRIMARY KEY, y INT, x INTEGER);
         START TRANSACTION;
           INSERT INTO t3 SELECT id, y, x FROM t1;
         COMMIT;
@@ -466,7 +469,7 @@ test:do_test(
 --         test:execsql([[
 --             PRAGMA case_sensitive_like=off;
 --             BEGIN;
---             CREATE TABLE t1(a, b TEXT COLLATE nocase);
+--             CREATE TABLE t1(a INT , b TEXT COLLATE nocase);
 --             CREATE INDEX i1 ON t1(b);
 --         ]])
 --         for _ in X(0, "X!for", [=[["set i 0","$i < 1000","incr i"]]=]) do
@@ -594,7 +597,7 @@ test:do_test(
     "analyze3-6.1",
     function()
         test:execsql(" DROP TABLE IF EXISTS t1 ")
-        test:execsql(" CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c) ")
+        test:execsql(" CREATE TABLE t1(id INTEGER PRIMARY KEY, a REAL, b TEXT, c REAL) ")
         test:execsql("START TRANSACTION")
         for i=1,1000 do
             test:execsql(string.format("INSERT INTO t1 VALUES(%s, %s, 'x', %s)", i, ((i-1) / 100), ((i-1) / 10)))
@@ -641,7 +644,7 @@ test:do_execsql_test(
     "analyze-7.1",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT , c INT );
         INSERT INTO t1 VALUES(1,1,'0000');
         CREATE INDEX t0b ON t1(b);
         ANALYZE;
diff --git a/test/sql-tap/analyze4.test.lua b/test/sql-tap/analyze4.test.lua
index c2cc190f10ac85a5e2def1112c6a452d598ff7a5..f7344234ca19cfe1975f1aaf49e0159dde3e06e8 100755
--- a/test/sql-tap/analyze4.test.lua
+++ b/test/sql-tap/analyze4.test.lua
@@ -28,7 +28,7 @@ test:do_test(
     "analyze4-1.0",
     function()
         test:execsql([[
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b TEXT);
             CREATE INDEX t1a ON t1(a);
             CREATE INDEX t1b ON t1(b);
             INSERT INTO t1 (a,b) VALUES(1,NULL);
@@ -94,7 +94,7 @@ test:do_execsql_test(
             --ALTER TABLE t1 ADD COLUMN d;
             -- So, re-create the table and its contents
             DROP TABLE t1;
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c DEFAULT NULL,d DEFAULT NULL);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c  INT DEFAULT NULL,d  INT DEFAULT NULL);
             CREATE INDEX t1a ON t1(a);
             CREATE INDEX t1b ON t1(b);
             INSERT INTO t1 (a,b) VALUES(1,NULL);
diff --git a/test/sql-tap/analyze5.test.lua b/test/sql-tap/analyze5.test.lua
index 67229e78fc3501a7fcfb8f4412a40b11ba072e85..e4a6d5e0f7cd4fb684f26d08a5e2264455992408 100755
--- a/test/sql-tap/analyze5.test.lua
+++ b/test/sql-tap/analyze5.test.lua
@@ -61,8 +61,8 @@ test:do_test(
     "analyze5-1.0",
     function()
         -- Tarantool: waiting for #2130
-        -- test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, t,u,v TEXT COLLATE nocase,w,x,y,z)")
-        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, t,u,v,w,x,y,z)")
+        -- test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, t INT ,u INT ,v TEXT COLLATE nocase,w INT ,x INT ,y INT ,z INT )")
+        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, t TEXT ,u TEXT ,v TEXT ,w TEXT ,x TEXT ,y TEXT ,z FLOAT)")
         for i=0,999 do -- _ in X(0, "X!for", [=[["set i 0","$i < 1000","incr i"]]=]) do
             if  ((i >= 25) and (i <= 50)) then
                 y = 1
@@ -255,7 +255,7 @@ for i, v in pairs({
             w2 = v[1]:gsub('y', '+y'):gsub('z', '+z')
             a1 = test:execsql("SELECT id FROM t1 NOT INDEXED WHERE "..w2.." ORDER BY +id")
             a2 = test:execsql("SELECT id FROM t1 WHERE "..v[1].." ORDER BY +id")
-            if (test:is_deeply_regex(a1, a2))
+            if (test.is_deeply_regex(a1, a2))
             then
                 res = "ok"
             else
diff --git a/test/sql-tap/analyze6.test.lua b/test/sql-tap/analyze6.test.lua
index 4bbb67c2a5061b4271f76d5469b5c6058a112d40..04dadf25dc367fa1952f8767d968b2f978e892cf 100755
--- a/test/sql-tap/analyze6.test.lua
+++ b/test/sql-tap/analyze6.test.lua
@@ -100,7 +100,7 @@ test:do_test(
     "analyze6-2.1",
     function()
         test:execsql([[
-            CREATE TABLE t201(x INTEGER PRIMARY KEY, y UNIQUE, z);
+            CREATE TABLE t201(x INTEGER PRIMARY KEY, y  INT UNIQUE, z INT );
             CREATE INDEX t201z ON t201(z);
             ANALYZE;
         ]])
diff --git a/test/sql-tap/analyze7.test.lua b/test/sql-tap/analyze7.test.lua
index 81e1eb410bb374f5f8f8f56b513a237208c38c69..cb7ab57bdb134f9e8101bb5b02e36d3af34b3b93 100755
--- a/test/sql-tap/analyze7.test.lua
+++ b/test/sql-tap/analyze7.test.lua
@@ -22,12 +22,12 @@ test:do_test(
 	function()
 		return test:execsql([[
 		    DROP TABLE IF EXISTS t1;
-			CREATE TABLE t1(id PRIMARY KEY, a, b, c, d);
+			CREATE TABLE t1(id  INT PRIMARY KEY, a INT , b INT , c INT , d INT );
 			CREATE INDEX t1a ON t1(a);
 			CREATE INDEX t1b ON t1(b);
 			CREATE INDEX t1cd ON t1(c, d);
 		    DROP TABLE IF EXISTS nums;
-			CREATE TABLE nums(n PRIMARY KEY);
+			CREATE TABLE nums(n  INT PRIMARY KEY);
 			INSERT into nums WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<256) SELECT x FROM cnt;
  			INSERT INTO t1 SELECT n, n, n, n/100, n FROM nums;
  			EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;
diff --git a/test/sql-tap/analyze8.test.lua b/test/sql-tap/analyze8.test.lua
index e06e3ed87ba319cb67cc9e58dd68562e708d66b6..65052c7472cd7477966f0e1ae22182b697b99a66 100755
--- a/test/sql-tap/analyze8.test.lua
+++ b/test/sql-tap/analyze8.test.lua
@@ -33,7 +33,7 @@ test:do_test(
     1.0,
     function()
         test:execsql([[
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c,d);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT ,d INT );
             CREATE INDEX t1a ON t1(a);
             CREATE INDEX t1b ON t1(b);
             CREATE INDEX t1c ON t1(c);
diff --git a/test/sql-tap/analyze9.test.lua b/test/sql-tap/analyze9.test.lua
index 6b6251786cd044f158738d98d79f04e43451ec8c..d884addcef38ed31077f7c7041d27afb6769e2c0 100755
--- a/test/sql-tap/analyze9.test.lua
+++ b/test/sql-tap/analyze9.test.lua
@@ -96,15 +96,15 @@ test:do_execsql_test(
     2.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a TEXT PRIMARY KEY, b INT );
         INSERT INTO t1 VALUES('some text', 14);
-        INSERT INTO t1 VALUES(22.0, 'some text');
+        INSERT INTO t1 VALUES('text', 12);
         CREATE INDEX i1 ON t1(a, b);
         ANALYZE;
         SELECT msgpack_decode_sample("sample") FROM "_sql_stat4";
     ]], {
         -- <2.1>
-        "some text 14", "22 some text", "some text", 22
+        "some text 14", "text 12", "some text", 22
         -- </2.1>
     })
 
@@ -113,7 +113,7 @@ test:do_execsql_test(
     3.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t2(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t2(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT );
         CREATE INDEX i2 ON t2(a, b);
     ]])
 
@@ -195,7 +195,7 @@ test:do_execsql_test(
     3.4,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT , c TEXT);
         INSERT INTO t1 VALUES(1, 1, 'one-a');
         INSERT INTO t1 VALUES(11, 1, 'one-b');
         INSERT INTO t1 VALUES(21, 1, 'one-c');
@@ -229,7 +229,7 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT , b INT , c INT);
         CREATE INDEX i1 ON t1(c, b, a);
     ]])
 
@@ -237,7 +237,7 @@ insert_filler_rows_n = function(iStart, nCopy, nVal)
     for i = 0, nVal-1 do
         local iVal = iStart+i
         for j = 0, nCopy-1 do
-            box.sql.execute(string.format("INSERT INTO t1 VALUES (null, %s, %s, %s)", iVal, iVal, iVal))
+            box.sql.execute(string.format("INSERT INTO t1 VALUES (null, %s, %s, '%s')", iVal, iVal, iVal))
         end
     end
 end
@@ -345,7 +345,7 @@ test:do_test(
     function()
         test:execsql([[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(o,t INTEGER PRIMARY KEY);
+            CREATE TABLE t1(o TEXT,t INTEGER PRIMARY KEY);
             CREATE INDEX i1 ON t1(o);
         ]])
         for i = 0, 9999, 10 do
@@ -379,7 +379,7 @@ test:do_execsql_test(
     6.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT , b INT );
         CREATE INDEX i1 ON t1(a);
         CREATE INDEX i2 ON t1(b);
         INSERT INTO t1 VALUES(null, 1, 1);
@@ -388,7 +388,7 @@ test:do_execsql_test(
         INSERT INTO t1 VALUES(null, 4, 4);
         INSERT INTO t1 VALUES(null, 5, 5);
         ANALYZE;
-        CREATE TABLE x1(tbl, idx, neq, nlt, ndlt, sample, PRIMARY KEY(tbl, idx, sample)); 
+        CREATE TABLE x1(tbl TEXT, idx TEXT , neq TEXT, nlt TEXT, ndlt TEXT, sample BLOB, PRIMARY KEY(tbl, idx, sample));
         INSERT INTO x1 SELECT * FROM "_sql_stat4";
         DELETE FROM "_sql_stat4";
         INSERT INTO "_sql_stat4" SELECT * FROM x1;
@@ -409,7 +409,7 @@ test:do_execsql_test(
     7.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT );
         CREATE INDEX i1 ON t1(a, b);
         INSERT INTO t1 VALUES(null, 1, 1);
         INSERT INTO t1 VALUES(null, 2, 2);
@@ -480,7 +480,7 @@ test:do_execsql_test(
     8.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id PRIMARY KEY, x TEXT);
+        CREATE TABLE t1(id  INT PRIMARY KEY, x TEXT);
         CREATE INDEX i1 ON t1(x);
         INSERT INTO t1 VALUES(1, '1');
         INSERT INTO t1 VALUES(2, '2');
@@ -507,7 +507,7 @@ test:do_execsql_test(
 --     9.1,
 --     [[
 --         DROP TABLE IF EXISTS t1;
---         CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d, e);
+--         CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT , c INT , d INT , e INT );
 --         CREATE INDEX i1 ON t1(a, b, c, d);
 --         CREATE INDEX i2 ON t1(e);
 --     ]])
@@ -578,7 +578,7 @@ test:do_execsql_test(
     "10.1.1",
     [[
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT );
         CREATE INDEX t3a ON t3(a);
         CREATE INDEX t3b ON t3(b);
     ]])
@@ -626,7 +626,7 @@ test:do_execsql_test(
     "10.2.1",
     [[
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, x, a, b);
+        CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT, a INT , b INT);
         CREATE INDEX t3a ON t3(x, a);
         CREATE INDEX t3b ON t3(x, b);
     ]])
@@ -677,7 +677,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "11.0",
     [[
-        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a COLLATE "unicode_ci", b);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT COLLATE "unicode_ci", b INT);
         CREATE INDEX t4b ON t4(b);
         CREATE INDEX t4a ON t4(a);
     ]], {
@@ -707,7 +707,7 @@ test:do_test(
 test:do_execsql_test(
     "11.2", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = 'def' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = '"def"' AND b = 3;
     ]], {
         -- <11.2>
         0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (B=?)"
@@ -717,10 +717,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "11.3", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = 'abc' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = '"abc"' AND b = 3;
     ]], {
         -- <11.3>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (A=?)"
         -- </11.3>
     })
 
@@ -728,7 +728,7 @@ test:do_execsql_test(
     "11.4",
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT , b INT);
         CREATE INDEX t4b ON t4(b);
         CREATE INDEX t4a ON t4(a COLLATE "unicode_ci");
     ]], {
@@ -758,7 +758,7 @@ test:do_test(
 test:do_execsql_test(
     "11.6", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = 'def' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = '"def"' AND b = 3;
     ]], {
         -- <11.6>
         0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (B=?)"
@@ -768,20 +768,20 @@ test:do_execsql_test(
 test:do_execsql_test(
     "11.7", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = 'abc' COLLATE "unicode_ci" AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a = '"abc"' COLLATE "unicode_ci" AND b = 3;
     ]], {
         -- <11.7>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (A=?)"
         -- </11.7>
     })
 
 test:do_execsql_test(
     "11.8", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a COLLATE "unicode_ci" = 'abc' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE a COLLATE "unicode_ci" = '"abc"' AND b = 3;
     ]], {
         -- <11.8>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (A=?)"
         -- </11.8>
     })
 
@@ -789,7 +789,7 @@ test:do_execsql_test(
     "12.0",
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x, a COLLATE "unicode_ci", b);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT , a TEXT COLLATE "unicode_ci", b INT);
         CREATE INDEX t4b ON t4(x, b);
         CREATE INDEX t4a ON t4(x, a);
     ]], {
@@ -819,7 +819,7 @@ test:do_test(
 test:do_execsql_test(
     "12.2", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a = 'def' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a = '"def"' AND b = 3;
     ]], {
         -- <12.2>
         0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (X=? AND B=?)"
@@ -829,10 +829,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "12.3", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a = 'abc' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a = '"abc"' AND b = 3;
     ]], {
         -- <12.3>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (X=? AND B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (X=? AND A=?)"
         -- </12.3>
     })
 
@@ -840,7 +840,7 @@ test:do_execsql_test(
     "12.4",
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x, a, b);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT, a TEXT, b INT);
         CREATE INDEX t4b ON t4(x, b);
         CREATE INDEX t4a ON t4(x, a COLLATE "unicode_ci");
     ]], {
@@ -880,20 +880,20 @@ test:do_execsql_test(
 test:do_execsql_test(
     "12.7", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x= 'abcdef' AND a = 'abc' COLLATE "unicode_ci" AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x= 'abcdef' AND a = '"abc"' COLLATE "unicode_ci" AND b = 3;
     ]], {
         -- <12.7>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (X=? AND B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (X=? AND A=?)"
         -- </12.7>
     })
 
 test:do_execsql_test(
     "12.8", 
     [[
-        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a COLLATE "unicode_ci" = 'abc' AND b = 3;
+        EXPLAIN QUERY PLAN SELECT * FROM t4 WHERE x = 'abcdef' AND a COLLATE "unicode_ci" = '"abc"' AND b = 3;
     ]], {
         -- <12.8>
-        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4B (X=? AND B=?)"
+        0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX T4A (X=? AND A=?)"
         -- </12.8>
     })
 
@@ -905,7 +905,7 @@ test:do_test(
     13.1,
     function()
         test:execsql("DROP TABLE IF EXISTS t1;")
-        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d);")
+        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT, b INT, c INT, d INT);")
         test:execsql("CREATE INDEX i1 ON t1(a);")
         test:execsql("CREATE INDEX i2 ON t1(b, c);")
         local a = 0
@@ -972,7 +972,7 @@ test:do_test(
     14.1,
     function()
         test:execsql("DROP TABLE IF EXISTS t1")
-        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b INTEGER, c)")
+        test:execsql("CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT, b INTEGER, c INT)")
         for i = 0, 100 do
             local c = i % 3
             test:execsql(string.format(" INSERT INTO t1 VALUES(null, 'ott', %s, %s) ", i, c))
@@ -1016,7 +1016,7 @@ test:do_execsql_test(
     15.1,
     [[
         DROP TABLE IF EXISTS x1;
-        CREATE TABLE x1(a PRIMARY KEY, b, UNIQUE(a, b));
+        CREATE TABLE x1(a  INT PRIMARY KEY, b INT , UNIQUE(a, b));
         INSERT INTO x1 VALUES(1, 2);
         INSERT INTO x1 VALUES(3, 4);
         INSERT INTO x1 VALUES(5, 6);
@@ -1037,7 +1037,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     15.3,
     [[
-        INSERT INTO "_sql_stat4" VALUES('42', '42', '42', '42', '42', 42);
+        INSERT INTO "_sql_stat4" VALUES('42', '42', '42', '42', '42', '42');
     ]])
 
 test:do_execsql_test(
@@ -1111,7 +1111,7 @@ test:do_test(
     function()
         test:execsql([[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT, b INT, c INT, d TEXT);
             CREATE INDEX i1 ON t1(a, b);
             INSERT INTO t1 VALUES(null, -1, -1, -1, NULL);
             INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1;
@@ -1190,7 +1190,7 @@ test:do_test(
     function()
         test:execsql([[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(a PRIMARY KEY, b);
+            CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
             CREATE INDEX i1 ON t1(a, b);
         ]])
         for i = 0, 8 do
@@ -1219,7 +1219,7 @@ test:do_test(
             DROP TABLE IF EXISTS t1;
             DROP TABLE IF EXISTS x1;
             DROP TABLE IF EXISTS t3;
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c,d);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT ,d INT );
             CREATE INDEX i1 ON t1(a,b,c,d);
         ]])
         for i = 0, 23 do
@@ -1256,7 +1256,7 @@ test:do_execsql_test(
     21.0,
     [[
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t2(id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT, b INT );
         CREATE INDEX i2 ON t2(a);
     ]])
 
@@ -1300,7 +1300,7 @@ test:do_execsql_test(
     22.0,
     [[
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(a, b, c, d, PRIMARY KEY(a, b));
+        CREATE TABLE t3(a TEXT , b INT , c TEXT , d INT , PRIMARY KEY(a, b));
     ]])
 
 test:do_execsql_test(
@@ -1389,7 +1389,7 @@ box.internal.sql_create_function("int_to_char", "TEXT", int_to_char)
 test:do_execsql_test(
     24.0,
     [[
-        CREATE TABLE t5(c, d, b, e, a, PRIMARY KEY(a, b, c));
+        CREATE TABLE t5(c INT , d INT , b TEXT, e INT , a TEXT, PRIMARY KEY(a, b, c));
         WITH data(a, b, c, d, e) AS (SELECT 'z', 'y', 0, 0, 0 UNION ALL 
             SELECT a, CASE WHEN b='y' THEN 'n' ELSE 'y' END, c+1, e/250, e+1 FROM data WHERE e<1000) 
                 INSERT INTO t5(a, b, c, d, e) SELECT * FROM data;
@@ -1442,7 +1442,7 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t6;
         DROP TABLE IF EXISTS ints;
-        CREATE TABLE t6(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b);
+        CREATE TABLE t6(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT );
         WITH ints(i,j) AS (SELECT 1,1 UNION ALL SELECT i+1,j+1 FROM ints WHERE i<100) 
             INSERT INTO t6 SELECT null,* FROM ints;
         CREATE INDEX aa ON t6(a);
@@ -1514,7 +1514,7 @@ test:do_test(
     function()
         test:execsql([[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, x, y, z);
+            CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, x INT , y INT , z INT );
             CREATE INDEX t1xy ON t1(x, y);
             CREATE INDEX t1z ON t1(z);
         ]])
@@ -1598,7 +1598,7 @@ test:do_execsql_test(
     "26.2.1",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, x, y, z);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT, y INT , z INT );
         CREATE INDEX i1 ON t1(x, y);
         CREATE INDEX i2 ON t1(z);
 
diff --git a/test/sql-tap/analyzeC.test.lua b/test/sql-tap/analyzeC.test.lua
index a3cea7056124cb0889c59276ea2b2c06c738f725..266e37eff0062fa0f22eae4b1e6e94f94922958f 100755
--- a/test/sql-tap/analyzeC.test.lua
+++ b/test/sql-tap/analyzeC.test.lua
@@ -34,7 +34,7 @@ test:do_execsql_test(
     1.0,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a PRIMARY KEY, b, c, d);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT , c INT , d INT );
         INSERT INTO t1(a,b,c,d) VALUES(1,1,2,3),(2,7,8,9),(3,4,5,6),(4,10,11,12),(5,4,8,12),(6,1,11,111);
         CREATE INDEX t1b ON t1(b);
         CREATE INDEX t1c ON t1(c);
diff --git a/test/sql-tap/analyzeD.test.lua b/test/sql-tap/analyzeD.test.lua
index ef6aced181fd253cb370d078463f2a82bf5f3dd6..4bce88bff562bcd278a3c88e57f2f66cbb893ce7 100755
--- a/test/sql-tap/analyzeD.test.lua
+++ b/test/sql-tap/analyzeD.test.lua
@@ -32,7 +32,7 @@ testprefix = "analyzeD"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(id PRIMARY KEY, a, b, c);
+        CREATE TABLE t1(id  INT PRIMARY KEY, a INT , b INT , c INT );
     ]])
 
 
@@ -41,7 +41,7 @@ test:do_test(
 	function()
 		for i = 1, 999 do
 			local c = math.floor(i % 200);
-			test:execsql(string.format(" INSERT INTO t1(id, a, b, c) VALUES(%s, 2*(%s/100), %s%%10, %s ); ", i, i, i, c))
+			test:execsql(string.format(" INSERT INTO t1(id, a, b, c) VALUES(%s, 2*(%s + 100), %s%%10, %s ); ", i, i, i, c))
 		end
 	return test:execsql([[
 			INSERT INTO t1 VALUES(1001, 3001, 3001, 3001);
diff --git a/test/sql-tap/analyzeE.test.lua b/test/sql-tap/analyzeE.test.lua
index 6e0aa03f00081ed8a534b4f12ff645962d81167c..c0a33ad868b30749578376e37f891a33ce7e58b8 100755
--- a/test/sql-tap/analyzeE.test.lua
+++ b/test/sql-tap/analyzeE.test.lua
@@ -26,7 +26,7 @@ test:do_execsql_test(
     "analyzeE-1.0",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY, a INT , b INT );
         WITH RECURSIVE cnt(x) AS (VALUES(1000) UNION ALL SELECT x+1 FROM cnt WHERE x<2000) INSERT INTO t1(id, a, b) SELECT x, x, x FROM cnt;
         CREATE INDEX t1a ON t1(a);
         CREATE INDEX t1b ON t1(b);
@@ -277,7 +277,7 @@ test:do_execsql_test(
     "analyzeE-3.0",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id PRIMARY KEY,a,b,c);
+        CREATE TABLE t1(id  INT PRIMARY KEY,a INT ,b INT ,c INT );
         WITH RECURSIVE cnt(x) AS (VALUES(1000) UNION ALL SELECT x+1 FROM cnt WHERE x<2000) INSERT INTO t1(id,a,b,c) SELECT x, x, x, 123 FROM cnt;
         CREATE INDEX t1ca ON t1(c,a);
         ANALYZE;
diff --git a/test/sql-tap/analyzeF.test.lua b/test/sql-tap/analyzeF.test.lua
index c5e11c84ecedbedb58057e0996652941bc31033c..40185db09cdccfb210a0c2ef3dabd478c1331b42 100755
--- a/test/sql-tap/analyzeF.test.lua
+++ b/test/sql-tap/analyzeF.test.lua
@@ -28,7 +28,7 @@ test:do_execsql_test(
     1.0,
     [[
     	DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id PRIMARY KEY, x INTEGER, y INTEGER);
+        CREATE TABLE t1(id  INT PRIMARY KEY, x INTEGER, y INTEGER);
         WITH data(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM data) INSERT INTO t1 SELECT i, isqrt(i), isqrt(i) FROM data LIMIT 500;
         CREATE INDEX t1y ON t1(y);
         CREATE INDEX t1x ON t1(x);
diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua
index fa45c0e33ea6c6725ef1e176d9f030b5cb27e875..e361a00d1d356906a255a7fb7d06bee0d469597e 100755
--- a/test/sql-tap/autoinc.test.lua
+++ b/test/sql-tap/autoinc.test.lua
@@ -30,7 +30,7 @@ test:plan(47)
 test:do_execsql_test(
     "autoinc-1.2",
     [[
-        CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
+        CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y INT );
     ]], {
         -- <autoinc-1.2>
 
@@ -269,7 +269,7 @@ test:do_test(
             DROP TABLE t2;
         ]])
         return test:execsql([[
-            CREATE TABLE t2(d, e INTEGER PRIMARY KEY AUTOINCREMENT, f);
+            CREATE TABLE t2(d INT , e INTEGER PRIMARY KEY AUTOINCREMENT, f INT );
             INSERT INTO t2(d) VALUES(1);
         ]])
     end, {
@@ -302,7 +302,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "autoinc-2.73",
     [[
-        CREATE TABLE t3(g INTEGER PRIMARY KEY AUTOINCREMENT, h);
+        CREATE TABLE t3(g INTEGER PRIMARY KEY AUTOINCREMENT, h INT );
         INSERT INTO t3(h) VALUES(1);
         SELECT max(x) FROM t1 UNION SELECT max(e) FROM t2
           UNION SELECT max(g) FROM t3;
@@ -388,7 +388,7 @@ test:do_execsql_test(
 -- test:do_execsql_test(
 --     "autoinc-4.2",
 --     [[
---         CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
+--         CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y INT );
 --         CREATE TEMP TABLE t3(a INTEGER PRIMARY KEY AUTOINCREMENT, b);
 --         SELECT 1, name FROM sqlite_master WHERE type='table';
 --         SELECT 2, name FROM sqlite_temp_master WHERE type='table';
@@ -516,7 +516,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "autoinc-6.1",
     [[
-        CREATE TABLE t6(v INTEGER PRIMARY KEY AUTOINCREMENT, w);
+        CREATE TABLE t6(v INTEGER PRIMARY KEY AUTOINCREMENT, w INT );
         INSERT INTO t6 VALUES(9223372036854775807,1);
         SELECT max(v) FROM t6;
     ]], {
@@ -574,9 +574,9 @@ test:do_test(
     "autoinc-9.1",
     function()
         return test:execsql([[
-            CREATE TABLE t2(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
+            CREATE TABLE t2(x INTEGER PRIMARY KEY AUTOINCREMENT, y INT );
             INSERT INTO t2 VALUES(NULL, 1);
-            CREATE TABLE t3(a INTEGER PRIMARY KEY AUTOINCREMENT, b);
+            CREATE TABLE t3(a INTEGER PRIMARY KEY AUTOINCREMENT, b INT );
             INSERT INTO t3 SELECT * FROM t2 WHERE y>1;
 
             SELECT max(a) FROM t3;
@@ -648,7 +648,7 @@ test:do_test(
     "autoinc-3928.1",
     function()
         return test:execsql([[
-            CREATE TABLE t3928(a INTEGER PRIMARY KEY AUTOINCREMENT, b);
+            CREATE TABLE t3928(a INTEGER PRIMARY KEY AUTOINCREMENT, b TEXT);
             CREATE TRIGGER t3928r1 BEFORE INSERT ON t3928 BEGIN
               INSERT INTO t3928(b) VALUES('before1');
               INSERT INTO t3928(b) VALUES('before2');
@@ -685,11 +685,11 @@ test:do_test(
             DROP TRIGGER t3928r1;
             DROP TRIGGER t3928r2;
             CREATE TRIGGER t3928r3 BEFORE UPDATE ON t3928
-              WHEN typeof(new.b)=='integer' BEGIN
+              WHEN new.b=='456' BEGIN
                  INSERT INTO t3928(b) VALUES('before-int-' || new.b);
             END;
             CREATE TRIGGER t3928r4 AFTER UPDATE ON t3928
-              WHEN typeof(new.b)=='integer' BEGIN
+              WHEN new.b=='456' BEGIN
                  INSERT INTO t3928(b) VALUES('after-int-' || new.b);
             END;
             DELETE FROM t3928 WHERE a!=1;
@@ -698,7 +698,7 @@ test:do_test(
         ]])
     end, {
         -- <autoinc-3928.3>
-        1, 456, 14, "before-int-456", 15, "after-int-456"
+        1, '456', 14, "before-int-456", 15, "after-int-456"
         -- </autoinc-3928.3>
     })
 
@@ -723,7 +723,7 @@ test:do_test(
             INSERT INTO t3928b VALUES(200);
             INSERT INTO t3928b VALUES(300);
             DELETE FROM t3928;
-            CREATE TABLE t3928c(y INTEGER PRIMARY KEY AUTOINCREMENT, z);
+            CREATE TABLE t3928c(y INTEGER PRIMARY KEY AUTOINCREMENT, z TEXT);
             CREATE TRIGGER t3928br1 BEFORE DELETE ON t3928b BEGIN
               INSERT INTO t3928(b) VALUES('before-del-'||old.x);
               INSERT INTO t3928c(z) VALUES('before-del-'||old.x);
@@ -770,7 +770,7 @@ test:do_test(
     "autoinc-a69637.1",
     function()
         return test:execsql([[
-            CREATE TABLE ta69637_1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
+            CREATE TABLE ta69637_1(x INTEGER PRIMARY KEY AUTOINCREMENT, y INT );
             CREATE TABLE ta69637_2(z INTEGER PRIMARY KEY);
             CREATE TRIGGER ra69637_1 AFTER INSERT ON ta69637_2 BEGIN
               INSERT INTO ta69637_1(y) VALUES(new.z+1);
@@ -805,7 +805,7 @@ test:do_test(
 test:do_catchsql_test(
     "autoinc-gh-3670",
     [[
-        CREATE TABLE t1 (s1 INT PRIMARY KEY AUTOINCREMENT, s2 CHAR);
+        CREATE TABLE t1 (s1 INT PRIMARY KEY AUTOINCREMENT, s2 CHAR(10));
         INSERT INTO t1 VALUES (1, 'a');
         INSERT INTO t1 SELECT s2, s2 FROM t1;
     ]], {
diff --git a/test/sql-tap/autoindex4.test.lua b/test/sql-tap/autoindex4.test.lua
index a567c5e7df2bed9ab0a8e02207e8cf6bb67e7f1c..a2c018a7d3c3ed3035eed31eed84019724d32fa2 100755
--- a/test/sql-tap/autoindex4.test.lua
+++ b/test/sql-tap/autoindex4.test.lua
@@ -23,9 +23,9 @@ test:plan(7)
 test:do_execsql_test(
     "autoindex4-1.0",
     [[
-        CREATE TABLE t1(a,b, primary key(a,b));
+        CREATE TABLE t1(a INT,b TEXT, primary key(a,b));
         INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
-        CREATE TABLE t2(x,y, primary key(x,y));
+        CREATE TABLE t2(x INT,y TEXT, primary key(x,y));
         INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
 
         SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
@@ -76,7 +76,7 @@ test:do_execsql_test(
     })
 
 -- do_execsql_test autoindex4-2.0 {
---   CREATE TABLE t3(e,f);
+--   CREATE TABLE t3(e INT,f INT);
 --   INSERT INTO t3 VALUES(123,654),(555,444),(234,987);
 --   SELECT (SELECT count(*) FROM t1, t2 WHERE a=e AND x=f), e, f, '|'
 --     FROM t3
diff --git a/test/sql-tap/boundary1.test.lua b/test/sql-tap/boundary1.test.lua
index 6beab9a5eee22b391613e95f7ed58cd983dfc0df..e35e1edbd3f084f84b6d249d2d9f116321932874 100755
--- a/test/sql-tap/boundary1.test.lua
+++ b/test/sql-tap/boundary1.test.lua
@@ -26,7 +26,7 @@ test:do_test(
     "boundary1-1.1",
     function()
         return test:execsql([[
-            CREATE TABLE t1(rowid primary key, a,x);
+            CREATE TABLE t1(rowid  INT primary key, a INT ,x BLOB);
             INSERT INTO t1(rowid,a,x) VALUES(-8388609,1,'ffffffffff7fffff');
             INSERT INTO t1(rowid,a,x) VALUES(-36028797018963969,2,'ff7fffffffffffff');
             INSERT INTO t1(rowid,a,x) VALUES(9223372036854775807,3,'7fffffffffffffff');
diff --git a/test/sql-tap/boundary3.test.lua b/test/sql-tap/boundary3.test.lua
index 5b63e05392e9fd021233309ab7154848e043f902..934d3722acbf24a51837ac765c73e0bd2bc86b01 100755
--- a/test/sql-tap/boundary3.test.lua
+++ b/test/sql-tap/boundary3.test.lua
@@ -26,10 +26,10 @@ test:do_test(
     "boundary3-1.1",
     function()
         return test:execsql([[
-            CREATE TABLE t1(rowid primary key, a,x);
+            CREATE TABLE t1(rowid  INT primary key, a FLOAT ,x BLOB);
             INSERT INTO t1(rowid,a,x) VALUES(-8388609,1,'ffffffffff7fffff');
             INSERT INTO t1(rowid,a,x) VALUES(-36028797018963969,2,'ff7fffffffffffff');
-            INSERT INTO t1(rowid,a,x) VALUES(9223372036854775807,3,'7fffffffffffffff');
+            INSERT INTO t1(rowid,a,x) VALUES(9223372036854775806,3,'7fffffffffffffff');
             INSERT INTO t1(rowid,a,x) VALUES(127,4,'000000000000007f');
             INSERT INTO t1(rowid,a,x) VALUES(3,5,'0000000000000003');
             INSERT INTO t1(rowid,a,x) VALUES(16777216,6,'0000000001000000');
@@ -81,7 +81,7 @@ test:do_test(
             INSERT INTO t1(rowid,a,x) VALUES(-3,52,'fffffffffffffffd');
             INSERT INTO t1(rowid,a,x) VALUES(-128,53,'ffffffffffffff80');
             INSERT INTO t1(rowid,a,x) VALUES(-129,54,'ffffffffffffff7f');
-            INSERT INTO t1(rowid,a,x) VALUES(-9223372036854775808,55,'8000000000000000');
+            INSERT INTO t1(rowid,a,x) VALUES(-9223372036854775807,55,'8000000000000000');
             INSERT INTO t1(rowid,a,x) VALUES(4398046511104,56,'0000040000000000');
             INSERT INTO t1(rowid,a,x) VALUES(1099511627775,57,'000000ffffffffff');
             INSERT INTO t1(rowid,a,x) VALUES(-549755813889,58,'ffffff7fffffffff');
@@ -109,14 +109,14 @@ test:do_test(
     "boundary3-1.3",
     function()
         return test:execsql([[
-            CREATE TABLE t2(r primary key,a);
+            CREATE TABLE t2(r INT primary key, a REAL);
             INSERT INTO t2 SELECT rowid, a FROM t1;
             CREATE INDEX t2i1 ON t2(r);
             CREATE INDEX t2i2 ON t2(a);
             ---INSERT INTO t2 VALUES(100000,9.22337303685477580800e+18,65);
             ---INSERT INTO t2 VALUES(100001,-9.22337303685477580800e+18,66);
-            INSERT INTO t2 VALUES(9.22337303685477580800e+18,65);
-            INSERT INTO t2 VALUES(-9.22337303685477580800e+18,66);
+            INSERT INTO t2 VALUES(9223372036854775807, 65);
+            INSERT INTO t2 VALUES(-9223372036854775808, 66);
             SELECT count(*) FROM t2;
         ]])
     end, {
@@ -2318,12 +2318,12 @@ test:do_execsql_test(
 test:do_execsql_test(
     "boundary3-2.16.ge.1",
     "SELECT t2.a FROM t1 JOIN t2 USING(a) WHERE t1.rowid >= 9223372036854775807 ORDER BY t2.a"
-    ,{3})
+    ,{})
 
 test:do_execsql_test(
     "boundary3-2.16.ge.2",
     "SELECT t2.a FROM t2 NATURAL JOIN t1 WHERE t1.rowid >= 9223372036854775807 ORDER BY t1.a DESC"
-    ,{3})
+    ,{})
 
 test:do_execsql_test(
     "boundary3-2.16.ge.3",
@@ -2343,12 +2343,12 @@ test:do_execsql_test(
 test:do_execsql_test(
     "boundary3-2.16.lt.1",
     "SELECT t2.a FROM t1 JOIN t2 USING(a) WHERE t1.rowid < 9223372036854775807 ORDER BY t2.a"
-    ,{1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64})
+    ,{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64})
 
 test:do_execsql_test(
     "boundary3-2.16.lt.2",
     "SELECT t2.a FROM t2 NATURAL JOIN t1 WHERE t1.rowid < 9223372036854775807 ORDER BY t1.a DESC"
-    ,{64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 2, 1})
+    ,{64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1})
 
 test:do_execsql_test(
     "boundary3-2.16.lt.3",
@@ -6768,27 +6768,27 @@ test:do_execsql_test(
 test:do_execsql_test(
     "boundary3-2.46.1",
     "SELECT t1.a, t1.x FROM  t1, t2 WHERE t1.rowid=-9223372036854775808 AND t2.a=t1.a"
-    ,{55, "8000000000000000"})
+    ,{})
 
 test:do_execsql_test(
     "boundary3-2.46.2",
     "SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='8000000000000000'"
-    ,{-9223372036854775808LL, 55})
+    ,{-9223372036854775807LL,55})
 
 test:do_execsql_test(
     "boundary3-2.46.3",
     "SELECT t1.rowid, t1.x FROM  t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=55"
-    ,{-9223372036854775808LL, "8000000000000000"})
+    ,{-9223372036854775807LL, "8000000000000000"})
 
 test:do_execsql_test(
     "boundary3-2.46.gt.1",
     "SELECT t2.a FROM t1 JOIN t2 USING(a) WHERE t1.rowid > -9223372036854775808 ORDER BY t2.a"
-    ,{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64})
+    ,{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64})
 
 test:do_execsql_test(
     "boundary3-2.46.gt.2",
     "SELECT t2.a FROM t2 NATURAL JOIN t1 WHERE t1.rowid > -9223372036854775808 ORDER BY t1.a DESC"
-    ,{64, 63, 62, 61, 60, 59, 58, 57, 56, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1})
+    ,{64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1})
 
 test:do_execsql_test(
     "boundary3-2.46.gt.3",
@@ -6858,12 +6858,12 @@ test:do_execsql_test(
 test:do_execsql_test(
     "boundary3-2.46.le.1",
     "SELECT t2.a FROM t1 JOIN t2 USING(a) WHERE t1.rowid <= -9223372036854775808 ORDER BY t2.a"
-    ,{55})
+    ,{})
 
 test:do_execsql_test(
     "boundary3-2.46.le.2",
     "SELECT t2.a FROM t2 NATURAL JOIN t1 WHERE t1.rowid <= -9223372036854775808 ORDER BY t1.a DESC"
-    ,{55})
+    ,{})
 
 test:do_execsql_test(
     "boundary3-2.46.le.3",
diff --git a/test/sql-tap/cast.test.lua b/test/sql-tap/cast.test.lua
index 29110dc459afb071d0367fc54dea47fd8e155ae7..e3b7b12483072380bbcafefc9d08a4dad3ab2cef 100755
--- a/test/sql-tap/cast.test.lua
+++ b/test/sql-tap/cast.test.lua
@@ -80,7 +80,7 @@ test:do_execsql_test(
         SELECT typeof(CAST(x'616263' AS numeric))
     ]], {
         -- <cast-1.6>
-        "integer"
+        "real"
         -- </cast-1.6>
     })
 
@@ -282,7 +282,7 @@ test:do_execsql_test(
         SELECT typeof(CAST(123 AS numeric))
     ]], {
         -- <cast-1.26>
-        "integer"
+        "real"
         -- </cast-1.26>
     })
 
@@ -482,7 +482,7 @@ test:do_execsql_test(
         SELECT typeof(CAST('123abc' AS numeric))
     ]], {
         -- <cast-1.46>
-        "integer"
+        "real"
         -- </cast-1.46>
     })
 
@@ -689,7 +689,7 @@ test:do_execsql_test(
         SELECT CAST(9223372036854774800 AS numeric)
     ]], {
         -- <cast-3.2>
-        9223372036854774800LL
+        9223372036854774784
         -- </cast-3.2>
     })
 
@@ -724,7 +724,7 @@ test:do_execsql_test(
         SELECT CAST(-9223372036854774800 AS numeric)
     ]], {
         -- <cast-3.6>
-        -9223372036854774800LL
+        -9223372036854774784
         -- </cast-3.6>
     })
 
@@ -759,7 +759,7 @@ test:do_execsql_test(
         SELECT CAST('9223372036854774800' AS numeric)
     ]], {
         -- <cast-3.12>
-        9223372036854774800LL
+        9223372036854774784
         -- </cast-3.12>
     })
 
@@ -796,7 +796,7 @@ test:do_execsql_test(
         SELECT CAST('-9223372036854774800' AS numeric)
     ]], {
         -- <cast-3.16>
-        -9223372036854774800LL
+        -9223372036854774784
         -- </cast-3.16>
     })
 
@@ -834,7 +834,7 @@ if true then --test:execsql("PRAGMA encoding")[1][1]=="UTF-8" then
             SELECT CAST(x'39323233333732303336383534373734383030' AS numeric)
         ]], {
             -- <cast-3.22>
-            9223372036854774800LL
+            9223372036854774784
             -- </cast-3.22>
         })
     test:do_execsql_test(
@@ -906,7 +906,7 @@ test:do_test(
     "cast-4.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key);
+            CREATE TABLE t1(a TEXT primary key);
             INSERT INTO t1 VALUES('abc');
             SELECT a, CAST(a AS integer) FROM t1;
         ]]
diff --git a/test/sql-tap/check.test.lua b/test/sql-tap/check.test.lua
index 3a33a6329d34274228f2776b9eb7d4d7eca6d733..039e2291ec030d25d08fc135dd5a421aa23e7e49 100755
--- a/test/sql-tap/check.test.lua
+++ b/test/sql-tap/check.test.lua
@@ -30,7 +30,7 @@ test:do_execsql_test(
         CREATE TABLE t1(
           x INTEGER CHECK( x<5 ),
           y REAL CHECK( y>x ),
-          z primary key
+          z  INT primary key
         );
     ]], {
         -- <check-1.1>
@@ -205,7 +205,7 @@ test:do_execsql_test(
     "check-2.1",
     [[
         CREATE TABLE t2(
-          id primary key,
+          id  INT primary key,
           x INTEGER CONSTRAINT one CHECK( typeof(coalesce(x,0))=='integer'),
           y REAL CONSTRAINT two CHECK( typeof(coalesce(y,0.1))=='real' ),
           z TEXT CONSTRAINT three CHECK( typeof(coalesce(z,''))=='text' )
@@ -340,7 +340,7 @@ test:do_catchsql_test(
     "check-3.1",
     [[
         CREATE TABLE t3(
-          x primary key, y, z,
+          x  INT primary key, y INT , z INT ,
           CHECK( x<(SELECT min(x) FROM t1) )
         );
     ]], {
@@ -365,7 +365,7 @@ test:do_catchsql_test(
     "check-3.3",
     [[
         CREATE TABLE t3(
-          x primary key, y, z,
+          x  INT primary key, y INT , z INT ,
           CHECK( q<x )
         );
     ]], {
@@ -389,7 +389,7 @@ test:do_catchsql_test(
     "check-3.5",
     [[
         CREATE TABLE t3(
-          x primary key, y, z,
+          x  INT primary key, y INT , z INT ,
           CHECK( t2.x<x )
         );
     ]], {
@@ -413,7 +413,7 @@ test:do_catchsql_test(
     "check-3.7",
     [[
         CREATE TABLE t3(
-          x primary key, y, z,
+          x  INT primary key, y INT , z INT ,
           CHECK( t3.x<25 )
         );
     ]], {
@@ -446,7 +446,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "check-4.1",
     [[
-        CREATE TABLE t4(x primary key, y,
+        CREATE TABLE t4(x  INT primary key, y INT ,
           CHECK (
                x+y==11
             OR x*y==12
@@ -537,7 +537,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "check-5.1",
     [[
-        CREATE TABLE t5(x primary key, y,
+        CREATE TABLE t5(x  INT primary key, y INT ,
           CHECK( x*y<:abc )
         );
     ]], {
@@ -549,7 +549,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "check-5.2",
     [[
-        CREATE TABLE t5(x primary key, y,
+        CREATE TABLE t5(x  INT primary key, y INT ,
           CHECK( x*y<? )
         );
     ]], {
@@ -713,7 +713,7 @@ box.internal.sql_create_function("myfunc", "INT", myfunc)
 test:do_execsql_test(
     7.1,
     [[
-        CREATE TABLE t6(a CHECK (myfunc(a)) primary key)
+        CREATE TABLE t6(a  INT CHECK (myfunc(a)) primary key)
     ]])
 
 test:do_execsql_test(
@@ -756,7 +756,7 @@ test:do_test(
 test:do_test(
     7.6,
     function()
-        return test:catchsql(" CREATE TABLE t7(a CHECK (myfunc(a))) ") --, "db2")
+        return test:catchsql(" CREATE TABLE t7(a  INT CHECK (myfunc(a))) ") --, "db2 INT ")
     end, {
         -- <7.6>
         1, "no such function: MYFUNC"
@@ -791,7 +791,7 @@ end
 test:do_execsql_test(
     8.1,
     [[
-        CREATE TABLE t810(a primary key, CHECK( t810.a>0 ));
+        CREATE TABLE t810(a  INT primary key, CHECK( t810.a>0 ));
     ]], {
         -- <8.1>
 
diff --git a/test/sql-tap/coalesce.test.lua b/test/sql-tap/coalesce.test.lua
index ef177c925a5edc86b35a2d57a3c1a2b472346df3..5740c1b37785be8d6532df86562b9c880fa6a2cf 100755
--- a/test/sql-tap/coalesce.test.lua
+++ b/test/sql-tap/coalesce.test.lua
@@ -21,7 +21,7 @@ test:do_test(
     "coalesce-1.0",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c, d);
+            CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT, c INT, d INT);
             INSERT INTO t1 VALUES(1, null, null, null);
             INSERT INTO t1 VALUES(2, 2, 99, 99);
             INSERT INTO t1 VALUES(3, null, 3, 99);
diff --git a/test/sql-tap/collation.test.lua b/test/sql-tap/collation.test.lua
index 4d33d0c9d20bb921922e2e2db12a91bb7ba02823..eb4f43a901f0a7412606cd7a66deae780aad8219 100755
--- a/test/sql-tap/collation.test.lua
+++ b/test/sql-tap/collation.test.lua
@@ -167,7 +167,7 @@ for _, data_collation in ipairs(data_collations) do
         local result = test_case[3]
         test:do_execsql_test(
             extendex_prefix.."create_table",
-            string.format("create table t1(a primary key, b %s);", data_collation[1]),
+            string.format("create table t1(a INT primary key, b TEXT %s);", data_collation[1]),
             {})
         test:do_test(
             extendex_prefix.."insert_values",
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index ddc06eea7cb132d2308180a44f26fac48b831b31..207e7a979d9930d722e83ee2d393010ee1d1495f 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -72,11 +72,11 @@ test:do_test(
     "colname-2.1",
     function()
         test:execsql [[
-            CREATE TABLE tabc(a PRIMARY KEY,b,c);
+            CREATE TABLE tabc(a INT PRIMARY KEY,b INT,c INT);
             INSERT INTO tabc VALUES(1,2,3);
-            CREATE TABLE txyz(x PRIMARY KEY,y,z);
+            CREATE TABLE txyz(x INT PRIMARY KEY,y INT,z INT);
             INSERT INTO txyz VALUES(4,5,6);
-            CREATE TABLE tboth(a PRIMARY KEY,b,c,x,y,z);
+            CREATE TABLE tboth(a INT PRIMARY KEY,b INT,c INT,x INT,y INT,z INT);
             INSERT INTO tboth VALUES(11,12,13,14,15,16);
             CREATE VIEW v1 AS SELECT tabC.a, txyZ.x, * 
               FROM tabc, txyz ORDER BY 1 LIMIT 1;
@@ -442,7 +442,7 @@ test:do_execsql2_test(
 --            return lreplace( test:execsql("SELECT x.* FROM sqlite_master X LIMIT 1;"), 3, 3,"x")
 --        end, {
 --            -- <colname-5.1>
---            "table", "tabc", "tabc", "x", "CREATE TABLE tabc(a,b,c)"
+--            "table", "tabc", "tabc", "x", "CREATE TABLE tabc(a INT,b INT,c INT)"
 --            -- </colname-5.1>
 --        })
 
@@ -460,7 +460,7 @@ test:do_test(
             PRAGMA full_column_names='OFF';
             ]])
         test:execsql [=[
-            CREATE TABLE t6(a primary key, "'a'", """a""", "[a]", "`a`");
+            CREATE TABLE t6(a INT primary key, "'a'" INT, """a""" INT, "[a]" INT,  "`a`" INT);
             INSERT INTO t6 VALUES(1,2,3,4,5);
         ]=]
         return test:execsql2 "SELECT * FROM t6"
@@ -537,7 +537,7 @@ test:do_test(
     "colname-7.1",
     function()
         test:execsql [[
-            CREATE TABLE t7(x INTEGER PRIMARY KEY, y);
+            CREATE TABLE t7(x INTEGER PRIMARY KEY, y INT);
             INSERT INTO t7 VALUES(1,2);
         ]]
         return test:execsql2 "SELECT x, * FROM t7"
@@ -553,7 +553,7 @@ test:do_test(
     "colname-8.1",
     function()
         return test:execsql [[
-            CREATE TABLE t3893("x" PRIMARY KEY);
+            CREATE TABLE t3893("x" INT PRIMARY KEY);
             INSERT INTO t3893 VALUES(123);
             SELECT "y"."x" FROM (SELECT "x" FROM t3893) AS "y";
         ]]
@@ -597,7 +597,7 @@ for i, val in ipairs(data2) do
     )
 end
 
-test:execsql([[ create table table1("a" primary key, "b") ]])
+test:execsql([[ create table table1("a" TEXT primary key, "b" TEXT) ]])
 test:execsql("insert into table1 values('a1', 'a1')")
 
 -- " is used for identifiers
@@ -636,16 +636,16 @@ test:do_test(
 
 test:do_catchsql_test(
     "colname-11.1",
-    [[ create table t1(a, b, c, primary key('A'))]],
+    [[ create table t1(a INT, b INT, c INT, primary key('A'))]],
     {1, "expressions prohibited in PRIMARY KEY"})
 
 test:do_catchsql_test(
     "colname-11.2",
-    [[CREATE TABLE t1(a, b, c, d, e, 
+    [[CREATE TABLE t1(a INT, b INT, c INT, d INT, e INT,
       PRIMARY KEY(a), UNIQUE('b' COLLATE "unicode_ci" DESC));]],
     {1, "/Tarantool does not support functional indexes/"})
 
-test:execsql("create table table1(a primary key, b, c)")
+test:execsql("create table table1(a  INT primary key, b INT, c INT)")
 
 test:do_catchsql_test(
     "colname-11.3",
diff --git a/test/sql-tap/count.test.lua b/test/sql-tap/count.test.lua
index 45808de8d1909c8706ba453ae13ed74a11af6f5d..b05e3a28e0966b0d6089be1e4a0701cdb02b433e 100755
--- a/test/sql-tap/count.test.lua
+++ b/test/sql-tap/count.test.lua
@@ -45,7 +45,7 @@ for _, zIndex in ipairs(queries) do
         function()
             test:execsql [[
                 DROP TABLE IF EXISTS t1;
-                CREATE TABLE t1(a, b, PRIMARY KEY(a,b));
+                CREATE TABLE t1(a INT , b INT , PRIMARY KEY(a,b));
             ]]
             test:execsql(zIndex)
             return test:execsql(" SELECT count(*) FROM t1 ")
@@ -117,7 +117,7 @@ test:do_test(
     "count-2.1",
     function()
         test:execsql [[
-            CREATE TABLE t2(a, b, PRIMARY KEY(a,b));
+            CREATE TABLE t2(a INT , b INT , PRIMARY KEY(a,b));
         ]]
         return uses_op_count("SELECT count(*) FROM t2")
     end,1)
@@ -217,7 +217,7 @@ test:do_test(
 test:do_execsql_test(
     "count-3.1",
     [[
-        CREATE TABLE t3(a, b, PRIMARY KEY(a,b));
+        CREATE TABLE t3(a INT , b INT , PRIMARY KEY(a,b));
         SELECT a FROM (SELECT count(*) AS a FROM t3) WHERE a==0;
     ]], {
         -- <count-3.1>
@@ -238,7 +238,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "count-4.1",
     [[
-        CREATE TABLE t4(a PRIMARY KEY, b);
+        CREATE TABLE t4(a TEXT PRIMARY KEY, b TEXT );
         INSERT INTO t4 VALUES('a', 'b');
         CREATE INDEX t4i1 ON t4(b, a);
         SELECT count(*) FROM t4;
@@ -286,7 +286,7 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "count-6.1",
     [[
-        CREATE TABLE t6(x PRIMARY KEY);
+        CREATE TABLE t6(x  INT PRIMARY KEY);
         SELECT count(DISTINCT) FROM t6 GROUP BY x;
     ]], {
         -- <count-6.1>
diff --git a/test/sql-tap/cse.test.lua b/test/sql-tap/cse.test.lua
index 3544ef66e03fec50a63e5c6d3de6e26158c1bf48..4b25f936da228fc8509a5b0ce0ca76ef834f3801 100755
--- a/test/sql-tap/cse.test.lua
+++ b/test/sql-tap/cse.test.lua
@@ -26,7 +26,7 @@ test:do_test(
     "cse-1.1",
     function()
         test:execsql [[
-            CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c, d, e, f);
+            CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT , c INT , d INT , e INT , f INT );
             INSERT INTO t1 VALUES(1,11,12,13,14,15);
             INSERT INTO t1 VALUES(2,21,22,23,24,25);
         ]]
@@ -221,11 +221,11 @@ test:do_execsql_test(
 test:do_execsql_test(
     "cse-2.1",
     [[
-        CREATE TABLE t2(a0 PRIMARY KEY,a1,a2,a3,a4,a5,a6,a7,a8,a9,
-                        a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,
-                        a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,
-                        a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,
-                        a40,a41,a42,a43,a44,a45,a46,a47,a48,a49);
+        CREATE TABLE t2(a0  INT PRIMARY KEY,a1 INT ,a2 INT ,a3 INT ,a4 INT ,a5 INT ,a6 INT ,a7 INT ,a8 INT ,a9 INT ,
+                        a10 INT ,a11 INT ,a12 INT ,a13 INT ,a14 INT ,a15 INT ,a16 INT ,a17 INT ,a18 INT ,a19 INT ,
+                        a20 INT ,a21 INT ,a22 INT ,a23 INT ,a24 INT ,a25 INT ,a26 INT ,a27 INT ,a28 INT ,a29 INT ,
+                        a30 INT ,a31 INT ,a32 INT ,a33 INT ,a34 INT ,a35 INT ,a36 INT ,a37 INT ,a38 INT ,a39 INT ,
+                        a40 INT ,a41 INT ,a42 INT ,a43 INT ,a44 INT ,a45 INT ,a46 INT ,a47 INT ,a48 INT ,a49 INT );
         INSERT INTO t2 VALUES(0,1,2,3,4,5,6,7,8,9,
                         10,11,12,13,14,15,16,17,18,19,
                         20,21,22,23,24,25,26,27,28,29,
diff --git a/test/sql-tap/date.test.lua b/test/sql-tap/date.test.lua
index 62443764185c20c163de331d21cc2621cacbb098..acddfe090212961052a549aaf5f37e7b7877bb99 100755
--- a/test/sql-tap/date.test.lua
+++ b/test/sql-tap/date.test.lua
@@ -418,7 +418,7 @@ datetest(13.34, "date('2001-01-01','-1.5 years')", "1999-07-02")
 -- if {0==[sqlite3 -has-codec]} {
 --   do_test date-14.1 {
 --     execsql {
---       CREATE TABLE t1(x);
+--       CREATE TABLE t1(x FLOAT );
 --       INSERT INTO t1 VALUES(1.1);
 --     }
 --     db close
diff --git a/test/sql-tap/default.test.lua b/test/sql-tap/default.test.lua
index 88bfa219f4965018b0d3d6261c41d87bbe4df07e..314a35cd7515e18baff131edcf5ea0dabf03d7e2 100755
--- a/test/sql-tap/default.test.lua
+++ b/test/sql-tap/default.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(15)
+test:plan(16)
 
 --!./tcltestrunner.lua
 -- 2005 August 18
@@ -75,12 +75,12 @@ test:do_execsql_test(
 	[[
 	CREATE TABLE t4(
 	rowid INTEGER PRIMARY KEY AUTOINCREMENT, 
-	c DEFAULT 'abc'
+	c TEXT DEFAULT 'abc'
 	);
 	PRAGMA table_info(t4);
 	]], {
 	-- <default-2.1>
-	0,"ROWID","integer",1,"",1,1,"C","scalar",0,"'abc'",0
+	0,"ROWID","integer",1,"",1,1,"C","string",0,"'abc'",0
 	-- </default-2.1>
 })
 
@@ -91,7 +91,7 @@ test:do_execsql_test(
 	PRAGMA table_info(t4);
 	]], {
 	-- <default-2.2>
-	0,"ROWID","integer",1,"",1,1,"C","scalar",0,"'abc'",0
+	0,"ROWID","integer",1,"",1,1,"C","string",0,"'abc'",0
 	-- </default-2.2>
 })
 
@@ -103,13 +103,13 @@ test:do_execsql_test(
 	CREATE TABLE t3(
 	a INTEGER PRIMARY KEY AUTOINCREMENT,
 	b INT DEFAULT 12345 UNIQUE NOT NULL CHECK( b>=0 AND b<99999 ),
-	c VARCHAR(123,456) DEFAULT 'hello' NOT NULL,
+	c VARCHAR(123) DEFAULT 'hello' NOT NULL,
 	d REAL,
-	e FLOATING POINT(5,10) DEFAULT 4.36,
-	f NATIONAL CHARACTER(15), --COLLATE RTRIM,
-	g LONG INTEGER DEFAULT( 3600*12 )
+	e NUMERIC(5,10) DEFAULT 4.36,
+	f VARCHAR(15), --COLLATE RTRIM,
+	g INTEGER DEFAULT( 3600*12 )
 	);
-	INSERT INTO t3 VALUES(null, 5, 'row1', '5.25', 'xyz', 321, '432');
+	INSERT INTO t3 VALUES(null, 5, 'row1', 5.25, 8.67, 321, 432);
 	SELECT a, typeof(a), b, typeof(b), c, typeof(c), 
 	d, typeof(d), e, typeof(e), f, typeof(f),
 	g, typeof(g) FROM t3;
@@ -119,7 +119,7 @@ test:do_execsql_test(
 	-- In current situation I don't know what to do, need Kirill's
 	-- advice.
 	-- Bulat
-	1, "integer", 5, "integer", "row1", "text", 5.25, "real", "xyz", "text", "321", "text", 432, "integer"
+	1, "integer", 5, "integer", "row1", "text", 5.25, "real", 8.67, "real", "321", "text", 432, "integer"
 	-- </default-3.1>
 })
 
diff --git a/test/sql-tap/delete4.test.lua b/test/sql-tap/delete4.test.lua
index bf96accb7eb2746930df37a2afa4555d0af88baf..074c5ee888547d3ce03985379bbdad12cb647aa1 100755
--- a/test/sql-tap/delete4.test.lua
+++ b/test/sql-tap/delete4.test.lua
@@ -22,7 +22,7 @@ testprefix = "delete4"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE t1(x INTEGER PRIMARY KEY, y);
+        CREATE TABLE t1(x INTEGER PRIMARY KEY, y INT );
         INSERT INTO t1 VALUES(1, 0);
         INSERT INTO t1 VALUES(2, 1);
         INSERT INTO t1 VALUES(3, 0);
@@ -56,7 +56,7 @@ test:do_execsql_test(
     2.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(x INTEGER PRIMARY KEY, y, z);
+        CREATE TABLE t1(x INTEGER PRIMARY KEY, y INT , z BLOB);
         INSERT INTO t1 VALUES(1, 0, randomblob(200));
         INSERT INTO t1 VALUES(2, 1, randomblob(200));
         INSERT INTO t1 VALUES(3, 0, randomblob(200));
@@ -90,7 +90,7 @@ test:do_execsql_test(
     3.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a, b, PRIMARY KEY(a, b));
+        CREATE TABLE t1(a INT , b INT , PRIMARY KEY(a, b));
         INSERT INTO t1 VALUES(1, 2);
         INSERT INTO t1 VALUES(2, 4);
         INSERT INTO t1 VALUES(1, 5);
@@ -110,7 +110,7 @@ test:do_execsql_test(
     3.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(i INTEGER PRIMARY KEY, a, b);
+        CREATE TABLE t1(i INTEGER PRIMARY KEY, a TEXT, b TEXT);
         CREATE INDEX i1a ON t1(a);
         CREATE INDEX i1b ON t1(b);
         INSERT INTO t1 VALUES(1, 'one', 'i');
@@ -154,7 +154,7 @@ test:do_execsql_test(
     4.1,
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(col0 PRIMARY KEY, col1);
+        CREATE TABLE t4(col0  INT PRIMARY KEY, col1 TEXT);
         INSERT INTO t4 VALUES(14, 'abcde');
         CREATE INDEX idx_t4_0 ON t4 (col1, col0);
         DELETE FROM t4 WHERE col0=69 OR col0>7;
@@ -168,7 +168,7 @@ test:do_execsql_test(
     4.2,
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(col0 PRIMARY KEY, col1);
+        CREATE TABLE t4(col0  INT PRIMARY KEY, col1 TEXT);
         INSERT INTO t4 VALUES(14, 'abcde');
         CREATE INDEX idx_t4_0 ON t4 (col1, col0);
         DELETE FROM t4 WHERE col0=69 OR col0>7;
@@ -182,7 +182,7 @@ test:do_execsql_test(
     4.11,
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(col0, col1, pk PRIMARY KEY);
+        CREATE TABLE t4(col0 INT , col1 TEXT, pk TEXT PRIMARY KEY);
         INSERT INTO t4 VALUES(14, 'abcde','xyzzy');
         CREATE INDEX idx_t4_0 ON t4 (col1, col0);
         CREATE INDEX idx_t4_3 ON t4 (col0);
@@ -197,7 +197,7 @@ test:do_execsql_test(
     4.12,
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(col0, col1, pk PRIMARY KEY);
+        CREATE TABLE t4(col0 INT , col1 TEXT, pk TEXT PRIMARY KEY);
         INSERT INTO t4 VALUES(14, 'abcde','xyzzy');
         CREATE INDEX idx_t4_3 ON t4 (col0);
         CREATE INDEX idx_t4_0 ON t4 (col1, col0);
diff --git a/test/sql-tap/distinct.test.lua b/test/sql-tap/distinct.test.lua
index ff0d4d0296151fa16fd6f9658475603a7a51124e..26a4aace2c02098428f2b439974776adaa233a6a 100755
--- a/test/sql-tap/distinct.test.lua
+++ b/test/sql-tap/distinct.test.lua
@@ -92,15 +92,15 @@ end
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c, d);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY, a TEXT , b TEXT , c TEXT , d TEXT );
         CREATE UNIQUE INDEX i2 ON t1(d COLLATE "unicode_ci");
 
-        CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
+        CREATE TABLE t2(x INTEGER PRIMARY KEY, y INT );
 
-        CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
+        CREATE TABLE t3(c1  INT PRIMARY KEY NOT NULL, c2  INT NOT NULL);
         CREATE INDEX i3 ON t3(c2);
 
-        CREATE TABLE t4(id INTEGER PRIMARY KEY, a, b NOT NULL, c NOT NULL, d NOT NULL);
+        CREATE TABLE t4(id INTEGER PRIMARY KEY, a INT , b  INT NOT NULL, c  INT NOT NULL, d TEXT NOT NULL);
         CREATE UNIQUE INDEX t4i1 ON t4(b, c);
         CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE "unicode_ci");
     ]])
@@ -157,7 +157,7 @@ test:execsql([[
 test:do_execsql_test(
     2.0,
     [[
-        CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c);
+        CREATE TABLE t1(id INTEGER PRIMARY KEY, a TEXT, b TEXT, c TEXT );
         CREATE INDEX i1 ON t1(a, b);
         CREATE INDEX i2 ON t1(b COLLATE "unicode_ci", c COLLATE "unicode_ci");
 
@@ -201,7 +201,7 @@ test:do_execsql_test(
 
 -- do_test 3.0 {
 --   db eval {
---     CREATE TABLE t3(a INTEGER, b INTEGER, c, UNIQUE(a,b));
+--     CREATE TABLE t3(a INTEGER, b INTEGER, c INT , UNIQUE(a,b));
 --     INSERT INTO t3 VALUES
 --         (null, null, 1),
 --         (null, null, 2),
@@ -229,14 +229,14 @@ if (1 > 0) then
         [[
             DROP TABLE IF EXISTS t1;
             DROP TABLE IF EXISTS t2;
-            CREATE TABLE t1(id primary key, a INTEGER);
+            CREATE TABLE t1(id  INT primary key, a INTEGER);
             INSERT INTO t1 VALUES(1,3);
             INSERT INTO t1 VALUES(2,2);
             INSERT INTO t1 VALUES(3,1);
             INSERT INTO t1 VALUES(4,2);
             INSERT INTO t1 VALUES(5,3);
             INSERT INTO t1 VALUES(6,1);
-            CREATE TABLE t2(x primary key);
+            CREATE TABLE t2(x BLOB primary key);
             INSERT INTO t2
               SELECT DISTINCT
                 CASE a WHEN 1 THEN x'0000000000'
@@ -259,7 +259,7 @@ if (1 > 0) then
         5.1,
         [[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(id primary key,x);
+            CREATE TABLE t1(id  INT primary key,x INT );
             INSERT INTO t1(id,x) VALUES(1,3),(2,1),(3,5),
                                     (4,2),(5,6),(6,4),
                                     (7,5),(8,1),(9,3);
diff --git a/test/sql-tap/distinctagg.test.lua b/test/sql-tap/distinctagg.test.lua
index daee61418ce6754a679f673dc1c3a6cac29bab38..e55c16b546182c6b3c57b50338d38df03329fcfb 100755
--- a/test/sql-tap/distinctagg.test.lua
+++ b/test/sql-tap/distinctagg.test.lua
@@ -22,7 +22,7 @@ test:plan(6)
 test:do_execsql_test(
     "distinctagg-1.1",
     [[
-        CREATE TABLE t1(a,b,c primary key);
+        CREATE TABLE t1(a INT,b INT,c INT primary key);
         INSERT INTO t1 VALUES(1,2,3);
         INSERT INTO t1 VALUES(1,3,4);
         INSERT INTO t1 VALUES(1,3,5);
diff --git a/test/sql-tap/drop_all.test.lua b/test/sql-tap/drop_all.test.lua
index d4f6c60737ebbd69cfd98ba50af4157ffd517863..86a2587eb3e3849c5282eb6ac7c13d163db1ede4 100755
--- a/test/sql-tap/drop_all.test.lua
+++ b/test/sql-tap/drop_all.test.lua
@@ -9,7 +9,7 @@ test:do_test(
     prefix.."1.0",
     function()
         for i = 1, N do
-            test:execsql(string.format("create table table%s(a primary key)", i))
+            test:execsql(string.format("create table table%s(a INT primary key)", i))
         end
 
         for i = 1, N do
diff --git a/test/sql-tap/e_delete.test.lua b/test/sql-tap/e_delete.test.lua
index 6365f3b226589e4cdbfa952cb1ed0f52553b4dee..84a4e0a22a3bab2de2112e9d98e7d9558ab2572e 100755
--- a/test/sql-tap/e_delete.test.lua
+++ b/test/sql-tap/e_delete.test.lua
@@ -25,7 +25,7 @@ test.do_delete_tests = test.do_select_tests
 test:do_execsql_test(
     "e_delete-0.0",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
         CREATE INDEX i1 ON t1(a);
     ]], {
         -- <e_delete-0.0>
@@ -56,7 +56,7 @@ test:do_test(
             "t1", "t2", "t3", "t4", "t5", "t6"
         }
         for _, t in ipairs(tables) do
-            local sql = 'CREATE TABLE '..t..'(x PRIMARY KEY, y);'
+            local sql = 'CREATE TABLE '..t..'(x INT PRIMARY KEY, y TEXT);'
             test:execsql(sql)
         end
 
@@ -114,16 +114,16 @@ if (0 > 0) then
 --   ATTACH 'test.db2' AS aux;
 --   ATTACH 'test.db3' AS aux2;
     [[
-       CREATE TABLE temp.t7(a primary key, b);   INSERT INTO temp.t7 VALUES(1, 2);
-       CREATE TABLE main.t7(a primary key, b);   INSERT INTO main.t7 VALUES(3, 4);
-       CREATE TABLE aux.t7(a primary key, b);    INSERT INTO aux.t7 VALUES(5, 6);
-       CREATE TABLE aux2.t7(a primary key, b);   INSERT INTO aux2.t7 VALUES(7, 8);
-       CREATE TABLE main.t8(a primary key, b);   INSERT INTO main.t8 VALUES(1, 2);
-       CREATE TABLE aux.t8(a primary key, b);    INSERT INTO aux.t8 VALUES(3, 4);
-       CREATE TABLE aux2.t8(a primary key, b);   INSERT INTO aux2.t8 VALUES(5, 6);
-       CREATE TABLE aux.t9(a primary key, b);    INSERT INTO aux.t9 VALUES(1, 2);
-       CREATE TABLE aux2.t9(a primary key, b);   INSERT INTO aux2.t9 VALUES(3, 4);
-       CREATE TABLE aux2.t10(a primary key, b);  INSERT INTO aux2.t10 VALUES(1, 2);]]
+       CREATE TABLE temp.t7(a INT primary key, b INT);   INSERT INTO temp.t7 VALUES(1, 2);
+       CREATE TABLE main.t7(a INT primary key, b INT);   INSERT INTO main.t7 VALUES(3, 4);
+       CREATE TABLE aux.t7(a INT primary key, b INT);    INSERT INTO aux.t7 VALUES(5, 6);
+       CREATE TABLE aux2.t7(a INT primary key, b INT);   INSERT INTO aux2.t7 VALUES(7, 8);
+       CREATE TABLE main.t8(a INT primary key, b INT);   INSERT INTO main.t8 VALUES(1, 2);
+       CREATE TABLE aux.t8(a INT primary key, b INT);    INSERT INTO aux.t8 VALUES(3, 4);
+       CREATE TABLE aux2.t8(a INT primary key, b INT);   INSERT INTO aux2.t8 VALUES(5, 6);
+       CREATE TABLE aux.t9(a INT primary key, b INT);    INSERT INTO aux.t9 VALUES(1, 2);
+       CREATE TABLE aux2.t9(a INT primary key, b INT);   INSERT INTO aux2.t9 VALUES(3, 4);
+       CREATE TABLE aux2.t10(a INT primary key, b INT);  INSERT INTO aux2.t10 VALUES(1, 2);]]
     , {})
 
     -- EVIDENCE-OF: R-09681-58560 The table-name specified as part of a
@@ -349,7 +349,7 @@ if (0 > 0) then
     local function rebuild_t1()
         test:catchsql " DROP TABLE t1 "
         test:execsql [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
         INSERT INTO t1 VALUES(1, 'one');
         INSERT INTO t1 VALUES(2, 'two');
         INSERT INTO t1 VALUES(3, 'three');
@@ -479,7 +479,7 @@ if (0 > 0) then
  rebuild_t1 
  catchsql { DROP TABLE t1log }
  execsql {
-   CREATE TABLE t1log(x);
+   CREATE TABLE t1log(x INT );
    CREATE TRIGGER tr1 AFTER DELETE ON t1 BEGIN
      INSERT INTO t1log VALUES(old.a);
    END;
diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua
index 9a9a5faae4d3bd2c6b3cccc061690f3eb104cd97..ef7adb218d4dc2ee75e28afdd1db3f8b9352e211 100755
--- a/test/sql-tap/e_expr.test.lua
+++ b/test/sql-tap/e_expr.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(12431)
+test:plan(12425)
 
 --!./tcltestrunner.lua
 -- 2010 July 16
@@ -152,9 +152,9 @@ for _, op1 in ipairs(oplist) do
     for _, op2 in ipairs(oplist) do
         untested[op1..","..op2] = 1
         for tn, val in ipairs(test_cases1) do
-            local A = val[1]
-            local B = val[2]
-            local C = val[3]
+            local A = val[2]
+            local B = val[3]
+            local C = val[4]
             local testname = string.format("e_expr-1.%s.%s.%s", opname[op1], opname[op2], tn)
             -- If ?op2 groups more tightly than ?op1, then the result
             -- of executing ?sql1 whould be the same as executing ?sql3.
@@ -165,21 +165,19 @@ for _, op1 in ipairs(oplist) do
             local sql1 = string.format("SELECT %s %s %s %s %s", A, op1, B, op2, C)
             local sql2 = string.format("SELECT (%s %s %s) %s %s", A, op1, B, op2, C)
             local sql3 = string.format("SELECT %s %s (%s %s %s)", A, op1, B, op2, C)
-            local a2 = test:catchsql(sql2)
-            local a3 = test:catchsql(sql3)
-            local res = opprec[op2] < opprec[op1] and a3 or a2
-
-            if res[1] ~= 0 then
-                --
-                -- gh-2135: Division by zero is forbiden.
-                --
-                test:do_catchsql_test(
-                    testname, sql1,
-                    {1, "Failed to execute SQL statement: division by zero"})
-            else
-                test:do_execsql_test(testname, sql1, res[2])
+            -- Some cases may fail due to wrong type conversions.
+            -- For instance: SELECT 1 + (1 || -1)
+            -- After concatenation we'he got: 1 + '1-1'.
+            -- Since '1-1' can't be converted to number, this
+            -- expression results in error.
+            --
+            local is_ok1, a2 = pcall(test.execsql, test, sql2)
+            local is_ok2, a3 = pcall(test.execsql, test, sql3)
+            if is_ok1 and is_ok2 then
+                test:do_execsql_test(
+                    testname,
+                    sql1, (opprec[op2] < opprec[op1]) and a3 or a2)
             end
-
             if (a2 ~= a3) then
                 untested[op1..","..op2] = nil
             end
@@ -469,29 +467,22 @@ literals = {
 for _, op in ipairs(oplist) do
     for n1, rhs in ipairs(literals) do
         for n2, lhs in ipairs(literals) do
-            local res = test:catchsql(string.format(" SELECT typeof(%s %s %s) ", lhs, op, rhs))
-            local testname = string.format("e_expr-7.%s.%s.%s", opname[op], n1, n2)
-            if res[1] ~= 0 then
-                --
-                -- gh-2135: Division by zero is forbiden.
-                --
-                test:do_test(
-                    testname,
-                    function()
-                        return res[2] == "Failed to execute SQL statement: division by zero"
-                    end, true)
-            else
-                local t = res[2][1]
+            local is_ok, t = pcall(test.execsql, test,
+                                   string.format(" SELECT typeof(%s %s %s) ",
+                                                 lhs, op, rhs))
+            if is_ok then
+                t = t[1]
                 test:do_test(
-                    testname,
+                    string.format("e_expr-7.%s.%s.%s", opname[op], n1, n2),
                     function()
                         return (((op == "||") and ((t == "text") or
                                 (t == "null"))) or
                                 ((op ~= "||") and (((t == "integer") or
-                                        (t == "real")) or
-                                        (t == "null")))) and 1 or 0
-                    end, 1)
+                                (t == "real")) or
+                                (t == "null")))) and 1 or 0
+                end, 1)
             end
+
         end
     end
 end
@@ -849,7 +840,7 @@ test:do_execsql_test(
 -- # clause in a table column definition.
 -- #
 -- do_execsql_test e_expr-9.24 {
---   CREATE TABLE t24(a COLLATE NOCASE, b);
+--   CREATE TABLE t24(a TEXT COLLATE NOCASE, b INT);
 --   INSERT INTO t24 VALUES('aaa', 1);
 --   INSERT INTO t24 VALUES('bbb', 2);
 --   INSERT INTO t24 VALUES('ccc', 3);
@@ -1271,7 +1262,7 @@ test:do_execsql_test(
     })
 
 test:execsql [[
-    CREATE TABLE tblname(cname PRIMARY KEY);
+    CREATE TABLE tblname(cname INT PRIMARY KEY);
 ]]
 local function glob(args)
     return 1
@@ -1332,7 +1323,6 @@ local test_cases12 ={
     {42, "( EXPR )"},
 
     {43, "CAST ( EXPR AS integer )"},
-    {44, "CAST ( EXPR AS 'abcd' )"},
 
     {45, "EXPR COLLATE \"unicode_ci\""},
     {46, "EXPR COLLATE binary"},
@@ -3075,7 +3065,7 @@ evalcount = 0
 test:do_execsql_test(
     "e_expr-26.1.1",
     [[
-        CREATE TABLE t2(x PRIMARY KEY, w1, r1, w2, r2, r3);
+        CREATE TABLE t2(x INT PRIMARY KEY, w1 INT, r1 TEXT, w2 INT, r2 TEXT, r3 TEXT);
         INSERT INTO t2 VALUES(1, 1, 'R1', 2, 'R2', 'R3');
         INSERT INTO t2 VALUES(2, 1, 'R1', 2, 'R2', 'R3');
         INSERT INTO t2 VALUES(3, 1, 'R1', 2, 'R2', 'R3');
@@ -3153,24 +3143,12 @@ test:do_test(
 -- affinity only changes the data type of a value if the change is
 -- lossless and reversible.
 --
-test:do_execsql_test(
-    "e_expr-27.1.1",
-    [[
-        CREATE TABLE t3(a TEXT PRIMARY KEY, b REAL, c INTEGER);
-        INSERT INTO t3 VALUES(X'555655', '1.23abc', 4.5);
-        SELECT typeof(a), a, typeof(b), b, typeof(c), c FROM t3;
-    ]], {
-        -- <e_expr-27.1.1>
-        "blob", "UVU", "text", "1.23abc", "real", 4.5
-        -- </e_expr-27.1.1>
-    })
-
 test:do_execsql_test(
     "e_expr-27.1.2",
     [[
         SELECT
           typeof(CAST(X'555655' as TEXT)), CAST(X'555655' as TEXT),
-          typeof(CAST('1.23abc' as REAL)), CAST('1.23abc' as REAL),
+          typeof(CAST('1.23' as REAL)), CAST('1.23' as REAL),
           typeof(CAST(4.5 as INTEGER)), CAST(4.5 as INTEGER)
     ]], {
         -- <e_expr-27.1.2>
@@ -3184,13 +3162,7 @@ test:do_execsql_test(
 do_expr_test("e_expr-27.2.1", " CAST(NULL AS integer) ", "null", "")
 do_expr_test("e_expr-27.2.2", " CAST(NULL AS text) ", "null", "")
 do_expr_test("e_expr-27.2.3", " CAST(NULL AS blob) ", "null", "")
-do_expr_test("e_expr-27.2.4", " CAST(NULL AS number) ", "null", "")
--- EVIDENCE-OF: R-43522-35548 Casting a value to a type-name with no
--- affinity causes the value to be converted into a BLOB.
---
-do_expr_test("e_expr-27.3.1", " CAST('abc' AS blob)       ", "blob", "abc")
-do_expr_test("e_expr-27.3.2", " CAST('def' AS shobblob_x) ", "blob", "def")
-do_expr_test("e_expr-27.3.3", " CAST('ghi' AS abbLOb10)   ", "blob", "ghi")
+do_expr_test("e_expr-27.2.4", " CAST(NULL AS numeric) ", "null", "")
 -- EVIDENCE-OF: R-22956-37754 Casting to a BLOB consists of first casting
 -- the value to TEXT in the encoding of the database connection, then
 -- interpreting the resulting byte sequence as a BLOB instead of as TEXT.
@@ -3307,10 +3279,10 @@ do_expr_test("e_expr-31.2.4", [[
 -- result into INTEGER if and only if the conversion from REAL to INTEGER
 -- is lossless and reversible.
 --
-do_expr_test("e_expr-32.1.1", " CAST('45'   AS NUMERIC)  ", "integer", 45)
-do_expr_test("e_expr-32.1.2", " CAST('45.0' AS NUMERIC)  ", "integer", 45)
+do_expr_test("e_expr-32.1.1", " CAST('45'   AS NUMERIC)  ", "real", 45)
+do_expr_test("e_expr-32.1.2", " CAST('45.0' AS NUMERIC)  ", "real", 45)
 do_expr_test("e_expr-32.1.3", " CAST('45.2' AS NUMERIC)  ", "real", 45.2)
-do_expr_test("e_expr-32.1.4", " CAST('11abc' AS NUMERIC) ", "integer", 11)
+do_expr_test("e_expr-32.1.4", " CAST('11abc' AS NUMERIC) ", "real", 11)
 do_expr_test("e_expr-32.1.5", " CAST('11.1abc' AS NUMERIC) ", "real", 11.1)
 -- EVIDENCE-OF: R-30347-18702 Casting a REAL or INTEGER value to NUMERIC
 -- is a no-op, even if a real value could be losslessly converted to an
@@ -3320,10 +3292,10 @@ do_expr_test("e_expr-32.2.1", " CAST(13.0 AS NUMERIC) ", "real", 13.0)
 do_expr_test("e_expr-32.2.2", " CAST(13.5 AS NUMERIC) ", "real", 13.5)
 do_expr_test("e_expr-32.2.3", [[
   CAST(-9223372036854775808 AS NUMERIC)
-]], "integer", -9223372036854775808LL)
+]], "real", -9223372036854775808)
 do_expr_test("e_expr-32.2.4", [[
   CAST(9223372036854775807 AS NUMERIC)
-]], "integer", 9223372036854775807LL)
+]], "real", 9223372036854775807)
 -- EVIDENCE-OF: R-64550-29191 Note that the result from casting any
 -- non-BLOB value into a BLOB and the result from casting any BLOB value
 -- into a non-BLOB value may be different depending on whether the
@@ -3337,7 +3309,7 @@ do_expr_test("e_expr-32.2.4", [[
 test:do_execsql_test(
     "e_expr-34.1",
     [[
-        CREATE TABLE t1(id PRIMARY KEY, a, b);
+        CREATE TABLE t1(id INT PRIMARY KEY, a INT, b INT);
         INSERT INTO t1 VALUES(1, 1, 2);
         INSERT INTO t1 VALUES(2, NULL, 2);
         INSERT INTO t1 VALUES(3, 1, NULL);
@@ -3432,10 +3404,9 @@ test:catchsql "DROP TABLE t22;"
 test:do_execsql_test(
     "e_expr-35.0",
     [[
-        CREATE TABLE t22(a PRIMARY KEY, b);
+        CREATE TABLE t22(a TEXT PRIMARY KEY, b TEXT);
         INSERT INTO t22 VALUES('one', 'two');
         INSERT INTO t22 VALUES('three', NULL);
-        INSERT INTO t22 VALUES(4, 5.0);
     ]], {
         -- <e_expr-35.0>
         
@@ -3451,14 +3422,14 @@ test:do_execsql_test(
 --
 do_expr_test("e_expr-35.1.1", " (SELECT 35)   ", "integer", 35)
 do_expr_test("e_expr-35.1.2", " (SELECT NULL) ", "null", "")
-do_expr_test("e_expr-35.1.3", " (SELECT count(*) FROM t22) ", "integer", 3)
+do_expr_test("e_expr-35.1.3", " (SELECT count(*) FROM t22) ", "integer", 2)
 do_expr_test("e_expr-35.1.4", " (SELECT 4 FROM t22 LIMIT 1) ", "integer", 4)
 do_expr_test("e_expr-35.1.5", [[ 
   (SELECT b FROM t22 UNION SELECT a+1 FROM t22 LIMIT 1)
 ]], "null", "")
 do_expr_test("e_expr-35.1.6", [[ 
   (SELECT a FROM t22 UNION SELECT COALESCE(b, 55) FROM t22 ORDER BY 1 LIMIT 1)
-]], "integer", 4)
+]], "integer", 55)
 -- EVIDENCE-OF: R-46899-53765 A SELECT used as a scalar quantity must
 -- return a result set with a single column.
 --
@@ -3491,7 +3462,7 @@ end
 test:do_execsql_test(
     "e_expr-36.3.1",
     [[
-        CREATE TABLE t4(x PRIMARY KEY, y);
+        CREATE TABLE t4(x INT PRIMARY KEY, y TEXT);
         INSERT INTO t4 VALUES(1, 'one');
         INSERT INTO t4 VALUES(2, 'two');
         INSERT INTO t4 VALUES(3, 'three');
diff --git a/test/sql-tap/e_select1.test.lua b/test/sql-tap/e_select1.test.lua
index c8ad9039d24031eec1a5c359396b57c6d86e59eb..b1e113cc9f759840bce4b75d394e6080445354a4 100755
--- a/test/sql-tap/e_select1.test.lua
+++ b/test/sql-tap/e_select1.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(541)
+test:plan(525)
 
 --!./tcltestrunner.lua
 -- 2010 July 16
@@ -24,21 +24,21 @@ test:plan(541)
 test:do_execsql_test(
     "e_select-1.0",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a TEXT PRIMARY KEY, b TEXT);
         INSERT INTO t1 VALUES('a', 'one');
         INSERT INTO t1 VALUES('b', 'two');
         INSERT INTO t1 VALUES('c', 'three');
 
-        CREATE TABLE t2(a PRIMARY KEY, b);
+        CREATE TABLE t2(a TEXT PRIMARY KEY, b TEXT);
         INSERT INTO t2 VALUES('a', 'I');
         INSERT INTO t2 VALUES('b', 'II');
         INSERT INTO t2 VALUES('c', 'III');
 
-        CREATE TABLE t3(a PRIMARY KEY, c);
+        CREATE TABLE t3(a TEXT PRIMARY KEY, c INT);
         INSERT INTO t3 VALUES('a', 1);
         INSERT INTO t3 VALUES('b', 2);
 
-        CREATE TABLE t4(a PRIMARY KEY, c);
+        CREATE TABLE t4(a TEXT PRIMARY KEY, c INT);
         INSERT INTO t4 VALUES('a', NULL);
         INSERT INTO t4 VALUES('b', 2);
     ]], {
@@ -185,7 +185,7 @@ test:do_select_tests(
 
         {"2011.1", "SELECT ALL 1, 2, 3 WHERE 1 GROUP BY 2", {1, 2, 3}},
         {"2012.1", "SELECT ALL 1, 2, 3 WHERE 0 GROUP BY 2 HAVING count(*)=1", {}},
-        {"2012.2", "SELECT ALL 1, 2, 3 WHERE 'abc' GROUP BY 2 HAVING count(*)>1", {}},
+        {"2012.2", "SELECT ALL 1, 2, 3 WHERE 2 GROUP BY 2 HAVING count(*)>1", {}},
 
         {"0111.1", "SELECT count(*), max(a) FROM t1 WHERE a='a' GROUP BY b", {1, "a"}},
         {"0112.1", "SELECT count(*), max(a) FROM t1 WHERE a='c' GROUP BY b HAVING count(*)=1", {1, "c"}},
@@ -298,57 +298,6 @@ test:do_select_tests(
         {"6", "SELECT count(*) WHERE 1", {1}},
     })
 
--- EVIDENCE-OF: R-45424-07352 If there is only a single table or subquery
--- in the FROM clause, then the input data used by the SELECT statement
--- is the contents of the named table.
---
---   The results of the SELECT queries suggest that they are operating on the
---   contents of the table 'xx'.
---
-test:do_execsql_test(
-    "e_select-1.2.0",
-    [[
-        CREATE TABLE xx(id primary key, x, y);
-        INSERT INTO xx VALUES(1, 'IiJlsIPepMuAhU', X'10B00B897A15BAA02E3F98DCE8F2');
-        INSERT INTO xx VALUES(2, NULL, -16.87);
-        INSERT INTO xx VALUES(3, -17.89, 'linguistically');
-    ]], {
-        -- <e_select-1.2.0>
-
-        -- </e_select-1.2.0>
-    })
-
-test:do_select_tests(
-    "e_select-1.2",
-    {
-        {"1", "SELECT quote(x), quote(y) FROM xx", {"'IiJlsIPepMuAhU'", "X'10B00B897A15BAA02E3F98DCE8F2'", "NULL", "-16.87", "-17.89", "'linguistically'" }},
-        {"2", "SELECT count(*), count(x), count(y) FROM xx", {3, 2, 3}},
-        {"3", "SELECT sum(x), sum(y) FROM xx", {-17.89, -16.87}},
-    })
-
--- EVIDENCE-OF: R-28355-09804 If there is more than one table or subquery
--- in FROM clause then the contents of all tables and/or subqueries are
--- joined into a single dataset for the simple SELECT statement to
--- operate on.
---
---   There are more detailed tests for subsequent requirements that add
---   more detail to this idea. We just add a single test that shows that
---   data is coming from each of the three tables following the FROM clause
---   here to show that the statement, vague as it is, is not incorrect.
---
-test:do_select_tests(
-    "e_select-1.3",
-    {
-        {"1", "SELECT * FROM t1, t2, t3", {
-            "a" ,"one" ,"a" ,"I" ,"a" ,1 ,"a" ,"one" ,"a" ,"I" ,"b" ,2 ,"a" ,"one" ,"b" ,"II" ,"a" ,1 ,
-            "a" ,"one" ,"b" ,"II" ,"b" ,2 ,"a" ,"one" ,"c" ,"III" ,"a" ,1 ,"a" ,"one" ,"c" ,"III" ,"b" ,2 ,
-            "b" ,"two" ,"a" ,"I" ,"a" ,1 ,"b" ,"two" ,"a" ,"I" ,"b" ,2 ,"b" ,"two" ,"b" ,"II" ,"a" ,1 ,
-            "b" ,"two" ,"b" ,"II" ,"b" ,2 ,"b" ,"two" ,"c" ,"III" ,"a" ,1 ,"b" ,"two" ,"c" ,"III" ,"b" ,2 ,
-            "c" ,"three" ,"a" ,"I" ,"a" ,1 ,"c" ,"three" ,"a" ,"I" ,"b" ,2 ,"c" ,"three" ,"b" ,"II" ,"a" ,1 ,
-            "c" ,"three" ,"b" ,"II" ,"b" ,2 ,"c" ,"three" ,"c", "III", "a", 1, "c", "three", "c", "III", "b", 2
-        }},
-    })
-
 --
 -- The following block of tests - e_select-1.4.* - test that the description
 -- of cartesian joins in the SELECT documentation is consistent with SQLite.
@@ -377,13 +326,13 @@ test:do_select_tests(
 test:do_execsql_test(
     "e_select-1.4.0",
     [[
-        CREATE TABLE x1(id primary key, a, b);
-        CREATE TABLE x2(id primary key, c, d, e);
-        CREATE TABLE x3(id primary key, f, g, h, i);
+        CREATE TABLE x1(id  INT primary key, a TEXT , b TEXT );
+        CREATE TABLE x2(id  INT primary key, c FLOAT , d FLOAT , e FLOAT );
+        CREATE TABLE x3(id  INT primary key, f TEXT , g TEXT , h TEXT , i TEXT );
 
         -- x1: 3 rows, 2 columns
-        INSERT INTO x1 VALUES(1,24, 'converging');
-        INSERT INTO x1 VALUES(2,NULL, X'CB71');
+        INSERT INTO x1 VALUES(1,'24', 'converging');
+        INSERT INTO x1 VALUES(2, NULL, CAST(X'CB71' as TEXT));
         INSERT INTO x1 VALUES(3,'blonds', 'proprietary');
 
         -- x2: 2 rows, 3 columns
@@ -391,11 +340,11 @@ test:do_execsql_test(
         INSERT INTO x2 VALUES(2,-58, NULL, 1.21);
 
         -- x3: 5 rows, 4 columns
-        INSERT INTO x3 VALUES(1,-39.24, NULL, 'encompass', -1);
-        INSERT INTO x3 VALUES(2,'presenting', 51, 'reformation', 'dignified');
-        INSERT INTO x3 VALUES(3,'conducting', -87.24, 37.56, NULL);
-        INSERT INTO x3 VALUES(4,'coldest', -96, 'dramatists', 82.3);
-        INSERT INTO x3 VALUES(5,'alerting', NULL, -93.79, NULL);
+        INSERT INTO x3 VALUES(1,'-39.24', NULL, 'encompass', '-1');
+        INSERT INTO x3 VALUES(2,'presenting', '51', 'reformation', 'dignified');
+        INSERT INTO x3 VALUES(3,'conducting', '-87.24', '37.56', NULL);
+        INSERT INTO x3 VALUES(4,'coldest', '-96', 'dramatists', '82.3');
+        INSERT INTO x3 VALUES(5,'alerting', NULL, '-93.79', NULL);
     ]], {
         -- <e_select-1.4.0>
 
@@ -408,23 +357,23 @@ test:do_execsql_test(
 --
 do_join_test("e_select-1.4.1.1", [[
   SELECT a,b,c,d,e FROM x1 JOIN_PATTERN x2 LIMIT 1
-]], {24, "converging", -60.06, "", ""})
+]], {"24", "converging", -60.06, "", ""})
 do_join_test("e_select-1.4.1.2", [[
   SELECT c,d,e,a,b FROM x2 JOIN_PATTERN x1 LIMIT 1
-]], {-60.06, "", "", 24, "converging"})
+]], {-60.06, "", "", "24", "converging"})
 do_join_test("e_select-1.4.1.3", [[
   SELECT f,g,h,i,c,d,e FROM x3 JOIN_PATTERN x2 LIMIT 1
-]], {-39.24, "", "encompass", -1, -60.06, "", ""})
+]], {'-39.24', "", "encompass", '-1', -60.06, "", ""})
 do_join_test("e_select-1.4.1.4", [[
   SELECT c,d,e,f,g,h,i FROM x2 JOIN_PATTERN x3 LIMIT 1
-]], {-60.06, "", "", -39.24, "", "encompass", -1})
+]], {-60.06, "", "", '-39.24', "", "encompass", '-1'})
 -- EVIDENCE-OF: R-44414-54710 There is a row in the cartesian product
 -- dataset formed by combining each unique combination of a row from the
 -- left-hand and right-hand datasets.
 --
 do_join_test("e_select-1.4.2.1", [[
   SELECT c,d,e,f,g,h,i FROM x2 JOIN_PATTERN x3 ORDER BY +c, +f
-]], { -60.06, "", "", -39.24, "", "encompass", -1, -60.06, "", "", "alerting", "", -93.79, "", -60.06, "", "", "coldest", -96, "dramatists", 82.3, -60.06, "", "", "conducting", -87.24, 37.56, "", -60.06, "", "", "presenting", 51, "reformation", "dignified", -58, "", 1.21, -39.24, "", "encompass", -1, -58, "", 1.21, "alerting", "", -93.79, "", -58, "", 1.21, "coldest", -96, "dramatists", 82.3, -58, "", 1.21, "conducting", -87.24, 37.56, "", -58, "", 1.21, "presenting", 51, "reformation", "dignified" })
+]], { -60.06,"","","-39.24","","encompass","-1",-60.06,"","","alerting","","-93.79","",-60.06,"","","coldest","-96","dramatists","82.3",-60.06,"","","conducting","-87.24","37.56","",-60.06,"","","presenting","51","reformation","dignified",-58,"",1.21,"-39.24","","encompass","-1",-58,"",1.21,"alerting","","-93.79","",-58,"",1.21,"coldest","-96","dramatists","82.3",-58,"",1.21,"conducting","-87.24","37.56","",-58,"",1.21,"presenting","51","reformation","dignified" })
 -- TODO: Come back and add a few more like the above.
 -- EVIDENCE-OF: R-18439-38548 In other words, if the left-hand dataset
 -- consists of Nleft rows of Mleft columns, and the right-hand dataset of
@@ -502,8 +451,6 @@ local data ={
     {"1"," SELECT * FROM t1 JOIN_PATTERN t2 ON (1) ",t1_cross_t2},
     {"2"," SELECT * FROM t1 JOIN_PATTERN t2 ON (0) ",{}},
     {"3"," SELECT * FROM t1 JOIN_PATTERN t2 ON (NULL) ",{}},
-    {"4"," SELECT * FROM t1 JOIN_PATTERN t2 ON ('abc') ",{}},
-    {"5"," SELECT * FROM t1 JOIN_PATTERN t2 ON ('1ab') ", t1_cross_t2},
     {"6"," SELECT * FROM t1 JOIN_PATTERN t2 ON (0.9) ",t1_cross_t2},
     {"7"," SELECT * FROM t1 JOIN_PATTERN t2 ON ('0.9') ",t1_cross_t2},
     {"8"," SELECT * FROM t1 JOIN_PATTERN t2 ON (0.0) ",{}},
@@ -561,11 +508,11 @@ if (0 > 0)
     test:do_execsql_test(
         "e_select-1.6.0",
         [[
-            CREATE TABLE t5(a COLLATE "unicode_ci", b COLLATE binary);
+            CREATE TABLE t5(a  TEXT COLLATE "unicode_ci", b  TEXT COLLATE binary);
             INSERT INTO t5 VALUES('AA', 'cc');
             INSERT INTO t5 VALUES('BB', 'dd');
             INSERT INTO t5 VALUES(NULL, NULL);
-            CREATE TABLE t6(a COLLATE binary, b COLLATE "unicode_ci");
+            CREATE TABLE t6(a  TEXT COLLATE binary, b  TEXT COLLATE "unicode_ci");
             INSERT INTO t6 VALUES('aa', 'cc');
             INSERT INTO t6 VALUES('bb', 'DD');
             INSERT INTO t6 VALUES(NULL, NULL);
@@ -597,8 +544,8 @@ end
 test:do_execsql_test(
     "e_select-1.8.0",
     [[
-        CREATE TABLE t7(a PRIMARY KEY, b, c);
-        CREATE TABLE t8(a PRIMARY KEY, d, e);
+        CREATE TABLE t7(a TEXT PRIMARY KEY, b TEXT, c INT );
+        CREATE TABLE t8(a TEXT PRIMARY KEY, d TEXT, e INT );
 
         INSERT INTO t7 VALUES('x', 'ex',  24);
         INSERT INTO t7 VALUES('y', 'why', 25);
@@ -668,7 +615,7 @@ test:do_select_tests(
 test:do_execsql_test(
     "e_select-1.11.0",
     [[
-        CREATE TABLE t10(id primary key, x, y);
+        CREATE TABLE t10(id  INT primary key, x INT , y TEXT);
         INSERT INTO t10 VALUES(1, 1, 'true');
         INSERT INTO t10 VALUES(2, 0, 'false');
     ]], {
@@ -710,18 +657,18 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-3.0",
     [[
-        CREATE TABLE x1(id PRIMARY KEY, k, x, y, z);
-        INSERT INTO x1 VALUES(1, 1, 'relinquished', 'aphasia', 78.43);
-        INSERT INTO x1 VALUES(2, 2, X'A8E8D66F',    X'07CF',   -81);
-        INSERT INTO x1 VALUES(3, 3, -22,            -27.57,    NULL);
+        CREATE TABLE x1(id  INT PRIMARY KEY, k INT , x TEXT , y TEXT , z TEXT );
+        INSERT INTO x1 VALUES(1, 1, 'relinquished', 'aphasia', '78.43');
+        INSERT INTO x1 VALUES(2, 2, 'A8E8D66F',    '07CF',   '-81');
+        INSERT INTO x1 VALUES(3, 3, '-22',            '-27.57',    NULL);
         INSERT INTO x1 VALUES(4, 4, NULL,           'bygone',  'picky');
-        INSERT INTO x1 VALUES(5, 5, NULL,           96.28,     NULL);
-        INSERT INTO x1 VALUES(6, 6, 0,              1,         2);
+        INSERT INTO x1 VALUES(5, 5, NULL,           '96.28',     NULL);
+        INSERT INTO x1 VALUES(6, 6, '0',              '1',         '2');
 
-        CREATE TABLE x2(id primary key, k, x, y2);
-        INSERT INTO x2 VALUES(1, 1, 50, X'B82838');
-        INSERT INTO x2 VALUES(2, 5, 84.79, 65.88);
-        INSERT INTO x2 VALUES(3, 3, -22, X'0E1BE452A393');
+        CREATE TABLE x2(id  INT primary key, k INT , x TEXT , y2 TEXT );
+        INSERT INTO x2 VALUES(1, 1, '50', 'B82838');
+        INSERT INTO x2 VALUES(2, 5, '84.79', '65.88');
+        INSERT INTO x2 VALUES(3, 3, '-22', '0E1BE452A393');
         INSERT INTO x2 VALUES(4, 7, 'mistrusted', 'standardized');
     ]], {
         -- <e_select-3.0>
@@ -734,45 +681,6 @@ test:do_execsql_test(
 -- expression. Only rows for which the WHERE clause expression evaluates
 -- to true are included from the dataset before continuing.
 --
-test:do_execsql_test(
-    "e_select-3.1.1",
-    [[
-        SELECT k FROM x1 WHERE x
-    ]], {
-        -- <e_select-3.1.1>
-        3
-        -- </e_select-3.1.1>
-    })
-
-test:do_execsql_test(
-    "e_select-3.1.2",
-    [[
-        SELECT k FROM x1 WHERE y
-    ]], {
-        -- <e_select-3.1.2>
-        3, 5, 6
-        -- </e_select-3.1.2>
-    })
-
-test:do_execsql_test(
-    "e_select-3.1.3",
-    [[
-        SELECT k FROM x1 WHERE z
-    ]], {
-        -- <e_select-3.1.3>
-        1, 2, 6
-        -- </e_select-3.1.3>
-    })
-
-test:do_execsql_test(
-    "e_select-3.1.4",
-    [[
-        SELECT k FROM x1 WHERE '1'||z
-    ]], {
-        -- <e_select-3.1.4>
-        1, 2, 4, 6
-        -- </e_select-3.1.4>
-    })
 
 test:do_execsql_test(
     "e_select-3.1.5",
@@ -784,16 +692,6 @@ test:do_execsql_test(
         -- </e_select-3.1.5>
     })
 
-test:do_execsql_test(
-    "e_select-3.1.6",
-    [[
-        SELECT k FROM x1 WHERE z - 78.43
-    ]], {
-        -- <e_select-3.1.6>
-        2, 4, 6
-        -- </e_select-3.1.6>
-    })
-
 test:do_execsql_test(
     "e_select-3.2.1a",
     [[
@@ -852,21 +750,21 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-4.0",
     [[
-        CREATE TABLE z1(id primary key, a, b, c);
-        CREATE TABLE z2(id primary key, d, e);
-        CREATE TABLE z3(id primary key, a, b);
+        CREATE TABLE z1(id  INT primary key, a FLOAT, b FLOAT, c TEXT);
+        CREATE TABLE z2(id  INT primary key, d FLOAT, e FLOAT);
+        CREATE TABLE z3(id  INT primary key, a FLOAT, b FLOAT);
 
         INSERT INTO z1 VALUES(1, 51.65, -59.58, 'belfries');
         INSERT INTO z1 VALUES(2, -5, NULL, 75);
         INSERT INTO z1 VALUES(3, -2.2, -23.18, 'suiters');
         INSERT INTO z1 VALUES(4, NULL, 67, 'quartets');
         INSERT INTO z1 VALUES(5, -1.04, -32.3, 'aspen');
-        INSERT INTO z1 VALUES(6, 63, 'born', -26);
+        INSERT INTO z1 VALUES(6, 63, '0', -26);
 
         INSERT INTO z2 VALUES(1, NULL, 21);
         INSERT INTO z2 VALUES(2, 36, 6);
 
-        INSERT INTO z3 VALUES(1, 'subsistence', 'gauze');
+        INSERT INTO z3 VALUES(1, 123.21, 123.12);
         INSERT INTO z3 VALUES(2, 49.17, -67);
     ]], {
         -- <e_select-4.0>
@@ -891,9 +789,9 @@ test:do_select_tests(
         {"4", "SELECT z2.d, z2.e FROM z1,z2 LIMIT 1", {"", 21}},
         {"5", "SELECT z2.d, z2.e, z1.a, z1.b, z1.c FROM z1,z2 LIMIT 1", {"", 21, 51.65, -59.58, "belfries"}},
 
-        {"6", "SELECT count(*), a,b,c FROM z1", {6, 63, "born", -26}},
-        {"7", "SELECT max(a), a,b,c FROM z1", {63, 63, "born", -26}},
-        {"8", "SELECT a,b,c, min(a) FROM z1", {-5, "", 75, -5}},
+        {"6", "SELECT count(*), a,b,c FROM z1", {6, 63, 0, "-26"}},
+        {"7", "SELECT max(a), a,b,c FROM z1", {63, 63, 0, "-26"}},
+        {"8", "SELECT a,b,c, min(a) FROM z1", {-5, "", "75", -5}},
 
         {"9", "SELECT a,b,c,d,e,a,b,c,d,e FROM z1,z2 LIMIT 1", {
             51.65, -59.58, "belfries", "", 21, 51.65, -59.58, "belfries", "", 21}},
@@ -970,14 +868,14 @@ end
 test:do_select_tests(
     "e_select-4.4",
     {
-        {"1", "SELECT a, b FROM z1", {51.65, -59.58, -5, "", -2.2, -23.18, "", 67, -1.04, -32.3, 63, "born"}},
+        {"1", "SELECT a, b FROM z1", {51.65, -59.58, -5, "", -2.2, -23.18, "", 67, -1.04, -32.3, 63, 0}},
 
         {"2", "SELECT a IS NULL, b+1, a,b,c FROM z1",
-            {0, -58.58, 51.65, -59.58, "belfries", 0, "", -5, "", 75,
+            {0, -58.58, 51.65, -59.58, "belfries", 0, "", -5, "", "75",
                 0, -22.18, -2.2, -23.18, "suiters", 1, 68, "", 67, "quartets", 0, -31.3,
-                -1.04, -32.3, "aspen", 0, 1, 63, "born", -26}},
+                -1.04, -32.3, "aspen", 0, 1, 63, 0, "-26"}},
 
-        {"3", "SELECT 32*32, d||e FROM z2", {1024, "", 1024, "366"}},
+        {"3", "SELECT 32*32, d||e FROM z2", {1024, "", 1024, "36.06.0"}},
     })
 
 -- Test cases e_select-4.5.* and e_select-4.6.* together show that:
@@ -994,7 +892,7 @@ test:do_select_tests(
 test:do_select_tests(
     "e_select-4.5",
     {
-        {"1", "SELECT count(a), max(a), count(b), max(b) FROM z1", {5, 63, 5, "born"}},
+        {"1", "SELECT count(a), max(a), count(b), max(b) FROM z1", {5, 63, 5, 67}},
         {"2", "SELECT count(*), max(1)", {1, 1}},
 
         {"3", "SELECT sum(b+1) FROM z1 NATURAL LEFT JOIN z3", {-43.06}},
@@ -1018,13 +916,13 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-4.6.0",
     [[
-        CREATE TABLE a1(one PRIMARY KEY, two);
+        CREATE TABLE a1(one  INT PRIMARY KEY, two INT );
         INSERT INTO a1 VALUES(1, 1);
         INSERT INTO a1 VALUES(2, 3);
         INSERT INTO a1 VALUES(3, 6);
         INSERT INTO a1 VALUES(4, 10);
 
-        CREATE TABLE a2(one PRIMARY KEY, three);
+        CREATE TABLE a2(one  INT PRIMARY KEY, three INT );
         INSERT INTO a2 VALUES(1, 1);
         INSERT INTO a2 VALUES(3, 2);
         INSERT INTO a2 VALUES(6, 3);
@@ -1083,7 +981,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-4.9.0",
     [[
-        CREATE TABLE b1(one PRIMARY KEY, two);
+        CREATE TABLE b1(one  INT PRIMARY KEY, two TEXT);
         INSERT INTO b1 VALUES(1, 'o');
         INSERT INTO b1 VALUES(4, 'f');
         INSERT INTO b1 VALUES(3, 't');
@@ -1092,14 +990,14 @@ test:do_execsql_test(
         INSERT INTO b1 VALUES(7, 's');
         INSERT INTO b1 VALUES(6, 's');
 
-        CREATE TABLE b2(x, y PRIMARY KEY);
+        CREATE TABLE b2(x TEXT, y  INT PRIMARY KEY);
         INSERT INTO b2 VALUES(NULL, 0);
         INSERT INTO b2 VALUES(NULL, 1);
         INSERT INTO b2 VALUES('xyz', 2);
         INSERT INTO b2 VALUES('abc', 3);
         INSERT INTO b2 VALUES('xyz', 4);
 
-        CREATE TABLE b3(id PRIMARY KEY, a COLLATE "unicode_ci", b COLLATE binary);
+        CREATE TABLE b3(id  INT PRIMARY KEY, a  TEXT COLLATE "unicode_ci", b  TEXT COLLATE binary);
         INSERT INTO b3 VALUES(1, 'abc', 'abc');
         INSERT INTO b3 VALUES(2, 'aBC', 'aBC');
         INSERT INTO b3 VALUES(3, 'Def', 'Def');
@@ -1200,7 +1098,7 @@ end
 test:do_execsql_test(
     "e_select-4.13.0",
     [[
-        CREATE TABLE c1(up, down PRIMARY KEY);
+        CREATE TABLE c1(up TEXT, down  INT PRIMARY KEY);
         INSERT INTO c1 VALUES('x', 1);
         INSERT INTO c1 VALUES('x', 2);
         INSERT INTO c1 VALUES('x', 4);
@@ -1208,7 +1106,7 @@ test:do_execsql_test(
         INSERT INTO c1 VALUES('y', 16);
         INSERT INTO c1 VALUES('y', 32);
 
-        CREATE TABLE c2(i PRIMARY KEY, j);
+        CREATE TABLE c2(i  INT PRIMARY KEY, j INT );
         INSERT INTO c2 VALUES(1, 0);
         INSERT INTO c2 VALUES(2, 1);
         INSERT INTO c2 VALUES(3, 3);
@@ -1219,7 +1117,7 @@ test:do_execsql_test(
         INSERT INTO c2 VALUES(8, 28);
         INSERT INTO c2 VALUES(9, 36);
 
-        CREATE TABLE c3(i PRIMARY KEY, k TEXT);
+        CREATE TABLE c3(i  INT PRIMARY KEY, k TEXT);
         INSERT INTO c3 VALUES(1,  'hydrogen');
         INSERT INTO c3 VALUES(2,  'helium');
         INSERT INTO c3 VALUES(3,  'lithium');
@@ -1303,7 +1201,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-5.1.0",
     [[
-        CREATE TABLE h1(id primary key, a, b);
+        CREATE TABLE h1(id  INT primary key, a INT , b TEXT);
         INSERT INTO h1 VALUES(1, 1, 'one');
         INSERT INTO h1 VALUES(2, 1, 'I');
         INSERT INTO h1 VALUES(3, 1, 'i');
@@ -1311,7 +1209,7 @@ test:do_execsql_test(
         INSERT INTO h1 VALUES(5, 4, 'IV');
         INSERT INTO h1 VALUES(6, 4, 'iv');
 
-        CREATE TABLE h2(id primary key, x COLLATE "unicode_ci");
+        CREATE TABLE h2(id  INT primary key, x  TEXT COLLATE "unicode_ci");
         INSERT INTO h2 VALUES(1, 'One');
         INSERT INTO h2 VALUES(2, 'Two');
         INSERT INTO h2 VALUES(3, 'Three');
@@ -1321,7 +1219,7 @@ test:do_execsql_test(
         INSERT INTO h2 VALUES(7, 'three');
         INSERT INTO h2 VALUES(8, 'four');
 
-        CREATE TABLE h3(c PRIMARY KEY, d);
+        CREATE TABLE h3(c  INT PRIMARY KEY, d TEXT);
         INSERT INTO h3 VALUES(1, NULL);
         INSERT INTO h3 VALUES(2, NULL);
         INSERT INTO h3 VALUES(3, NULL);
@@ -1411,9 +1309,9 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-7.1.0",
     [[
-        CREATE TABLE j1(a PRIMARY KEY, b, c);
-        CREATE TABLE j2(e PRIMARY KEY, f);
-        CREATE TABLE j3(g PRIMARY KEY);
+        CREATE TABLE j1(a  INT PRIMARY KEY, b INT , c INT );
+        CREATE TABLE j2(e  INT PRIMARY KEY, f INT );
+        CREATE TABLE j3(g  INT PRIMARY KEY);
     ]], {
         -- <e_select-7.1.0>
 
@@ -1557,9 +1455,9 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-7.4.0",
     [[
-        CREATE TABLE q1(id primary key, a TEXT, b INTEGER, c);
-        CREATE TABLE q2(id primary key, d NUMBER, e BLOB);
-        CREATE TABLE q3(id primary key, f REAL, g);
+        CREATE TABLE q1(id  INT primary key, a TEXT, b FLOAT, c FLOAT);
+        CREATE TABLE q2(id  INT primary key, d TEXT, e FLOAT);
+        CREATE TABLE q3(id  INT primary key, f TEXT, g INT);
 
         INSERT INTO q1 VALUES(1, 16, -87.66, NULL);
         INSERT INTO q1 VALUES(2, 'legible', 94, -42.47);
@@ -1567,7 +1465,7 @@ test:do_execsql_test(
 
         INSERT INTO q2 VALUES(1, 'legible', 1);
         INSERT INTO q2 VALUES(2, 'beauty', 2);
-        INSERT INTO q2 VALUES(3, -65.91, 4);
+        INSERT INTO q2 VALUES(3, -65, 4);
         INSERT INTO q2 VALUES(4, 'emanating', -16.56);
 
         INSERT INTO q3 VALUES(1, 'beauty', 2);
@@ -1581,9 +1479,9 @@ test:do_execsql_test(
 test:do_select_tests(
     "e_select-7.4",
     {
-        {1, "SELECT a FROM q1 UNION ALL SELECT d FROM q2", {"16", "legible", "beauty", "legible", "beauty", -65.91, "emanating"}},
+        {1, "SELECT a FROM q1 UNION ALL SELECT d FROM q2", {"16", "legible", "beauty", "legible", "beauty", "-65", "emanating"}},
         {"3", "SELECT count(*) FROM q1 UNION ALL SELECT min(e) FROM q2", {3, -16.56}},
-        {"4", "SELECT d,e FROM q2 UNION ALL SELECT f,g FROM q3", {"legible" , 1, "beauty", 2, -65.91, 4, "emanating", -16.56, "beauty", 2, "beauty", 2}},
+        {"4", "SELECT d,e FROM q2 UNION ALL SELECT f,g FROM q3", {"legible" , 1, "beauty", 2, "-65", 4, "emanating", -16.56, "beauty", 2, "beauty", 2}},
         })
 
 -- EVIDENCE-OF: R-20560-39162 The UNION operator works the same way as
@@ -1594,13 +1492,13 @@ test:do_select_tests(
     "e_select-7.5",
     {
         {1, "SELECT a FROM q1 UNION SELECT d FROM q2",
-            {-65.91, "16", "beauty", "emanating", "legible"}},
+            {"-65", "16", "beauty", "emanating", "legible"}},
 
         {3, "SELECT count(*) FROM q1 UNION SELECT min(e) FROM q2",
             {-16.56, 3}},
 
         {4, "SELECT d,e FROM q2 UNION SELECT f,g FROM q3",
-            {-65.91, 4, "beauty", 2, "emanating", -16.56, "legible", 1}}
+            {"-65", 4, "beauty", 2, "emanating", -16.56, "legible", 1}}
     })
 
 -- EVIDENCE-OF: R-45764-31737 The INTERSECT operator returns the
@@ -1621,7 +1519,7 @@ test:do_select_tests(
     "e_select-7.7",
     {
         {"1", "SELECT a FROM q1 EXCEPT SELECT d FROM q2", {"16"}},
-        {"2", "SELECT d,e FROM q2 EXCEPT SELECT f,g FROM q3", {-65.91, 4, "emanating", -16.56, "legible", 1}},
+        {"2", "SELECT d,e FROM q2 EXCEPT SELECT f,g FROM q3", {"-65", 4, "emanating", -16.56, "legible", 1}},
     })
 
 -- EVIDENCE-OF: R-40729-56447 Duplicate rows are removed from the results
@@ -1676,7 +1574,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-7.10.0",
     [[
-        CREATE TABLE y1(a COLLATE "unicode_ci" PRIMARY KEY, b COLLATE binary, c);
+        CREATE TABLE y1(a  TEXT COLLATE "unicode_ci" PRIMARY KEY, b  TEXT COLLATE binary, c INT );
         INSERT INTO y1 VALUES('Abc', 'abc', 'aBC');
     ]], {
         -- <e_select-7.10.0>
@@ -1705,8 +1603,8 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-7.10.0",
     [[
-        CREATE TABLE w1(a TEXT PRIMARY KEY, b NUMBER);
-        CREATE TABLE w2(a PRIMARY KEY, b TEXT);
+        CREATE TABLE w1(a TEXT PRIMARY KEY, b FLOAT);
+        CREATE TABLE w2(a  INT PRIMARY KEY, b TEXT);
 
         INSERT INTO w1 VALUES('1', 4.1);
         INSERT INTO w2 VALUES(1, 4.1);
@@ -1754,7 +1652,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-7.12.0",
     [[
-        CREATE TABLE t1(x PRIMARY KEY);
+        CREATE TABLE t1(x  INT PRIMARY KEY);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t1 VALUES(2);
         INSERT INTO t1 VALUES(3);
@@ -1793,7 +1691,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "e_select-8.1.0",
     [[
-        CREATE TABLE d1(id primary key, x, y, z);
+        CREATE TABLE d1(id  INT primary key, x INT , y INT , z INT );
 
         INSERT INTO d1 VALUES(1, 1, 2, 3);
         INSERT INTO d1 VALUES(2, 2, 5, -1);
@@ -1804,7 +1702,7 @@ test:do_execsql_test(
         INSERT INTO d1 VALUES(7, 1, 4, 93);
         INSERT INTO d1 VALUES(8, 1, 5, -1);
 
-        CREATE TABLE d2(id primary key, a, b);
+        CREATE TABLE d2(id  INT primary key, a TEXT, b TEXT);
         INSERT INTO d2 VALUES(1, 'gently', 'failings');
         INSERT INTO d2 VALUES(2, 'commercials', 'bathrobe');
         INSERT INTO d2 VALUES(3, 'iterate', 'sexton');
@@ -1981,16 +1879,16 @@ test:do_select_tests(
 test:do_execsql_test(
     "e_select-8.8.0",
     [[
-        CREATE TABLE d3(id primary key, a);
-        INSERT INTO d3 VALUES(1, 'text');
+        CREATE TABLE d3(id  INT primary key, a FLOAT);
+        INSERT INTO d3 VALUES(1, 0);
         INSERT INTO d3 VALUES(2, 14.1);
         INSERT INTO d3 VALUES(3, 13);
-        INSERT INTO d3 VALUES(4, X'78787878');
+        INSERT INTO d3 VALUES(4, 78787878);
         INSERT INTO d3 VALUES(5, 15);
         INSERT INTO d3 VALUES(6, 12.9);
         INSERT INTO d3 VALUES(7, null);
 
-        CREATE TABLE d4(id primary key, x COLLATE "unicode_ci");
+        CREATE TABLE d4(id  INT primary key, x  TEXT COLLATE "unicode_ci");
         INSERT INTO d4 VALUES(1, 'abc');
         INSERT INTO d4 VALUES(2, 'ghi');
         INSERT INTO d4 VALUES(3, 'DEF');
@@ -2013,7 +1911,7 @@ test:do_execsql_test(
         SELECT a FROM d3 ORDER BY a
     ]], {
         -- <e_select-8.8.1>
-        "", 12.9, 13, 14.1, 15, "text", "xxxx"
+        "", 0, 12.9, 13, 14.1, 15, 78787878
         -- </e_select-8.8.1>
     })
 
@@ -2023,7 +1921,7 @@ test:do_execsql_test(
         SELECT a FROM d3 ORDER BY a DESC
     ]], {
         -- <e_select-8.8.2>
-        "xxxx", "text", 15, 14.1, 13, 12.9, ""
+        78787878, 15, 14.1, 13, 12.9, 0, ""
         -- </e_select-8.8.2>
     })
 
@@ -2139,9 +2037,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "e_select-8.13.0",
     [[
-        CREATE TABLE d5(a PRIMARY KEY, b);
-        CREATE TABLE d6(c PRIMARY KEY, d);
-        CREATE TABLE d7(e PRIMARY KEY, f);
+        CREATE TABLE d5(a  INT PRIMARY KEY, b TEXT);
+        CREATE TABLE d6(c  INT PRIMARY KEY, d TEXT);
+        CREATE TABLE d7(e  INT PRIMARY KEY, f TEXT);
 
         INSERT INTO d5 VALUES(1, 'f');
         INSERT INTO d6 VALUES(2, 'e');
@@ -2150,8 +2048,8 @@ test:do_execsql_test(
         INSERT INTO d6 VALUES(5, 'b');
         INSERT INTO d7 VALUES(6, 'a');
 
-        CREATE TABLE d8(x COLLATE "unicode_ci" PRIMARY KEY);
-        CREATE TABLE d9(y COLLATE "unicode_ci" PRIMARY KEY);
+        CREATE TABLE d8(x  TEXT COLLATE "unicode_ci" PRIMARY KEY);
+        CREATE TABLE d9(y  TEXT COLLATE "unicode_ci" PRIMARY KEY);
 
         INSERT INTO d8 VALUES('a');
         INSERT INTO d9 VALUES('B');
@@ -2216,7 +2114,7 @@ test:do_select_tests(
 test:do_execsql_test(
     "e_select-9.0",
     [[
-        CREATE TABLE f1(id primary key, a, b);
+        CREATE TABLE f1(id  INT primary key, a INT, b TEXT);
         INSERT INTO f1 VALUES(1, 26, 'z');
         INSERT INTO f1 VALUES(2, 25, 'y');
         INSERT INTO f1 VALUES(3, 24, 'x');
diff --git a/test/sql-tap/eqp.test.lua b/test/sql-tap/eqp.test.lua
index 8a2c5e2691864fffe6773e9c68987d675d1bad40..b52dff0330c4c2c50095f175186f005574343172 100755
--- a/test/sql-tap/eqp.test.lua
+++ b/test/sql-tap/eqp.test.lua
@@ -32,11 +32,11 @@ local testprefix = "eqp"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE t1(idt1 primary key, a INT, b INT, ex TEXT);
+        CREATE TABLE t1(idt1  INT primary key, a INT, b INT, ex TEXT);
         CREATE INDEX i1 ON t1(a);
         CREATE INDEX i2 ON t1(b);
-        CREATE TABLE t2(idt2 primary key, a INT, b INT, ex TEXT);
-        CREATE TABLE t3(idt3 primary key, a INT, b INT, ex TEXT);
+        CREATE TABLE t2(idt2  INT primary key, a INT, b INT, ex TEXT);
+        CREATE TABLE t3(idt3  INT primary key, a INT, b INT, ex TEXT);
     ]])
 
 test:do_eqp_test(
@@ -181,9 +181,9 @@ test:drop_all_tables()
 test:do_execsql_test(
     2.1,
     [[
-        CREATE TABLE t1(idt1 primary key, x INT, y INT, ex TEXT);
+        CREATE TABLE t1(idt1  INT primary key, x INT, y INT, ex TEXT);
 
-        CREATE TABLE t2(idt2 primary key, x INT, y INT, ex TEXT);
+        CREATE TABLE t2(idt2  INT primary key, x INT, y INT, ex TEXT);
         CREATE INDEX t2i1 ON t2(x);
     ]])
 
@@ -519,7 +519,7 @@ test:drop_all_tables()
 test:do_execsql_test(
     "5.1.0",
     [[
-        CREATE TABLE t1(idt1 PRIMARY KEY, a INT, b INT, ex TEXT) 
+        CREATE TABLE t1(idt1  INT PRIMARY KEY, a INT, b INT, ex TEXT)
     ]])
 
 test:do_eqp_test("5.1.1", "SELECT a, b FROM t1 WHERE a=1", {
@@ -562,7 +562,7 @@ test:do_eqp_test("5.3.1", "SELECT a, b FROM t1 WHERE a=1", {
 test:do_execsql_test(
     "5.4.0",
     [[
-        CREATE TABLE t2(idt2 primary key, c INT, d INT, ex TEXT)
+        CREATE TABLE t2(idt2  INT primary key, c INT, d INT, ex TEXT)
     ]])
 
 test:do_eqp_test("5.4.1", "SELECT t1.a, t2.c FROM t1, t2 WHERE t1.a=1 AND t1.b>2", {
@@ -727,8 +727,8 @@ test:drop_all_tables()
 test:do_execsql_test(
     7.0,
     [[
-        CREATE TABLE t1(idt1 primary key, a INT, b INT, ex CHAR(100));
-        CREATE TABLE t2(idt2 primary key, a INT, b INT, ex CHAR(100));
+        CREATE TABLE t1(idt1  INT primary key, a INT, b INT, ex CHAR(100));
+        CREATE TABLE t2(idt2  INT primary key, a INT, b INT, ex CHAR(100));
         CREATE INDEX i1 ON t2(a);
     ]])
 
@@ -770,8 +770,8 @@ test:drop_all_tables()
 test:do_execsql_test(
     8.0,
     [[
-        CREATE TABLE t1(a, b, c, PRIMARY KEY(b, c));
-        CREATE TABLE t2(id primary key, a, b, c);
+        CREATE TABLE t1(a INT , b INT , c INT , PRIMARY KEY(b, c));
+        CREATE TABLE t2(id  INT primary key, a INT , b INT , c INT );
     ]])
 
 test:do_eqp_test("8.1.1", "SELECT * FROM t2", {
diff --git a/test/sql-tap/fkey1.test.lua b/test/sql-tap/fkey1.test.lua
index b419e4d5910f524aa81b5830a321536c820d083f..557e557a5fa8111940e5237d5cac1547117a1a52 100755
--- a/test/sql-tap/fkey1.test.lua
+++ b/test/sql-tap/fkey1.test.lua
@@ -7,7 +7,7 @@ test:plan(25)
 test:do_execsql_test(
     "fkey1-1.1",
     [[
-        CREATE TABLE t2(x PRIMARY KEY, y TEXT, UNIQUE (x, y));
+        CREATE TABLE t2(x INT PRIMARY KEY, y TEXT, UNIQUE (x, y));
     ]], {
         -- <fkey1-1.1>
         -- </fkey1-1.1>
@@ -17,11 +17,11 @@ test:do_execsql_test(
     "fkey1-1.2",
     [[
         CREATE TABLE t1(
-            a PRIMARY KEY,
+            a INT PRIMARY KEY,
             b INTEGER
                 REFERENCES t1 ON DELETE CASCADE
                 REFERENCES t2 (x),
-            c TEXT,
+            c TEXT UNIQUE,
             FOREIGN KEY (b, c) REFERENCES t2(x, y) ON UPDATE CASCADE);
     ]], {
         -- <fkey1-1.1>
@@ -32,8 +32,8 @@ test:do_execsql_test(
     "fkey1-1.3",
     [[
         CREATE TABLE t3(
-            a PRIMARY KEY REFERENCES t2,
-            b INTEGER REFERENCES t1,
+            a INT PRIMARY KEY REFERENCES t2,
+            b TEXT REFERENCES t1(c),
             FOREIGN KEY (a, b) REFERENCES t2(x, y));
     ]], {
         -- <fkey1-1.3>
@@ -64,8 +64,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "fkey1-3.1",
     [[
-        CREATE TABLE t5(a PRIMARY KEY, b, c UNIQUE, UNIQUE(a, b));
-        CREATE TABLE t6(d REFERENCES t5, e PRIMARY KEY REFERENCES t5(c));
+        CREATE TABLE t5(a INTEGER PRIMARY KEY, b INT , c INT UNIQUE, UNIQUE(a, b) );
+        CREATE TABLE t6(d  INT REFERENCES t5, e  INT PRIMARY KEY REFERENCES t5(c));
         PRAGMA foreign_key_list(t6);
     ]], {
         -- <fkey1-3.1>
@@ -77,7 +77,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "fkey1-3.2",
     [[
-        CREATE TABLE t7(d PRIMARY KEY, e, f, FOREIGN KEY (d, e) REFERENCES t5(a, b));
+        CREATE TABLE t7(d  INT PRIMARY KEY, e INT , f INT , FOREIGN KEY (d, e) REFERENCES t5(a, b));
         PRAGMA foreign_key_list(t7);
     ]], {
         -- <fkey1-3.2>
@@ -90,7 +90,7 @@ test:do_execsql_test(
     "fkey1-3.3",
     [[
         CREATE TABLE t8(
-            d PRIMARY KEY, e, f,
+            d  INT PRIMARY KEY, e INT , f INT ,
             FOREIGN KEY (d, e) REFERENCES t5(a, b) ON DELETE CASCADE ON UPDATE SET NULL);
         PRAGMA foreign_key_list(t8);
     ]], {
@@ -104,7 +104,7 @@ test:do_execsql_test(
     "fkey1-3.4",
     [[
         CREATE TABLE t9(
-            d PRIMARY KEY, e, f,
+            d  INT PRIMARY KEY, e INT , f INT ,
             FOREIGN KEY (d, e) REFERENCES t5(a, b) ON DELETE CASCADE ON UPDATE SET DEFAULT);
         PRAGMA foreign_key_list(t9);
     ]], {
@@ -144,8 +144,8 @@ test:do_execsql_test(
     "fkey1-5.1",
     [[
         CREATE TABLE t11(
-            x PRIMARY KEY,
-            parent REFERENCES t11 ON DELETE CASCADE);
+            x INTEGER PRIMARY KEY,
+            parent  INT REFERENCES t11 ON DELETE CASCADE);
         INSERT INTO t11 VALUES(1, NULL), (2, 1), (3, 2);
     ]], {
         -- <fkey1-5.1>
@@ -176,9 +176,9 @@ test:do_execsql_test(
     "fkey1-5.4",
     [[
         CREATE TABLE Foo (
-            Id PRIMARY KEY,
+            Id INT PRIMARY KEY,
             ParentId INTEGER REFERENCES Foo(Id) ON DELETE CASCADE,
-            C1);
+            C1 TEXT);
         INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (1, null, 'A');
         INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (2, 1, 'A-2-1');
         INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (3, 2, 'A-3-2');
@@ -211,10 +211,10 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "fkey1-6.1",
     [[
-        CREATE TABLE p1(id PRIMARY KEY, x, y);
+        CREATE TABLE p1(id INT PRIMARY KEY, x INT, y INT);
         CREATE INDEX p1x ON p1(x);
         INSERT INTO p1 VALUES(1, 1, 1);
-        CREATE TABLE c1(a PRIMARY KEY REFERENCES p1(x));
+        CREATE TABLE c1(a INT PRIMARY KEY REFERENCES p1(x));
     ]], {
         -- <fkey1-6.1>
         1, "Failed to create foreign key constraint 'FK_CONSTRAINT_1_C1': referenced fields don't compose unique index"
@@ -226,7 +226,7 @@ test:do_execsql_test(
     [[
         CREATE UNIQUE INDEX p1x2 ON p1(x);
         DROP TABLE IF EXISTS c1;
-        CREATE TABLE c1(a PRIMARY KEY REFERENCES p1(x));
+        CREATE TABLE c1(a INT PRIMARY KEY REFERENCES p1(x));
         INSERT INTO c1 VALUES(1);
     ]], {
         -- <fkey1-6.3>
diff --git a/test/sql-tap/fkey2.test.lua b/test/sql-tap/fkey2.test.lua
index 140f83543a7f21e4175751b65282cce0f4faf537..55849bdf87c75ba4b5694e60e020b12c54874118 100755
--- a/test/sql-tap/fkey2.test.lua
+++ b/test/sql-tap/fkey2.test.lua
@@ -7,14 +7,15 @@ test:plan(116)
 test:do_execsql_test(
     "fkey2-1.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
-        CREATE TABLE t2(c PRIMARY KEY REFERENCES t1(a), d);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE t2(c  INT PRIMARY KEY REFERENCES t1(a), d INT);
 
-        CREATE TABLE t3(a PRIMARY KEY, b);
-        CREATE TABLE t4(c PRIMARY KEY REFERENCES t3, d);
+        CREATE TABLE t3(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE t4(c  INT PRIMARY KEY REFERENCES t3, d INT );
+
+        CREATE TABLE t7(a INT , b INTEGER PRIMARY KEY);
+        CREATE TABLE t8(c  INT PRIMARY KEY REFERENCES t7, d INT );
 
-        CREATE TABLE t7(a, b INTEGER PRIMARY KEY);
-        CREATE TABLE t8(c INTEGER PRIMARY KEY REFERENCES t7, d);
     ]], {
         -- <fkey2-1.1>
         -- </fkey2-1.1>
@@ -298,7 +299,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "fkey2-1.29",
     [[
-        CREATE TABLE t9(a PRIMARY KEY REFERENCES nosuchtable, b);
+        CREATE TABLE t9(a INT PRIMARY KEY REFERENCES nosuchtable, b);
     ]], {
         1, "Space 'NOSUCHTABLE' does not exist"
     })
@@ -340,13 +341,13 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-3.1",
     [[
-        CREATE TABLE ab(a PRIMARY KEY, b);
+        CREATE TABLE ab(a  INT PRIMARY KEY, b TEXT);
         CREATE TABLE cd(
-            c PRIMARY KEY REFERENCES ab ON UPDATE CASCADE ON DELETE CASCADE,
-            d);
+            c  INT PRIMARY KEY REFERENCES ab ON UPDATE CASCADE ON DELETE CASCADE,
+            d TEXT);
         CREATE TABLE ef(
-            e PRIMARY KEY REFERENCES cd ON UPDATE CASCADE,
-            f, CHECK (e!=5));
+            e  INT PRIMARY KEY REFERENCES cd ON UPDATE CASCADE,
+            f TEXT , CHECK (e!=5));
 
         INSERT INTO ab VALUES(1, 'b');
         INSERT INTO cd VALUES(1, 'd');
@@ -423,9 +424,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t1;
         CREATE TABLE t1(
-            node PRIMARY KEY,
-            parent REFERENCES t1 ON DELETE CASCADE);
-        CREATE TABLE t2(node PRIMARY KEY, parent);
+            node  INT PRIMARY KEY,
+            parent  INT REFERENCES t1 ON DELETE CASCADE);
+        CREATE TABLE t2(node  INT PRIMARY KEY, parent INT );
         CREATE TRIGGER t2t AFTER DELETE ON t2 BEGIN
             DELETE FROM t2 WHERE parent = old.node;
         END;
@@ -472,9 +473,9 @@ test:do_execsql_test(
         DROP TABLE t2;
         DROP TABLE t1;
         CREATE TABLE t1(
-            node PRIMARY KEY,
-            parent REFERENCES t1 ON DELETE CASCADE);
-        CREATE TABLE t2(node PRIMARY KEY, parent);
+            node  INT PRIMARY KEY,
+            parent  INT REFERENCES t1 ON DELETE CASCADE);
+        CREATE TABLE t2(node  INT PRIMARY KEY, parent INT );
         CREATE TRIGGER t2t AFTER DELETE ON t2 BEGIN
             DELETE FROM t2 WHERE parent = old.node;
         END;
@@ -524,8 +525,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(c INTEGER PRIMARY KEY REFERENCES t1, b);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE t2(c INTEGER PRIMARY KEY REFERENCES t1, b TEXT);
     ]], {
         -- <fkey2-5.1>
         -- </fkey2-5.1>
@@ -600,10 +601,10 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
         CREATE TABLE t2(
             c INTEGER PRIMARY KEY,
-            d DEFAULT 1 REFERENCES t1 ON DELETE SET DEFAULT);
+            d INTEGER DEFAULT 1 REFERENCES t1 ON DELETE SET DEFAULT);
         DELETE FROM t1;
     ]], {
         -- <fkey2-6.1>
@@ -660,8 +661,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-6.6",
     [[
-        CREATE TABLE pp(a, b, c, PRIMARY KEY(b, c));
-        CREATE TABLE cc(d DEFAULT 3, e DEFAULT 1, f DEFAULT 2, id PRIMARY KEY,
+        CREATE TABLE pp(a INT , b INT , c INT , PRIMARY KEY(b, c));
+        CREATE TABLE cc(d  INT DEFAULT 3, e TEXT DEFAULT '1', f  INT DEFAULT 2, id  INT PRIMARY KEY,
             FOREIGN KEY(f, d) REFERENCES pp
             ON UPDATE SET DEFAULT
             ON DELETE SET NULL);
@@ -696,7 +697,7 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t4;
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(x PRIMARY KEY REFERENCES t3 ON DELETE SET NULL);
+        CREATE TABLE t3(x  INT PRIMARY KEY REFERENCES t3 ON DELETE SET NULL);
         INSERT INTO t3(x) VALUES(12345);
         DROP TABLE t3;
         DROP TABLE IF EXISTS t2;
@@ -712,8 +713,8 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "fkey2-7.1",
     [[
-        CREATE TABLE p(a PRIMARY KEY, b);
-        CREATE TABLE c(x PRIMARY KEY REFERENCES p(c));
+        CREATE TABLE p(a INT PRIMARY KEY, b INT);
+        CREATE TABLE c(x INT PRIMARY KEY REFERENCES p(c));
     ]], {
         -- <fkey2-7.1>
         1, "Failed to create foreign key constraint 'FK_CONSTRAINT_1_C': foreign key refers to nonexistent field C"
@@ -724,7 +725,7 @@ test:do_catchsql_test(
     "fkey2-7.2",
     [[
         CREATE VIEW v AS SELECT b AS y FROM p;
-        CREATE TABLE c(x PRIMARY KEY REFERENCES v(y));
+        CREATE TABLE c(x  INT PRIMARY KEY REFERENCES v(y));
     ]], {
         -- <fkey2-7.2>
         1, "referenced table can't be view"
@@ -737,9 +738,9 @@ test:do_catchsql_test(
         DROP VIEW v;
         DROP TABLE IF EXISTS c;
         DROP TABLE IF EXISTS p;
-        CREATE TABLE p(a COLLATE "unicode_ci", b PRIMARY KEY);
+        CREATE TABLE p(a TEXT COLLATE "unicode_ci", b INT PRIMARY KEY);
         CREATE UNIQUE INDEX idx ON p(a);
-        CREATE TABLE c(x PRIMARY KEY REFERENCES p(a));
+        CREATE TABLE c(x TEXT PRIMARY KEY REFERENCES p(a));
     ]], {
         -- <fkey2-7.3>
         1, "Failed to create foreign key constraint 'FK_CONSTRAINT_1_C': field collation mismatch"
@@ -751,8 +752,8 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS c;
         DROP TABLE IF EXISTS p;
-        CREATE TABLE p(a, b, PRIMARY KEY(a, b));
-        CREATE TABLE c(x PRIMARY KEY REFERENCES p);
+        CREATE TABLE p(a INT, b INT, PRIMARY KEY(a, b));
+        CREATE TABLE c(x INT PRIMARY KEY REFERENCES p);
     ]], {
         -- <fkey2-7.4>
         1, "Failed to create foreign key constraint 'FK_CONSTRAINT_1_C': number of columns in foreign key does not match the number of columns in the primary index of referenced table"
@@ -765,8 +766,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-8.1",
     [[
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(c INTEGER PRIMARY KEY, d, FOREIGN KEY(c) REFERENCES t1(a) ON UPDATE CASCADE);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(c INTEGER PRIMARY KEY, d INT, FOREIGN KEY(c) REFERENCES t1(a) ON UPDATE CASCADE);
 
         INSERT INTO t1 VALUES(10, 100);
         INSERT INTO t2 VALUES(10, 100);
@@ -787,9 +788,9 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a, b PRIMARY KEY);
+        CREATE TABLE t1(a INT , b TEXT PRIMARY KEY);
         CREATE TABLE t2(
-            x PRIMARY KEY REFERENCES t1 ON UPDATE RESTRICT);
+            x TEXT PRIMARY KEY REFERENCES t1 ON UPDATE RESTRICT);
         INSERT INTO t1 VALUES(1, 'one');
         INSERT INTO t1 VALUES(2, 'two');
         INSERT INTO t1 VALUES(3, 'three');
@@ -835,13 +836,13 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(x COLLATE "unicode_ci" PRIMARY KEY);
+        CREATE TABLE t1(x  TEXT COLLATE "unicode_ci" PRIMARY KEY);
         CREATE TRIGGER tt1 AFTER DELETE ON t1
             WHEN EXISTS ( SELECT 1 FROM t2 WHERE old.x = y )
         BEGIN
             INSERT INTO t1 VALUES(old.x);
         END;
-        CREATE TABLE t2(y COLLATE "unicode_ci" PRIMARY KEY REFERENCES t1);
+        CREATE TABLE t2(y TEXT COLLATE "unicode_ci" PRIMARY KEY REFERENCES t1);
         INSERT INTO t1 VALUES('A');
         INSERT INTO t1 VALUES('B');
         INSERT INTO t2 VALUES('A');
@@ -869,7 +870,7 @@ test:do_execsql_test(
     "fkey2-9.7",
     [[
         DROP TABLE t2;
-        CREATE TABLE t2(y COLLATE "unicode_ci" PRIMARY KEY REFERENCES t1 ON DELETE RESTRICT);
+        CREATE TABLE t2(y TEXT COLLATE "unicode_ci" PRIMARY KEY REFERENCES t1 ON DELETE RESTRICT);
         INSERT INTO t2 VALUES('A');
         INSERT INTO t2 VALUES('B');
     ]], {
@@ -911,16 +912,16 @@ test:do_execsql_test(
     "fkey2-9.11",
     [[
         CREATE TABLE up(
-            c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
-            c10, c11, c12, c13, c14, c15, c16, c17, c18, c19,
-            c20, c21, c22, c23, c24, c25, c26, c27, c28, c29,
-            c30, c31, c32, c33, c34, c35, c36, c37, c38, c39,
+            c00 TEXT , c01 TEXT , c02 TEXT , c03 TEXT , c04 TEXT , c05 TEXT , c06 TEXT , c07 TEXT , c08 TEXT , c09 TEXT ,
+            c10 TEXT , c11 TEXT , c12 TEXT , c13 TEXT , c14 TEXT , c15 TEXT , c16 TEXT , c17 TEXT , c18 TEXT , c19 TEXT ,
+            c20 TEXT , c21 TEXT , c22 TEXT , c23 TEXT , c24 TEXT , c25 TEXT , c26 TEXT , c27 TEXT , c28 TEXT , c29 TEXT ,
+            c30 TEXT , c31 TEXT , c32 TEXT , c33 TEXT , c34 TEXT , c35 TEXT , c36 TEXT , c37 TEXT , c38 TEXT , c39 TEXT ,
             PRIMARY KEY(c34, c35));
         CREATE TABLE down(
-            c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
-            c10, c11, c12, c13, c14, c15, c16, c17, c18, c19,
-            c20, c21, c22, c23, c24, c25, c26, c27, c28, c29,
-            c30, c31, c32, c33, c34, c35, c36, c37, c38, c39,
+            c00 TEXT , c01 TEXT , c02 TEXT , c03 TEXT , c04 TEXT , c05 TEXT , c06 TEXT , c07 TEXT , c08 TEXT , c09 TEXT ,
+            c10 TEXT , c11 TEXT , c12 TEXT , c13 TEXT , c14 TEXT , c15 TEXT , c16 TEXT , c17 TEXT , c18 TEXT , c19 TEXT ,
+            c20 TEXT , c21 TEXT , c22 TEXT , c23 TEXT , c24 TEXT , c25 TEXT , c26 TEXT , c27 TEXT , c28 TEXT , c29 TEXT ,
+            c30 TEXT , c31 TEXT , c32 TEXT , c33 TEXT , c34 TEXT , c35 TEXT , c36 TEXT , c37 TEXT , c38 TEXT , c39 TEXT ,
             PRIMARY KEY(c39, c38),
             FOREIGN KEY(c39, c38) REFERENCES up ON UPDATE CASCADE);
         INSERT INTO up(c34, c35) VALUES('yes', 'no');
@@ -986,9 +987,9 @@ test:do_execsql_test(
 -- test:do_execsql_test(
 --     "fkey2-10.1",
 --     [[
---         CREATE TABLE t1(a PRIMARY KEY, b REFERENCES t1);
---         CREATE TABLE t2(a PRIMARY KEY, b REFERENCES t1, c REFERENCES t2);
---         CREATE TABLE t3(a PRIMARY KEY REFERENCES t1, b REFERENCES t2, c REFERENCES t1);
+--         CREATE TABLE t1(a  INT PRIMARY KEY, b  INT REFERENCES t1);
+--         CREATE TABLE t2(a  INT PRIMARY KEY, b  INT REFERENCES t1, c  INT REFERENCES t2);
+--         CREATE TABLE t3(a  INT PRIMARY KEY REFERENCES t1, b  INT REFERENCES t2, c  INT REFERENCES t1);
 --         INSERT INTO t1 VALUES(1, 1);
 --         ALTER TABLE t1 RENAME TO t4;
 --         SELECT * FROM t4;
@@ -1044,7 +1045,7 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a PRIMARY KEY, b REFERENCES nosuchtable);
+        CREATE TABLE t1(a INT PRIMARY KEY, b INT REFERENCES nosuchtable);
     ]], {
         -- <fkey2-10.6>
         1, "Space 'NOSUCHTABLE' does not exist"
@@ -1054,10 +1055,10 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-10.7",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a TEXT PRIMARY KEY, b INT );
         INSERT INTO t1 VALUES('a', 1);
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(x PRIMARY KEY REFERENCES t1);
+        CREATE TABLE t2(x TEXT PRIMARY KEY REFERENCES t1);
         INSERT INTO t2 VALUES('a');
     ]], {
         -- <fkey2-10.7>
@@ -1089,8 +1090,8 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS cc;
         DROP TABLE IF EXISTS pp;
-        CREATE TABLE pp(x, y, PRIMARY KEY(x, y));
-        CREATE TABLE cc(a PRIMARY KEY, b, FOREIGN KEY(a, b) REFERENCES pp(x, z));
+        CREATE TABLE pp(x TEXT, y TEXT, PRIMARY KEY(x, y));
+        CREATE TABLE cc(a  INT PRIMARY KEY, b INT , FOREIGN KEY(a, b) REFERENCES pp(x, z));
     ]], {
         -- <fkey2-10.14>
         1, "Failed to create foreign key constraint 'FK_CONSTRAINT_1_CC': foreign key refers to nonexistent field Z"
@@ -1101,14 +1102,14 @@ test:do_execsql_test(
     "fkey2-10.16",
     [[
         CREATE TABLE cc(
-            a PRIMARY KEY, b,
+            a  TEXT PRIMARY KEY, b TEXT,
             FOREIGN KEY(a, b) REFERENCES pp DEFERRABLE INITIALLY DEFERRED);
 
         INSERT INTO pp VALUES('a', 'b');
         INSERT INTO cc VALUES('a', 'b');
         DROP TABLE cc;
         DROP TABLE pp;
-        CREATE TABLE pp(a, b, c, PRIMARY KEY(b, c));
+        CREATE TABLE pp(a INT , b TEXT, c TEXT, PRIMARY KEY(b, c));
         INSERT INTO pp VALUES(1, 'a', 'b');
     ]], {
         -- <fkey2-10.16>
@@ -1127,8 +1128,8 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "fkey2-10.18",
     [[
-        CREATE TABLE b1(a PRIMARY KEY, b);
-        CREATE TABLE b2(a PRIMARY KEY, b REFERENCES b1);
+        CREATE TABLE b1(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE b2(a  INT PRIMARY KEY, b  INT REFERENCES b1);
         DROP TABLE b1;
     ]], {
         -- <fkey2-10.18>
@@ -1139,7 +1140,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "fkey2-10.19",
     [[
-        CREATE TABLE b3(a PRIMARY KEY, b REFERENCES b2 DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE b3(a  INT PRIMARY KEY, b  INT REFERENCES b2 DEFERRABLE INITIALLY DEFERRED);
         DROP TABLE b2;
     ]], {
         -- <fkey2-10.19>
@@ -1152,7 +1153,7 @@ test:do_catchsql_test(
     [[
         DROP VIEW IF EXISTS v;
         CREATE VIEW v AS SELECT * FROM b1;
-        CREATE TABLE t1(x PRIMARY KEY REFERENCES v);
+        CREATE TABLE t1(x INT PRIMARY KEY REFERENCES v);
     ]], {
         -- <fkey2-10.20>
         1, "referenced table can't be view"
@@ -1167,7 +1168,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-11.1",
     [[
-        CREATE TABLE self(a PRIMARY KEY, b REFERENCES self(a));
+        CREATE TABLE self(a INT PRIMARY KEY, b INT REFERENCES self(a));
         INSERT INTO self VALUES(13, 13);
         UPDATE self SET a = 14, b = 14;
     ]], {
@@ -1237,7 +1238,7 @@ test:do_execsql_test(
     "fkey2-11.8",
     [[
         DROP TABLE IF EXISTS self;
-        CREATE TABLE self(a UNIQUE, b PRIMARY KEY REFERENCES self(a));
+        CREATE TABLE self(a INT UNIQUE, b INT PRIMARY KEY REFERENCES self(a));
         INSERT INTO self VALUES(13, 13);
         UPDATE self SET a = 14, b = 14;
     ]], {
@@ -1309,11 +1310,11 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-12.1",
     [[
-        CREATE TABLE tdd08(a PRIMARY KEY, b);
+        CREATE TABLE tdd08(a INT PRIMARY KEY, b INT);
         CREATE UNIQUE INDEX idd08 ON tdd08(a,b);
         INSERT INTO tdd08 VALUES(200,300);
 
-        CREATE TABLE tdd08_b(w PRIMARY KEY,x,y, FOREIGN KEY(x,y) REFERENCES tdd08(a,b));
+        CREATE TABLE tdd08_b(w  INT PRIMARY KEY,x INT ,y INT , FOREIGN KEY(x,y) REFERENCES tdd08(a,b));
         INSERT INTO tdd08_b VALUES(100,200,300);
     ]], {
         -- <fkey2-12.1>
@@ -1373,10 +1374,10 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-13.1",
     [[
-        CREATE TABLE tce71(a PRIMARY KEY, b);
+        CREATE TABLE tce71(a INT PRIMARY KEY, b INT);
         CREATE UNIQUE INDEX ice71 ON tce71(a,b);
         INSERT INTO tce71 VALUES(100,200);
-        CREATE TABLE tce72(w PRIMARY KEY, x, y, FOREIGN KEY(x,y) REFERENCES tce71(a,b));
+        CREATE TABLE tce72(w  INT PRIMARY KEY, x INT , y INT , FOREIGN KEY(x,y) REFERENCES tce71(a,b));
         INSERT INTO tce72 VALUES(300,100,200);
         UPDATE tce71 set b = 200 where a = 100;
         SELECT * FROM tce71, tce72;
@@ -1409,9 +1410,9 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey2-14.1",
     [[
-        CREATE TABLE tce73(a PRIMARY KEY, b, UNIQUE(a,b));
+        CREATE TABLE tce73(a INTEGER PRIMARY KEY, b INT , UNIQUE(a,b));
         INSERT INTO tce73 VALUES(100,200);
-        CREATE TABLE tce74(w PRIMARY KEY, x, y, FOREIGN KEY(x,y) REFERENCES tce73(a,b));
+        CREATE TABLE tce74(w INTEGER PRIMARY KEY, x INT , y INT , FOREIGN KEY(x,y) REFERENCES tce73(a,b));
         INSERT INTO tce74 VALUES(300,100,200);
         UPDATE tce73 set b = 200 where a = 100;
         SELECT * FROM tce73, tce74;
diff --git a/test/sql-tap/fkey3.test.lua b/test/sql-tap/fkey3.test.lua
index 84997dd3567f7106cacef196c2d8716a2a4b86dd..8fbbdcfbc7feafe2812e6c466bb47b4eb5681d67 100755
--- a/test/sql-tap/fkey3.test.lua
+++ b/test/sql-tap/fkey3.test.lua
@@ -107,7 +107,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "fkey3-3.1",
     [[
-        CREATE TABLE t3(a PRIMARY KEY, b, c, d,
+        CREATE TABLE t3(a INT PRIMARY KEY, b INT, c INT, d INT,
             UNIQUE(a, b),
             FOREIGN KEY(c, d) REFERENCES t3(a, b));
         INSERT INTO t3 VALUES(1, 2, 1, 2);
@@ -139,7 +139,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey3-3.4",
     [[
-        CREATE TABLE t4(a PRIMARY KEY, b REFERENCES t4(a));
+        CREATE TABLE t4(a INT PRIMARY KEY, b INT REFERENCES t4(a));
     ]], {
         -- <fkey3-3.4>
         -- </fkey3-3.4>
@@ -158,7 +158,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey3-3.6",
     [[
-        CREATE TABLE t6(a PRIMARY KEY, b, c, d, UNIQUE (a, b),
+        CREATE TABLE t6(a INTEGER PRIMARY KEY, b TEXT, c INT, d TEXT, UNIQUE(a, b),
             FOREIGN KEY(c, d) REFERENCES t6(a, b));
         INSERT INTO t6 VALUES(1, 'a', 1, 'a');
         INSERT INTO t6 VALUES(2, 'a', 2, 'a');
@@ -205,7 +205,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "fkey3-3.10",
     [[
-        CREATE TABLE t7(a, b, c, d PRIMARY KEY, UNIQUE(a, b),
+        CREATE TABLE t7(a TEXT, b INT, c TEXT, d INTEGER PRIMARY KEY, UNIQUE(a, b),
             FOREIGN KEY(c, d) REFERENCES t7(a, b));
         INSERT INTO t7 VALUES('x', 1, 'x', 1);
         INSERT INTO t7 VALUES('x', 2, 'x', 2);
@@ -237,7 +237,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey3-6.1",
     [[
-        CREATE TABLE t8(a PRIMARY KEY, b, c, d, e);
+        CREATE TABLE t8(a INT PRIMARY KEY, b INT, c INT, d INT, e INT, UNIQUE(a, b),
+                        FOREIGN KEY(c, d) REFERENCES t8(a, b));
         CREATE UNIQUE INDEX t8i1 ON t8(a, b);
         CREATE UNIQUE INDEX t8i2 ON t8(c);
         ALTER TABLE t8 ADD CONSTRAINT fk1 FOREIGN KEY (c, d) REFERENCES t8(a, b);
@@ -271,7 +272,7 @@ test:do_catchsql_test(
     "fkey3-6.4",
     [[
         CREATE TABLE TestTable (
-            id PRIMARY KEY,
+            id INT PRIMARY KEY,
             name TEXT,
             source_id INTEGER NOT NULL,
             parent_id INTEGER);
diff --git a/test/sql-tap/fkey4.test.lua b/test/sql-tap/fkey4.test.lua
index df3548f8cbb9dcaf8d41a4aad7e69802362e77e5..a1b3b1f41f97387aa87758215a4f8740a3953461 100755
--- a/test/sql-tap/fkey4.test.lua
+++ b/test/sql-tap/fkey4.test.lua
@@ -7,8 +7,8 @@ test:plan(17)
 test:do_execsql_test(
     "fkey8-1.1",
     [[
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2);
         DELETE FROM p1 WHERE a = 2;
@@ -23,8 +23,8 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE SET NULL);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE SET NULL);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2);
         DELETE FROM p1 WHERE a = 2;
@@ -39,8 +39,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY DEFAULT 3 REFERENCES p1 ON DELETE SET DEFAULT);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY DEFAULT 3 REFERENCES p1 ON DELETE SET DEFAULT);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2);
         DELETE FROM p1 WHERE a = 2;
@@ -56,16 +56,16 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
-        CREATE TRIGGER ct1 AFTER DELETE ON c1 BEGIN INSERT INTO p1 VALUES('x'); END;
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TRIGGER ct1 AFTER DELETE ON c1 BEGIN INSERT INTO p1 VALUES(0); END;
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2);
         DELETE FROM p1 WHERE a = 2;
         SELECT * FROM p1;
     ]], {
         -- <fkey8-1.4>
-        1, 3, 'x'
+        0, 1, 3
         -- </fkey8-1.4>
     })
 
@@ -74,9 +74,9 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
-        CREATE TABLE cc1(d PRIMARY KEY REFERENCES c1(b));
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TABLE cc1(d INT PRIMARY KEY REFERENCES c1(b));
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2), (3);
         INSERT INTO cc1 VALUES (2);
@@ -93,9 +93,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS cc1;
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
-        CREATE TABLE cc1(d PRIMARY KEY REFERENCES c1(b) ON DELETE CASCADE);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TABLE cc1(d INT PRIMARY KEY REFERENCES c1(b) ON DELETE CASCADE);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2), (3);
         INSERT INTO cc1 VALUES (2);
@@ -112,9 +112,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS cc1;
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
-        CREATE TABLE cc1(c PRIMARY KEY, d REFERENCES c1(b) ON DELETE SET NULL);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TABLE cc1(c INT PRIMARY KEY, d INT REFERENCES c1(b) ON DELETE SET NULL);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2), (3);
         INSERT INTO cc1 VALUES (2, 2);
@@ -132,9 +132,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS cc1;
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
-        CREATE TABLE cc1(c PRIMARY KEY, d DEFAULT 3 REFERENCES c1(b) ON DELETE SET DEFAULT);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON DELETE CASCADE);
+        CREATE TABLE cc1(c INT PRIMARY KEY, d INT DEFAULT 3 REFERENCES c1(b) ON DELETE SET DEFAULT);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2), (3);
         INSERT INTO cc1 VALUES (2, 2);
@@ -152,8 +152,8 @@ test:do_catchsql_test(
         DROP TABLE IF EXISTS cc1;
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON UPDATE SET NULL, c);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON UPDATE SET NULL, c INT);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2, 1), (3, 2);
         UPDATE OR IGNORE p1 SET a = 4 WHERE a = 2;
@@ -168,8 +168,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY);
-        CREATE TABLE c1(b PRIMARY KEY REFERENCES p1 ON UPDATE CASCADE, c);
+        CREATE TABLE p1(a INT PRIMARY KEY);
+        CREATE TABLE c1(b INT PRIMARY KEY REFERENCES p1 ON UPDATE CASCADE, c INT);
         INSERT INTO p1 VALUES (1), (2), (3);
         INSERT INTO c1 VALUES (2, 1), (3, 2);
         UPDATE OR IGNORE p1 SET a = 4 WHERE a = 2;
@@ -185,8 +185,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c1;
         DROP TABLE IF EXISTS p1;
-        CREATE TABLE p1(a PRIMARY KEY, b);
-        CREATE TABLE c1(x PRIMARY KEY REFERENCES p1 DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE p1(a INT PRIMARY KEY, b TEXT);
+        CREATE TABLE c1(x INT PRIMARY KEY REFERENCES p1 DEFERRABLE INITIALLY DEFERRED);
         INSERT INTO p1 VALUES (1, 'one');
         INSERT INTO p1 VALUES (2, 'two');
         INSERT INTO c1 VALUES (1);
@@ -212,8 +212,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c2;
         DROP TABLE IF EXISTS p2;
-        CREATE TABLE p2(a PRIMARY KEY, b);
-        CREATE TABLE c2(x PRIMARY KEY, y REFERENCES p2 DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE p2(a INT PRIMARY KEY, b INT);
+        CREATE TABLE c2(x INT PRIMARY KEY, y INT REFERENCES p2 DEFERRABLE INITIALLY DEFERRED);
     ]], {
         -- <fkey8-3.1>
         -- </fkey8-3.1>
@@ -236,8 +236,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "fkey8-4.1",
     [[
-        CREATE TABLE p3(a PRIMARY KEY, b);
-        CREATE TABLE c3(x PRIMARY KEY REFERENCES p3);
+        CREATE TABLE p3(a INT PRIMARY KEY, b TEXT);
+        CREATE TABLE c3(x INT PRIMARY KEY REFERENCES p3);
         INSERT INTO p3 VALUES(1, 'one');
         INSERT INTO p3 VALUES(2, 'two');
         INSERT INTO c3 VALUES(1);
@@ -256,8 +256,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS c3;
         DROP TABLE IF EXISTS p3;
-        CREATE TABLE p3(a PRIMARY KEY, b);
-        CREATE TABLE c3(x PRIMARY KEY REFERENCES p3);
+        CREATE TABLE p3(a INT PRIMARY KEY, b TEXT);
+        CREATE TABLE c3(x INT PRIMARY KEY REFERENCES p3);
         INSERT INTO p3 VALUES(1, 'one');
         INSERT INTO p3 VALUES(2, 'two');
         INSERT INTO c3 VALUES(1);
diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua
index 531ce39d89262fbbc64a8af6fc615752fafa021e..393212968f7e9020dcbf1811a7b99c9bf4674ec9 100755
--- a/test/sql-tap/func.test.lua
+++ b/test/sql-tap/func.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(14538)
+test:plan(14535)
 
 --!./tcltestrunner.lua
 -- 2001 September 15
@@ -38,7 +38,7 @@ test:do_test(
 test:do_execsql_test(
     "func-0.1",
     [[
-        CREATE TABLE t2(id integer primary key, a);
+        CREATE TABLE t2(id integer primary key, a INT);
         INSERT INTO t2(id,a) VALUES(1, 1);
         INSERT INTO t2(id,a) VALUES(2, NULL);
         INSERT INTO t2(id,a) VALUES(3, 345);
@@ -357,7 +357,7 @@ test:do_test(
     "func-4.1",
     function()
         test:execsql([[
-            CREATE TABLE t1(id integer primary key, a,b,c);
+            CREATE TABLE t1(id integer primary key, a INT,b REAL,c REAL);
             INSERT INTO t1(id, a,b,c) VALUES(1, 1,2,3);
             INSERT INTO t1(id, a,b,c) VALUES(2, 2,1.2345678901234,-12345.67890);
             INSERT INTO t1(id, a,b,c) VALUES(3, 3,-2,-5);
@@ -1201,7 +1201,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "func-12.5",
     [[
-        CREATE TABLE t4(id integer primary key, x);
+        CREATE TABLE t4(id integer primary key, x INT);
         INSERT INTO t4 VALUES(1, test_destructor('hello'));
         INSERT INTO t4 VALUES(2, test_destructor('world'));
         SELECT min(test_destructor(x)), max(test_destructor(x)) FROM t4;
@@ -1247,7 +1247,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "func-13.2",
     [[
-        CREATE TABLE t4(id integer primary key, a, b);
+        CREATE TABLE t4(id integer primary key, a INT, b INT);
         INSERT INTO t4 VALUES(1, 'abc', 'def');
         INSERT INTO t4 VALUES(2, 'ghi', 'jkl');
     ]], {
@@ -1452,7 +1452,7 @@ test:do_test(
     "func-16.1",
     function()
         test:execsql([[
-            CREATE TABLE tbl2(id integer primary key, a, b);
+            CREATE TABLE tbl2(id integer primary key, a INT, b INT);
         ]])
         STMT = sqlite3_prepare(DB, "INSERT INTO tbl2 VALUES(1, ?, ?)", -1, "TAIL")
         sqlite3_bind_blob(STMT, 1, "abc", 3)
@@ -1492,7 +1492,7 @@ end
 test:do_execsql_test(
     "func-18.1",
     [[
-        CREATE TABLE t5(id int primary key, x);
+        CREATE TABLE t5(id int primary key, x INT);
         INSERT INTO t5 VALUES(1, 1);
         INSERT INTO t5 VALUES(2, -99);
         INSERT INTO t5 VALUES(3, 10000);
@@ -1571,7 +1571,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "func-18.10",
     [[
-        CREATE TABLE t6(id primary key, x INTEGER);
+        CREATE TABLE t6(id INT primary key, x INTEGER);
         INSERT INTO t6 VALUES(1, 1);
         INSERT INTO t6 VALUES(2, 1<<62);
         SELECT sum(x) - ((1<<62)+1) from t6;
@@ -2421,7 +2421,7 @@ test:do_test(
     "func-28.1",
     function()
         test:execsql([[
-            CREATE TABLE t28(id primary key, x, y DEFAULT(nosuchfunc(1)));
+            CREATE TABLE t28(id INT primary key, x INT, y INT DEFAULT(nosuchfunc(1)));
         ]])
         return test:catchsql([[
             INSERT INTO t28(id, x) VALUES(1, 1);
@@ -2432,130 +2432,6 @@ test:do_test(
         -- </func-28.1>
     })
 
--- Verify that the length() and typeof() functions do not actually load
--- the content of their argument.
---
-
--- MUST_WORK_TEST cache_miss
-if 0>0 then
-test:do_test(
-    "func-29.1",
-    function()
-        test:execsql([[
-            CREATE TABLE t29(id INTEGER PRIMARY KEY, x, y);
-            INSERT INTO t29 VALUES(1, 2, 3), (2, NULL, 4), (3, 4.5, 5);
-            INSERT INTO t29 VALUES(4, randomblob(1000000), 6);
-            INSERT INTO t29 VALUES(5, 'hello', 7);
-        ]])
-        db("close")
-        sqlite3("db", "test.db")
-        sqlite3_db_status("db", "CACHE_MISS", 1)
-        return test:execsql("SELECT typeof(x), length(x), typeof(y) FROM t29 ORDER BY id")
-    end, {
-        -- <func-29.1>
-        "integer", 1, "integer", "null", "", "integer", "real", 3, "integer", "blob", 1000000, "integer", "text", 5, "integer"
-        -- </func-29.1>
-    })
-
-test:do_test(
-    "func-29.2",
-    function()
-        local x = test.lindex(sqlite3_db_status("db", "CACHE_MISS", 1), 1)
-        if (x < 5) then
-            x = 1
-        end
-        return x
-    end, {
-        -- <func-29.2>
-        1
-        -- </func-29.2>
-    })
-
-test:do_test(
-    "func-29.3",
-    function()
-        db("close")
-        sqlite3("db", "test.db")
-        sqlite3_db_status("db", "CACHE_MISS", 1)
-        return test:execsql("SELECT typeof(+x) FROM t29 ORDER BY id")
-    end, {
-        -- <func-29.3>
-        "integer", "null", "real", "blob", "text"
-        -- </func-29.3>
-    })
-
-if X(1339, "X!cmd", [=[["expr","[permutation] != \"mmap\""]]=])
- then
-    
-
-end
-test:do_test(
-    "func-29.5",
-    function()
-        db("close")
-        sqlite3("db", "test.db")
-        sqlite3_db_status("db", "CACHE_MISS", 1)
-        return test:execsql("SELECT sum(length(x)) FROM t29")
-    end, {
-        -- <func-29.5>
-        1000009
-        -- </func-29.5>
-    })
-
-test:do_test(
-    "func-29.6",
-    function()
-        x = test.lindex(sqlite3_db_status("db", "CACHE_MISS", 1), 1)
-        if (x < 5)
- then
-            x = 1
-        end
-        return x
-    end, {
-        -- <func-29.6>
-        1
-        -- </func-29.6>
-    })
-end
-
--- The OP_Column opcode has an optimization that avoids loading content
--- for fields with content-length=0 when the content offset is on an overflow
--- page.  Make sure the optimization works.
---
-test:do_execsql_test(
-    "func-29.10",
-    [[
-        CREATE TABLE t29b(a primary key,b,c,d,e,f,g,h,i);
-        INSERT INTO t29b 
-         VALUES(1, hex(randomblob(2000)), null, 0, 1, '', zeroblob(0),'x',x'01');
-        SELECT typeof(c), typeof(d), typeof(e), typeof(f),
-               typeof(g), typeof(h), typeof(i) FROM t29b;
-    ]], {
-        -- <func-29.10>
-        "null", "integer", "integer", "text", "blob", "text", "blob"
-        -- </func-29.10>
-    })
-
-test:do_execsql_test(
-    "func-29.11",
-    [[
-        SELECT length(f), length(g), length(h), length(i) FROM t29b;
-    ]], {
-        -- <func-29.11>
-        0, 0, 1, 1
-        -- </func-29.11>
-    })
-
-test:do_execsql_test(
-    "func-29.12",
-    [[
-        SELECT quote(f), quote(g), quote(h), quote(i) FROM t29b;
-    ]], {
-        -- <func-29.12>
-        "''", "X''", "'x'", "X'01'"
-        -- </func-29.12>
-    })
-
 -- EVIDENCE-OF: R-29701-50711 The unicode(X) function returns the numeric
 -- unicode code point corresponding to the first character of the string
 -- X.
diff --git a/test/sql-tap/func5.test.lua b/test/sql-tap/func5.test.lua
index 493b50552be61ca6d9e16a7911a2deb8341bbab0..db37a91b07dfd6ac467cb285592cce71e1ed409e 100755
--- a/test/sql-tap/func5.test.lua
+++ b/test/sql-tap/func5.test.lua
@@ -24,7 +24,7 @@ test:plan(5)
 test:do_execsql_test(
     "func5-1.1",
     [[
-        CREATE TABLE t1(x PRIMARY KEY,a,b,c);
+        CREATE TABLE t1(x INT PRIMARY KEY,a TEXT,b TEXT,c INT );
         INSERT INTO t1 VALUES(1,'ab','cd',1);
         INSERT INTO t1 VALUES(2,'gh','ef',5);
         INSERT INTO t1 VALUES(3,'pqr','fuzzy',99);
@@ -60,7 +60,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "func5-2.1",
     [[
-        CREATE TABLE t2(x PRIMARY KEY,y);
+        CREATE TABLE t2(x  INT PRIMARY KEY,y INT );
         INSERT INTO t2 VALUES(1,2),(3,4),(5,6),(7,8);
         SELECT x, y FROM t2 WHERE x+5=5+x ORDER BY +x;
     ]], {
diff --git a/test/sql-tap/gh-2360-omit-truncate-in-transaction.test.lua b/test/sql-tap/gh-2360-omit-truncate-in-transaction.test.lua
index 7bd5572a763829b6bb3bdbf2599782c3fbb046b5..aa2989bdcb9caa39ea55ae7e09dfae47462dbb93 100755
--- a/test/sql-tap/gh-2360-omit-truncate-in-transaction.test.lua
+++ b/test/sql-tap/gh-2360-omit-truncate-in-transaction.test.lua
@@ -32,7 +32,7 @@ test:do_execsql_test(
 	"truncate-1.3",
 	[[
 		DROP TABLE IF EXISTS t1;
-		CREATE TABLE t1(id PRIMARY KEY, a, b);
+		CREATE TABLE t1(id INT PRIMARY KEY, a INT, b INT);
 		INSERT INTO t1 VALUES(1, 1, 1), (2, 1, 3), (3, 2, 3);
 		DELETE FROM t1;
 		SELECT * FROM t1;
diff --git a/test/sql-tap/gh-2723-concurrency.test.lua b/test/sql-tap/gh-2723-concurrency.test.lua
index 3f7d241c0403b26682cd66b30a5c406d625ef20e..21912a0bfb4bf6e795bb73dcb7a16195a3e3c1db 100755
--- a/test/sql-tap/gh-2723-concurrency.test.lua
+++ b/test/sql-tap/gh-2723-concurrency.test.lua
@@ -11,7 +11,7 @@ for id = 1, N do
     fiber.create(
         function ()
             local table_name = "table2723"..id
-            box.sql.execute("create table "..table_name.."(id primary key, a integer unique, b)")
+            box.sql.execute("create table "..table_name.."(id INT primary key, a integer unique, b INT)")
             box.sql.execute("insert into "..table_name.." values(1, 2, 3)")
             box.sql.execute("insert into "..table_name.." values(3, 4, 3)")
             pcall( function() box.sql.execute("insert into "..table_name.." values(3, 4, 3)") end)
@@ -32,7 +32,7 @@ test:do_test(
     0)
 
 ch = fiber.channel(N)
-box.sql.execute("create table t1(id primary key, a integer unique, b);")
+box.sql.execute("create table t1(id INT primary key, a integer unique, b INT);")
 box.sql.execute("create index i1 on t1(b);")
 for id = 1, N do
     fiber.create(
@@ -59,7 +59,7 @@ box.sql.execute("drop table t1;")
 
 
 ch = fiber.channel(N)
-box.sql.execute("create table t1(id primary key, a integer unique, b);")
+box.sql.execute("create table t1(id INT primary key, a integer unique, b INT);")
 box.sql.execute("create index i1 on t1(b);")
 for id = 1, N*N do
     box.sql.execute(string.format("insert into t1 values(%s, %s, 3)", id, id))
diff --git a/test/sql-tap/gh-2884-forbid-rowid-syntax.test.lua b/test/sql-tap/gh-2884-forbid-rowid-syntax.test.lua
index 74d69aa17a67bf2f5987b519e49904afedc54033..c628510c27e40c44352675bb3488a086c218acd9 100755
--- a/test/sql-tap/gh-2884-forbid-rowid-syntax.test.lua
+++ b/test/sql-tap/gh-2884-forbid-rowid-syntax.test.lua
@@ -4,7 +4,7 @@ test:plan(1)
 
 local ok = pcall(test.execsql, test, [[
     DROP TABLE IF EXISTS t1;
-    CREATE TABLE t1(a, b, c, d TEXT, PRIMARY KEY (c, d)) WITHOUT ROWID;
+    CREATE TABLE t1(a INT, b INT, c INT, d TEXT, PRIMARY KEY (c, d)) WITHOUT ROWID;
 ]])
 
 test:ok(not ok, 'rowid syntax must be forbidden')
diff --git a/test/sql-tap/gh-2996-indexed-by.test.lua b/test/sql-tap/gh-2996-indexed-by.test.lua
index 4b1dae4b4999da8859a6480c9d43cdf8b47cc06e..7ee86be90dc6e197cbc664bc2c2479e584d65a75 100755
--- a/test/sql-tap/gh-2996-indexed-by.test.lua
+++ b/test/sql-tap/gh-2996-indexed-by.test.lua
@@ -7,7 +7,7 @@ test:plan(13)
 -- statement is correct.
 
 test:execsql [[
-    CREATE TABLE t1(a INT PRIMARY KEY, b);
+    CREATE TABLE t1(a INT PRIMARY KEY, b INT);
     CREATE INDEX t1ix2 on t1(b);
     CREATE INDEX t1ix1 on t1(b);
 ]]
diff --git a/test/sql-tap/gh-3307-xfer-optimization-issue.test.lua b/test/sql-tap/gh-3307-xfer-optimization-issue.test.lua
index 8d96261987d12850c3200a12934b459bea4781fd..80a2a2d9cb3625746d7652c4a70abb54372543ff 100755
--- a/test/sql-tap/gh-3307-xfer-optimization-issue.test.lua
+++ b/test/sql-tap/gh-3307-xfer-optimization-issue.test.lua
@@ -201,8 +201,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
@@ -236,8 +236,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
@@ -271,8 +271,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         START TRANSACTION;
             INSERT OR ROLLBACK INTO t2 SELECT * FROM t1;
@@ -304,8 +304,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
@@ -337,8 +337,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
@@ -372,8 +372,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
@@ -407,8 +407,8 @@ test:do_catchsql_xfer_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-        CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t1 VALUES (1, 1), (3, 3), (5, 5);
         INSERT INTO t2 VALUES (2, 2), (3, 4);
         START TRANSACTION;
diff --git a/test/sql-tap/gh-3332-tuple-format-leak.test.lua b/test/sql-tap/gh-3332-tuple-format-leak.test.lua
index 05b30aa315781e61732d77d31d5a2cde0bcaa69f..f19b7bc229cf7b1d1e16086c6091d1a0a8e43088 100755
--- a/test/sql-tap/gh-3332-tuple-format-leak.test.lua
+++ b/test/sql-tap/gh-3332-tuple-format-leak.test.lua
@@ -5,7 +5,7 @@ test:plan(2)
 test:do_test(
     "format-leak-prep",
     function()
-        box.sql.execute("CREATE TABLE t1(id UNSIGNED BIG INT PRIMARY KEY,\
+        box.sql.execute("CREATE TABLE t1(id INTEGER PRIMARY KEY,\
                          max_players INTEGER, n_players INTEGER, flags INTEGER);");
         box.sql.execute("CREATE INDEX IDX_MAX_PLAYERS ON t1(max_players);");
         box.sql.execute("CREATE INDEX IDX_N_PLAYERS ON t1(n_players);");
diff --git a/test/sql-tap/gh2130-index-refer-table.test.lua b/test/sql-tap/gh2130-index-refer-table.test.lua
index b5fc1106d46cbd19ce1443f5417928607c586d66..b3bf519ae83a82713ae9bf4812e3242f0e572f29 100755
--- a/test/sql-tap/gh2130-index-refer-table.test.lua
+++ b/test/sql-tap/gh2130-index-refer-table.test.lua
@@ -5,8 +5,8 @@ test:plan(5)
 test:execsql " DROP TABLE IF EXISTS t1 "
 test:execsql " DROP TABLE IF EXISTS t2 "
 
-test:execsql " CREATE TABLE t1(a INT PRIMARY KEY, b, c) "
-test:execsql " CREATE TABLE t2(a INT PRIMARY KEY, b, c) "
+test:execsql " CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT) "
+test:execsql " CREATE TABLE t2(a INT PRIMARY KEY, b INT, c INT) "
 
 test:do_execsql_test(
 	"index-1.1",
diff --git a/test/sql-tap/hexlit.test.lua b/test/sql-tap/hexlit.test.lua
index c037e7174b76cbf176efeafdbf45be178b133042..158eda73b1c0d76e7f0b1eedfdc8fcaa29e107e0 100755
--- a/test/sql-tap/hexlit.test.lua
+++ b/test/sql-tap/hexlit.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(130)
+test:plan(128)
 
 --!./tcltestrunner.lua
 -- 2014-07-23
@@ -98,29 +98,6 @@ for n = 1, 0x10 -1, 1 do
     hexlit1("200."..n..".3", "0X"..string.format("%03X",n), n)
     hexlit1("200."..n..".4", "0x"..string.format("%03X",n), n)
 end
--- String literals that look like hex do not get cast or coerced.
---
-test:do_execsql_test(
-    "hexlit-300",
-    [[
-        CREATE TABLE t1(id primary key, x INT, y REAL);
-        INSERT INTO t1 VALUES(1, '1234','4567'),(2, '0x1234','0x4567');
-        SELECT typeof(x), x, typeof(y), y, '#' FROM t1 ORDER BY id;
-    ]], {
-        -- <hexlit-300>
-        "integer", 1234, "real", 4567.0, "#", "text", "0x1234", "text", "0x4567", "#"
-        -- </hexlit-300>
-    })
-
-test:do_execsql_test(
-    "hexlit-301",
-    [[
-        SELECT CAST('0x1234' AS INTEGER);
-    ]], {
-        -- <hexlit-301>
-        0
-        -- </hexlit-301>
-    })
 
 -- Oversized hex literals are rejected
 --
@@ -138,7 +115,7 @@ test:do_catchsql_test(
     "hexlist-410",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(x primary key);
+        CREATE TABLE t1(x INT primary key);
         INSERT INTO t1 VALUES(1+0x10000000000000000);
     ]], {
         -- <hexlist-410>
diff --git a/test/sql-tap/icu.test.lua b/test/sql-tap/icu.test.lua
index 5b67e9fe7e1f14a27ac98a139761902ee2872b57..b9026d22e74eb7784876b43ade110109bb5fb129 100755
--- a/test/sql-tap/icu.test.lua
+++ b/test/sql-tap/icu.test.lua
@@ -25,7 +25,7 @@ if (0 > 0)
  then
     -- Create a table to work with.
     --
-    test:execsql "CREATE TABLE test1(i1 int primary key, i2 int, r1 real, r2 real, t1 text, t2 text)"
+    test:execsql "CREATE TABLE test1(i1 int primary key, i2 int, r1 INT real, r2 INT real, t1 text, t2 text)"
     test:execsql "INSERT INTO test1 VALUES(1,2,1.1,2.2,'hello','world')"
     local function test_expr(name, settings, expr, result)
         test:do_test(
@@ -87,7 +87,7 @@ if (0 > 0)
     test:do_execsql_test(
         "icu-4.1",
         [[
-            CREATE TABLE fruit(name);
+            CREATE TABLE fruit(name INT);
             INSERT INTO fruit VALUES('plum');
             INSERT INTO fruit VALUES('cherry');
             INSERT INTO fruit VALUES('apricot');
diff --git a/test/sql-tap/identifier-characters.test.lua b/test/sql-tap/identifier-characters.test.lua
index 988d44880de550dfe8901bbd260aa77016aecef3..94fadc05d8cce1c01d6d44b504442cce723a0f28 100755
--- a/test/sql-tap/identifier-characters.test.lua
+++ b/test/sql-tap/identifier-characters.test.lua
@@ -14,7 +14,7 @@ local testcases = {
 		if string.len(id) == box.schema.NAME_MAX then
 			id = string.sub(id, string.len(id))
 		end
-		test:execsql(string.format("create table \"%s\" (a primary key);", id))
+		test:execsql(string.format("create table \"%s\" (a INT primary key);", id))
 	end,
 	-- cleanup
 	function (id)
@@ -25,7 +25,7 @@ local testcases = {
 	end},
 	{"column name",
 	function (id)
-		test:execsql(string.format("create table table1(a primary key, \"%s\");", id))
+		test:execsql(string.format("create table table1(a INT primary key, \"%s\" INT);", id))
 	end,
 	function (id)
 		test:execsql(string.format("drop table table1;", id))
@@ -81,7 +81,7 @@ local testcases = {
 
 test:do_execsql_test(
 	test_prefix.."preparition",
-	"create table test(a primary key, b, c)")
+	"create table test(a  INT primary key, b INT, c INT)")
 
 for _, testcase in ipairs(testcases) do
 	test:do_test(
diff --git a/test/sql-tap/identifier_case.test.lua b/test/sql-tap/identifier_case.test.lua
index ed9553c6bd7a150e8b9fb4758f81fea8d93c50bd..096130a520e7f5d50a1e368bed277594b529948b 100755
--- a/test/sql-tap/identifier_case.test.lua
+++ b/test/sql-tap/identifier_case.test.lua
@@ -82,7 +82,7 @@ for _, row in ipairs(data) do
     test:do_catchsql_test(
         test_prefix.."2.1."..row[1],
         string.format( [[
-                CREATE TABLE table%s ("columNN", %s, primary key("columNN", %s));
+                CREATE TABLE table%s ("columNN" INT, %s INT, primary key("columNN", %s));
                 INSERT INTO table%s(%s, "columNN") values (%s, %s);
                 ]],
                 row[1], row[2], row[2],
@@ -116,7 +116,7 @@ test:do_test(
     end,
     6)
 
-test:execsql([[create table table1(columnn, "columnn" primary key)]])
+test:execsql([[create table table1(columnn INT , "columnn" INT primary key)]])
 test:execsql([[insert into table1("columnn", "COLUMNN") values(2,1)]])
 
 
@@ -158,7 +158,7 @@ test:do_test(
 
 test:do_execsql_test(
     test_prefix.."4.0",
-    string.format([[create table table1(a, b primary key)]]),
+    string.format([[create table table1(a INT , b  INT primary key)]]),
     nil
 )
 
@@ -213,7 +213,7 @@ data = {
 test:do_catchsql_test(
     test_prefix.."6.0.",
     [[
-        CREATE TABLE T1 (a primary key, b);
+        CREATE TABLE T1 (a TEXT primary key, b TEXT);
     ]],
     {0})
 
diff --git a/test/sql-tap/in1.test.lua b/test/sql-tap/in1.test.lua
index e81f142f80dcb76afe084bb2f194ff1596c65a4d..b938ff17f83fea2b5e587276afd70fca401d739a 100755
--- a/test/sql-tap/in1.test.lua
+++ b/test/sql-tap/in1.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(83)
+test:plan(80)
 
 --!./tcltestrunner.lua
 -- 2001 September 15
@@ -25,7 +25,7 @@ test:do_test(
     "in-1.0",
     function()
         test:execsql [[
-            CREATE TABLE t1(a PRIMARY KEY, b);
+            CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
             START TRANSACTION;
         ]]
         -- for _ in X(0, "X!for", [=[["set i 1","$i<=10","incr i"]]=]) do
@@ -309,16 +309,16 @@ test:do_test(
 test:do_execsql_test(
     "in-5.1",
     [[
-        INSERT INTO t1 VALUES('hello', 'world');
+        INSERT INTO t1 VALUES(19, 21);
         SELECT * FROM t1
         WHERE a IN (
-           'Do','an','IN','with','a','constant','RHS','but','where','the',
-           'has','many','elements','We','need','to','test','that',
-           'collisions','hash','table','are','resolved','properly',
-           'This','in-set','contains','thirty','one','entries','hello');
+           100,104,1092,1234,19,456,544,324,476,632,
+           231,987,79879,657,546,33,555432,44433,
+           234,3453,633,12341,5675,67854,
+           12123,345,3453,5553,3241,56751,9845);
     ]], {
         -- <in-5.1>
-        "hello", "world"
+        19, 21
         -- </in-5.1>
     })
 
@@ -327,15 +327,14 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in-6.1",
     [[
-        CREATE TABLE ta(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE ta(a INTEGER PRIMARY KEY, b INT );
         INSERT INTO ta VALUES(1,1);
         INSERT INTO ta VALUES(2,2);
         INSERT INTO ta VALUES(3,3);
         INSERT INTO ta VALUES(4,4);
         INSERT INTO ta VALUES(6,6);
         INSERT INTO ta VALUES(8,8);
-        INSERT INTO ta VALUES(10,
-           'This is a key that is long enough to require a malloc in the VDBE');
+        INSERT INTO ta VALUES(10, 10);
         SELECT * FROM ta WHERE a<10;
     ]], {
         -- <in-6.1>
@@ -346,15 +345,14 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in-6.2",
     [[
-        CREATE TABLE tb(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE tb(a INTEGER PRIMARY KEY, b INT );
         INSERT INTO tb VALUES(1,1);
         INSERT INTO tb VALUES(2,2);
         INSERT INTO tb VALUES(3,3);
         INSERT INTO tb VALUES(5,5);
         INSERT INTO tb VALUES(7,7);
         INSERT INTO tb VALUES(9,9);
-        INSERT INTO tb VALUES(11,
-           'This is a key that is long enough to require a malloc in the VDBE');
+        INSERT INTO tb VALUES(11,10);
         SELECT * FROM tb WHERE a<10;
     ]], {
         -- <in-6.2>
@@ -428,7 +426,7 @@ test:do_execsql_test(
         SELECT a FROM ta WHERE a IN (SELECT b FROM tb);
     ]], {
         -- <in-6.9>
-        1, 2, 3
+        1, 2, 3, 10
         -- </in-6.9>
     })
 
@@ -438,7 +436,7 @@ test:do_execsql_test(
         SELECT a FROM ta WHERE a NOT IN (SELECT b FROM tb);
     ]], {
         -- <in-6.10>
-        4, 6, 8, 10
+        4, 6, 8
         -- </in-6.10>
     })
 
@@ -470,7 +468,7 @@ test:do_execsql_test(
         SELECT a FROM t1 WHERE a NOT IN () ORDER BY a;
     ]], {
         -- <in-7.3>
-        5, 6, 7, 8, "hello"
+        5, 6, 7, 8, 19
         -- </in-7.3>
     })
 
@@ -549,10 +547,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in-8.1",
     [[
-        SELECT b FROM t1 WHERE a IN ('hello','there')
+        SELECT b FROM t1 WHERE a IN (19,88)
     ]], {
         -- <in-8.1>
-        "world"
+        21
         -- </in-8.1>
     })
 
@@ -586,7 +584,7 @@ test:do_execsql_test(
         SELECT b FROM t1 WHERE a NOT IN t4;
     ]], {
         -- <in-9.3>
-        64, 256, "world"
+        64, 256, 21
         -- </in-9.3>
     })
 
@@ -625,7 +623,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "in-11.1",
     [[
-        CREATE TABLE t6(a PRIMARY KEY,b NUMERIC);
+        CREATE TABLE t6(a  INT PRIMARY KEY,b NUMERIC);
         INSERT INTO t6 VALUES(1,2);
         INSERT INTO t6 VALUES(2,3);
         SELECT * FROM t6 WHERE b IN (2);
@@ -648,32 +646,6 @@ test:do_test(
         -- </in-11.2>
     })
 
-test:do_test(
-    "in-11.3",
-    function()
-        -- No coercion should occur here because of the unary + before b.
-        return test:execsql [[
-            SELECT * FROM t6 WHERE +b IN ('2');
-        ]]
-    end, {
-        -- <in-11.3>
-        
-        -- </in-11.3>
-    })
-
-test:do_test(
-    "in-11.4",
-    function()
-        -- No coercion because column a as affinity NONE
-        return test:execsql [[
-            SELECT * FROM t6 WHERE a IN ('2');
-        ]]
-    end, {
-        -- <in-11.4>
-        
-        -- </in-11.4>
-    })
-
 test:do_execsql_test(
     "in-11.5",
     [[
@@ -684,26 +656,13 @@ test:do_execsql_test(
         -- </in-11.5>
     })
 
-test:do_test(
-    "in-11.6",
-    function()
-        -- No coercion because column a as affinity NONE
-        return test:execsql [[
-            SELECT * FROM t6 WHERE +a IN ('2');
-        ]]
-    end, {
-        -- <in-11.6>
-        
-        -- </in-11.6>
-    })
-
 -- Test error conditions with expressions of the form IN(<compound select>).
 --
 test:do_execsql_test(
     "in-12.1",
     [[
-        CREATE TABLE t2(a PRIMARY KEY, b, c);
-        CREATE TABLE t3(a PRIMARY KEY, b, c);
+        CREATE TABLE t2(a  INT PRIMARY KEY, b INT , c INT );
+        CREATE TABLE t3(a  INT PRIMARY KEY, b INT , c INT );
     ]], {
         -- <in-12.1>
         
@@ -913,7 +872,7 @@ test:do_test(
 test:do_execsql_test(
     "in-13.2",
     [[
-        CREATE TABLE t7(id primary key, a, b, c NOT NULL);
+        CREATE TABLE t7(id  INT primary key, a INT , b INT , c  INT NOT NULL);
         INSERT INTO t7 VALUES(1, 1,    1, 1);
         INSERT INTO t7 VALUES(2, 2,    2, 2);
         INSERT INTO t7 VALUES(3, 3,    3, 3);
diff --git a/test/sql-tap/in2.test.lua b/test/sql-tap/in2.test.lua
index 239585eb0b362d987015baa912739594543c2c1f..9d9a3c3b3676993706b6da426fadf99a1390ad0b 100755
--- a/test/sql-tap/in2.test.lua
+++ b/test/sql-tap/in2.test.lua
@@ -22,7 +22,7 @@ test:plan(1999)
 test:do_execsql_test(
     "in2-1",
     [[
-        CREATE TABLE a(i INTEGER PRIMARY KEY, a);
+        CREATE TABLE a(i INTEGER PRIMARY KEY, a INT);
     ]], {
         -- <in2-1>
         
diff --git a/test/sql-tap/in3.test.lua b/test/sql-tap/in3.test.lua
index fd120451bd0183f9294c1bb899d5c8fa2916b4b0..83139a3e43de8d82a96574e7d45525fc80047498 100755
--- a/test/sql-tap/in3.test.lua
+++ b/test/sql-tap/in3.test.lua
@@ -58,7 +58,7 @@ end
 test:do_execsql_test(
     "in3-1.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
         INSERT INTO t1 VALUES(1, 2);
         INSERT INTO t1 VALUES(3, 4);
         INSERT INTO t1 VALUES(5, 6);
@@ -92,7 +92,7 @@ test:do_test(
         return exec_neph(" SELECT a FROM t1 WHERE a+0 IN (SELECT a FROM t1); ")
     end, {
         -- <in3-1.5>
-        0, 1, 3, 5
+        1, 1, 3, 5
         -- </in3-1.5>
     })
 
@@ -271,18 +271,18 @@ test:do_test(
             DROP TABLE IF EXISTS t1;
             DROP TABLE IF EXISTS t1;
 
-            CREATE TABLE t1(id primary key, a BLOB, b NUMBER ,c TEXT);
+            CREATE TABLE t1(id  INT primary key, a BLOB, b NUMERIC ,c TEXT);
             CREATE UNIQUE INDEX t1_i1 ON t1(a);        /* no affinity */
             CREATE UNIQUE INDEX t1_i2 ON t1(b);        /* numeric affinity */
             CREATE UNIQUE INDEX t1_i3 ON t1(c);        /* text affinity */
 
-            CREATE TABLE t2(id primary key, x BLOB, y NUMBER, z TEXT);
+            CREATE TABLE t2(id  INT primary key, x BLOB, y NUMERIC, z TEXT);
             CREATE UNIQUE INDEX t2_i1 ON t2(x);        /* no affinity */
             CREATE UNIQUE INDEX t2_i2 ON t2(y);        /* numeric affinity */
             CREATE UNIQUE INDEX t2_i3 ON t2(z);        /* text affinity */
 
-            INSERT INTO t1 VALUES(1, 1, 1, 1);
-            INSERT INTO t2 VALUES(1, '1', '1', '1');
+            INSERT INTO t1 VALUES(1, '1', 1, '1');
+            INSERT INTO t2 VALUES(1, '1', 1, '1');
         ]]
     end, {
         -- <in3-3.1>
@@ -293,36 +293,38 @@ test:do_test(
 test:do_test(
     "in3-3.2",
     function()
-        -- No affinity is applied before comparing "x" and "a". Therefore
-        -- the index can be used (the comparison is false, text!=number).
+        -- Both columns have type 'BLOB' so they are comparable.
+        -- Moreover, we can use index and avoid materializing
+        -- retults into ephemeral table.
         return exec_neph(" SELECT x IN (SELECT a FROM t1) FROM t2 ")
     end, {
         -- <in3-3.2>
-        0, 0
+        0, 1
         -- </in3-3.2>
     })
 
 test:do_test(
     "in3-3.3",
     function()
-        -- Logically, numeric affinity is applied to both sides before 
-        -- the comparison.  Therefore it is possible to use index t1_i2.
+        -- Logically, numeric affinity is applied to both sides before
+        -- the comparison, but index can't be used.
         return exec_neph(" SELECT x IN (SELECT b FROM t1) FROM t2 ")
     end, {
         -- <in3-3.3>
-        0, 1
+        1, 1
         -- </in3-3.3>
     })
 
 test:do_test(
     "in3-3.4",
     function()
-        -- No affinity is applied before the comparison takes place. Making
-        -- it possible to use index t1_i3.
+        -- BLOB is compatible with TEXT, however index can't
+        -- be used since under the hood BLOB is SCALAR (which
+        -- can contain not only STRING values) and TEXT is STRING.
         return exec_neph(" SELECT x IN (SELECT c FROM t1) FROM t2 ")
     end, {
         -- <in3-3.4>
-        0, 1
+        1, 1
         -- </in3-3.4>
     })
 
@@ -370,7 +372,7 @@ test:do_test(
     "in3-4.1",
     function()
         test:execsql [[
-            CREATE TABLE t3(a PRIMARY KEY, b, c);
+            CREATE TABLE t3(a  INT PRIMARY KEY, b TEXT , c INT );
             CREATE UNIQUE INDEX t3_i ON t3(b, a);
         ]]
         return test:execsql [[
@@ -385,16 +387,22 @@ test:do_test(
         -- </in3-4.1>
     })
 
+-- No need in ephemeral table since index t3_i can be used:
+-- types are matching, column 'b' is leftmost in index.
+--
 test:do_test(
     "in3-4.2",
     function()
-        return exec_neph(" SELECT 'text' IN (SELECT b FROM t3) ")
+        return exec_neph(" SELECT 'text' IN (SELECT b FROM t3)")
     end, {
         -- <in3-4.2>
         0, 1
         -- </in3-4.2>
     })
 
+-- Ephemeral table is used since collations of indexed
+-- column (rhs) 'b' and searched value (lhs)  are different.
+--
 test:do_test(
     "in3-4.3",
     function()
diff --git a/test/sql-tap/in4.test.lua b/test/sql-tap/in4.test.lua
index ac39c5fca4743fb1341215774721a7c853b606d1..70fb207fd8041fdfe23b84fcf417fff8852b0a49 100755
--- a/test/sql-tap/in4.test.lua
+++ b/test/sql-tap/in4.test.lua
@@ -20,7 +20,7 @@ test:plan(61)
 test:do_execsql_test(
     "in4-1.1",
     [[
-        CREATE TABLE t1(a, b PRIMARY KEY);
+        CREATE TABLE t1(a TEXT , b  INT PRIMARY KEY);
         CREATE INDEX i1 ON t1(a);
     ]], {
         -- <in4-1.1>
@@ -172,8 +172,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(pk primary key, x, id);
-        CREATE TABLE t2(pk primary key, x, id);
+        CREATE TABLE t1(pk  INT primary key, x INT , id INT );
+        CREATE TABLE t2(pk  INT primary key, x INT , id INT );
         INSERT INTO t1 VALUES(1, NULL, NULL);
         INSERT INTO t1 VALUES(2, 0, NULL);
         INSERT INTO t1 VALUES(3, 1, 3);
@@ -204,7 +204,7 @@ test:do_test(
     "in4-3.3",
     function()
         test:execsql [[
-            CREATE TABLE t3(x PRIMARY KEY, y, z);
+            CREATE TABLE t3(x  INT PRIMARY KEY, y INT , z INT );
             CREATE INDEX t3i1 ON t3(x, y);
             INSERT INTO t3 VALUES(1, 1, 1);
             INSERT INTO t3 VALUES(10, 10, 10);
@@ -524,7 +524,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in4-4.1",
     [[
-        CREATE TABLE t4a(a TEXT, b TEXT COLLATE "unicode_ci", c PRIMARY KEY);
+        CREATE TABLE t4a(a TEXT, b TEXT COLLATE "unicode_ci", c  INT PRIMARY KEY);
         INSERT INTO t4a VALUES('ABC','abc',1);
         INSERT INTO t4a VALUES('def','xyz',2);
         INSERT INTO t4a VALUES('ghi','ghi',3);
@@ -588,7 +588,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in4-4.11",
     [[
-        CREATE TABLE t4b(a TEXT, b NUMERIC, c PRIMARY KEY);
+        CREATE TABLE t4b(a TEXT, b NUMERIC, c  INT PRIMARY KEY);
         INSERT INTO t4b VALUES('1.0',1,4);
         SELECT c FROM t4b WHERE a=b;
     ]], {
@@ -623,7 +623,7 @@ test:do_execsql_test(
         SELECT c FROM t4b WHERE a=+b;
     ]], {
         -- <in4-4.14>
-        
+        4
         -- </in4-4.14>
     })
 
@@ -633,7 +633,7 @@ test:do_execsql_test(
         SELECT c FROM t4b WHERE +b=a;
     ]], {
         -- <in4-4.15>
-        
+        4
         -- </in4-4.15>
     })
 
@@ -653,7 +653,7 @@ test:do_execsql_test(
         SELECT c FROM t4b WHERE a IN (b);
     ]], {
         -- <in4-4.17>
-        
+        4
         -- </in4-4.17>
     })
 
@@ -701,9 +701,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "in4-6.1",
     [[
-        CREATE TABLE t6a(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t6a(a INTEGER PRIMARY KEY, b INT );
         INSERT INTO t6a VALUES(1,2),(3,4),(5,6);
-        CREATE TABLE t6b(c INTEGER PRIMARY KEY, d);
+        CREATE TABLE t6b(c INTEGER PRIMARY KEY, d INT );
         INSERT INTO t6b VALUES(4,44),(5,55),(6,66);
 
         SELECT * FROM t6a, t6b WHERE a=3 AND b IN (c);
diff --git a/test/sql-tap/in5.test.lua b/test/sql-tap/in5.test.lua
index 5a115ddd44d9420285a2a1295b7fa0d6797d73c4..4e2cdcd2420b98e35aa2dca4fa893a118a91badf 100755
--- a/test/sql-tap/in5.test.lua
+++ b/test/sql-tap/in5.test.lua
@@ -269,7 +269,7 @@ test:do_test(
 test:do_execsql_test(
     "6.1.1",
     [[
-        CREATE TABLE t1(id primary key, a COLLATE "unicode_ci");
+        CREATE TABLE t1(id  INT primary key, a  TEXT COLLATE "unicode_ci");
         INSERT INTO t1 VALUES(1, 'one');
         INSERT INTO t1 VALUES(2, 'ONE');
     ]])
@@ -287,7 +287,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "6.2.1",
     [[
-        CREATE TABLE t3(a, b PRIMARY KEY);
+        CREATE TABLE t3(a INT , b  INT PRIMARY KEY);
         INSERT INTO t3 VALUES(1, 1);
         INSERT INTO t3 VALUES(1, 2);
         INSERT INTO t3 VALUES(1, 3);
@@ -322,8 +322,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "6.3.1",
     [[
-        CREATE TABLE x1(pk primary key, a);
-        CREATE TABLE x2(pk primary key, b);
+        CREATE TABLE x1(pk  INT primary key, a INT );
+        CREATE TABLE x2(pk  INT primary key, b INT );
         INSERT INTO x1 VALUES(1, 1), (2, 1), (3, 2);
         INSERT INTO x2 VALUES(1, 1), (2, 2);
         SELECT count(*) FROM x2 WHERE b IN (SELECT DISTINCT a FROM x1 LIMIT 2);
diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua
index 50f4131cb9275ddc15db60f34a843f3ff5df8ba4..8618ce8b5052da463bb2a29496e3998b2111ee20 100755
--- a/test/sql-tap/index1.test.lua
+++ b/test/sql-tap/index1.test.lua
@@ -24,7 +24,7 @@ test:plan(70)
 test:do_test(
     "index-1.1",
     function()
-        test:execsql "CREATE TABLE test1(id primary key, f1 int, f2 int, f3 int)"
+        test:execsql "CREATE TABLE test1(id  INT primary key, f1 int, f2 int, f3 int)"
         test:execsql "CREATE INDEX index1 ON test1(f1)"
         return test:execsql [[SELECT "name" FROM "_space" WHERE "name"='TEST1']]
     end, {
@@ -93,7 +93,7 @@ test:do_catchsql_test(
 test:do_test(
     "index-2.1b",
     function()
-        test:execsql "CREATE TABLE test1(id primary key, f1 int, f2 int, f3 int)"
+        test:execsql "CREATE TABLE test1(id  INT primary key, f1 int, f2 int, f3 int)"
         return test:catchsql "CREATE INDEX index1 ON test1(f4)"
     end, {
         -- <index-2.1b>
@@ -122,7 +122,7 @@ test:do_test(
 test:do_test(
     "index-4.1",
     function()
-        test:execsql "CREATE TABLE test1(id primary key, cnt int, power int)"
+        test:execsql "CREATE TABLE test1(id  INT primary key, cnt int, power int)"
         local val = 2
         for i = 1, 19, 1 do
             test:execsql(string.format("INSERT INTO test1 VALUES(%s, %s,%s)", i, i, val))
@@ -278,8 +278,8 @@ test:do_test(
 test:do_test(
     "index-6.1",
     function()
-        test:execsql "CREATE TABLE test1(id primary key, f1 int, f2 int)"
-        test:execsql "CREATE TABLE test2(id primary key, g1 real, g2 real)"
+        test:execsql "CREATE TABLE test1(id  INT primary key, f1 int, f2 int)"
+        test:execsql "CREATE TABLE test2(id  INT primary key, g1 float, g2 float)"
         return test:execsql "CREATE INDEX index1 ON test1(f1)"
     end, {
         -- <index-6.1>
@@ -339,7 +339,7 @@ test:do_test(
 test:do_execsql_test(
     "index-6.4",
     [[
-        CREATE TABLE test1(id primary key, a,b);
+        CREATE TABLE test1(id  INT primary key, a INT ,b INT );
         CREATE INDEX index1 ON test1(a);
         CREATE INDEX index2 ON test1(b);
         CREATE INDEX index3 ON test1(a,b);
@@ -423,7 +423,7 @@ test:execsql("DROP TABLE IF EXISTS test1")
 test:do_test(
     "index-9.1",
     function()
-        test:execsql "CREATE TABLE tab1(id primary key, a int)"
+        test:execsql "CREATE TABLE tab1(id  INT primary key, a int)"
         test:execsql "EXPLAIN CREATE INDEX idx1 ON tab1(a)"
 
 
@@ -451,7 +451,7 @@ test:do_test(
 test:do_execsql_test(
     "index-10.0",
     [[
-        CREATE TABLE t1(id primary key, a int, b int);
+        CREATE TABLE t1(id  INT primary key, a int, b int);
         CREATE INDEX i1 ON t1(a);
         INSERT INTO t1 VALUES(1, 1,2);
         INSERT INTO t1 VALUES(2, 2,4);
@@ -605,10 +605,9 @@ end
 test:do_execsql_test(
     "index-12.1",
     [[
-        CREATE TABLE t4(id primary key, a NUM,b);
+        CREATE TABLE t4(id  INT primary key, a NUM,b INT );
         INSERT INTO t4 VALUES(1, '0.0',1);
         INSERT INTO t4 VALUES(2, '0.00',2);
-        INSERT INTO t4 VALUES(3, 'abc',3);
         INSERT INTO t4 VALUES(4, '-1.0',4);
         INSERT INTO t4 VALUES(5, '+1.0',5);
         INSERT INTO t4 VALUES(6, '0',6);
@@ -616,7 +615,7 @@ test:do_execsql_test(
         SELECT a FROM t4 ORDER BY b;
     ]], {
         -- <index-12.1>
-        0, 0, "abc", -1, 1, 0, 0
+        0, 0, -1, 1, 0, 0
         -- </index-12.1>
     })
 
@@ -646,7 +645,7 @@ test:do_execsql_test(
         SELECT a FROM t4 WHERE a>-0.5 ORDER BY b
     ]], {
         -- <index-12.4>
-        0, 0, "abc", 1, 0, 0
+        0, 0, 1, 0, 0
         -- </index-12.4>
     })
 
@@ -677,7 +676,7 @@ test:do_execsql_test(
         SELECT a FROM t4 WHERE a>-0.5 ORDER BY b
     ]], {
         -- <index-12.7>
-        0, 0, "abc", 1, 0, 0
+        0, 0, 1, 0, 0
         -- </index-12.7>
     })
 
@@ -690,7 +689,7 @@ test:do_execsql_test(
         CREATE TABLE t5(
            a int UNIQUE,
            b float PRIMARY KEY,
-           c varchar(10),
+           c  TEXT,
            UNIQUE(a,c)
         );
         INSERT INTO t5 VALUES(1,2,3);
@@ -726,17 +725,17 @@ test:do_execsql_test(
 test:do_execsql_test(
     "index-14.1",
     [[
-        CREATE TABLE t6(id primary key, a,b,c);
+        CREATE TABLE t6(id  INT primary key, a TEXT,b TEXT ,c INT );
         CREATE INDEX t6i1 ON t6(a,b);
         INSERT INTO t6 VALUES(1, '','',1);
         INSERT INTO t6 VALUES(2, '',NULL,2);
         INSERT INTO t6 VALUES(3, NULL,'',3);
-        INSERT INTO t6 VALUES(4, 'abc',123,4);
-        INSERT INTO t6 VALUES(5, 123,'abc',5);
+        INSERT INTO t6 VALUES(4, 'abc','123',4);
+        INSERT INTO t6 VALUES(5, '123','abc',5);
         SELECT c FROM t6 ORDER BY a,b;
     ]], {
         -- <index-14.1>
-        3, 5, 2, 1, 4
+        3, 2, 1, 5, 4
         -- </index-14.1>
     })
 
@@ -766,7 +765,7 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a>'';
     ]], {
         -- <index-14.4>
-        4
+        5, 4
         -- </index-14.4>
     })
 
@@ -776,27 +775,27 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a>='';
     ]], {
         -- <index-14.5>
-        2, 1, 4
+        2, 1, 5, 4
         -- </index-14.5>
     })
 
-test:do_execsql_test(
+test:do_catchsql_test(
     "index-14.6",
     [[
         SELECT c FROM t6 WHERE a>123;
     ]], {
         -- <index-14.6>
-        2, 1, 4
+        1, "Can't convert to numeric "
         -- </index-14.6>
     })
 
-test:do_execsql_test(
+test:do_catchsql_test(
     "index-14.7",
     [[
         SELECT c FROM t6 WHERE a>=123;
     ]], {
         -- <index-14.7>
-        5, 2, 1, 4
+        1, "Can't convert to numeric "
         -- </index-14.7>
     })
 
@@ -806,7 +805,7 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a<'abc';
     ]], {
         -- <index-14.8>
-        5, 2, 1
+        2, 1, 5
         -- </index-14.8>
     })
 
@@ -816,7 +815,7 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a<='abc';
     ]], {
         -- <index-14.9>
-        5, 2, 1, 4
+        2, 1, 5, 4
         -- </index-14.9>
     })
 
@@ -826,7 +825,7 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a<='';
     ]], {
         -- <index-14.10>
-        5, 2, 1
+        2, 1
         -- </index-14.10>
     })
 
@@ -836,7 +835,7 @@ test:do_execsql_test(
         SELECT c FROM t6 WHERE a<'';
     ]], {
         -- <index-14.11>
-        5
+
         -- </index-14.11>
     })
 
@@ -874,7 +873,7 @@ test:do_execsql_test(
 -- } {13 14 15 12 8 5 2 1 3 6 10 11 9 4 7}
 -- # do_test index-15.3 {
 --   execsql {
---     SELECT b FROM t1 WHERE typeof(a) IN ('integer','real') ORDER BY b;
+--     SELECT b FROM t1 WHERE typeof(a) IN ('integer','float') ORDER BY b;
 --   }
 -- } {1 2 3 5 6 8 10 11 12 13 14 15}
 -- integrity_check index-15.4
@@ -882,12 +881,12 @@ test:do_execsql_test(
 -- includes qualifications that specify the same constraint twice only a
 -- single index is generated to enforce the constraint.
 --
--- For example: "CREATE TABLE abc( x PRIMARY KEY, UNIQUE(x) );"
+-- For example: "CREATE TABLE abc( x  INT PRIMARY KEY, UNIQUE(x) );"
 --
 test:do_execsql_test(
     "index-16.1",
     [[
-        CREATE TABLE t7(c UNIQUE PRIMARY KEY);
+        CREATE TABLE t7(c  INT PRIMARY KEY);
         SELECT count(*) FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-16.1>
@@ -899,7 +898,7 @@ test:do_execsql_test(
     "index-16.2",
     [[
         DROP TABLE t7;
-        CREATE TABLE t7(c UNIQUE PRIMARY KEY);
+        CREATE TABLE t7(c  INT UNIQUE PRIMARY KEY);
         SELECT count(*) FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-16.2>
@@ -911,7 +910,7 @@ test:do_execsql_test(
     "index-16.3",
     [[
         DROP TABLE t7;
-        CREATE TABLE t7(c PRIMARY KEY, UNIQUE(c) );
+        CREATE TABLE t7(c  INT PRIMARY KEY, UNIQUE(c) );
         SELECT count(*) FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-16.3>
@@ -923,7 +922,7 @@ test:do_execsql_test(
     "index-16.4",
     [[
         DROP TABLE t7;
-        CREATE TABLE t7(c, d , UNIQUE(c, d), PRIMARY KEY(c, d) );
+        CREATE TABLE t7(c INT , d  INT , UNIQUE(c, d), PRIMARY KEY(c, d) );
         SELECT count(*) FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-16.4>
@@ -935,7 +934,7 @@ test:do_execsql_test(
     "index-16.5",
     [[
         DROP TABLE t7;
-        CREATE TABLE t7(c, d , UNIQUE(c), PRIMARY KEY(c, d) );
+        CREATE TABLE t7(c INT , d  INT , UNIQUE(c), PRIMARY KEY(c, d) );
         SELECT count(*) FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-16.5>
@@ -952,7 +951,7 @@ test:do_execsql_test(
     "index-17.1",
     [[
         DROP TABLE t7;
-        CREATE TABLE t7(c, d UNIQUE, UNIQUE(c), PRIMARY KEY(c, d) );
+        CREATE TABLE t7(c INT , d  INT UNIQUE, UNIQUE(c), PRIMARY KEY(c, d) );
         SELECT "_index"."name" FROM "_index" JOIN "_space" WHERE "_index"."id" = "_space"."id" AND "_space"."name"='T7';
     ]], {
         -- <index-17.1>
@@ -1005,7 +1004,7 @@ if (0 > 0)
     test:do_catchsql_test(
         "index-21.2",
         [[
-            CREATE TABLE t6(x primary key);
+            CREATE TABLE t6(x  INT primary key);
             INSERT INTO temp.t6 values(1),(5),(9);
             CREATE INDEX temp.i21 ON t6(x);
             SELECT x FROM t6 ORDER BY x DESC;
diff --git a/test/sql-tap/index2.test.lua b/test/sql-tap/index2.test.lua
index f9176b872b02a3408469ae7b1b426a42d50f09b8..0efd484bd7d194efac28abb54767719eec80af7a 100755
--- a/test/sql-tap/index2.test.lua
+++ b/test/sql-tap/index2.test.lua
@@ -26,9 +26,9 @@ local ROW_NUM = 100 -- was 100
 test:do_test(
     "index2-1.1",
     function()
-        local sql_parts = {"CREATE TABLE t1(id primary key"}
+        local sql_parts = {"CREATE TABLE t1(id  INT primary key"}
         for i = 1, COL_NUM, 1 do
-            table.insert(sql_parts, "c"..i)
+            table.insert(sql_parts, "c"..i .. ' INT')
         end
         local sql = table.concat(sql_parts, ",")..");"
         return test:execsql(sql)
diff --git a/test/sql-tap/index3.test.lua b/test/sql-tap/index3.test.lua
index 7f6baa6a999051213ecb196d63eebc2c803a370c..4f950be090afe3c2a56e093061f5dd9e698b4e25 100755
--- a/test/sql-tap/index3.test.lua
+++ b/test/sql-tap/index3.test.lua
@@ -25,7 +25,7 @@ test:plan(2)
 test:do_execsql_test(
     "index3-1.1",
     [[
-        CREATE TABLE t1(id primary key, a);
+        CREATE TABLE t1(id  INT primary key, a INT );
         INSERT INTO t1 VALUES(1, 1);
         INSERT INTO t1 VALUES(2, 1);
         SELECT a FROM t1;
@@ -56,7 +56,7 @@ test:do_execsql_test(
     "index3-2.1",
     [[
         DROP TABLE t1;
-        CREATE TABLE t1(a, b, c, d, e, 
+        CREATE TABLE t1(a INT , b TEXT , c INT , d INT , e INT ,
                         PRIMARY KEY(a), UNIQUE(b COLLATE "unicode_ci" DESC));
         CREATE INDEX t1c ON t1(c);
         CREATE INDEX t1d ON t1(d COLLATE binary ASC);
diff --git a/test/sql-tap/index4.test.lua b/test/sql-tap/index4.test.lua
index 69b7ebcf9f106daf9cf18593d57c8cc5408cc86c..e42b0c95704366a63f2a923084d3a66002712f2e 100755
--- a/test/sql-tap/index4.test.lua
+++ b/test/sql-tap/index4.test.lua
@@ -22,7 +22,7 @@ testprefix = "index4"
 test:do_execsql_test(
     1.1,
     [[
-          CREATE TABLE t1(x primary key);
+        CREATE TABLE t1(x BLOB primary key);
         START TRANSACTION;
           INSERT INTO t1 VALUES(randomblob(102));
           INSERT INTO t1 SELECT randomblob(102) FROM t1;     --     2
@@ -78,7 +78,7 @@ test:do_execsql_test(
     1.6,
     [[
           DROP TABLE t1;
-          CREATE TABLE t1(x primary key);
+          CREATE TABLE t1(x BLOB primary key);
         START TRANSACTION;
           INSERT INTO t1 VALUES('a');
           INSERT INTO t1 VALUES('b');
@@ -107,7 +107,7 @@ test:do_execsql_test(
     [[
         --START TRANSACTION;
           DROP TABLE t1;
-          CREATE TABLE t1(x primary key);
+          CREATE TABLE t1(x TEXT primary key);
           INSERT INTO t1 VALUES('a');
         --COMMIT;
         CREATE INDEX i1 ON t1(x); 
@@ -126,7 +126,7 @@ if (1 > 0)
         [[
             --START TRANSACTION;
               DROP TABLE t1;
-              CREATE TABLE t1(x primary key);
+              CREATE TABLE t1(x INT primary key);
             --COMMIT;
             CREATE INDEX i1 ON t1(x); 
             --PRAGMA integrity_check
@@ -140,7 +140,7 @@ end
 test:do_execsql_test(
     2.1,
     [[
-          CREATE TABLE t2(id primary key, x);
+          CREATE TABLE t2(id INT primary key, x INT);
         START TRANSACTION;
           INSERT INTO t2 VALUES(1, 14);
           INSERT INTO t2 VALUES(2, 35);
diff --git a/test/sql-tap/index6.test.lua b/test/sql-tap/index6.test.lua
index af18e89d401b9bb76dbe43f8a1578e045105deb0..05385efe661759c7a90d6329cc1f219b079f4af0 100755
--- a/test/sql-tap/index6.test.lua
+++ b/test/sql-tap/index6.test.lua
@@ -24,7 +24,7 @@ test:plan(14)
 -- do_test index6-1.1 {
 --   # Able to parse and manage partial indices
 --   execsql {
---     CREATE TABLE t1(a,b,c);
+--     CREATE TABLE t1(a INT ,b INT ,c INT );
 --     CREATE INDEX t1a ON t1(a) WHERE a IS NOT NULL;
 --     CREATE INDEX t1b ON t1(b) WHERE b>10;
 --     CREATE VIRTUAL TABLE nums USING wholenumber;
@@ -117,7 +117,7 @@ test:plan(14)
 -- #
 -- do_test index6-2.1 {
 --   execsql {
---     CREATE TABLE t2(a,b);
+--     CREATE TABLE t2(a INT ,b INT );
 --     INSERT INTO t2(a,b) SELECT value, value FROM nums WHERE value<1000;
 --     UPDATE t2 SET a=NULL WHERE b%2==0;
 --     CREATE INDEX t2a1 ON t2(a) WHERE a IS NOT NULL;
@@ -182,7 +182,7 @@ test:plan(14)
 -- # Partial UNIQUE indices
 -- #
 -- do_execsql_test index6-3.1 {
---   CREATE TABLE t3(a,b);
+--   CREATE TABLE t3(a INT ,b INT );
 --   INSERT INTO t3 SELECT value, value FROM nums WHERE value<200;
 --   UPDATE t3 SET a=999 WHERE b%5!=0;
 --   CREATE UNIQUE INDEX t3a ON t3(a) WHERE a<>999;
@@ -227,7 +227,7 @@ test:do_execsql_test(
         -- </index6-6.0>
     })
 else
-    test:execsql("CREATE TABLE t6(a,b, PRIMARY KEY (a,b));")
+    test:execsql("CREATE TABLE t6(a INT ,b INT , PRIMARY KEY (a,b));")
     test:execsql("INSERT INTO t6(a,b) VALUES(123,456);")
 end
 
@@ -252,8 +252,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "index6-7.0",
     [[
-        CREATE TABLE t7a(id primary key, x);
-        CREATE TABLE t7b(id primary key, y);
+        CREATE TABLE t7a(id  INT primary key, x INT );
+        CREATE TABLE t7b(id  INT primary key, y INT );
         INSERT INTO t7a VALUES(1, 1);
         CREATE INDEX t7ax ON t7a(x);
         SELECT x,y FROM t7a LEFT JOIN t7b ON (x=99) ORDER BY x;
@@ -309,8 +309,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "index6-8.0",
     [[
-        CREATE TABLE t8a(id primary key, a,b);
-        CREATE TABLE t8b(id primary key, x,y);
+        CREATE TABLE t8a(id INT primary key, a INT,b TEXT);
+        CREATE TABLE t8b(id INT primary key, x TEXT,y INT);
         CREATE INDEX i8c ON t8b(y);
 
         INSERT INTO t8a VALUES(1, 1, 'one');
@@ -387,7 +387,7 @@ end
 test:do_execsql_test(
     "index6-10.1",
     [[
-        CREATE TABLE t10(a,b,c,d,e INTEGER PRIMARY KEY);
+        CREATE TABLE t10(a INT ,b INT ,c INT ,d INT ,e INTEGER PRIMARY KEY);
         INSERT INTO t10 VALUES
           (1,2,3,4,5),
           (2,3,4,5,6),
diff --git a/test/sql-tap/index7.test.lua b/test/sql-tap/index7.test.lua
index 7d4a5472314041ecd4519f42693b4fbe7f1512b0..03b1e7044c861bbe44370f391c3bcd4ed2ac826b 100755
--- a/test/sql-tap/index7.test.lua
+++ b/test/sql-tap/index7.test.lua
@@ -30,7 +30,7 @@ end
 -- do_test index7-1.1 {
 --   # Able to parse and manage partial indices
 --   execsql {
---     CREATE TABLE t1(a,b,c PRIMARY KEY) WITHOUT rowid;
+--     CREATE TABLE t1(a INT,b INT,c INT PRIMARY KEY) WITHOUT rowid;
 --     CREATE INDEX t1a ON t1(a) WHERE a IS NOT NULL;
 --     CREATE INDEX t1b ON t1(b) WHERE b>10;
 --     CREATE VIRTUAL TABLE nums USING wholenumber;
@@ -138,7 +138,7 @@ end
 -- #
 -- do_test index7-2.1 {
 --   execsql {
---     CREATE TABLE t2(a,b PRIMARY KEY) without rowid;
+--     CREATE TABLE t2(a INT,b INT PRIMARY KEY) without rowid;
 --     INSERT INTO t2(a,b) SELECT value, value FROM nums WHERE value<1000;
 --     UPDATE t2 SET a=NULL WHERE b%5==0;
 --     CREATE INDEX t2a1 ON t2(a) WHERE a IS NOT NULL;
@@ -203,7 +203,7 @@ end
 -- # Partial UNIQUE indices
 -- #
 -- do_execsql_test index7-3.1 {
---   CREATE TABLE t3(a,b PRIMARY KEY) without rowid;
+--   CREATE TABLE t3(a INT,b INT PRIMARY KEY) without rowid;
 --   INSERT INTO t3 SELECT value, value FROM nums WHERE value<200;
 --   UPDATE t3 SET a=999 WHERE b%5!=0;
 --   CREATE UNIQUE INDEX t3a ON t3(a) WHERE a<>999;
@@ -239,8 +239,8 @@ end
 test:do_execsql_test(
     "index7-6.1",
     [[
-        CREATE TABLE t5(id primary key, a, b);
-        CREATE TABLE t4(id primary key, c, d);
+        CREATE TABLE t5(id INT primary key, a INT, b TEXT);
+        CREATE TABLE t4(id INT primary key, c TEXT, d TEXT);
         INSERT INTO t5 VALUES(1, 1, 'xyz');
         INSERT INTO t4 VALUES(1, 'abc', 'not xyz');
         SELECT a,b,c,d FROM (SELECT a,b FROM t5 WHERE a=1 AND b='xyz'), t4 WHERE c='abc';
@@ -305,7 +305,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.1",
         [[
-            CREATE TABLE t(a,b,c, PRIMARY KEY(a));
+            CREATE TABLE t(a INT,b INT,c INT, PRIMARY KEY(a));
             CREATE INDEX i1 ON t(a, a, b, c, c, b, b, b, c, b, c);
             pragma index_info = t.i1;
         ]],
@@ -324,7 +324,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.2",
         [[
-            CREATE TABLE test4(a,b,c,d, PRIMARY KEY(a,a,a,b,c));
+            CREATE TABLE test4(a INT,b INT, c INT, d INT, PRIMARY KEY(a,a,a,b,c));
             CREATE INDEX index1 on test4(b,c,a,c);
             SELECT "_index"."name"
             FROM "_index" JOIN "_space" WHERE
@@ -341,7 +341,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.3",
         [[
-            CREATE TABLE test5(a,b,c,d, PRIMARY KEY(a), UNIQUE(a));
+            CREATE TABLE test5(a INT,b INT,c INT,d INT, PRIMARY KEY(a), UNIQUE(a));
             SELECT "_index"."name", "_index"."iid"
             FROM "_index" JOIN "_space" WHERE
                 "_index"."id" = "_space"."id" AND
@@ -357,7 +357,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.4",
         [[
-            CREATE TABLE test6(a,b,c,d, PRIMARY KEY(a), CONSTRAINT c1 UNIQUE(a));
+            CREATE TABLE test6(a INT,b INT,c INT,d INT, PRIMARY KEY(a), CONSTRAINT c1 UNIQUE(a));
             SELECT "_index"."name", "_index"."iid"
             FROM "_index" JOIN "_space" WHERE
                 "_index"."id" = "_space"."id" AND
@@ -372,7 +372,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.5",
         [[
-            CREATE TABLE test7(a,b,c,d, UNIQUE(a), PRIMARY KEY(a));
+            CREATE TABLE test7(a INT,b INT,c INT,d INT, UNIQUE(a), PRIMARY KEY(a));
             SELECT "_index"."name", "_index"."iid"
             FROM "_index" JOIN "_space" WHERE
                 "_index"."id" = "_space"."id" AND
@@ -387,7 +387,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
         "index7-8.6",
         [[
-            CREATE TABLE test8(a,b,c,d, CONSTRAINT c1 UNIQUE(a), PRIMARY KEY(a));
+            CREATE TABLE test8(a INT,b INT,c INT,d INT, CONSTRAINT c1 UNIQUE(a), PRIMARY KEY(a));
             SELECT "_index"."name", "_index"."iid"
             FROM "_index" JOIN "_space" WHERE
                 "_index"."id" = "_space"."id" AND
diff --git a/test/sql-tap/insert1.test.lua b/test/sql-tap/insert1.test.lua
index cfca0025ff5c5a5182f2031e624b9ccb3ae9beac..547430bac9bdf62c5218114b6d7b9fe6d0542120 100755
--- a/test/sql-tap/insert1.test.lua
+++ b/test/sql-tap/insert1.test.lua
@@ -213,7 +213,7 @@ end, {
 -- Test of expressions in the VALUES clause
 --
 test:do_execsql_test("insert-4.1", [[
-  CREATE TABLE t3(a PRIMARY KEY,b,c);
+  CREATE TABLE t3(a INT PRIMARY KEY,b INT,c INT);
   INSERT INTO t3 VALUES(1+2+3,4,5);
   SELECT * FROM t3;
 ]], {
@@ -286,7 +286,7 @@ test:do_execsql_test("insert-4.7", [[
 --
 -- if X(0, "X!capable", [["tempdb"]]) then
   test:do_execsql_test("insert-5.1", [[
-    CREATE TABLE t4(x PRIMARY KEY);
+    CREATE TABLE t4(x INT PRIMARY KEY);
     INSERT INTO t4 VALUES(1);
     SELECT * FROM t4;
   ]], {
@@ -362,7 +362,7 @@ test:do_execsql_test("insert-4.7", [[
   -- The REPLACE command is not available if SQLITE_OMIT_CONFLICT is 
   -- defined at compilation time.
   test:do_execsql_test("insert-6.1", [[
-    CREATE TABLE t1(a INTEGER PRIMARY KEY, b UNIQUE);
+    CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT UNIQUE);
     INSERT INTO t1 VALUES(1,2);
     INSERT INTO t1 VALUES(2,3);
     SELECT b FROM t1 WHERE b=2;
@@ -402,7 +402,7 @@ test:do_execsql_test("insert-4.7", [[
 -- # INSERT statments.
 -- do_test insert-7.1 {
 --   execsql {
---     CREATE TABLE t1(a);
+--     CREATE TABLE t1(a INT);
 --     INSERT INTO t1 VALUES(1);
 --     INSERT INTO t1 VALUES(2);
 --     CREATE INDEX i1 ON t1(a);
@@ -434,7 +434,7 @@ test:do_execsql_test("insert-4.7", [[
 -- #
 -- do_test insert-9.1 {
 --   execsql {
---     CREATE TABLE t5(x);
+--     CREATE TABLE t5(x INT);
 --     INSERT INTO t5 VALUES(1);
 --     INSERT INTO t5 VALUES(2);
 --     INSERT INTO t5 VALUES(3);
@@ -445,7 +445,7 @@ test:do_execsql_test("insert-4.7", [[
 -- MUST_WORK_TEST
 -- do_test insert-9.2 {
 --   execsql {
---     CREATE TABLE t6(x INTEGER PRIMARY KEY, y);
+--     CREATE TABLE t6(x INTEGER PRIMARY KEY, y INT);
 --     INSERT INTO t6 VALUES(1,1);
 --     INSERT INTO t6 VALUES(2,2);
 --     INSERT INTO t6 VALUES(3,3);
@@ -457,7 +457,7 @@ test:do_execsql_test("insert-4.7", [[
 --
 -- if X(0, "X!capable", [["compound"]]) then
   test:do_execsql_test("insert-10.1", [[
-    CREATE TABLE t10(a PRIMARY KEY,b,c);
+    CREATE TABLE t10(a  INT PRIMARY KEY,b INT,c INT);
     INSERT INTO t10 VALUES(1,2,3), (4,5,6), (7,8,9);
     SELECT * FROM t10;
   ]], {
@@ -480,7 +480,7 @@ test:do_execsql_test("insert-4.7", [[
 -- #
 -- do_execsql_test insert-11.1 {
 --   CREATE TABLE t11a AS SELECT '123456789' AS x;
---   CREATE TABLE t11b (a INTEGER PRIMARY KEY, b, c);
+--   CREATE TABLE t11b (a INTEGER PRIMARY KEY, b INT, c INT);
 --   INSERT INTO t11b SELECT x, x, x FROM t11a;
 --   SELECT quote(a), quote(b), quote(c) FROM t11b;
 -- } {123456789 '123456789' '123456789'}
@@ -488,9 +488,9 @@ test:do_execsql_test("insert-4.7", [[
 -- # Ticket http://www.sqlite.org/src/info/e9654505cfda9361
 -- #
 -- do_execsql_test insert-12.1 {
---   CREATE TABLE t12a(a,b,c,d,e,f,g);
+--   CREATE TABLE t12a(a INT,b INT,c INT,d INT,e INT,f INT,g INT);
 --   INSERT INTO t12a VALUES(101,102,103,104,105,106,107);
---   CREATE TABLE t12b(x);
+--   CREATE TABLE t12b(x INT);
 --   INSERT INTO t12b(x,rowid,x,x,x,x,x) SELECT * FROM t12a;
 --   SELECT rowid, x FROM t12b;
 -- } {102 101}
@@ -501,7 +501,7 @@ test:do_execsql_test("insert-4.7", [[
 --   SELECT * FROM tab1;
 -- } {11 22}
 -- do_execsql_test insert-12.3 {
---   CREATE TABLE t12c(a, b DEFAULT 'xyzzy', c);
+--   CREATE TABLE t12c(a INT, b INT DEFAULT 'xyzzy', c INT);
 --   INSERT INTO t12c(a, rowid, c) SELECT 'one', 999, 'two';
 --   SELECT * FROM t12c;
 -- } {one xyzzy two}
@@ -511,7 +511,7 @@ test:do_execsql_test("insert-4.7", [[
 test:do_execsql_test(
     "insert-13.0",
     [[
-        create table test(a primary key, b)
+        create table test(a  INT primary key, b INT )
     ]])
 
 test:do_catchsql_test(
diff --git a/test/sql-tap/insert3.test.lua b/test/sql-tap/insert3.test.lua
index c0e9d9556a8e8263ef01d1e56f3a75942f12ebd9..720f5d7deb0808135e0733e91d3dba2f54c831fc 100755
--- a/test/sql-tap/insert3.test.lua
+++ b/test/sql-tap/insert3.test.lua
@@ -28,8 +28,8 @@ test:plan(18)
 test:do_execsql_test(
     "insert3-1.0",
     [[
-            CREATE TABLE t1(rowid INTEGER PRIMARY KEY AUTOINCREMENT, a,b);
-            CREATE TABLE log(rowid INTEGER PRIMARY KEY AUTOINCREMENT, x UNIQUE, y);
+            CREATE TABLE t1(rowid INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT );
+            CREATE TABLE log(rowid INTEGER PRIMARY KEY AUTOINCREMENT, x  INT UNIQUE, y INT );
             CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
               UPDATE log SET y=y+1 WHERE x=new.a;
               INSERT OR IGNORE INTO log(x, y) VALUES(new.a, 1);
@@ -57,7 +57,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "insert3-1.2",
     [[
-            CREATE TABLE log2(rowid INTEGER PRIMARY KEY AUTOINCREMENT, x UNIQUE,y);
+            CREATE TABLE log2(rowid INTEGER PRIMARY KEY AUTOINCREMENT, x  INT UNIQUE,y INT );
             CREATE TRIGGER r2 BEFORE INSERT ON t1 BEGIN
               UPDATE log2 SET y=y+1 WHERE x=new.b;
               INSERT OR IGNORE INTO log2(x, y) VALUES(new.b,1);
@@ -121,10 +121,10 @@ test:do_execsql_test(
     [[
             CREATE TABLE t2(
               a INTEGER PRIMARY KEY AUTOINCREMENT,
-              b DEFAULT 'b',
-              c DEFAULT 'c'
+              b  INT DEFAULT 'b',
+              c  INT DEFAULT 'c'
             );
-            CREATE TABLE t2dup(rowid INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c);
+            CREATE TABLE t2dup(rowid INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT );
             CREATE TRIGGER t2r1 BEFORE INSERT ON t2 BEGIN
               INSERT INTO t2dup(a,b,c) VALUES(new.a,new.b,new.c);
             END;
@@ -157,7 +157,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "insert3-3.1",
     [[
-            CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c);
+            CREATE TABLE t3(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT );
             CREATE TRIGGER t3r1 BEFORE INSERT on t3 WHEN nosuchcol BEGIN
               SELECT 'illegal WHEN clause';
             END;
@@ -179,7 +179,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "insert3-3.3",
     [[
-            CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a,b,c);
+            CREATE TABLE t4(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT ,b INT ,c INT );
             CREATE TRIGGER t4r1 AFTER INSERT on t4 WHEN nosuchcol BEGIN
               SELECT 'illegal WHEN clause';
             END;
@@ -209,7 +209,7 @@ test:do_execsql_test(
     [[
             CREATE TABLE t5(
               a INTEGER PRIMARY KEY AUTOINCREMENT,
-              b DEFAULT 'xyz'
+              b  INT DEFAULT 'xyz'
             );
             INSERT INTO t5 DEFAULT VALUES;
             SELECT * FROM t5;
@@ -233,7 +233,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "insert3-3.7",
     [[
-            CREATE TABLE t6(id INTEGER PRIMARY KEY AUTOINCREMENT, x,y DEFAULT 4.3, z DEFAULT x'6869');
+            CREATE TABLE t6(id INTEGER PRIMARY KEY AUTOINCREMENT, x INT ,y  INT DEFAULT 4.3, z  INT DEFAULT x'6869');
             INSERT INTO t6 DEFAULT VALUES;
             SELECT * FROM t6;
     ]], {
@@ -273,7 +273,7 @@ test:drop_all_tables()
 --         "insert3-4.1",
 --         function()
 --             test:execsql([[
---                 CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c);
+--                 CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a INT , b INT , c INT );
 --                 CREATE INDEX i1 ON t1(a, b);
 --                 BEGIN;
 --                 INSERT INTO t1 (a,b,c)VALUES(randstr(10,400),randstr(10,400),randstr(10,400));
diff --git a/test/sql-tap/intpkey.test.lua b/test/sql-tap/intpkey.test.lua
index 35a436ef80a9ba518a388f51bec90410ec968ca1..132d9a37fb33741e6858f56d181e89110e64b31d 100755
--- a/test/sql-tap/intpkey.test.lua
+++ b/test/sql-tap/intpkey.test.lua
@@ -27,7 +27,7 @@ test:plan(39)
 test:do_execsql_test(
     "intpkey-1.0",
     [[
-        CREATE TABLE t1(a TEXT PRIMARY KEY, b, c);
+        CREATE TABLE t1(a TEXT PRIMARY KEY, b INT, c INT);
     ]], {
         -- <intpkey-1.0>
         
@@ -53,7 +53,7 @@ test:do_execsql_test(
     "intpkey-1.2",
     [[
         DROP TABLE t1;
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c TEXT);
         --SELECT name FROM sqlite_master
         --  WHERE type='index' AND tbl_name='t1';
     ]], {
@@ -660,7 +660,7 @@ if (0 > 0) then
 test:do_execsql_test(
     "intpkey-8.1",
     [[
-        CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z);
+        CREATE TABLE t2(x INTEGER PRIMARY KEY, y INT, z INT);
         INSERT INTO t2 SELECT * FROM t1;
         --SELECT rowid FROM t2;
         SELECT x FROM t2;
@@ -701,7 +701,7 @@ if (0 > 0)
         "intpkey-10.1",
         [[
             DROP TABLE t2;
-            CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z);
+            CREATE TABLE t2(x INTEGER PRIMARY KEY, y INT, z INT);
             INSERT INTO t2 VALUES(NULL, 1, 2);
             SELECT * from t2;
         ]], {
@@ -777,7 +777,7 @@ test:do_execsql_test(
         SELECT * FROM t1 WHERE a=1;
     ]], {
         -- <intpkey-13.2>
-        1, 2, 3
+        1, "2", "3"
         -- </intpkey-13.2>
     })
 
diff --git a/test/sql-tap/join.test.lua b/test/sql-tap/join.test.lua
index ac05a98b234a429694fd86017ffb90a34e049b0a..4e4ec64222d9cce6dd0feb2fa809d097cd56390f 100755
--- a/test/sql-tap/join.test.lua
+++ b/test/sql-tap/join.test.lua
@@ -24,7 +24,7 @@ test:plan(92)
 test:do_execsql_test(
     "join-1.1",
     [[
-        CREATE TABLE t1(a primary key,b,c);
+        CREATE TABLE t1(a INT primary key,b INT,c INT);
         INSERT INTO t1 VALUES(1,2,3);
         INSERT INTO t1 VALUES(2,3,4);
         INSERT INTO t1 VALUES(3,4,5);
@@ -38,7 +38,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join-1.2",
     [[
-        CREATE TABLE t2(b primary key,c,d);
+        CREATE TABLE t2(b INT primary key,c INT,d INT);
         INSERT INTO t2 VALUES(1,2,3);
         INSERT INTO t2 VALUES(2,3,4);
         INSERT INTO t2 VALUES(3,4,5);
@@ -348,7 +348,7 @@ test:do_execsql2_test(
 test:do_execsql_test(
     "join-1.15",
     [[
-        CREATE TABLE t3(c primary key,d,e);
+        CREATE TABLE t3(c INT primary key,d INT,e INT);
         INSERT INTO t3 VALUES(2,3,4);
         INSERT INTO t3 VALUES(3,4,5);
         INSERT INTO t3 VALUES(4,5,6);
@@ -382,7 +382,7 @@ test:do_execsql2_test(
 test:do_execsql_test(
     "join-1.18",
     [[
-        CREATE TABLE t4(d primary key,e,f);
+        CREATE TABLE t4(d INT primary key,e INT,f INT);
         INSERT INTO t4 VALUES(2,3,4);
         INSERT INTO t4 VALUES(3,4,5);
         INSERT INTO t4 VALUES(4,5,6);
@@ -708,8 +708,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "join-5.1",
     [[
-        create table centros (id integer primary key, centro);
-        create table usuarios (id integer primary key, nombre, apellidos,
+        create table centros (id integer primary key, centro TEXT);
+        create table usuarios (id integer primary key, nombre TEXT, apellidos TEXT,
         idcentro integer);
         START TRANSACTION;
         INSERT INTO centros VALUES(1,'xxx');
@@ -733,7 +733,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join-7.1",
     [[
-        CREATE TABLE t7 (id primary key, x, y);
+        CREATE TABLE t7 (id INT primary key, x TEXT, y INT);
         INSERT INTO t7 VALUES (1, 'pa1', 1);
         INSERT INTO t7 VALUES (2, 'pa2', NULL);
         INSERT INTO t7 VALUES (3, 'pa3', NULL);
@@ -742,7 +742,7 @@ test:do_execsql_test(
         INSERT INTO t7 VALUES (6, 'pa31', 130);
         INSERT INTO t7 VALUES (7, 'pa28', NULL);
 
-        CREATE TABLE t8 (a integer primary key, b);
+        CREATE TABLE t8 (a integer primary key, b TEXT);
         INSERT INTO t8 VALUES (1, 'pa1');
         INSERT INTO t8 VALUES (2, 'pa4');
         INSERT INTO t8 VALUES (3, NULL);
@@ -765,13 +765,13 @@ test:do_execsql_test(
 -- do_test join-8.1 {
 --   execsql {
 --     BEGIN;
---     CREATE TABLE t9(a INTEGER PRIMARY KEY, b);
+--     CREATE TABLE t9(a INTEGER PRIMARY KEY, b INT);
 --     INSERT INTO t9 VALUES(1,11);
 --     INSERT INTO t9 VALUES(2,22);
---     CREATE TABLE t10(x INTEGER PRIMARY KEY, y);
+--     CREATE TABLE t10(x INTEGER PRIMARY KEY, y INT);
 --     INSERT INTO t10 VALUES(1,2);
 --     INSERT INTO t10 VALUES(3,3);    
---     CREATE TABLE t11(p INTEGER PRIMARY KEY, q);
+--     CREATE TABLE t11(p INTEGER PRIMARY KEY, q INT);
 --     INSERT INTO t11 VALUES(2,111);
 --     INSERT INTO t11 VALUES(3,333);    
 --     CREATE VIEW v10_11 AS SELECT x, q FROM t10, t11 WHERE t10.y=t11.p;
@@ -816,8 +816,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join-9.1",
     [[
-        CREATE TABLE t12(a primary key,b);
-        CREATE TABLE t13(b primary key,c);
+        CREATE TABLE t12(a INT primary key,b INT);
+        CREATE TABLE t13(b INT primary key,c INT);
         START TRANSACTION;
         INSERT INTO t12 VALUES(1,11);
         INSERT INTO t12 VALUES(2,22);
@@ -863,8 +863,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join-10.1",
     [[
-        CREATE TABLE t21(a primary key,b,c);
-        CREATE TABLE t22(p primary key,q);
+        CREATE TABLE t21(a INT primary key,b INT,c INT);
+        CREATE TABLE t22(p INT primary key,q INT);
         CREATE INDEX i22 ON t22(q);
         SELECT a FROM t21 LEFT JOIN t22 ON b=p WHERE q=
            (SELECT max(m.q) FROM t22 m JOIN t21 n ON n.b=m.p WHERE n.c=1);
@@ -881,8 +881,8 @@ test:do_test(
     "join-10.2",
     function()
         test:execsql [[
-            CREATE TABLE t23(a primary key, b, c);
-            CREATE TABLE t24(a primary key, b, c);
+            CREATE TABLE t23(a INT primary key, b INT, c INT);
+            CREATE TABLE t24(a INT primary key, b INT, c INT);
             INSERT INTO t23 VALUES(1, 2, 3);
         ]]
         return test:execsql [[
@@ -980,8 +980,8 @@ test:do_test(
             DROP TABLE IF EXISTS t2;
         ]]
         return test:execsql [[
-            CREATE TABLE t1(id primary key, a COLLATE "unicode_ci", b);
-            CREATE TABLE t2(id primary key, a, b);
+            CREATE TABLE t1(id INT primary key, a TEXT COLLATE "unicode_ci", b INT);
+            CREATE TABLE t2(id INT primary key, a TEXT, b INT);
             INSERT INTO t1 VALUES(1, 'ONE', 1);
             INSERT INTO t1 VALUES(2, 'two', 2);
             INSERT INTO t2 VALUES(1, 'one', 1);
@@ -1015,8 +1015,8 @@ test:do_test(
             DROP TABLE IF EXISTS t2;
         ]]
         return test:execsql [[
-            CREATE TABLE t1(a primary key, b TEXT);
-            CREATE TABLE t2(b INTEGER primary key, a);
+            CREATE TABLE t1(a TEXT primary key, b TEXT);
+            CREATE TABLE t2(b INTEGER primary key, a TEXT);
             INSERT INTO t1 VALUES('one', '1.0');
             INSERT INTO t1 VALUES('two', '2');
             INSERT INTO t2 VALUES(1, 'one');
@@ -1054,7 +1054,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join-12.1",
     [[
-        CREATE TABLE t14(x primary key);
+        CREATE TABLE t14(x TEXT primary key);
         INSERT INTO t14 VALUES('abcdefghij');
     ]])
 
@@ -1092,9 +1092,9 @@ jointest("join-12.13", 65537, {1, 'at most 64 tables in a join'})
 test:do_execsql_test(
     "join-13.0",
     [[
-        CREATE TABLE aa(a primary key);
-        CREATE TABLE bb(b primary key);
-        CREATE TABLE cc(id primary key, c);
+        CREATE TABLE aa(a INT primary key);
+        CREATE TABLE bb(b INT primary key);
+        CREATE TABLE cc(id INT primary key, c INT);
 
         INSERT INTO aa VALUES(45);
         INSERT INTO cc VALUES(1, 45);
diff --git a/test/sql-tap/join2.test.lua b/test/sql-tap/join2.test.lua
index c89331afcff6b50eb48751649ea9e892bc9fc329..c8b17bd7e2163dc0a1c7dd6555f4b74996080e9f 100755
--- a/test/sql-tap/join2.test.lua
+++ b/test/sql-tap/join2.test.lua
@@ -23,7 +23,7 @@ test:plan(7)
 test:do_execsql_test(
     "join2-1.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b INT);
         INSERT INTO t1 VALUES(1,11);
         INSERT INTO t1 VALUES(2,22);
         INSERT INTO t1 VALUES(3,33);
@@ -37,7 +37,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join2-1.2",
     [[
-        CREATE TABLE t2(b primary key,c);
+        CREATE TABLE t2(b INT primary key,c INT);
         INSERT INTO t2 VALUES(11,111);
         INSERT INTO t2 VALUES(33,333);
         INSERT INTO t2 VALUES(44,444);
@@ -51,7 +51,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "join2-1.3",
     [[
-        CREATE TABLE t3(c primary key,d);
+        CREATE TABLE t3(c INT primary key,d INT);
         INSERT INTO t3 VALUES(111,1111);
         INSERT INTO t3 VALUES(444,4444);
         INSERT INTO t3 VALUES(555,5555);
diff --git a/test/sql-tap/join3.test.lua b/test/sql-tap/join3.test.lua
index ee2f261e8d27f2a736e903784bcd2de90af5c3bf..ae091d165af515ad994c5d40e1a3b24dac8ecf14 100755
--- a/test/sql-tap/join3.test.lua
+++ b/test/sql-tap/join3.test.lua
@@ -34,7 +34,7 @@ for N=1, bitmask_size do
     test:do_test(
         "join3-1."..N,
         function()
-            test:execsql("CREATE TABLE t"..N.."(x primary key);")
+            test:execsql("CREATE TABLE t"..N.."(x INT primary key);")
             test:execsql(string.format("INSERT INTO t%s VALUES(%s)", N, N))
             sql = "SELECT * FROM t1"
             -- for _ in X(0, "X!for", [=[["set i 2","$i<=$N","incr i"]]=]) do
diff --git a/test/sql-tap/join5.test.lua b/test/sql-tap/join5.test.lua
index 93f44c5049d73428baa04703d79bc2c5bdc7e131..79006a29e2c2047d9236dab6a04dbab28a50b978 100755
--- a/test/sql-tap/join5.test.lua
+++ b/test/sql-tap/join5.test.lua
@@ -25,8 +25,8 @@ test:do_execsql_test(
     "join5-1.1",
     [[
         CREATE TABLE t1(a integer primary key, b integer, c integer);
-        CREATE TABLE t2(x integer primary key, y);
-        CREATE TABLE t3(p integer primary key, q);
+        CREATE TABLE t2(x integer primary key, y TEXT);
+        CREATE TABLE t3(p integer primary key, q TEXT);
         START TRANSACTION;
         INSERT INTO t3 VALUES(11,'t3-11');
         INSERT INTO t3 VALUES(12,'t3-12');
@@ -90,11 +90,11 @@ test:do_test(
     "join5-2.1",
     function()
         test:execsql [[
-            CREATE TABLE ab(a primary key,b);
+            CREATE TABLE ab(a  INT primary key,b INT );
             INSERT INTO ab VALUES(1,2);
             INSERT INTO ab VALUES(3,NULL);
 
-            CREATE TABLE xy(x,y primary key);
+            CREATE TABLE xy(x INT ,y  INT primary key);
             INSERT INTO xy VALUES(2,3);
             INSERT INTO xy VALUES(NULL,1);
         ]]
@@ -224,10 +224,10 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE x1(a primary key);
+        CREATE TABLE x1(a  INT primary key);
         INSERT INTO x1 VALUES(1);
-        CREATE TABLE x2(b NOT NULL primary key);
-        CREATE TABLE x3(c primary key, d);
+        CREATE TABLE x2(b TEXT NOT NULL primary key);
+        CREATE TABLE x3(c TEXT primary key, d TEXT);
         INSERT INTO x3 VALUES('a', NULL);
         INSERT INTO x3 VALUES('b', NULL);
         INSERT INTO x3 VALUES('c', NULL);
@@ -276,10 +276,10 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS x1;
         DROP TABLE IF EXISTS x2;
         DROP TABLE IF EXISTS x3;
-        CREATE TABLE x1(a primary key);
+        CREATE TABLE x1(a  INT primary key);
         INSERT INTO x1 VALUES(1);
-        CREATE TABLE x2(b NOT NULL primary key);
-        CREATE TABLE x3(c primary key, d);
+        CREATE TABLE x2(b TEXT NOT NULL primary key);
+        CREATE TABLE x3(c TEXT primary key, d INT );
         INSERT INTO x3 VALUES('a', NULL);
         INSERT INTO x3 VALUES('b', NULL);
         INSERT INTO x3 VALUES('c', NULL);
diff --git a/test/sql-tap/join6.test.lua b/test/sql-tap/join6.test.lua
index 27480b723f8f5e88f3095a0fce51bef36e222118..896f61960c04af32c6c4846db276da72d12047ff 100755
--- a/test/sql-tap/join6.test.lua
+++ b/test/sql-tap/join6.test.lua
@@ -28,9 +28,9 @@ test:plan(14)
 test:do_execsql_test(
     "join6-1.1",
     [[
-        CREATE TABLE t1(a primary key);
-        CREATE TABLE t2(a primary key);
-        CREATE TABLE t3(a primary key,b);
+        CREATE TABLE t1(a INT primary key);
+        CREATE TABLE t2(a INT primary key);
+        CREATE TABLE t3(a INT primary key,b INT);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t3 VALUES(1,2);
 
@@ -70,9 +70,9 @@ test:do_execsql_test(
         DROP TABLE t2;
         DROP TABLE t3;
 
-        CREATE TABLE t1(x primary key,y);
-        CREATE TABLE t2(y primary key,z);
-        CREATE TABLE t3(x primary key,z);
+        CREATE TABLE t1(x INT primary key,y INT);
+        CREATE TABLE t2(y INT primary key,z INT);
+        CREATE TABLE t3(x INT primary key,z INT);
 
         INSERT INTO t1 VALUES(1,2);
         INSERT INTO t1 VALUES(3,4);
@@ -107,15 +107,15 @@ test:do_execsql_test(
         DROP TABLE t2;
         DROP TABLE t3;
 
-        CREATE TABLE t1(a primary key,x,y);
+        CREATE TABLE t1(a INT primary key,x INT,y INT);
         INSERT INTO t1 VALUES(1,91,92);
         INSERT INTO t1 VALUES(2,93,94);
 
-        CREATE TABLE t2(b primary key,y,z);
+        CREATE TABLE t2(b INT primary key,y INT,z INT);
         INSERT INTO t2 VALUES(3,92,93);
         INSERT INTO t2 VALUES(4,94,95);
 
-        CREATE TABLE t3(c primary key,x,z);
+        CREATE TABLE t3(c INT primary key,x INT,z INT);
         INSERT INTO t3 VALUES(5,91,93);
         INSERT INTO t3 VALUES(6,99,95);
 
diff --git a/test/sql-tap/keyword1.test.lua b/test/sql-tap/keyword1.test.lua
index fbcd173273dc47905a8ddab794246a70a53c7814..6895dc16ed2f762a02ac74fb38f11c4ce278366a 100755
--- a/test/sql-tap/keyword1.test.lua
+++ b/test/sql-tap/keyword1.test.lua
@@ -20,7 +20,7 @@ test:plan(175)
 -- ["set","testdir",[["file","dirname",["argv0"]]]]
 -- ["source",[["testdir"],"\/tester.tcl"]]
 test:execsql [[
-    CREATE TABLE t1(a PRIMARY KEY, b);
+    CREATE TABLE t1(a INT PRIMARY KEY, b TEXT);
     INSERT INTO t1 VALUES(1, 'one');
     INSERT INTO t1 VALUES(2, 'two');
     INSERT INTO t1 VALUES(3, 'three');
@@ -200,9 +200,9 @@ for _, kw in ipairs(kwlist) do
         "keyword1-"..kw..".1",
         function()
             if (kw == "if") then
-                test:execsql( string.format([[CREATE TABLE "%s"(%s %s PRIMARY KEY)]], kw:upper(), kw, kw))
+                test:execsql( string.format([[CREATE TABLE "%s"(%s %s PRIMARY KEY)]], kw:upper(), kw, 'INT'))
             else
-                test:execsql(string.format("CREATE TABLE %s(%s %s PRIMARY KEY)", kw, kw, kw))
+                test:execsql(string.format("CREATE TABLE %s(%s %s PRIMARY KEY)", kw, kw, 'INT'))
             end
             test:execsql("INSERT INTO "..kw.." VALUES(99)")
             test:execsql("INSERT INTO "..kw.." SELECT a FROM t1")
diff --git a/test/sql-tap/like2.test.lua b/test/sql-tap/like2.test.lua
index abcac39fbd1d2c89f9649eb512f1bff5fedca583..0e7ebdfd6cf00fbc44d64ee169e5396c05e84fd5 100755
--- a/test/sql-tap/like2.test.lua
+++ b/test/sql-tap/like2.test.lua
@@ -25,7 +25,7 @@ test:do_test(
     "like2-1.1",
     function()
         return test:execsql [=[
-            CREATE TABLE t1(x INT PRIMARY KEY, y COLLATE "unicode_ci");
+            CREATE TABLE t1(x INT PRIMARY KEY, y  TEXT COLLATE "unicode_ci");
             INSERT INTO t1(x,y) VALUES(1,CAST(x'01' AS TEXT));
             INSERT INTO t1(x,y) VALUES(2,CAST(x'02' AS TEXT));
             INSERT INTO t1(x,y) VALUES(3,CAST(x'03' AS TEXT));
@@ -165,7 +165,7 @@ test:do_test(
     "like2-1.2",
     function()
         return test:execsql [[
-            CREATE TABLE t2(x INT PRIMARY KEY, y COLLATE "unicode_ci");
+            CREATE TABLE t2(x INT PRIMARY KEY, y  TEXT COLLATE "unicode_ci");
             INSERT INTO t2 SELECT * FROM t1;
             CREATE INDEX i2 ON t2(y);
             SELECT count(*) FROM t2;
@@ -180,7 +180,7 @@ test:do_test(
     "like2-1.3",
     function()
         return test:execsql [[
-            CREATE TABLE t3(x INT PRIMARY KEY, y COLLATE "unicode_ci");
+            CREATE TABLE t3(x INT PRIMARY KEY, y  TEXT COLLATE "unicode_ci");
             INSERT INTO t3 SELECT x, 'abc' || y || 'xyz' FROM t1;
             CREATE INDEX i3 ON t3(y);
             SELECT count(*) FROM t2;
diff --git a/test/sql-tap/like3.test.lua b/test/sql-tap/like3.test.lua
index 505d2fabb0f0e3c89e1b925cb3420b4aea658f26..ea6824ba7a8048298e89f1701205c50c89b17353 100755
--- a/test/sql-tap/like3.test.lua
+++ b/test/sql-tap/like3.test.lua
@@ -35,14 +35,14 @@ test:plan(7)
 
 test:execsql([[
     --PRAGMA encoding='UTF8';
-    CREATE TABLE t1(a PRIMARY KEY,b TEXT COLLATE "unicode_ci");
+    CREATE TABLE t1(a INT PRIMARY KEY,b TEXT COLLATE "unicode_ci");
     INSERT INTO t1(a,b)
        VALUES(1,'abc'),
              (2,'ABX'),
              (3,'BCD'),
-             (4,x'616263'),
-             (5,x'414258'),
-             (6,x'424344');
+             (4, char(0x61, 0x62, 0x63)),
+             (5, char(0x41, 0x42, 0x58)),
+             (6, char(0x42, 0x43, 0x44));
     CREATE INDEX t1ba ON t1(b,a);
 ]])
 
@@ -70,7 +70,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "like3-2.0",
     [[
-        CREATE TABLE t2(a PRIMARY KEY, b TEXT);
+        CREATE TABLE t2(a INT PRIMARY KEY, b TEXT);
         INSERT INTO t2 SELECT a, b FROM t1;
         CREATE INDEX t2ba ON t2(b,a);
         SELECT a, b FROM t2 WHERE b GLOB 'ab*' ORDER BY +a;
diff --git a/test/sql-tap/limit.test.lua b/test/sql-tap/limit.test.lua
index 2293107c5e702fba8c9f15b2e5ceb2a4eb0d3a4b..062ba4e38572f57ee23a9c207e24601e0715252b 100755
--- a/test/sql-tap/limit.test.lua
+++ b/test/sql-tap/limit.test.lua
@@ -23,7 +23,7 @@ test:plan(103)
 -- Build some test data
 --
 test:execsql [[
-    CREATE TABLE t1(id primary key, x int, y int);
+    CREATE TABLE t1(id INT primary key, x int, y int);
     START TRANSACTION;
 ]]
 for i=1,32 do
@@ -233,7 +233,7 @@ test:do_test(
     "limit-4.1",
     function()
         return test:execsql [[
-            CREATE TABLE t3(x primary KEY);
+            CREATE TABLE t3(x INT primary KEY);
             START TRANSACTION;
             INSERT INTO t3 SELECT x FROM t1 ORDER BY x LIMIT 10 OFFSET 1;
             INSERT INTO t3 SELECT x+(SELECT max(x) FROM t3) FROM t3;
@@ -282,7 +282,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "limit-5.1",
     [[
-        CREATE TABLE t5(id primary key, x, y);
+        CREATE TABLE t5(id INT primary key, x INT, y INT);
         INSERT INTO t5 SELECT id, x-y, x+y FROM t1 WHERE x BETWEEN 10 AND 15
             ORDER BY x LIMIT 2;
         SELECT x, y FROM t5 ORDER BY x;
@@ -346,7 +346,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "limit-6.1",
     [[
-        CREATE TABLE t6(a primary key);
+        CREATE TABLE t6(a INT primary key);
         START TRANSACTION;
         INSERT INTO t6 VALUES(1);
         INSERT INTO t6 VALUES(2);
@@ -568,7 +568,7 @@ test:do_execsql_test(
     "limit-9.2.1",
     [[
         --CREATE TABLE t7 AS SELECT * FROM t6;
-        CREATE TABLE t7 (a primary key);
+        CREATE TABLE t7 (a INT primary key);
         INSERT INTO t7 SELECT * FROM t6;
     ]], {
         -- <limit-9.2.1>
@@ -757,7 +757,7 @@ test:do_test(
     "limit-13.1",
     function()
         return test:execsql [[
-            CREATE TABLE t13(x primary key);
+            CREATE TABLE t13(x INT primary key);
             INSERT INTO t13 VALUES(1),(2);
             CREATE VIEW v13a AS SELECT x AS y FROM t13;
             CREATE VIEW v13b AS SELECT y AS z FROM v13a UNION ALL SELECT y+10 FROM v13a;
diff --git a/test/sql-tap/minmax2.test.lua b/test/sql-tap/minmax2.test.lua
index fbb002f36e2e3d880582fde22ca271233b9e96aa..1c67e0dad90da387437bb83b3b0d4318566093da 100755
--- a/test/sql-tap/minmax2.test.lua
+++ b/test/sql-tap/minmax2.test.lua
@@ -26,7 +26,7 @@ test:plan(49)
 test:do_execsql_test(
     "minmax2-1.0",
     [[
-        CREATE TABLE t1(id PRIMARY KEY, x, y);
+        CREATE TABLE t1(id  INT PRIMARY KEY, x INT , y INT );
         START TRANSACTION;
         INSERT INTO t1 VALUES(1, 1,1);
         INSERT INTO t1 VALUES(2, 2,2);
@@ -146,7 +146,7 @@ test:do_test(
     "minmax2-2.0",
     function()
         test:execsql [[
-            CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+            CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT );
             INSERT INTO t2 SELECT x, y FROM t1;
         ]]
         sql_search_count = box.sql.debug().sql_search_count
@@ -476,7 +476,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "minmax2-10.1",
     [[
-        CREATE TABLE t6(id primary key, x);
+        CREATE TABLE t6(id  INT primary key, x INT );
         INSERT INTO t6 VALUES(1, 1);
         INSERT INTO t6 VALUES(2, 2);
         INSERT INTO t6 VALUES(3, NULL);
diff --git a/test/sql-tap/minmax3.test.lua b/test/sql-tap/minmax3.test.lua
index d44ddabe1c9609388821d3934e2901caa99bc245..1ddf39ff50047bb0dede6456bf8edb9cb715287f 100755
--- a/test/sql-tap/minmax3.test.lua
+++ b/test/sql-tap/minmax3.test.lua
@@ -46,7 +46,7 @@ test:do_test(
     "minmax3-1.0",
     function()
         test:execsql [[
-            CREATE TABLE t1(id primary key, x, y, z)
+            CREATE TABLE t1(id  INT primary key, x TEXT, y TEXT, z TEXT)
         ]]
         -- db close
         -- set_file_format 4
@@ -284,7 +284,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "minmax3-2.1",
     [[
-        CREATE TABLE t2(id primary key, a, b);
+        CREATE TABLE t2(id  INT primary key, a INT , b INT );
         CREATE INDEX i3 ON t2(a, b);
         INSERT INTO t2 VALUES(1, 1, NULL);
         INSERT INTO t2 VALUES(2, 1, 1);
@@ -377,7 +377,7 @@ test:do_execsql_test(
     "minmax3-3.1",
     [[
         DROP TABLE t2;
-        CREATE TABLE t2(id primary key, a, b);
+        CREATE TABLE t2(id  INT primary key, a INT , b INT );
         CREATE INDEX i3 ON t2(a, b DESC);
         INSERT INTO t2 VALUES(1, 1, NULL);
         INSERT INTO t2 VALUES(2, 1, 1);
@@ -469,7 +469,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "minmax3-4.1",
     [[
-        CREATE TABLE t4(x primary key);
+        CREATE TABLE t4(x TEXT primary key);
         INSERT INTO t4 VALUES('abc');
         INSERT INTO t4 VALUES('BCD');
         SELECT max(x) FROM t4;
diff --git a/test/sql-tap/minmax4.test.lua b/test/sql-tap/minmax4.test.lua
index d17ce8dfdaf21198d3d69a1c7aa4d7cd8ecf64a2..b600c9bfe2dbab7d5e873dcf078bed08f29ca902 100755
--- a/test/sql-tap/minmax4.test.lua
+++ b/test/sql-tap/minmax4.test.lua
@@ -29,7 +29,7 @@ test:do_test(
     "minmax4-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(p primary key,q);
+            CREATE TABLE t1(p INT primary key,q INT);
             SELECT p, max(q) FROM t1;
         ]]
     end, {
@@ -217,7 +217,7 @@ test:do_test(
     "minmax4-2.1",
     function()
         return test:execsql [[
-            CREATE TABLE t2(a,b,c primary key);
+            CREATE TABLE t2(a INT,b INT,c INT primary key);
             INSERT INTO t2 VALUES
                  (1,null,2),
                  (1,2,3),
diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua
index cd7792da9c6b45d8fe9ce0fd2ffb63d8942e3209..73506ded161fe525f0e47ba1c54cd14ded97e03d 100755
--- a/test/sql-tap/misc1.test.lua
+++ b/test/sql-tap/misc1.test.lua
@@ -28,7 +28,7 @@ test:plan(59)
 test:do_test(
     "misc1-1.1",
     function()
-        local cmd = "CREATE TABLE manycol(id primary key, x0 text"
+        local cmd = "CREATE TABLE manycol(id  INT primary key, x0 text"
         for i = 1, 99, 1 do
             cmd = cmd .. ",x"..i.." text"
         end
@@ -217,7 +217,7 @@ test:do_test(
     "misc1-3.1",
     function()
         local r = test:execsql([[
-            CREATE TABLE t1(a primary KEY);
+            CREATE TABLE t1(a TEXT primary KEY);
             INSERT INTO t1 VALUES('hi');
             PRAGMA full_column_names=on;
             --SELECT rowid, * FROM t1;
@@ -237,7 +237,7 @@ test:do_test(
 test:do_execsql_test(
     "misc1-4.1",
     [[
-        CREATE TABLE t2(a primary key);
+        CREATE TABLE t2(a TEXT primary key);
         START TRANSACTION;
         INSERT INTO t2 VALUES('This is a long string to use up a lot of disk -');
         UPDATE t2 SET a=a||a||a||a;
@@ -262,7 +262,7 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "misc1-5.1",
     [[
-        CREATE TABLE t3(a primary key,b);
+        CREATE TABLE t3(a  INT primary key,b INT );
         INSERT INTO t3 VALUES(1,2);
         INSERT INTO t3 VALUES(3,4);
         UPDATE t3 SET a=0 WHEREwww b=2;
@@ -294,8 +294,8 @@ test:do_catchsql_test(
     "misc1-6.1",
     [[
         CREATE TABLE t4(
-          abort primary key, "asc", beginn, cluster, conflict, copy, delimiters, "desc", endd,
-          "explain", fail, ignore, key, offset, "pragma", "replace", temp, "view"
+          abort  INT primary key, "asc" INT, beginn INT , cluster INT , conflict INT , copy INT , delimiters INT , "desc" INT, endd INT ,
+          "explain" INT, fail INT , ignore INT , key INT , offset INT , "pragma" INT, "replace" INT, temp INT , "view" INT
         );
     ]], {
         -- <misc1-6.1>
@@ -340,8 +340,8 @@ test:do_catchsql_test(
     "misc1-7.1",
     [[
         CREATE TABLE error1(
-          a TYPE PRIMARY KEY,
-          b TYPE PRIMARY KEY
+          a  INT PRIMARY KEY,
+          b  INT PRIMARY KEY
         );
     ]], {
         -- <misc1-7.1>
@@ -354,7 +354,7 @@ test:do_catchsql_test(
     [[
         CREATE TABLE error1(
           a INTEGER PRIMARY KEY,
-          b TYPE PRIMARY KEY
+          b  INT PRIMARY KEY
         );
     ]], {
         -- <misc1-7.2>
@@ -365,7 +365,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "misc1-7.3",
     [[
-        CREATE TABLE t5(a,b,c,PRIMARY KEY(a,b));
+        CREATE TABLE t5(a INT ,b INT ,c INT ,PRIMARY KEY(a,b));
         INSERT INTO t5 VALUES(1,2,3);
         SELECT * FROM t5 ORDER BY a;
     ]], {
@@ -435,7 +435,7 @@ test:execsql([[
 test:do_catchsql_test(
     "misc1-9.1",
     [[
-        CREATE TABLE t1(a primary key not null, b unique not null);
+        CREATE TABLE t1(a  TEXT primary key not null, b  INT unique not null);
         INSERT INTO t1 VALUES('a',1234567890123456789);
         INSERT INTO t1 VALUES('b',1234567891123456789);
         INSERT INTO t1 VALUES('c',1234567892123456789);
@@ -612,7 +612,7 @@ test:do_execsql_test(
         SELECT '0'==0.0
     ]], {
         -- <misc1-12.2>
-        0
+        1
         -- </misc1-12.2>
     })
 
@@ -629,23 +629,23 @@ test:do_execsql_test(
 test:do_execsql_test(
     "misc1-12.4",
     [[
-        CREATE TABLE t6(a INT UNIQUE, b TEXT primary key);
+        CREATE TABLE t6(a TEXT UNIQUE, b TEXT primary key);
         INSERT INTO t6 VALUES('0','0.0');
         SELECT * FROM t6;
     ]], {
         -- <misc1-12.4>
-    0,"0.0"
+    "0","0.0"
         -- </misc1-12.4>
     })
 
 test:do_execsql_test(
     "misc1-12.5",
     [[
-        INSERT OR IGNORE INTO t6 VALUES(0.0,'x');
+        INSERT OR IGNORE INTO t6 VALUES('0','x');
         SELECT * FROM t6;
     ]], {
         -- <misc1-12.5>
-        0, "0.0"
+        "0", "0.0"
         -- </misc1-12.5>
     })
 
@@ -656,7 +656,7 @@ test:do_execsql_test(
         SELECT * FROM t6;
     ]], {
         -- <misc1-12.6>
-    "y","0",0,"0.0"
+    "y","0","0","0.0"
         -- </misc1-12.6>
     })
 
@@ -665,7 +665,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "misc1-12.7",
     [[
-        CREATE TABLE t7(x INTEGER, y TEXT, z primary key);
+        CREATE TABLE t7(x INTEGER, y TEXT, z  INT primary key);
         INSERT INTO t7 VALUES(0,0,1);
         INSERT INTO t7 VALUES(0.0,0,2);
         INSERT INTO t7 VALUES(0,0.0,3);
@@ -730,7 +730,7 @@ if 0>0 then
 test:do_execsql_test(
     "misc1-12.11",
     [[
-        CREATE TABLE t8(x TEXT COLLATE numeric, y INTEGER COLLATE text, z primary key);
+        CREATE TABLE t8(x TEXT COLLATE numeric, y INTEGER COLLATE text, z  INT primary key);
         INSERT INTO t8 VALUES(0,0,1);
         INSERT INTO t8 VALUES(0.0,0,2);
         INSERT INTO t8 VALUES(0,0.0,3);
@@ -771,7 +771,7 @@ end
 test:do_execsql_test(
     "misc1-13.1",
     [[
-        CREATE TABLE t9(x,y primary key);
+        CREATE TABLE t9(x TEXT,y  INT primary key);
         INSERT INTO t9 VALUES('one',1);
         INSERT INTO t9 VALUES('two',2);
         INSERT INTO t9 VALUES('three',3);
@@ -983,7 +983,7 @@ end
 --   CREATE TABLE t19b AS SELECT 4 AS '', 5 AS '',  6 AS '';
 --   SELECT * FROM t19b;
 -- } {4 5 6}
--- # 2015-05-20:  CREATE TABLE AS should not store INT value is a TEXT
+-- # 2015-05-20:  CREATE TABLE AS should not store value is a TEXT
 -- # column.
 -- #
 -- do_execsql_test misc1-19.3 {
@@ -1063,10 +1063,10 @@ test:do_execsql_test(
 -- db close
 -- sqlite3 db :memory:
 -- do_execsql_test misc1-23.1 {
---   CREATE TABLE t1(x);
+--   CREATE TABLE t1(x INT );
 --   UPDATE sqlite_master SET sql='CREATE table t(d CHECK(T(#0)';
 --   BEGIN;
---   CREATE TABLE t2(y);
+--   CREATE TABLE t2(y INT );
 --   ROLLBACK;
 --   DROP TABLE IF EXISTS t3;
 -- } {}
@@ -1076,20 +1076,20 @@ test:do_execsql_test(
 -- database_may_be_corrupt
 -- sqlite3 db :memory:
 -- do_catchsql_test misc1-23.2 {
---   CREATE TABLE t1(x UNIQUE);
+--   CREATE TABLE t1(x  INT UNIQUE);
 --   UPDATE sqlite_master SET sql='CREATE TABLE IF not EXISTS t(c)';
 --   BEGIN;
---   CREATE TABLE t2(x);
+--   CREATE TABLE t2(x INT );
 --   ROLLBACK;
 --   DROP TABLE F;
 -- } {1 {no such table: F}}
 -- db close
 -- sqlite3 db :memory:
 -- do_catchsql_test misc1-23.3 {
---   CREATE TABLE t1(x UNIQUE);
+--   CREATE TABLE t1(x  INT UNIQUE);
 --   UPDATE sqlite_master SET sql='CREATE table y(a TEXT, a TEXT)';
 --   BEGIN;
---   CREATE TABLE t2(y);
+--   CREATE TABLE t2(y INT );
 --   ROLLBACK;
 --   DROP TABLE IF EXISTS t;
 -- } {0 {}}
diff --git a/test/sql-tap/misc3.test.lua b/test/sql-tap/misc3.test.lua
index dc1545f8f065026a072922573d421050eb940823..70389a8672829ffffd03894ad8a9fb56ca529073 100755
--- a/test/sql-tap/misc3.test.lua
+++ b/test/sql-tap/misc3.test.lua
@@ -29,7 +29,7 @@ test:do_test(
     "misc3-1.1",
     function()
         test:execsql([[
-            CREATE TABLE t1(a PRIMARY KEY,b);
+            CREATE TABLE t1(a INT PRIMARY KEY,b TEXT);
             INSERT INTO t1
               VALUES(1,'a23456789_b23456789_c23456789_d23456789_e23456789_');
             UPDATE t1 SET b=b||b;
@@ -39,7 +39,7 @@ test:do_test(
             UPDATE t1 SET b=b||b;
             INSERT INTO t1 VALUES(2,'x');
             UPDATE t1 SET b=substr(b,1,500);
-            CREATE TABLE t2(x PRIMARY KEY,y);
+            CREATE TABLE t2(x  INT PRIMARY KEY,y INT );
             START TRANSACTION;
         ]])
         test:catchsql("UPDATE t1 SET a=CASE a WHEN 2 THEN 1 ELSE a END, b='y';")
@@ -63,7 +63,7 @@ test:do_test(
             DROP TABLE t2;
         ]])
         test:execsql([[
-            CREATE TABLE t1(a PRIMARY KEY,b);
+            CREATE TABLE t1(a INT PRIMARY KEY,b TEXT);
             INSERT INTO t1
             VALUES(1,'a23456789_b23456789_c23456789_d23456789_e23456789_');
             INSERT INTO t1 SELECT a+1, b||b FROM t1;
@@ -329,7 +329,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "misc3-4.1",
     [[
-        CREATE TABLE t3(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t3(a INTEGER PRIMARY KEY, b TEXT);
         INSERT INTO t3 VALUES(1, 'abc');
         INSERT INTO t3 VALUES(2, 'xyz');
         INSERT INTO t3 VALUES(3, NULL);
@@ -374,11 +374,11 @@ test:do_execsql_test(
 test:do_execsql_test(
     "misc3-5.1",
     [[
-        CREATE TABLE x1 (id primary key, b, c);
+        CREATE TABLE x1 (id INT primary key, b TEXT, c INT);
         INSERT INTO x1 VALUES(1, 'dog',3);
         INSERT INTO x1 VALUES(2, 'cat',1);
         INSERT INTO x1 VALUES(3, 'dog',4);
-        CREATE TABLE x2 (c primary key, e);
+        CREATE TABLE x2 (c INT primary key, e TEXT);
         INSERT INTO x2 VALUES(1,'one');
         INSERT INTO x2 VALUES(2,'two');
         INSERT INTO x2 VALUES(3,'three');
@@ -451,9 +451,9 @@ if (0 > 0) then
     test:do_execsql_test(
         "misc3-7.1",
         [[
-            CREATE TABLE y1(a primary key);
-            CREATE TABLE y2(b primary key);
-            CREATE TABLE y3(c primary key);
+            CREATE TABLE y1(a  INT primary key);
+            CREATE TABLE y2(b  INT primary key);
+            CREATE TABLE y3(c  INT primary key);
             START TRANSACTION;
             CREATE TRIGGER r1 AFTER DELETE ON y1 FOR EACH ROW BEGIN
               INSERT INTO y3(c) SELECT b FROM y2 ORDER BY b LIMIT 1;
diff --git a/test/sql-tap/misc5.test.lua b/test/sql-tap/misc5.test.lua
index 7e903d33b81a740025dc86cf4ed71050b2ddfb55..874679cb3621eb22f156cefc79540c4938501d9e 100755
--- a/test/sql-tap/misc5.test.lua
+++ b/test/sql-tap/misc5.test.lua
@@ -32,11 +32,11 @@ for i = 120, 140 - 1, 1 do
         "misc5-1."..i,
         function()
             test:catchsql("DROP TABLE t1")
-            local sql1 = "CREATE TABLE t1 (id primary key,"
+            local sql1 = "CREATE TABLE t1 (id  INT primary key,"
             local sql2 = "INSERT INTO t1 VALUES (1, "
             local sep = ""
             for j = 0, i - 1, 1 do
-                sql1 = sql1 .. string.format("%sa%s", sep, j)
+                sql1 = sql1 .. string.format("%sa%s INT", sep, j)
                 sql2 = sql2 .. string.format("%s%s", sep, j)
                 sep = ","
             end
@@ -53,7 +53,7 @@ end
 -- ifcapable conflict {
 --   do_test misc5-2.1 {
 --     execsql {
---       create table t2(x primary key);
+--       create table t2(x  INT primary key);
 --       insert into t2 values(1);
 --       insert or ignore into t2 select x*2 from t2;
 --       insert or ignore into t2 select x*4 from t2;
@@ -71,8 +71,8 @@ end
 test:do_execsql_test(
     "misc5-2.1",
     [[
-        create table t2(x primary key);
-        create table t2_temp(id primary key, x);
+        create table t2(x  INT primary key);
+        create table t2_temp(id  INT primary key, x INT );
         START TRANSACTION;
         insert into t2_temp values(1, 1);
         insert into t2_temp select id+1,x*2 from t2_temp;
@@ -153,7 +153,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "misc5-3.1",
     [[
-        CREATE TABLE songs(songid primary key, artist, timesplayed);
+        CREATE TABLE songs(songid  INT primary key, artist TEXT, timesplayed INT );
         INSERT INTO songs VALUES(1,'one',1);
         INSERT INTO songs VALUES(2,'one',2);
         INSERT INTO songs VALUES(3,'two',3);
@@ -208,7 +208,7 @@ test:do_execsql_test(
 --     close $fd
 --     sqlite3 db test.db
 --     catchsql {
---       CREATE TABLE t1(a,b,c);
+--       CREATE TABLE t1(a INT ,b INT ,c INT );
 --     }
 --   } {1 {file is encrypted or is not a database}}
 -- }
@@ -288,7 +288,7 @@ test:drop_all_tables()
 test:do_test(
     "misc5-7.1",
     function()
-        test:execsql "CREATE TABLE t1(x primary key)"
+        test:execsql "CREATE TABLE t1(x  INT primary key)"
         sql = "INSERT INTO t1 VALUES("
         tail = ""
         for i = 0, 199, 1 do
@@ -309,10 +309,10 @@ test:do_test(
 -- do_test misc5-7.2 {
 --   sqlite3 db2 :memory:
 --   catchsql {
---     CREATE TABLE t1(x UNIQUE);
+--     CREATE TABLE t1(x  INT UNIQUE);
 --     UPDATE sqlite_master SET sql='CREATE table t(o CHECK(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;VALUES(o)';
 --     BEGIN;
---     CREATE TABLE t2(y);
+--     CREATE TABLE t2(y INT );
 --     ROLLBACK;
 --     DROP TABLE IF EXISTS D;
 --   } db2
@@ -367,7 +367,7 @@ test:do_test(
     "misc5-11.1",
     function()
         return test:execsql [[
-            CREATE TABLE t3(x primary key);
+            CREATE TABLE t3(x  INT primary key);
             INSERT INTO t3 VALUES(-18);
             INSERT INTO t3 VALUES(-17);
             INSERT INTO t3 VALUES(-16);
diff --git a/test/sql-tap/null.test.lua b/test/sql-tap/null.test.lua
index 5e1f8666e81f579cebe9f08c20c2b6557663ee76..7179d0d1d03536b950f5c668740e77b4bd333d28 100755
--- a/test/sql-tap/null.test.lua
+++ b/test/sql-tap/null.test.lua
@@ -25,7 +25,7 @@ test:plan(45)
 test:do_execsql_test(
     "null-1.0",
     [[
-        create table t1(a primary key,b,c);
+        create table t1(a  INT primary key,b INT ,c INT );
         START TRANSACTION;
         insert into t1 values(1,0,0);
         insert into t1 values(2,0,1);
@@ -316,7 +316,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "null-7.1",
     [[
-        create table t2(a primary key, b unique);
+        create table t2(a int primary key, b int unique);
         insert into t2 values(1,1);
         insert into t2 values(2,null);
         insert into t2 values(3,null);
@@ -330,7 +330,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "null-7.2",
     [[
-        create table t3(a primary key, b, c, unique(b,c));
+        create table t3(a int primary key, b int, c int, unique(b,c));
         insert into t3 values(1,1,1);
         insert into t3 values(2,null,1);
         insert into t3 values(3,null,1);
@@ -347,7 +347,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "null-8.1",
     [[
-        CREATE TABLE t4(x primary key,y);
+        CREATE TABLE t4(x  INT primary key,y INT );
         INSERT INTO t4 VALUES(1,11);
         INSERT INTO t4 VALUES(2,NULL);
         SELECT x FROM t4 WHERE y=NULL;
@@ -453,7 +453,7 @@ test:do_execsql_test(
     })
 
 -- do_execsql_test null-9.1 {
---   CREATE TABLE t5(a, b, c);
+--   CREATE TABLE t5(a INT , b INT , c INT );
 --   CREATE UNIQUE INDEX t5ab ON t5(a, b);
 --   INSERT INTO t5 VALUES(1, NULL, 'one');
 --   INSERT INTO t5 VALUES(1, NULL, 'i');
diff --git a/test/sql-tap/offset1.test.lua b/test/sql-tap/offset1.test.lua
index e7554ef7838f873b1260a5d112db809cd8db7e7b..451694af226a7168ab7471d609071271bb2c05f3 100755
--- a/test/sql-tap/offset1.test.lua
+++ b/test/sql-tap/offset1.test.lua
@@ -25,9 +25,9 @@ test:plan(22)
 test:do_execsql_test(
     "offset1-1.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b TEXT);
         INSERT INTO t1 VALUES(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e');
-        CREATE TABLE t2(id primary key, x,y);
+        CREATE TABLE t2(id INT primary key, x INT,y TEXT);
         INSERT INTO t2 VALUES(1, 8,'y'),(2, 9,'z'),(3, 6,'w'),(4, 7,'x');
         SELECT count(*) FROM t1, t2;
     ]], {
diff --git a/test/sql-tap/orderby1.test.lua b/test/sql-tap/orderby1.test.lua
index 1cc104bfc144d561c22f2d90c8fc9d948933347a..dc43bf57c7b79ca6d81f6a2eeaebdebb91568340 100755
--- a/test/sql-tap/orderby1.test.lua
+++ b/test/sql-tap/orderby1.test.lua
@@ -29,7 +29,7 @@ test:do_test(
     function()
         return test:execsql [[
             CREATE TABLE album(
-              aid PRIMARY KEY,
+              aid INT PRIMARY KEY,
               title TEXT UNIQUE NOT NULL
             );
             CREATE TABLE track(
@@ -417,7 +417,7 @@ test:do_test(
             DROP TABLE track;
             DROP TABLE album;
             CREATE TABLE album(
-              aid PRIMARY KEY,
+              aid INT PRIMARY KEY,
               title TEXT UNIQUE NOT NULL
             );
             CREATE TABLE track(
@@ -664,7 +664,7 @@ test:do_test(
     4.0,
     function()
         return test:execsql [[
-            CREATE TABLE t41(a PRIMARY KEY, b INT NOT NULL);
+            CREATE TABLE t41(a INT PRIMARY KEY, b INT NOT NULL);
             CREATE INDEX t41ba ON t41(b,a);
             CREATE TABLE t42(id INTEGER PRIMARY KEY, x INT NOT NULL REFERENCES t41(a), y INT NOT NULL);
             CREATE UNIQUE INDEX t42xy ON t42(x,y);
@@ -728,7 +728,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     6.0,
     [[
-        CREATE TABLE abc(a primary key, b, c);
+        CREATE TABLE abc(a INT primary key, b INT, c INT);
         INSERT INTO abc VALUES(1, 2, 3);
         INSERT INTO abc VALUES(4, 5, 6);
         INSERT INTO abc VALUES(7, 8, 9);
@@ -751,7 +751,7 @@ test:do_execsql_test(
 -- # routine in where.c.
 -- #
 -- do_execsql_test 7.0 {
---   CREATE TABLE t7(a,b);
+--   CREATE TABLE t7(a INT,b INT);
 --   CREATE INDEX t7a ON t7(a);
 --   CREATE INDEX t7ab ON t7(a,b);
 --   EXPLAIN QUERY PLAN
@@ -767,7 +767,7 @@ test:do_execsql_test(
 --     8.0,
 --     [[
 --         PRAGMA cache_size = 5;
---         CREATE TABLE t1(id integer primary key, a, b);
+--         CREATE TABLE t1(id integer primary key, a INT, b INT);
 --         CREATE INDEX i1 ON t1(a);
 --     ]])
 
diff --git a/test/sql-tap/orderby2.test.lua b/test/sql-tap/orderby2.test.lua
index 6f9933bb5f7a42280bb913c428886b3621355a41..f7f72cbbb9b48032ee87a2a43049b2634c57db6b 100755
--- a/test/sql-tap/orderby2.test.lua
+++ b/test/sql-tap/orderby2.test.lua
@@ -27,9 +27,9 @@ test:do_test(
     1.0,
     function()
         return test:execsql [[
-            CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
+            CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT );
             INSERT INTO t1 VALUES(1,11), (2,22);
-            CREATE TABLE t2(d, e, PRIMARY KEY(d,e));
+            CREATE TABLE t2(d INT , e TEXT , PRIMARY KEY(d,e));
             INSERT INTO t2 VALUES(10, 'ten'), (11,'eleven'), (12,'twelve'),
                                  (11, 'oneteen');
         ]]
@@ -119,17 +119,17 @@ test:do_test(
     2.0,
     function()
         return test:execsql [[
-            CREATE TABLE t31(a,b, PRIMARY KEY(a,b));
-            CREATE TABLE t32(c,d, PRIMARY KEY(c,d));
-            CREATE TABLE t33(e,f, PRIMARY KEY(e,f));
-            CREATE TABLE t34(g,h, PRIMARY KEY(g,h));
+            CREATE TABLE t31(a INT ,b INT , PRIMARY KEY(a,b));
+            CREATE TABLE t32(c INT ,d INT , PRIMARY KEY(c,d));
+            CREATE TABLE t33(e INT ,f INT , PRIMARY KEY(e,f));
+            CREATE TABLE t34(g INT ,h INT , PRIMARY KEY(g,h));
 
             INSERT INTO t31 VALUES(1,4), (2,3), (1,3);
             INSERT INTO t32 VALUES(4,5), (3,6), (3,7), (4,8);
             INSERT INTO t33 VALUES(5,9), (7,10), (6,11), (8,12), (8,13), (7,14);
             INSERT INTO t34 VALUES(11,20), (10,21), (12,22), (9,23), (13,24),
                                   (14,25), (12,26);
-            SELECT a||','||c||','||e||','||g FROM t31, t32, t33, t34
+            SELECT CAST(a AS TEXT)||','||CAST(c AS TEXT)||','||CAST(e AS TEXT)||','||CAST(g as TEXT) FROM t31, t32, t33, t34
              WHERE c=b AND e=d AND g=f
              ORDER BY a ASC, c ASC, e DESC, g ASC;
         ]]
@@ -143,7 +143,7 @@ test:do_test(
     2.1,
     function()
         return test:execsql [[
-            SELECT a||','||c||','||e||','||g FROM t31, t32, t33, t34
+            SELECT CAST(a AS TEXT)||','||CAST(c AS TEXT)||','||CAST(e AS TEXT)||','||CAST(g AS TEXT) FROM t31, t32, t33, t34
              WHERE c=b AND e=d AND g=f
              ORDER BY +a ASC, +c ASC, +e DESC, +g ASC;
         ]]
@@ -157,7 +157,7 @@ test:do_test(
     2.2,
     function()
         return test:execsql [[
-            SELECT a||','||c||','||e||','||g FROM t31, t32, t33, t34
+            SELECT CAST(a AS TEXT)||','||CAST(c AS TEXT)||','||CAST(e AS TEXT)||','||CAST(g AS TEXT) FROM t31, t32, t33, t34
              WHERE c=b AND e=d AND g=f
              ORDER BY a ASC, c ASC, e ASC, g ASC;
         ]]
diff --git a/test/sql-tap/orderby4.test.lua b/test/sql-tap/orderby4.test.lua
index fb8d3ecc623c1fa04555f8756ec91caa759fc44a..a07857d3a25d290c21078e7c853403cd02ccb8b6 100755
--- a/test/sql-tap/orderby4.test.lua
+++ b/test/sql-tap/orderby4.test.lua
@@ -28,9 +28,9 @@ testprefix = "orderby4"
 test:do_execsql_test(
     "1.1",
     [[
-        CREATE TABLE t1(a, b, PRIMARY KEY(a,b));
+        CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a,b));
         INSERT INTO t1 VALUES(1,1),(1,2);
-        CREATE TABLE t2(x, y, PRIMARY KEY(x,y));
+        CREATE TABLE t2(x INT, y INT, PRIMARY KEY(x,y));
         INSERT INTO t2 VALUES(3,3),(4,4);
         SELECT a, x FROM t1, t2 ORDER BY 1, 2;
     ]], {
@@ -62,10 +62,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "2.1",
     [[
-        CREATE TABLE t3(id primary key, a);
+        CREATE TABLE t3(id INT primary key, a INT);
         INSERT INTO t3 VALUES(1, 1),(2, 1);
         CREATE INDEX t3a ON t3(a);
-        CREATE TABLE t4(id primary key, x);
+        CREATE TABLE t4(id INT primary key, x INT);
         INSERT INTO t4 VALUES(1, 3),(2, 4);
         CREATE INDEX t4x ON t4(x);
         SELECT a, x FROM t3, t4 ORDER BY 1, 2;
diff --git a/test/sql-tap/orderby5.test.lua b/test/sql-tap/orderby5.test.lua
index 2a7f7194941291c48f70767cc61ba755cc59d2c8..048f024abe21c715f7d1d194cd89e7a57f71d5b4 100755
--- a/test/sql-tap/orderby5.test.lua
+++ b/test/sql-tap/orderby5.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(11)
+test:plan(10)
 
 --!./tcltestrunner.lua
 -- 2013-06-14
@@ -26,11 +26,11 @@ testprefix = "orderby5"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE t1(id primary key,a,b,c);
+        CREATE TABLE t1(id INT primary key,a TEXT,b INT,c INT);
         CREATE INDEX t1bc ON t1(b,c);
 
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT a, b, c FROM t1 WHERE a=0;
+        SELECT DISTINCT a, b, c FROM t1 WHERE a='0';
     ]], {
         -- <1.1>
         "~/B-TREE/"
@@ -41,7 +41,7 @@ test:do_execsql_test(
     "1.2.1",
     [[
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT a, c, b FROM t1 WHERE a=0;
+        SELECT DISTINCT a, c, b FROM t1 WHERE a='0';
     ]], {
         -- <1.2.1>
         "~/B-TREE/"
@@ -85,7 +85,7 @@ test:do_execsql_test(
     1.3,
     [[
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT b, a, c FROM t1 WHERE a=0;
+        SELECT DISTINCT b, a, c FROM t1 WHERE a='0';
     ]], {
         -- <1.3>
         "~/B-TREE/"
@@ -96,7 +96,7 @@ test:do_execsql_test(
     1.4,
     [[
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT b, c, a FROM t1 WHERE a=0;
+        SELECT DISTINCT b, c, a FROM t1 WHERE a='0';
     ]], {
         -- <1.4>
         "~/B-TREE/"
@@ -107,7 +107,7 @@ test:do_execsql_test(
     1.5,
     [[
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT c, a, b FROM t1 WHERE a=0;
+        SELECT DISTINCT c, a, b FROM t1 WHERE a='0';
     ]], {
         -- <1.5>
         "~/B-TREE/"
@@ -118,7 +118,7 @@ test:do_execsql_test(
     1.6,
     [[
         EXPLAIN QUERY PLAN
-        SELECT DISTINCT c, b, a FROM t1 WHERE a=0;
+        SELECT DISTINCT c, b, a FROM t1 WHERE a='0';
     ]], {
         -- <1.6>
         "~/B-TREE/"
@@ -142,7 +142,7 @@ test:do_execsql_test(
 -- # lookups.
 -- #
 -- do_execsql_test 2.1a {
---   CREATE TABLE t2(a,b,c);
+--   CREATE TABLE t2(a INT,b INT,c INT);
 --   CREATE INDEX t2bc ON t2(b,c);
 --   ANALYZE;
 --   INSERT INTO sqlite_stat1 VALUES('t1','t1bc','1000000 10 9');
@@ -179,25 +179,11 @@ test:do_execsql_test(
 --   EXPLAIN QUERY PLAN
 --   SELECT * FROM t1 WHERE a=0 ORDER BY c, b, a;
 -- } {/B-TREE/}
-test:do_execsql_test(
-    3.0,
-    [[
-        CREATE TABLE t3(a INTEGER PRIMARY KEY, b, c, d, e, f);
-        --CREATE INDEX t3bcde ON t3(b, c, d, e);
-        -- As pk is not necessary in Tarantool's secondary indexes 'a' should be added manually
-        CREATE INDEX t3bcde ON t3(b, c, d, e, a);
-        EXPLAIN QUERY PLAN
-        SELECT a FROM t3 WHERE b=2 AND c=3 ORDER BY d DESC, e DESC, b, c, a DESC;
-    ]], {
-        -- <3.0>
-        "~/B-TREE/"
-        -- </3.0>
-    })
 
 -- MUST_WORK_TEST
 -- do_execsql_test 3.1 {
 --   DROP TABLE t3;
---   CREATE TABLE t3(a INTEGER PRIMARY KEY, b, c, d, e, f);
+--   CREATE TABLE t3(a INTEGER PRIMARY KEY, b INT, c INT, d INT, e INT, f INT);
 --   CREATE INDEX t3bcde ON t3(b, c, d, e);
 --   EXPLAIN QUERY PLAN
 --   SELECT a FROM t3 WHERE b=2 AND c=3 ORDER BY d DESC, e DESC, b, c, a DESC;
diff --git a/test/sql-tap/orderby6.test.lua b/test/sql-tap/orderby6.test.lua
index 1270626a6b45766bdd4192de2a889a5e77e67a3b..746baef95e43a1d2466a3790a787d6e9c7bb2b70 100755
--- a/test/sql-tap/orderby6.test.lua
+++ b/test/sql-tap/orderby6.test.lua
@@ -32,7 +32,7 @@ testprefix = "orderby6"
     test:do_test(
         "1.1",
         function()
-            test:execsql "CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));"
+            test:execsql "CREATE TABLE t1(a INT ,b INT ,c INT ,PRIMARY KEY(b,c));"
             return test:execsql [[
                 WITH RECURSIVE
                  cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000)
@@ -207,7 +207,7 @@ testprefix = "orderby6"
     test:do_test(
         "1.31",
         function()
-            test:execsql "CREATE TABLE t2(a,b,c,d,e,f,PRIMARY KEY(b,c,d,e,f));"
+            test:execsql "CREATE TABLE t2(a INT ,b INT ,c INT ,d INT ,e INT ,f INT ,PRIMARY KEY(b,c,d,e,f));"
             return test:execsql [[
                 WITH RECURSIVE
                  cnt(x) AS (VALUES(0) UNION ALL SELECT x+1 FROM cnt WHERE x<242)
diff --git a/test/sql-tap/orderby8.test.lua b/test/sql-tap/orderby8.test.lua
index 1651cd9e5c2aad76aab1c6a68082fcd66e09112a..63ec6da1c2d00f0d94df2cdb0b08bcd1b2802c0c 100755
--- a/test/sql-tap/orderby8.test.lua
+++ b/test/sql-tap/orderby8.test.lua
@@ -29,7 +29,7 @@ test:do_test(
     1.0,
     function()
         test:execsql [[
-            CREATE TABLE t1(x primary key);
+            CREATE TABLE t1(x INT primary key);
             INSERT INTO t1(x) VALUES(1),(5),(9),(7),(3),(2),(4),(6),(8);
         ]]
         rs = "x"
diff --git a/test/sql-tap/orderby9.test.lua b/test/sql-tap/orderby9.test.lua
index 5d2550eab87da54a33130596e7e134d453fce7a5..33c9a31a4d16de58ae9554c27558004a858b770d 100755
--- a/test/sql-tap/orderby9.test.lua
+++ b/test/sql-tap/orderby9.test.lua
@@ -27,7 +27,7 @@ test:do_execsql_test(
     "setup",
     [[
         -- create a table with many entries
-        CREATE TABLE t1(x primary key);
+        CREATE TABLE t1(x  INT primary key);
         WITH RECURSIVE
            c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<100)
         INSERT INTO t1 SELECT x FROM c;
diff --git a/test/sql-tap/printf2.test.lua b/test/sql-tap/printf2.test.lua
index bc76d241bd94d1696857e4e2352426317c6932fd..dca9137eefdb4032093fabc3a1cce96e49cd9f56 100755
--- a/test/sql-tap/printf2.test.lua
+++ b/test/sql-tap/printf2.test.lua
@@ -174,15 +174,13 @@ test:do_execsql_test(
 test:do_execsql_test(
     "printf2-2.1",
     [[
-        CREATE TABLE t1(id primary key, a,b,c);
+        CREATE TABLE t1(id INT primary key, a INT,b INT,c INT);
         INSERT INTO t1 VALUES(1, 1,2,3);
         INSERT INTO t1 VALUES(2, -1,-2,-3);
-        INSERT INTO t1 VALUES(3, 'abc','def','ghi');
-        INSERT INTO t1 VALUES(4, 1.5,2.25,3.125);
         SELECT printf('(%s)-%n-(%s)',a,b,c) FROM t1 ORDER BY id;
     ]], {
         -- <printf2-2.1>
-        "(1)--(2)", "(-1)--(-2)", "(abc)--(def)", "(1.5)--(2.25)"
+        "(1)--(2)", "(-1)--(-2)"
         -- </printf2-2.1>
     })
 
@@ -194,7 +192,7 @@ test:do_execsql_test(
         SELECT printf('%s=(%p)',a,a) FROM t1 ORDER BY a;
     ]], {
         -- <printf2-2.2>
-        "-1=(FFFFFFFFFFFFFFFF)", "1=(1)", "1.5=(1)", "abc=(0)"
+        "-1=(FFFFFFFFFFFFFFFF)", "1=(1)"
         -- </printf2-2.2>
     })
 
@@ -209,7 +207,7 @@ test:do_execsql_test(
         SELECT printf('%s=(%d/%g/%s)',a) FROM t1 ORDER BY a;
     ]], {
         -- <printf2-2.3>
-        "-1=(0/0/)", "1=(0/0/)", "1.5=(0/0/)", "abc=(0/0/)"
+        "-1=(0/0/)", "1=(0/0/)"
         -- </printf2-2.3>
     })
 
diff --git a/test/sql-tap/randexpr1.test.lua b/test/sql-tap/randexpr1.test.lua
index 7bc2c34c75c1828cbe97f792cb778058d0ea9f84..cafb853e82e76dc0f8d2558ba61a94f217ad8969 100755
--- a/test/sql-tap/randexpr1.test.lua
+++ b/test/sql-tap/randexpr1.test.lua
@@ -34,7 +34,7 @@ test:do_test(
     "randexpr1-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a PRIMARY KEY,b,c,d,e,f);
+            CREATE TABLE t1(a  INT PRIMARY KEY,b INT ,c INT ,d INT ,e INT ,f INT );
             INSERT INTO t1 VALUES(100,200,300,400,500,600);
             SELECT * FROM t1
         ]]
diff --git a/test/sql-tap/resolver01.test.lua b/test/sql-tap/resolver01.test.lua
index 4e708d08a455ea48eca40933ea0dafb66f0b92f8..d08f95bf6ef139d8b184ae9ca7fe30c0ed9572fc 100755
--- a/test/sql-tap/resolver01.test.lua
+++ b/test/sql-tap/resolver01.test.lua
@@ -33,8 +33,8 @@ test:plan(27)
 test:do_catchsql_test(
     "resolver01-1.1",
     [[
-        CREATE TABLE t1(x primary key, y); INSERT INTO t1 VALUES(11,22);
-        CREATE TABLE t2(y primary key, z); INSERT INTO t2 VALUES(33,44);
+        CREATE TABLE t1(x  INT primary key, y INT ); INSERT INTO t1 VALUES(11,22);
+        CREATE TABLE t2(y  INT primary key, z INT ); INSERT INTO t2 VALUES(33,44);
         SELECT 1 AS y FROM t1, t2 ORDER BY y;
     ]], {
         -- <resolver01-1.1>
@@ -55,7 +55,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "resolver01-1.3",
     [[
-        CREATE TABLE t3(x primary key,y); INSERT INTO t3 VALUES(11,44),(33,22);
+        CREATE TABLE t3(x  INT primary key,y INT ); INSERT INTO t3 VALUES(11,44),(33,22);
         SELECT x AS y FROM t3 ORDER BY y;
     ]], {
         -- <resolver01-1.3>
@@ -310,7 +310,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "resolver01-6.1",
     [[
-        CREATE TABLE t61(name primary key);
+        CREATE TABLE t61(name TEXT primary key);
         SELECT min(name) FROM t61 GROUP BY lower(name);
     ]], {
         -- <resolver01-6.1>
@@ -331,7 +331,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "resolver01-6.3",
     [[
-        CREATE TABLE t63(id primary key, name);
+        CREATE TABLE t63(id  INT primary key, name TEXT);
         INSERT INTO t63 VALUES (1, NULL);
         INSERT INTO t63 VALUES (2, 'abc');
         SELECT count(),
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index 6cfce9a0ee6f9de5c231599cf992096aa55dd7b3..62bfc393c752f0f1550af92f8d5037c562c7a9be 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -222,17 +222,17 @@ string.format([[
         INSERT INTO test1 VALUES(11,22);
         INSERT INTO test1 VALUES(33,44);
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(id INT, a, b, PRIMARY KEY(id));
+        CREATE TABLE t3(id INT, a TEXT, b TEXT, PRIMARY KEY(id));
         INSERT INTO t3 VALUES(1, 'abc',NULL);
         INSERT INTO t3 VALUES(2, NULL,'xyz');
         INSERT INTO t3 SELECT f1, * FROM test1;
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(id INT, a, b, PRIMARY KEY(id));
+        CREATE TABLE t4(id INT, a INT , b TEXT , PRIMARY KEY(id));
         INSERT INTO t4 VALUES(1, NULL,'%s');
         SELECT * FROM t3;
     ]], long), {
         -- <select1-2.0>
-        1, "abc", "", 2, "", "xyz", 11, 11, 22, 33, 33, 44
+        1, "abc", "", 2, "", "xyz", 11, "11", "22", 33, "33", "44"
         -- </select1-2.0>
     })
 
@@ -308,13 +308,13 @@ test:do_execsql_test(
         -- </select1-2.5.2>
     })
 
-test:do_execsql_test(
+test:do_catchsql_test(
     "select1-2.5.3",
     [[
         SELECT count(*),count(a),count(b) FROM t4 WHERE b=5
     ]], {
         -- <select1-2.5.3>
-        0, 0, 0
+        1, "Can't convert to numeric This is a string that is too big to fit inside a NBFS buffer"
         -- </select1-2.5.3>
     })
 
@@ -359,7 +359,7 @@ test:do_execsql_test(
         SELECT coalesce(min(a),'xyzzy') FROM t3
     ]], {
         -- <select1-2.8.1>
-        11
+        "11"
         -- </select1-2.8.1>
     })
 
@@ -369,7 +369,7 @@ test:do_execsql_test(
         SELECT min(coalesce(a,'xyzzy')) FROM t3
     ]], {
         -- <select1-2.8.2>
-        11
+        "11"
         -- </select1-2.8.2>
     })
 
@@ -570,7 +570,7 @@ test:do_catchsql_test(
 -- MUST_WORK_TEST
 -- do_test select1-2.23 {
 --   execsql {
---     CREATE TABLE tkt2526(a,b,c PRIMARY KEY);
+--     CREATE TABLE tkt2526(a INT ,b INT ,c  INT PRIMARY KEY);
 --     INSERT INTO tkt2526 VALUES('x','y',NULL);
 --     INSERT INTO tkt2526 VALUES('x','z',NULL);
 --   }
@@ -803,7 +803,7 @@ test:do_execsql_test(
     "select1-4.8",
     [[
         DROP TABLE IF EXISTS t5;
-        CREATE TABLE t5(a primary key,b);
+        CREATE TABLE t5(a  INT primary key,b INT );
         INSERT INTO t5 VALUES(1,10);
         INSERT INTO t5 VALUES(2,9);
         SELECT * FROM t5 ORDER BY 1;
@@ -1505,7 +1505,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "select1-8.2",
     [[
-        SELECT f1 FROM test1 WHERE ('x' || f1) BETWEEN 'x10' AND 'x20'
+        SELECT f1 FROM test1 WHERE ('x' || cast(f1 as TEXT)) BETWEEN 'x10' AND 'x20'
         ORDER BY f1
     ]], {
         -- <select1-8.2>
@@ -1695,7 +1695,7 @@ test:do_execsql_test(
         SELECT * FROM t3, t4;
     ]], {
         -- <select1-11.1>
-        0, 1, 2, 0, 3, 4
+        0, "1", "2", 0, 3, "4"
         -- </select1-11.1>
     })
 
@@ -1705,7 +1705,7 @@ test:do_execsql_test(
         SELECT * FROM t3, t4;
     ]], {
         -- <select1-11.2.1>
-        0, 1, 2, 0, 3, 4
+        0, "1", "2", 0, 3, "4"
         -- </select1-11.2.1>
     })
 
@@ -1715,7 +1715,7 @@ test:do_execsql2_test(
         SELECT * FROM t3, t4;
     ]], {
         -- <select1-11.2.2>
-        "ID",0,"A",1,"B",2,"ID",0,"A",3,"B",4
+        "ID",0,"A","1","B","2","ID",0,"A",3,"B","4"
         -- </select1-11.2.2>
     })
 
@@ -1725,7 +1725,7 @@ test:do_execsql_test(
         SELECT t3.*, t4.b FROM t3, t4;
     ]], {
         -- <select1-11.4.1>
-        0, 1, 2, 4
+        0, "1", "2", "4"
         -- </select1-11.4.1>
     })
 
@@ -1735,7 +1735,7 @@ test:do_execsql_test(
         SELECT "T3".*, t4.b FROM t3, t4;
     ]], {
         -- <select1-11.4.2>
-        0, 1, 2, 4
+        0, "1", "2", "4"
         -- </select1-11.4.2>
     })
 
@@ -1745,7 +1745,7 @@ test:do_execsql2_test(
         SELECT t3.*, t4.b FROM t3, t4;
     ]], {
         -- <select1-11.5.1>
-        "ID", 0, "A", 1, "B", 2, "B", 4
+        "ID", 0, "A", "1", "B", "2", "B", "4"
         -- </select1-11.5.1>
     })
 
@@ -1755,7 +1755,7 @@ test:do_execsql2_test(
         SELECT x.*, y.b FROM t3 AS x, t4 AS y;
     ]], {
         -- <select1-11.6>
-        "ID", 0, "A", 1, "B", 2, "B", 4
+        "ID", 0, "A", "1", "B", "2", "B", "4"
         -- </select1-11.6>
     })
 
@@ -1765,7 +1765,7 @@ test:do_execsql_test(
         SELECT t3.b, t4.* FROM t3, t4;
     ]], {
         -- <select1-11.7>
-        2, 0, 3, 4
+        "2", 0, 3, "4"
         -- </select1-11.7>
     })
 
@@ -1775,7 +1775,7 @@ test:do_execsql2_test(
         SELECT t3.b, t4.* FROM t3, t4;
     ]], {
         -- <select1-11.8>
-        "B", 2, "ID", 0, "A", 3, "B", 4
+        "B", "2", "ID", 0, "A", 3, "B", "4"
         -- </select1-11.8>
     })
 
@@ -1785,7 +1785,7 @@ test:do_execsql2_test(
         SELECT x.b, y.* FROM t3 AS x, t4 AS y;
     ]], {
         -- <select1-11.9>
-        "B", 2, "ID", 0, "A", 3, "B", 4
+        "B", "2", "ID", 0, "A", 3, "B", "4"
         -- </select1-11.9>
     })
 
@@ -1815,7 +1815,7 @@ test:do_execsql2_test(
             SELECT t3.* FROM t3, (SELECT max(a), max(b) FROM t4)
         ]], {
             -- <select1-11.12>
-            "ID", 0, "A", 1, "B", 2
+            "ID", 0, "A", "1", "B", "2"
             -- </select1-11.12>
         })
 
@@ -1825,7 +1825,7 @@ test:do_execsql2_test(
             SELECT t3.* FROM (SELECT max(a), max(b) FROM t4), t3
         ]], {
             -- <select1-11.13>
-            "ID", 0, "A", 1, "B", 2
+            "ID", 0, "A", "1", "B", "2"
             -- </select1-11.13>
         })
 
@@ -1835,7 +1835,7 @@ test:do_execsql2_test(
             SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx"
         ]], {
             -- <select1-11.14>
-            "ID", 0, "A", 1, "B", 2, "max(a)", 3, "max(b)", 4
+            "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4"
             -- </select1-11.14>
         })
 
@@ -1845,7 +1845,7 @@ test:do_execsql2_test(
             SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
         ]], {
             -- <select1-11.15>
-            "max(a)", 3, "max(b)", 4, "ID", 0, "A", 1, "B", 2
+            "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2"
             -- </select1-11.15>
         })
 
@@ -1857,7 +1857,7 @@ test:do_execsql2_test(
         SELECT y.* FROM t3 as y, t4 as z
     ]], {
         -- <select1-11.16>
-        "ID", 0, "A", 1, "B", 2
+        "ID", 0, "A", "1", "B", "2"
         -- </select1-11.16>
     })
 
@@ -1910,7 +1910,7 @@ test:do_execsql_test(
             SELECT a,b FROM t3 UNION SELECT 3 as "a", 4 ORDER BY a;
         ]], {
             -- <select1-12.5>
-            1, 2, 3, 4
+            3, 4, "1", "2"
             -- </select1-12.5>
         })
 
@@ -1920,7 +1920,7 @@ test:do_execsql_test(
             SELECT 5, 3, 4 UNION SELECT * FROM t3;
         ]], {
             -- <select1-12.6>
-            0, 1, 2, 5, 3, 4
+            0, "1", "2", 5, 3, 4
             -- </select1-12.6>
         })
 
@@ -1934,7 +1934,7 @@ test:do_execsql_test(
             SELECT * FROM t3 WHERE a=(SELECT 1);
         ]], {
             -- <select1-12.7>
-            0, 1, 2
+            0, "1", "2"
             -- </select1-12.7>
         })
 
@@ -1958,7 +1958,7 @@ test:do_execsql2_test(
         ) ORDER BY x;
     ]], {
         -- <select1-12.9>
-        "X", 1, "X", 3
+        "X", 3, "X", "1"
         -- </select1-12.9>
     })
 
@@ -1970,7 +1970,7 @@ test:do_execsql2_test(
         ) as z ORDER BY x;
     ]], {
         -- <select1-12.10>
-        "X", 1, "X", 3
+        "X", 3, "X", "1"
         -- </select1-12.10>
     })
 
@@ -1984,7 +1984,7 @@ test:do_test(
     function()
         test:execsql [[
             drop table if exists abc;
-            create TABLE abc(a, b, c, PRIMARY KEY(a, b));
+            create TABLE abc(a INT, b INT, c INT, PRIMARY KEY(a, b));
             START TRANSACTION;
             INSERT INTO abc VALUES(1, 1, 1);
         ]]
@@ -2040,7 +2040,7 @@ test:do_test(
         "select1-15.1",
         [[
             DROP TABLE IF EXISTS t1;
-            CREATE TABLE t1(id int primary key,a);
+            CREATE TABLE t1(id int primary key,a INT );
             CREATE INDEX i1 ON t1(a);
             INSERT INTO t1 VALUES(1, 1);
             INSERT INTO t1 VALUES(2, 2);
diff --git a/test/sql-tap/select3.test.lua b/test/sql-tap/select3.test.lua
index d49bb8725e3dfcb13d05b779d383ef3a9243ec75..dbc95f0d8e22669ef3b4f0b9b073cbc34db16cd2 100755
--- a/test/sql-tap/select3.test.lua
+++ b/test/sql-tap/select3.test.lua
@@ -350,7 +350,7 @@ test:do_execsql_test("select3-6.8", [[
 --
 test:do_execsql_test("select3-7.1", [[
   DROP TABLE IF EXISTS t2;
-  CREATE TABLE t2(a primary key,b);
+  CREATE TABLE t2(a  INT primary key,b INT );
   INSERT INTO t2 VALUES(1,2);
   SELECT a, sum(b) FROM t2 WHERE b=5 GROUP BY a;
 ]], {
@@ -377,7 +377,7 @@ test:do_execsql_test("select3-8.1", [[
   DROP TABLE IF EXISTS A;
   CREATE TABLE A (
     A1 DOUBLE,
-    A2 VARCHAR COLLATE "unicode_ci",
+    A2 TEXT,
     A3 DOUBLE,
     id int primary key
   );
diff --git a/test/sql-tap/select4.test.lua b/test/sql-tap/select4.test.lua
index a3a7004337fb136c58a36879781c8c0e27b7a31b..ebe8cd4cac89ca8657c5289b51033622c82dd05a 100755
--- a/test/sql-tap/select4.test.lua
+++ b/test/sql-tap/select4.test.lua
@@ -711,7 +711,7 @@ INSERT INTO t2 VALUES (0, 1), (1, 1), (2, 2), (3, 4), (4, 8), (5, 15);]]
 -- #
 -- do_test select4-7.1 {
 --   execsql {
---     CREATE TABLE t2 AS SELECT log AS 'x', count(*) AS 'y' FROM t1 GROUP BY log;
+--     CREATE TABLE t2 AS SELECT log AS 'x', count INT (*) AS 'y' FROM t1 GROUP BY log;
 --     SELECT * FROM t2 ORDER BY x;
 --   }
 -- } {0 1 1 1 2 2 3 4 4 8 5 15}  
@@ -1045,7 +1045,7 @@ test:do_execsql_test(
     })
 
 test:execsql [[DROP TABLE IF EXISTS t2;
-CREATE TABLE t2 (rowid int primary key, x, y);]]
+CREATE TABLE t2 (rowid int primary key, x INT, y INT);]]
 -- Make sure compound SELECTs with wildly different numbers of columns
 -- do not cause assertion faults due to register allocation issues.
 --
@@ -1261,7 +1261,7 @@ test:do_test(
     "select4-13.1",
     function()
         return test:execsql [[
-            CREATE TABLE t13(id int primary key,a,b);
+            CREATE TABLE t13(id int primary key,a INT,b INT);
             INSERT INTO t13 VALUES(0, 1,1);
             INSERT INTO t13 VALUES(1, 2,1);
             INSERT INTO t13 VALUES(2, 3,1);
@@ -1282,7 +1282,7 @@ test:do_test(
 test:do_execsql_test(
     "select4-14.1",
     [[
-        CREATE TABLE t14(a primary key,b,c);
+        CREATE TABLE t14(a INT primary key,b INT,c INT);
         INSERT INTO t14 VALUES(1,2,3),(4,5,6);
         SELECT * FROM t14 INTERSECT VALUES(3,2,1),(2,3,1),(1,2,3),(2,1,3);
     ]], {
diff --git a/test/sql-tap/select5.test.lua b/test/sql-tap/select5.test.lua
index 7ca25aea8cca1bb30d1f4d50dc3000ec21ccae3d..9c3cd27597600140f37e54dc69127421134310e9 100755
--- a/test/sql-tap/select5.test.lua
+++ b/test/sql-tap/select5.test.lua
@@ -206,7 +206,7 @@ test:do_execsql_test(
     "select5-5.1",
     [[
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(id int primary key, a, b, c);
+        CREATE TABLE t2(id int primary key, a INT, b INT, c INT);
         INSERT INTO t2 VALUES(0, 1, 2, 3);
         INSERT INTO t2 VALUES(1, 1, 4, 5);
         INSERT INTO t2 VALUES(2, 6, 4, 7);
@@ -276,7 +276,7 @@ test:do_execsql_test(
     "select5-6.1",
     [[
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3(x primary key,y);
+        CREATE TABLE t3(x INT primary key,y INT);
         INSERT INTO t3 VALUES(1,NULL);
         INSERT INTO t3 VALUES(2,NULL);
         INSERT INTO t3 VALUES(3,4);
@@ -291,7 +291,7 @@ test:do_execsql_test(
     "select5-6.2",
     [[
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(id int primary key, x,y,z);
+        CREATE TABLE t4(id int primary key, x INT,y INT,z INT);
         INSERT INTO t4 VALUES(0,1,2,NULL);
         INSERT INTO t4 VALUES(1,2,3,NULL);
         INSERT INTO t4 VALUES(2,3,NULL,5);
@@ -324,8 +324,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t8a;
         DROP TABLE IF EXISTS t8b;
-        CREATE TABLE t8a(id int primary key,a,b);
-        CREATE TABLE t8b(rowid int primary key, x);
+        CREATE TABLE t8a(id int primary key,a TEXT,b INT);
+        CREATE TABLE t8b(rowid int primary key, x INT);
         INSERT INTO t8a VALUES(0, 'one', 1);
         INSERT INTO t8a VALUES(1, 'one', 2);
         INSERT INTO t8a VALUES(2, 'two', 3);
diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
index 306e43c97b67885f8602295475d7e44dc02a9179..6fdb4195e7c36a1429d3f287a8d782bec62a3b02 100755
--- a/test/sql-tap/select6.test.lua
+++ b/test/sql-tap/select6.test.lua
@@ -28,7 +28,7 @@ test:do_test(
     "select6-1.0",
     function()
         -- MUST_WORK_TEST
-        -- CREATE TABLE t1(x, y);
+        -- CREATE TABLE t1(x INT , y INT );
         return test:execsql [[
             DROP TABLE IF EXISTS t1;
             CREATE TABLE t1 (x int PRIMARY KEY, y int);
@@ -168,7 +168,7 @@ test:do_test(
     "select6-2.0",
     function()
         -- MUST_WORK_TEST
-        -- CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+        -- CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT );
         return test:execsql [[
             DROP TABLE IF EXISTS t2;
             CREATE TABLE t2(a INTEGER PRIMARY KEY, b int);
@@ -677,9 +677,9 @@ test:do_execsql_test(
     "select6-8.1",
     [[
         DROP TABLE IF EXISTS t3;
-        CREATE TABLE t3 (p primary key, q);
+        CREATE TABLE t3 (p  INT primary key, q INT );
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(q primary key, r);
+        CREATE TABLE t4(q  INT primary key, r INT );
         START TRANSACTION;
         INSERT INTO t3 VALUES(1,11);
         INSERT INTO t3 VALUES(2,22);
@@ -900,9 +900,9 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t;
         DROP TABLE IF EXISTS j;
         DROP TABLE IF EXISTS k;
-        CREATE TABLE t(i primary key,j,k);
-        CREATE TABLE j(l primary key,m);
-        CREATE TABLE k(o primary key);
+        CREATE TABLE t(i  INT primary key,j INT ,k INT );
+        CREATE TABLE j(l  INT primary key,m INT );
+        CREATE TABLE k(o  INT primary key);
     ]])
 
 err = { 1, "SELECTs to the left and right of UNION ALL do not have the same number of result columns" }
@@ -1042,8 +1042,8 @@ test:do_execsql_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(x primary key);
-        CREATE TABLE t2(y primary key, z);
+        CREATE TABLE t1(x  INT primary key);
+        CREATE TABLE t2(y  INT primary key, z INT );
         SELECT ( SELECT y FROM t2 WHERE z = cnt )
           FROM ( SELECT count(*) AS cnt FROM t1 );
     ]], {
diff --git a/test/sql-tap/select7.test.lua b/test/sql-tap/select7.test.lua
index bef20436149fa778e3b33d5a7769bcd24f69e2f8..a5c55309ad7b5dcbcabd9287bba2876456d295e5 100755
--- a/test/sql-tap/select7.test.lua
+++ b/test/sql-tap/select7.test.lua
@@ -24,7 +24,7 @@ test:do_execsql_test(
     "select7-1.1",
     [[
         drop table if exists t1;
-        create table t1(x primary key);
+        create table t1(x TEXT primary key);
         insert into t1 values('amx');
         insert into t1 values('anx');
         insert into t1 values('amy');
@@ -86,8 +86,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS photo;
         DROP TABLE IF EXISTS tag;
-        CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
-        CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
+        CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x INT);
+        CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name TEXT);
 
         SELECT P.pk from PHOTO P WHERE NOT EXISTS (
              SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk
@@ -126,7 +126,7 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "select7-5.1",
     [[
-        CREATE TABLE t2(a primary key,b);
+        CREATE TABLE t2(a  INT primary key,b INT );
         SELECT 5 IN (SELECT a,b FROM t2);
     ]], {
         -- <select7-5.1>
@@ -266,8 +266,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     8.0,
     [[
-        CREATE TABLE t01(x primary key, y);
-        CREATE TABLE t02(x primary key, y);
+        CREATE TABLE t01(x  INT primary key, y INT );
+        CREATE TABLE t02(x  INT primary key, y INT );
     ]])
 
 test:do_catchsql_test(
diff --git a/test/sql-tap/select8.test.lua b/test/sql-tap/select8.test.lua
index 9d075f697bbf965bc717118a1e212d59466104d8..b67d0a194da566077befd80fe5980b8cf5b376bc 100755
--- a/test/sql-tap/select8.test.lua
+++ b/test/sql-tap/select8.test.lua
@@ -23,7 +23,7 @@ test:plan(3)
 -- ["source",[["testdir"],"\/tester.tcl"]]
 test:execsql [[
     DROP TABLE IF EXISTS songs;
-    CREATE TABLE songs(songid primary key, artist, timesplayed);
+    CREATE TABLE songs(songid INT primary key, artist TEXT, timesplayed INT);
     INSERT INTO songs VALUES(1,'one',1);
     INSERT INTO songs VALUES(2,'one',2);
     INSERT INTO songs VALUES(3,'two',3);
diff --git a/test/sql-tap/select9.test.lua b/test/sql-tap/select9.test.lua
index 323304b734de261e76ebc61b77018e055e9ee3f8..f757ab8f233f004f7c3f2a90fc7607de4ac9b93c 100755
--- a/test/sql-tap/select9.test.lua
+++ b/test/sql-tap/select9.test.lua
@@ -136,8 +136,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(id primary key, a, b, c);
-        CREATE TABLE t2(id primary key, d, e, f);
+        CREATE TABLE t1(id INT primary key, a INT, b TEXT, c TEXT);
+        CREATE TABLE t2(id INT primary key, d INT, e TEXT, f TEXT);
         START TRANSACTION;
           INSERT INTO t1 VALUES(0, 1,  'one',   'I');
           INSERT INTO t1 VALUES(1, 3,  NULL,    NULL);
@@ -484,8 +484,8 @@ test:do_test(
     "select9-5.1",
     function()
         return test:execsql [[
-            CREATE TABLE t51(x primary key, y);
-            CREATE TABLE t52(x primary key, y);
+            CREATE TABLE t51(x INT primary key, y INT);
+            CREATE TABLE t52(x INT primary key, y INT);
             CREATE VIEW v5 as
                SELECT x, y FROM t51
                UNION ALL
@@ -536,8 +536,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t61;
         DROP TABLE IF EXISTS t62;
-        CREATE TABLE t61(a primary key);
-        CREATE TABLE t62(b primary key);
+        CREATE TABLE t61(a INT primary key);
+        CREATE TABLE t62(b INT primary key);
         INSERT INTO t61 VALUES(111);
         INSERT INTO t62 VALUES(222);
         SELECT a FROM t61 WHERE 0 UNION SELECT b FROM t62;
diff --git a/test/sql-tap/selectA.test.lua b/test/sql-tap/selectA.test.lua
index 367a3f1272c369c52f9f95db01d95d97b0adaf10..9161cba91347cc456dd525f3f005223426b98e72 100755
--- a/test/sql-tap/selectA.test.lua
+++ b/test/sql-tap/selectA.test.lua
@@ -31,39 +31,39 @@ testprefix = "selectA"
 test:do_execsql_test(
     "selectA-1.0",
     [[
-        CREATE TABLE t1(id primary key, a,b,c COLLATE "unicode_ci");
+        CREATE TABLE t1(id  INT primary key, a INT ,b TEXT,c TEXT COLLATE "unicode_ci");
         INSERT INTO t1 VALUES(1, 1,'a','a');
-        INSERT INTO t1 VALUES(2, 9.9, 'b', 'B');
+        INSERT INTO t1 VALUES(2, 9, 'b', 'B');
         INSERT INTO t1 VALUES(3, NULL, 'C', 'c');
-        INSERT INTO t1 VALUES(4, 'hello', 'd', 'D');
-        INSERT INTO t1 VALUES(5, x'616263', 'e', 'e');
+        INSERT INTO t1 VALUES(4, 4, 'd', 'D');
+        INSERT INTO t1 VALUES(5, -9, 'e', 'e');
         SELECT a,b,c FROM t1;
     ]], {
         -- <selectA-1.0>
-        1, "a", "a", 9.9, "b", "B", "", "C", "c", "hello", "d", "D", "abc", "e", "e"
+        1, "a", "a", 9, "b", "B", "", "C", "c", 4, "d", "D", -9, "e", "e"
         -- </selectA-1.0>
     })
 
 test:do_execsql_test(
     "selectA-1.1",
     [[
-        CREATE TABLE t2(id primary key, x,y,z COLLATE "unicode_ci");
+        CREATE TABLE t2(id  INT primary key, x INT ,y TEXT,z  TEXT COLLATE "unicode_ci");
         INSERT INTO t2 VALUES(1, NULL,'U','u');
-        INSERT INTO t2 VALUES(2, 'mad', 'Z', 'z');
-        INSERT INTO t2 VALUES(3, x'68617265', 'm', 'M');
+        INSERT INTO t2 VALUES(2, 4, 'Z', 'z');
+        INSERT INTO t2 VALUES(3, 4444, 'm', 'M');
         INSERT INTO t2 VALUES(4, 5.2e6, 'X', 'x');
         INSERT INTO t2 VALUES(5, -23, 'Y', 'y');
         SELECT x,y,z FROM t2;
     ]], {
         -- <selectA-1.1>
-        "", "U", "u", "mad", "Z", "z", "hare", "m", "M", 5200000.0, "X", "x", -23, "Y", "y"
+        "", "U", "u", 4, "Z", "z", 4444, "m", "M", 5200000, "X", "x", -23, "Y", "y"
         -- </selectA-1.1>
     })
 
 test:do_execsql_test(
     "selectA-1.2",
     [[
-        CREATE TABLE t3(id primary key, a,b,c COLLATE "unicode_ci");
+        CREATE TABLE t3(id  INT primary key, a INT ,b TEXT ,c  TEXT COLLATE "unicode_ci");
         INSERT INTO t3 SELECT id, a, b, c FROM t1;
         INSERT INTO t3 SELECT id+10, x, y, z FROM t2;
         INSERT INTO t3 SELECT id+20, a, b, c FROM t1;
@@ -88,7 +88,7 @@ test:do_execsql_test(
         ORDER BY a,b,c
     ]], {
         -- <selectA-2.1>
-        "", "C", "c", "", "U", "u", -23, "Y", "y", 1, "a", "a", 9.9, "b", "B", 5200000.0, "X", "x", "hello", "d", "D", "mad", "Z", "z", "abc", "e", "e", "hare", "m", "M"
+        "","C","c","","U","u",-23,"Y","y",1,"a","a",4,"Z","z",9,"b","B",4444,"m","M",5200000,"X","x"
         -- </selectA-2.1>
     })
 
@@ -102,7 +102,7 @@ test:do_test(
         ]]
     end, {
         -- <selectA-2.1.1>
-        "", "C", "c", "", "U", "u", -23, "Y", "y", 1, "a", "a", 9.9, "b", "B", 5200000.0, "X", "x", "hello", "d", "D", "mad", "Z", "z", "abc", "e", "e", "hare", "m", "M"
+        "","C","c","","U","u",-23,"Y","y",1,"a","a",4,"Z","z",9,"b","B",4444,"m","M",5200000,"X","x"
         -- </selectA-2.1.1>
     })
 
@@ -116,7 +116,7 @@ test:do_test(
         ]]
     end, {
         -- <selectA-2.1.2>
-        "", "C", "c", "", "U", "u", -23, "Y", "y", 1, "a", "a", 9.9, "b", "B", 5200000.0, "X", "x", "hello", "d", "D", "mad", "Z", "z", "abc", "e", "e", "hare", "m", "M"
+        5200000,"X","x",4444,"m","M",9,"b","B",4,"Z","z",1,"a","a",-23,"Y","y","","C","c","","U","u"
         -- </selectA-2.1.2>
     })
 
@@ -127,7 +127,7 @@ test:do_execsql_test(
         ORDER BY a DESC,b,c
     ]], {
         -- <selectA-2.2>
-        "hare", "m", "M", "abc", "e", "e", "mad", "Z", "z", "hello", "d", "D", 5200000.0, "X", "x", 9.9, "b", "B", 1, "a", "a", -23, "Y", "y", "", "C", "c", "", "U", "u"
+        5200000,"X","x",4444,"m","M",9,"b","B",4,"Z","z",1,"a","a",-23,"Y","y","","C","c","","U","u"
         -- </selectA-2.2>
     })
 
@@ -138,7 +138,7 @@ test:do_execsql_test(
         ORDER BY a,c,b
     ]], {
         -- <selectA-2.3>
-        "", "C", "c", "", "U", "u", -23, "Y", "y", 1, "a", "a", 9.9, "b", "B", 5200000.0, "X", "x", "hello", "d", "D", "mad", "Z", "z", "abc", "e", "e", "hare", "m", "M"
+        "","C","c","","U","u",-23,"Y","y",1,"a","a",4,"Z","z",9,"b","B",4444,"m","M",5200000,"X","x"
         -- </selectA-2.3>
     })
 
@@ -149,7 +149,7 @@ test:do_execsql_test(
         ORDER BY b,a,c
     ]], {
         -- <selectA-2.4>
-        "", "C", "c", "", "U", "u", 5200000.0, "X", "x", -23, "Y", "y", "mad", "Z", "z", 1, "a", "a", 9.9, "b", "B", "hello", "d", "D", "abc", "e", "e", "hare", "m", "M"
+        "","C","c","","U","u",5200000,"X","x",-23,"Y","y",4,"Z","z",1,"a","a",9,"b","B",4444,"m","M"
         -- </selectA-2.4>
     })
 
@@ -160,7 +160,7 @@ test:do_execsql_test(
         ORDER BY b COLLATE "unicode_ci",a,c
     ]], {
         -- <selectA-2.5>
-        1, "a", "a", 9.9, "b", "B", "", "C", "c", "hello", "d", "D", "abc", "e", "e", "hare", "m", "M", "", "U", "u", 5200000.0, "X", "x", -23, "Y", "y", "mad", "Z", "z"
+        "","C","c","","U","u",5200000,"X","x",-23,"Y","y",4,"Z","z",1,"a","a",9,"b","B",4444,"m","M"
         -- </selectA-2.5>
     })
 
@@ -2370,8 +2370,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t4;
         DROP TABLE IF EXISTS t5;
-        CREATE TABLE t4(id int primary key, a int, b);
-        CREATE TABLE t5(id int primary key, c int, d);
+        CREATE TABLE t4(id int primary key, a int, b INT );
+        CREATE TABLE t5(id int primary key, c int, d INT );
 
         INSERT INTO t5 VALUES(0, 1, 'x');
         INSERT INTO t5 VALUES(1, 2, 'x');
@@ -2419,8 +2419,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t6;
         DROP TABLE IF EXISTS t7;
-        CREATE TABLE t6(id int primary key, a, b);
-        CREATE TABLE t7(id int primary key, c, d);
+        CREATE TABLE t6(id int primary key, a INT , b INT );
+        CREATE TABLE t7(id int primary key, c INT , d INT );
 
         INSERT INTO t7 VALUES(0, 2, 9);
         INSERT INTO t6 VALUES(0, 3, 0);
@@ -2472,8 +2472,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t8;
         DROP TABLE IF EXISTS t9;
-        CREATE TABLE t8(id int primary key, a, b);
-        CREATE TABLE t9(id int primary key, c, d);
+        CREATE TABLE t8(id int primary key, a INT , b INT );
+        CREATE TABLE t9(id int primary key, c INT , d INT );
     ]], {
         -- <5.0>
         
diff --git a/test/sql-tap/selectC.test.lua b/test/sql-tap/selectC.test.lua
index 407d2d2b1bfeb4e6d4f97282618885703da23216..1f9c53d2758081e0ecad9f0144e8f4142dfc9eac 100755
--- a/test/sql-tap/selectC.test.lua
+++ b/test/sql-tap/selectC.test.lua
@@ -23,7 +23,7 @@ test:do_execsql_test(
     "selectC-1.1",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(id PRIMARY KEY, a, b, c);
+        CREATE TABLE t1(id  INT PRIMARY KEY, a INT, b TEXT, c TEXT);
         INSERT INTO t1 VALUES(1, 1,'aaa','bbb');
         INSERT INTO t1 VALUES(2, 1, 'aaa', 'bbb');
         INSERT INTO t1 VALUES(3, 2,'ccc','ddd');
@@ -254,9 +254,9 @@ test:do_execsql_test(
 -- ifcapable trigger&&compound {
 --   do_test selectC-2.1 {
 --     catchsql {
---       CREATE TABLE t21a(a,b);
+--       CREATE TABLE t21a(a INT ,b INT );
 --       INSERT INTO t21a VALUES(1,2);
---       CREATE TABLE t21b(n);
+--       CREATE TABLE t21b(n INT );
 --       CREATE TRIGGER r21 AFTER INSERT ON t21b BEGIN
 --         SELECT a FROM t21a WHERE a>new.x UNION ALL
 --         SELECT b FROM t21a WHERE b>new.x ORDER BY 1 LIMIT 2;
@@ -275,7 +275,7 @@ test:do_execsql_test(
 --         org_id          TEXT NOT NULL,
 --         nickname        TEXT NOT NULL,
 --         license         TEXT,
---         CONSTRAINT person_pk PRIMARY KEY (org_id, nickname),
+--         CONSTRAINT person_pk PRIMARY KEY (org_id, nickname INT ),
 --         CONSTRAINT person_license_uk UNIQUE (license)
 --     );
 --     INSERT INTO person VALUES('meyers', 'jack', '2GAT123');
@@ -300,7 +300,7 @@ test:do_execsql_test(
     "selectC-3.2",
     [[
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(a PRIMARY KEY, b);
+        CREATE TABLE t2(a  TEXT PRIMARY KEY, b TEXT);
         INSERT INTO t2 VALUES('abc', 'xxx');
         INSERT INTO t2 VALUES('def', 'yyy');
         SELECT a, max(b || a) FROM t2 WHERE (b||b||b)!='value' GROUP BY a;
@@ -331,7 +331,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "selectC-4.1",
     [[
-        create table t_distinct_bug (id int primary key, a, b, c);
+        create table t_distinct_bug (id int primary key, a TEXT, b TEXT, c TEXT);
         insert into t_distinct_bug values (0, '1', '1', 'a');
         insert into t_distinct_bug values (1, '1', '2', 'b');
         insert into t_distinct_bug values (2, '1', '3', 'c');
diff --git a/test/sql-tap/selectE.test.lua b/test/sql-tap/selectE.test.lua
index 964a1bcd54da35a8217fc039156bfe17fbba76aa..11b84711e5829500f66688bc7280dcb34cdbdd29 100755
--- a/test/sql-tap/selectE.test.lua
+++ b/test/sql-tap/selectE.test.lua
@@ -29,9 +29,9 @@ test:plan(7)
 -- easily tell where the output of one query ends and the next query
 -- begins. 
 -- 
---     CREATE TABLE t1(a);
+--     CREATE TABLE t1(a TEXT);
 --     INSERT INTO t1 VALUES('abc'),('def');
---     CREATE TABLE t2(a);
+--     CREATE TABLE t2(a TEXT);
 --     INSERT INTO t2 VALUES('DEF');
 -- 
 --     SELECT a FROM t1 EXCEPT SELECT a FROM t2 ORDER BY a;
@@ -50,11 +50,11 @@ test:do_test(
     "selectE-1.0",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key);
+            CREATE TABLE t1(a TEXT primary key);
             INSERT INTO t1 VALUES('abc'),('def'),('ghi');
-            CREATE TABLE t2(a primary key);
+            CREATE TABLE t2(a TEXT primary key);
             INSERT INTO t2 VALUES('DEF'),('abc');
-            CREATE TABLE t3(a primary key);
+            CREATE TABLE t3(a TEXT primary key);
             INSERT INTO t3 VALUES('def'),('jkl');
 
             SELECT a FROM t1 EXCEPT SELECT a FROM t2
diff --git a/test/sql-tap/selectF.test.lua b/test/sql-tap/selectF.test.lua
index a28fe5d3739a5be8294cbb33e3be1a32c4c03df1..4cc5af137b0c236a117a863fc1fb4625899897e4 100755
--- a/test/sql-tap/selectF.test.lua
+++ b/test/sql-tap/selectF.test.lua
@@ -24,8 +24,8 @@ testprefix = "selectF"
 test:do_execsql_test(
     1,
     [[
-        CREATE TABLE t1(a primary key, b, c);
-        CREATE TABLE t2(d primary key, e, f);
+        CREATE TABLE t1(a INT primary key, b TEXT, c TEXT);
+        CREATE TABLE t2(d INT primary key, e TEXT, f TEXT);
         START TRANSACTION;
         INSERT INTO t1 VALUES(1,'one','I');
         INSERT INTO t2 VALUES(5,'ten','XX');
diff --git a/test/sql-tap/selectG.test.lua b/test/sql-tap/selectG.test.lua
index c9ee7de358fe558f8caff6eca55a00d638955a0d..69029023fae0e9eb829acd32920a9b3febbc11e7 100755
--- a/test/sql-tap/selectG.test.lua
+++ b/test/sql-tap/selectG.test.lua
@@ -34,7 +34,7 @@ local time_quota =
 test:do_test(
     100,
     function()
-        local sql_arr = {[[CREATE TABLE t1(x primary key);
+        local sql_arr = {[[CREATE TABLE t1(x INT primary key);
             INSERT INTO t1(x) VALUES]]}
         local i
         for i = 1, 100000-1, 1 do
diff --git a/test/sql-tap/sort.test.lua b/test/sql-tap/sort.test.lua
index 436af4bbcaa6f4000ca82cf94a7d7c218a71cc83..240c7db583f6d1e343f0fca42af74759c262afcc 100755
--- a/test/sql-tap/sort.test.lua
+++ b/test/sql-tap/sort.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(69)
+test:plan(62)
 
 --!./tcltestrunner.lua
 -- 2001 September 15.
@@ -294,7 +294,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "sort-3.1",
     [[
-        CREATE TABLE t2(a,b PRIMARY KEY);
+        CREATE TABLE t2(a TEXT ,b  INT PRIMARY KEY);
         INSERT INTO t2 VALUES('AGLIENTU',1);
         INSERT INTO t2 VALUES('AGLIE`',2);
         INSERT INTO t2 VALUES('AGNA',3);
@@ -433,7 +433,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "sort-5.1",
     [[
-        create table t3(id primary key, a,b);
+        create table t3(id  INT primary key, a INT ,b TEXT);
         insert into t3 values(1, 5,NULL);
         insert into t3 values(2, 6,NULL);
         insert into t3 values(3, 3,NULL);
@@ -663,84 +663,6 @@ test:do_execsql_test(
         -- </sort-8.1>
     })
 
--- BLOBs should sort after TEXT
---
-test:do_execsql_test(
-    "sort-9.1",
-    [[
-        CREATE TABLE t6(x PRIMARY KEY, y);
-        INSERT INTO t6 VALUES(1,1);
-        INSERT INTO t6 VALUES(2,'1');
-        INSERT INTO t6 VALUES(3,x'31');
-        INSERT INTO t6 VALUES(4,NULL);
-        SELECT x FROM t6 ORDER BY y;
-    ]], {
-        -- <sort-9.1>
-        4, 1, 2, 3
-        -- </sort-9.1>
-    })
-
-test:do_execsql_test(
-    "sort-9.2",
-    [[
-        SELECT x FROM t6 ORDER BY y DESC;
-    ]], {
-        -- <sort-9.2>
-        3, 2, 1, 4
-        -- </sort-9.2>
-    })
-
-test:do_execsql_test(
-    "sort-9.3",
-    [[
-        SELECT x FROM t6 WHERE y<1
-    ]], {
-        -- <sort-9.3>
-        
-        -- </sort-9.3>
-    })
-
-test:do_execsql_test(
-    "sort-9.4",
-    [[
-        SELECT x FROM t6 WHERE y<'1'
-    ]], {
-        -- <sort-9.4>
-        1
-        -- </sort-9.4>
-    })
-
-test:do_execsql_test(
-    "sort-9.5",
-    [[
-        SELECT x FROM t6 WHERE y<x'31'
-    ]], {
-        -- <sort-9.5>
-        1, 2
-        -- </sort-9.5>
-    })
-
-test:do_execsql_test(
-    "sort-9.6",
-    [[
-        SELECT x FROM t6 WHERE y>1
-    ]], {
-        -- <sort-9.6>
-        2, 3
-        -- </sort-9.6>
-    })
-
-test:do_execsql_test(
-    "sort-9.7",
-    [[
-        SELECT x FROM t6 WHERE y>'1'
-    ]], {
-        -- <sort-9.7>
-        3
-        -- </sort-9.7>
-    })
-
-
 
 -- endif bloblit
 -- Ticket #1092 - ORDER BY on rowid fields.
@@ -785,10 +707,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "sort-11.1",
     [[
-        create table t8(a PRIMARY KEY, b, c);
+        create table t8(a  INT PRIMARY KEY, b INT , c INT );
         insert into t8 values(1,2,3);
         insert into t8 values(2,3,4);
-        create table t9(id primary key, x,y);
+        create table t9(id  INT primary key, x INT ,y INT );
         insert into t9 values(1, 2,4);
         insert into t9 values(2, 2,3);
         select y from t8, t9 where a=1 order by a, y;
@@ -806,13 +728,13 @@ test:do_execsql_test(
     "sort-12.1",
     [[
         create table a (id integer primary key);
-        create table b (id integer primary key, aId integer, text);
+        create table b (id integer primary key, aId integer, "text" text);
         insert into a values (1);
         insert into b values (2, 1, 'xxx');
         insert into b values (1, 1, 'zzz');
         insert into b values (3, 1, 'yyy');
-        select a.id, b.id, b.text from a join b on (a.id = b.aId)
-          order by a.id, b.text;
+        select a.id, b.id, b."text" from a join b on (a.id = b.aId)
+          order by a.id, b."text";
     ]], {
         -- <sort-12.1>
         1, 2, "xxx", 1, 3, "yyy", 1, 1, "zzz"
@@ -825,7 +747,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "sort-13.0",
     [[
-        CREATE TABLE t10(id primary key, a, b);
+        CREATE TABLE t10(id  INT primary key, a INT , b INT );
     ]])
 
 test:do_test(
@@ -874,7 +796,7 @@ box.internal.sql_create_function("cksum", cksum)
     test:do_execsql_test(
         "sort-14.0",
         [[
-            CREATE TABLE t11(a, b);
+            CREATE TABLE t11(a INT , b INT );
             INSERT INTO t11 VALUES(randomblob(5000), NULL);
             INSERT INTO t11 SELECT randomblob(5000), NULL FROM t11; --2
             INSERT INTO t11 SELECT randomblob(5000), NULL FROM t11; --3
@@ -940,7 +862,7 @@ box.internal.sql_create_function("cksum", cksum)
         test:do_execsql_test(
             "15."..tn..".2",
             [[
-                CREATE TABLE t1(a primary key);
+                CREATE TABLE t1(a  INT primary key);
                 INSERT INTO t1 VALUES(4);
                 INSERT INTO t1 VALUES(5);
                 INSERT INTO t1 VALUES(3);
@@ -979,7 +901,7 @@ box.internal.sql_create_function("cksum", cksum)
     test:do_catchsql_test(
         16.1,
         [[
-            CREATE TABLE t1(a, b, c);
+            CREATE TABLE t1(a INT , b INT , c INT );
             INSERT INTO t1 VALUES(1, 2, 3);
             INSERT INTO t1 VALUES(1, NULL, 3);
             INSERT INTO t1 VALUES(NULL, 2, 3);
@@ -996,7 +918,7 @@ box.internal.sql_create_function("cksum", cksum)
     test:do_catchsql_test(
         16.2,
         [[
-            CREATE TABLE t1(a, b, c);
+            CREATE TABLE t1(a INT , b INT , c INT );
             INSERT INTO t1 VALUES(1, 2, 3);
             INSERT INTO t1 VALUES(1, NULL, 3);
             INSERT INTO t1 VALUES(1, 2, 3);
diff --git a/test/sql-tap/subquery.test.lua b/test/sql-tap/subquery.test.lua
index fb1c23c0b33a9e9db2266381b4a2a8fc27f108d1..fb9a737d11515cfcd08e4d6e61fb9fd91fbde6b3 100755
--- a/test/sql-tap/subquery.test.lua
+++ b/test/sql-tap/subquery.test.lua
@@ -26,8 +26,8 @@ test:do_test(
     "subquery-1.1",
     function()
         test:execsql [[
-            CREATE TABLE t1(a PRIMARY KEY,b);
-            CREATE TABLE t2(x PRIMARY KEY,y);
+            CREATE TABLE t1(a  INT PRIMARY KEY,b INT );
+            CREATE TABLE t2(x  INT PRIMARY KEY,y INT );
             START TRANSACTION;
             INSERT INTO t1 VALUES(1,2);
             INSERT INTO t1 VALUES(3,4);
@@ -244,7 +244,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "subquery-2.2.1",
     [[
-        CREATE TABLE t3(a PRIMARY KEY, b);
+        CREATE TABLE t3(a  INT PRIMARY KEY, b INT );
         INSERT INTO t3 VALUES(1, 2);
         INSERT INTO t3 VALUES(3, 1);
     ]], {
@@ -355,7 +355,7 @@ test:do_test(
         -- In the expr "x IN (SELECT a FROM t3)" the RHS of the IN operator
         -- has text affinity and the LHS has integer affinity.  The rule is
         -- that we try to convert both sides to an integer before doing the
-        -- comparision.  Hence, the integer value 10 in t3 will compare equal
+        -- comparision. Hence, the integer value 10 in t3 will compare equal
         -- to the string value '10.0' in t4 because the t4 value will be
         -- converted into an integer.
         return test:execsql [[
@@ -413,10 +413,10 @@ test:do_test(
         test:catchsql " DROP TABLE t1; "
         test:catchsql " DROP TABLE t2; "
         return test:execsql [[
-            CREATE TABLE t1(a PRIMARY KEY,b);
+            CREATE TABLE t1(a  INT PRIMARY KEY,b INT );
             INSERT INTO t1 VALUES(1,2);
             CREATE VIEW v1 AS SELECT b FROM t1 WHERE a>0;
-            CREATE TABLE t2(p PRIMARY KEY,q);
+            CREATE TABLE t2(p  INT PRIMARY KEY,q INT );
             INSERT INTO t2 VALUES(2,9);
             SELECT * FROM v1 WHERE EXISTS(SELECT * FROM t2 WHERE p=v1.b);
         ]]
@@ -443,7 +443,7 @@ test:do_test(
     "subquery-3.2",
     function()
         test:catchsql [[
-            CREATE TABLE t1(a PRIMARY KEY,b);
+            CREATE TABLE t1(a  INT PRIMARY KEY,b INT );
             INSERT INTO t1 VALUES(1,2);
         ]]
         return test:execsql [[
@@ -474,7 +474,7 @@ test:do_test(
     function()
         test:catchsql "DROP TABLE t2"
         return test:execsql [[
-            CREATE TABLE t2(c PRIMARY KEY, d);
+            CREATE TABLE t2(c  INT PRIMARY KEY, d TEXT);
             INSERT INTO t2 VALUES(1, 'one');
             INSERT INTO t2 VALUES(2, 'two');
             SELECT a, (SELECT d FROM t2 WHERE a=c) FROM t1 GROUP BY a;
@@ -522,7 +522,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "subquery-3.4.1",
     [[
-        CREATE TABLE t34(id primary key, x,y);
+        CREATE TABLE t34(id  INT primary key, x INT ,y INT );
         INSERT INTO t34 VALUES(1, 106,4), (2, 107,3), (3, 106,5), (4, 107,5);
         SELECT a.x, avg(a.y)
           FROM t34 AS a
@@ -579,8 +579,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "subquery-3.5.1",
     [[
-        CREATE TABLE t35a(x PRIMARY KEY); INSERT INTO t35a VALUES(1),(2),(3);
-        CREATE TABLE t35b(y PRIMARY KEY); INSERT INTO t35b VALUES(98), (99);
+        CREATE TABLE t35a(x  INT PRIMARY KEY); INSERT INTO t35a VALUES(1),(2),(3);
+        CREATE TABLE t35b(y  INT PRIMARY KEY); INSERT INTO t35b VALUES(98), (99);
         SELECT max((SELECT avg(y) FROM t35b)) FROM t35a;
     ]], {
         -- <subquery-3.5.1>
@@ -681,7 +681,7 @@ test:do_test(
     "subquery-4.2.1",
     function()
         test:execsql [[
-            CREATE TABLE t3(a PRIMARY KEY);
+            CREATE TABLE t3(a  INT PRIMARY KEY);
             INSERT INTO t3 VALUES(10);
         ]]
         return test:execsql "INSERT INTO t3 VALUES((SELECT max(a) FROM t3)+1)"
@@ -722,12 +722,12 @@ test:do_test(
         callcnt = 0
         box.internal.sql_create_function("callcnt", "INT", callcntproc)
         return test:execsql [[
-            CREATE TABLE t4(x,y PRIMARY KEY);
+            CREATE TABLE t4(x TEXT,y  INT PRIMARY KEY);
             INSERT INTO t4 VALUES('one',1);
             INSERT INTO t4 VALUES('two',2);
             INSERT INTO t4 VALUES('three',3);
             INSERT INTO t4 VALUES('four',4);
-            CREATE TABLE t5(a PRIMARY KEY,b);
+            CREATE TABLE t5(a  INT PRIMARY KEY,b INT );
             INSERT INTO t5 VALUES(1,11);
             INSERT INTO t5 VALUES(2,22);
             INSERT INTO t5 VALUES(3,33);
@@ -798,15 +798,15 @@ test:do_test(
 test:do_execsql_test(
     "subquery-7.1",
     [[
-        CREATE TABLE t7(c7 PRIMARY KEY);
+        CREATE TABLE t7(c7  INT PRIMARY KEY);
         INSERT INTO t7 VALUES(1);
         INSERT INTO t7 VALUES(2);
         INSERT INTO t7 VALUES(3);
-        CREATE TABLE t8(c8 PRIMARY KEY);
+        CREATE TABLE t8(c8  INT PRIMARY KEY);
         INSERT INTO t8 VALUES(100);
         INSERT INTO t8 VALUES(200);
         INSERT INTO t8 VALUES(300);
-        CREATE TABLE t9(c9 PRIMARY KEY);
+        CREATE TABLE t9(c9  INT PRIMARY KEY);
         INSERT INTO t9 VALUES(10000);
         INSERT INTO t9 VALUES(20000);
         INSERT INTO t9 VALUES(30000);
diff --git a/test/sql-tap/subquery2.test.lua b/test/sql-tap/subquery2.test.lua
index db3a317294e8f5fe553a662ae59e8d4c8d654f60..240911f4d997512b7cd111503632ed3a6c369a32 100755
--- a/test/sql-tap/subquery2.test.lua
+++ b/test/sql-tap/subquery2.test.lua
@@ -26,9 +26,9 @@ test:do_test(
     "subquery2-1.1",
     function()
         test:execsql [[
-            CREATE TABLE t1(a PRIMARY KEY,b);
-            CREATE TABLE t2(c PRIMARY KEY,d);
-            CREATE TABLE t3(e PRIMARY KEY,f);
+            CREATE TABLE t1(a  INT PRIMARY KEY,b INT );
+            CREATE TABLE t2(c  INT PRIMARY KEY,d INT );
+            CREATE TABLE t3(e  INT PRIMARY KEY,f INT );
             START TRANSACTION;
             INSERT INTO t1 VALUES(1,2);
             INSERT INTO t1 VALUES(3,4);
@@ -117,8 +117,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     2.1,
     [[
-        CREATE TABLE t4(a PRIMARY KEY, b);
-        CREATE TABLE t5(a PRIMARY KEY, b);
+        CREATE TABLE t4(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE t5(a  INT PRIMARY KEY, b INT );
         INSERT INTO t5 VALUES(3, 5);
 
         INSERT INTO t4 VALUES(1, 1);
diff --git a/test/sql-tap/suite.ini b/test/sql-tap/suite.ini
index 2455f5e8dd7f45670cc8b33f767418cb58536a3a..ea6c2da7aba93810fb33f2c8c1022537b40872d8 100644
--- a/test/sql-tap/suite.ini
+++ b/test/sql-tap/suite.ini
@@ -1,6 +1,10 @@
 [default]
 core = app
 description = Database tests with #! using TAP
+disabled = selectA.test.lua ;
+           like2.test.lua ;
+           types2.test.lua ;
+           e_expr.test.lua ;
 lua_libs = lua/sqltester.lua ../sql/lua/sql_tokenizer.lua ../box/lua/identifier.lua
 is_parallel = True
 release_disabled = debug_mode_only.test.lua
diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua
index 13e495edae15f3bd66aaa6f164bc0599b72ff22b..8367ec016123a32893425d054e76e394ff4d5da9 100755
--- a/test/sql-tap/table.test.lua
+++ b/test/sql-tap/table.test.lua
@@ -148,7 +148,7 @@ test:do_test(
 test:do_catchsql_test(
     "table-2.1d",
     [[
-        CREATE TABLE IF NOT EXISTS test2(x primary key,y)
+        CREATE TABLE IF NOT EXISTS test2(x INT primary key,y INT)
     ]], {
         -- <table-2.1d>
         0
@@ -158,7 +158,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "table-2.1e",
     [[
-        CREATE TABLE IF NOT EXISTS test2(x UNIQUE, y TEXT PRIMARY KEY)
+        CREATE TABLE IF NOT EXISTS test2(x INT UNIQUE, y TEXT PRIMARY KEY)
     ]], {
         -- <table-2.1e>
         0
@@ -180,7 +180,7 @@ test:do_execsql_test(
 test:do_test(
     "table-2.2a",
     function()
-        test:execsql "CREATE TABLE test2(id primary key, one text)"
+        test:execsql "CREATE TABLE test2(id INT primary key, one text)"
         return test:execsql "CREATE INDEX test3 ON test2(one)"
         --catchsql {CREATE TABLE test3(id primary key, two text)}
     end, {
@@ -263,7 +263,7 @@ test:do_test(
 test:do_catchsql_test(
     "table-3.2",
     [[
-        CREATE TABLE BIG(xyz foo primary key)
+        CREATE TABLE BIG(xyz int primary key)
     ]], {
         -- <table-3.2>
         1, "table BIG already exists"
@@ -273,7 +273,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "table-3.3",
     [[
-        CREATE TABLE biG(xyz foo primary key)
+        CREATE TABLE biG(xyz int primary key)
     ]], {
         -- <table-3.3>
         1, "table BIG already exists"
@@ -283,7 +283,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "table-3.4",
     [[
-        CREATE TABLE bIg(xyz foo primary key)
+        CREATE TABLE bIg(xyz int primary key)
     ]], {
         -- <table-3.4>
         1, "table BIG already exists"
@@ -317,7 +317,7 @@ test:do_test(
     "table-4.1",
     function()
         for i = 1, 100, 1 do
-            local sql = "CREATE TABLE "..string.format("test%03d", i).." (id primary key, "
+            local sql = "CREATE TABLE "..string.format("test%03d", i).." (id INT primary key, "
             for k = 1, i-1, 1 do
                 sql = sql .. "field"..k.." text,"
             end
@@ -489,14 +489,14 @@ test:do_catchsql_test(
     "table-7.1",
     [=[
         CREATE TABLE weird(
-          id primary key,
+          id int primary key,
           "desc" text,
           "asc" text,
           key int,
-          "14_vac" boolean,
+          "14_vac" int,
           fuzzy_dog_12 varchar(10),
           beginn blob,
-          endd clob
+          endd blob
         )
     ]=], {
         -- <table-7.1>
@@ -528,7 +528,7 @@ test:do_execsql2_test(
 test:do_execsql_test(
     "table-7.3",
     [[
-        CREATE TABLE savepoint_t(release_t primary key);
+        CREATE TABLE savepoint_t(release_t int primary key);
         INSERT INTO savepoint_t(release_t) VALUES(10);
         UPDATE savepoint_t SET release_t = 5;
         SELECT release_t FROM savepoint_t;
@@ -545,14 +545,14 @@ test:do_execsql2_test(
     [=[
         --CREATE TABLE t2 AS SELECT * FROM weird;
         CREATE TABLE t2(
-          id primary key,
+          id int primary key,
           "desc" text,
           "asc" text,
           key int,
-          "14_vac" boolean,
+          "14_vac" int,
           fuzzy_dog_12 varchar(10),
           beginn blob,
-          endd clob
+          endd blob
         );
         INSERT INTO t2 SELECT * from weird;
         SELECT * FROM t2;
@@ -694,7 +694,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
     "table-9.1",
     [[
-        CREATE TABLE t6(a primary key,b,a);
+        CREATE TABLE t6(a int primary key,b int,a int);
     ]], {
         -- <table-9.1>
         1, "duplicate column name: A"
@@ -718,7 +718,7 @@ test:do_catchsql_test(
     [[
         -- there is no t4 table
         --CREATE TABLE t6(a REFERENCES t4(a) NOT NULL primary key);
-        CREATE TABLE t6(a REFERENCES t2(id) NOT NULL primary key);
+        CREATE TABLE t6(a INT REFERENCES t2(id) NOT NULL primary key);
         INSERT INTO t6 VALUES(NULL);
     ]], {
         -- <table-10.1>
@@ -764,7 +764,7 @@ test:do_catchsql_test(
     "table-10.5",
     [[
         DROP TABLE t6;
-        CREATE TABLE t6(a NOT NULL NOT DEFERRABLE INITIALLY IMMEDIATE primary key);
+        CREATE TABLE t6(a int NOT NULL NOT DEFERRABLE INITIALLY IMMEDIATE primary key);
     ]], {
         -- <table-10.5>
         0
@@ -775,7 +775,7 @@ test:do_catchsql_test(
     "table-10.6",
     [[
         DROP TABLE t6;
-        CREATE TABLE t6(a NOT NULL DEFERRABLE INITIALLY DEFERRED primary key);
+        CREATE TABLE t6(a int NOT NULL DEFERRABLE INITIALLY DEFERRED primary key);
     ]], {
         -- <table-10.6>
         0
@@ -786,7 +786,7 @@ test:do_catchsql_test(
     "table-10.7",
     [[
         DROP TABLE t6;
-        CREATE TABLE t6(a primary key,
+        CREATE TABLE t6(a int primary key,
           FOREIGN KEY (a) REFERENCES t4(b) DEFERRABLE INITIALLY DEFERRED
         );
     ]], {
@@ -800,8 +800,8 @@ test:do_catchsql_test(
     [[
         DROP TABLE IF EXISTS t6;
         DROP TABLE IF EXISTS t4;
-        CREATE TABLE t4(x UNIQUE, y, PRIMARY KEY (x, y));
-        CREATE TABLE t6(a primary key,b,c,
+        CREATE TABLE t4(x INT UNIQUE, y INT, PRIMARY KEY (x, y));
+        CREATE TABLE t6(a INT primary key,b INT,c INT,
           FOREIGN KEY (b,c) REFERENCES t4(x,y) MATCH PARTIAL
             ON UPDATE SET NULL ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
         );
@@ -815,7 +815,7 @@ test:do_catchsql_test(
     "table-10.9",
     [[
         DROP TABLE t6;
-        CREATE TABLE t6(a primary key,b,c,
+        CREATE TABLE t6(a int primary key,b int,c int,
           FOREIGN KEY (b,c) REFERENCES t4(x)
         );
     ]], {
@@ -829,7 +829,7 @@ test:do_test(
     function()
         test:catchsql "DROP TABLE t6"
         return test:catchsql [[
-            CREATE TABLE t6(a primary key,b,c,
+            CREATE TABLE t6(a int primary key,b int,c int,
               FOREIGN KEY (b,c) REFERENCES t4(x,y,z)
             );
         ]]
@@ -844,7 +844,7 @@ test:do_test(
     function()
         test:catchsql "DROP TABLE t6"
         return test:catchsql [[
-            CREATE TABLE t6(a,b, c REFERENCES t4(x,y));
+            CREATE TABLE t6(a int,b int, c int REFERENCES t4(x,y));
         ]]
     end, {
         -- <table-10.11>
@@ -857,7 +857,7 @@ test:do_test(
     function()
         test:catchsql "DROP TABLE t6"
         return test:catchsql [[
-            CREATE TABLE t6(a,b,c,
+            CREATE TABLE t6(a int,b int,c int,
               FOREIGN KEY (b,x) REFERENCES t4(x,y)
             );
         ]]
@@ -872,7 +872,7 @@ test:do_test(
     function()
         test:catchsql "DROP TABLE t6"
         return test:catchsql [[
-            CREATE TABLE t6(a,b,c,
+            CREATE TABLE t6(a int,b int,c int,
               FOREIGN KEY (x,b) REFERENCES t4(x,y)
             );
         ]]
@@ -892,13 +892,13 @@ test:do_execsql_test(
     [[
         CREATE TABLE t7(
            a integer primary key,
-           b number(5,10),
-           c character varying (8),
+           b numeric(5,10),
+           c char(8),
            d VARCHAR(9),
-           e clob,
+           e blob,
            f BLOB,
            g Text,
-           h
+           h text
         );
         INSERT INTO t7(a) VALUES(1);
         SELECT typeof(a), typeof(b), typeof(c), typeof(d),
@@ -1042,7 +1042,7 @@ test:do_test(
     function()
         --test:execsql "BEGIN"
         for i = 0, 2000-1, 1 do
-            test:execsql("CREATE TABLE tbl"..i.." (a primary key, b, c)")
+            test:execsql("CREATE TABLE tbl"..i.." (a int primary key, b int, c int)")
         end
         --return test:execsql "COMMIT"
         return
@@ -1159,10 +1159,10 @@ test:do_test(
     function()
         local columns = {}
         for i = 0, 1000-1, 1 do
-            table.insert(columns, "c"..i)
+            table.insert(columns, "c"..i .. ' int')
         end
         columns = table.concat(columns, ",")
-        test:execsql("CREATE TABLE t(c primary key, "..columns..")")
+        test:execsql("CREATE TABLE t(c int primary key, "..columns..")")
         return
     end, {
     -- <table-15.1>
diff --git a/test/sql-tap/tkt-02a8e81d44.test.lua b/test/sql-tap/tkt-02a8e81d44.test.lua
index 746222ef91c72f24e99578e60fc0e605c298a2dd..792a5527c9fe30d296686fb2396d74796d043080 100755
--- a/test/sql-tap/tkt-02a8e81d44.test.lua
+++ b/test/sql-tap/tkt-02a8e81d44.test.lua
@@ -25,7 +25,7 @@ test:plan(1)
 test:do_execsql_test(
     "tkt-02a838-1.1",
     [[
-        CREATE TABLE t1(a primary key);
+        CREATE TABLE t1(a INT primary key);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t1 VALUES(2);
         INSERT INTO t1 VALUES(4);
diff --git a/test/sql-tap/tkt-31338dca7e.test.lua b/test/sql-tap/tkt-31338dca7e.test.lua
index 8b4a648705845444cc71ff1776c4fefa5d419250..c75e9bc76d2c087a9fc9d7af4a9fe4603460f62c 100755
--- a/test/sql-tap/tkt-31338dca7e.test.lua
+++ b/test/sql-tap/tkt-31338dca7e.test.lua
@@ -29,8 +29,8 @@ test:do_test(
     "tkt-31338-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(x primary key);
-            CREATE TABLE t2(y primary key);
+            CREATE TABLE t1(x  INT primary key);
+            CREATE TABLE t2(y  INT primary key);
             INSERT INTO t1 VALUES(111);
             INSERT INTO t1 VALUES(222);
             INSERT INTO t2 VALUES(333);
@@ -64,9 +64,9 @@ test:do_test(
     "tkt-31338-2.1",
     function()
         return test:execsql [[
-            CREATE TABLE t3(v primary key,w);
-            CREATE TABLE t4(x primary key,y);
-            CREATE TABLE t5(z primary key);
+            CREATE TABLE t3(v  INT primary key,w INT );
+            CREATE TABLE t4(x  INT primary key,y INT );
+            CREATE TABLE t5(z  INT primary key);
             INSERT INTO t3 VALUES(111,222);
             INSERT INTO t3 VALUES(333,444);
             INSERT INTO t4 VALUES(222,333);
@@ -117,15 +117,15 @@ test:do_test(
         --    db eval "DROP TABLE $x"
         -- }
         return test:execsql [[
-            CREATE TABLE t1(a primary key,b,c,d);
-            CREATE TABLE t2(e primary key,f);
+            CREATE TABLE t1(a  INT primary key,b INT ,c INT ,d INT );
+            CREATE TABLE t2(e  INT primary key,f INT );
             INSERT INTO t1 VALUES(1,2,3,4);
             INSERT INTO t2 VALUES(10,-8);
             CREATE INDEX t1a ON t1(a);
             CREATE INDEX t1b ON t1(b);
-            CREATE TABLE t3(g primary key);
+            CREATE TABLE t3(g  INT primary key);
             INSERT INTO t3 VALUES(4);
-            CREATE TABLE t4(h primary key);
+            CREATE TABLE t4(h  INT primary key);
             INSERT INTO t4 VALUES(5);
 
             SELECT * FROM t3 LEFT JOIN t1 ON d=g LEFT JOIN t4 ON c=h
@@ -199,8 +199,8 @@ if (1 > 0)
         "tkt-31338-3.5",
         function()
             return test:execsql [[
-                CREATE TABLE t5(a primary key,b,c,d,e,f);
-                CREATE TABLE t6(g primary key,h);
+                CREATE TABLE t5(a  INT primary key,b INT ,c INT ,d INT ,e INT ,f INT );
+                CREATE TABLE t6(g  INT primary key,h INT );
                 CREATE TRIGGER t6r AFTER INSERT ON t6 BEGIN
                   INSERT INTO t5    
                     SELECT * FROM t3 LEFT JOIN t1 ON d=g LEFT JOIN t4 ON c=h
diff --git a/test/sql-tap/tkt-385a5b56b9.test.lua b/test/sql-tap/tkt-385a5b56b9.test.lua
index 4f5ea91cac39fbbb9407aa05a4df88be55a94caf..6e863c73f2a0df6ef3b61ffbb8d07421c2828b78 100755
--- a/test/sql-tap/tkt-385a5b56b9.test.lua
+++ b/test/sql-tap/tkt-385a5b56b9.test.lua
@@ -21,7 +21,7 @@ testprefix = "tkt-385a5b56b9"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(id primary key, x, y);
+        CREATE TABLE t1(id INT primary key, x INT, y INT);
         INSERT INTO t1 VALUES(1, 1, NULL);
         INSERT INTO t1 VALUES(2, 2, NULL);
         INSERT INTO t1 VALUES(3, 1, NULL);
@@ -57,7 +57,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     2.0,
     [[
-        CREATE TABLE t2(x primary key, y NOT NULL);
+        CREATE TABLE t2(x INT primary key, y INT NOT NULL);
         CREATE UNIQUE INDEX t2x ON t2(x);
         CREATE UNIQUE INDEX t2y ON t2(y);
     ]])
diff --git a/test/sql-tap/tkt-38cb5df375.test.lua b/test/sql-tap/tkt-38cb5df375.test.lua
index dc8702ae3e66dbfc5c6ea914ef12ee85a1d3be70..726496aa3c3308fb6b4735150ea0a91604bd7e77 100755
--- a/test/sql-tap/tkt-38cb5df375.test.lua
+++ b/test/sql-tap/tkt-38cb5df375.test.lua
@@ -35,7 +35,7 @@ local ii
 test:do_execsql_test(
     "tkt-38cb5df375.0",
     [[
-        CREATE TABLE t1(a primary key);
+        CREATE TABLE t1(a  INT primary key);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t1 VALUES(2);
         INSERT INTO t1 SELECT a+2 FROM t1;
diff --git a/test/sql-tap/tkt-3998683a16.test.lua b/test/sql-tap/tkt-3998683a16.test.lua
index d0b322d1923d8349f843639378dc9264b53a444d..257965cb70856a5d8ad63ddc1de326798d807571 100755
--- a/test/sql-tap/tkt-3998683a16.test.lua
+++ b/test/sql-tap/tkt-3998683a16.test.lua
@@ -25,7 +25,7 @@ test:do_test(
     "tkt-3998683a16.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(x primary key, y REAL);
+            CREATE TABLE t1(x  INT primary key, y REAL);
             INSERT INTO t1 VALUES(1, '1.0');
             INSERT INTO t1 VALUES(2, '.125');
             INSERT INTO t1 VALUES(3, '123.');
diff --git a/test/sql-tap/tkt-4a03edc4c8.test.lua b/test/sql-tap/tkt-4a03edc4c8.test.lua
index ea42d78c92ee39bbc913d46a23d59b9197fc6918..00bf311b4e96c6ef0550cb4c4373540b2d8b2ae1 100755
--- a/test/sql-tap/tkt-4a03edc4c8.test.lua
+++ b/test/sql-tap/tkt-4a03edc4c8.test.lua
@@ -26,7 +26,7 @@ test:do_test(
         test:execsql [[
             CREATE TABLE t1(
               a INTEGER PRIMARY KEY,
-              b UNIQUE
+              b INTEGER UNIQUE
             );
             INSERT INTO t1 VALUES(1, 1);
             INSERT INTO t1 VALUES(2, 2);
diff --git a/test/sql-tap/tkt-4c86b126f2.test.lua b/test/sql-tap/tkt-4c86b126f2.test.lua
index 529bcc9c4a7362e351373401349cface72b16241..ad0fab7ca5f6c329272220d1bd1c80a8a787b96c 100755
--- a/test/sql-tap/tkt-4c86b126f2.test.lua
+++ b/test/sql-tap/tkt-4c86b126f2.test.lua
@@ -51,7 +51,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt-4c86b126f2-2.1",
     [[
-        CREATE TABLE t1(x TEXT PRIMARY KEY, y TEXT UNIQUE, z);
+        CREATE TABLE t1(x TEXT PRIMARY KEY, y TEXT UNIQUE, z TEXT);
         INSERT INTO t1 VALUES('ghi','jkl','y');
         SELECT * FROM t1 WHERE (x='ghi' OR y='jkl') AND z IS NOT NULL;
     ]], {
diff --git a/test/sql-tap/tkt-4dd95f6943.test.lua b/test/sql-tap/tkt-4dd95f6943.test.lua
index 016551c5b880a5c596e09db50917336e9ace3df1..88047d104e1af33796174d5a2c22995e54280ec4 100755
--- a/test/sql-tap/tkt-4dd95f6943.test.lua
+++ b/test/sql-tap/tkt-4dd95f6943.test.lua
@@ -21,7 +21,7 @@ testprefix = "tkt-4dd95f6943"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(id primary key, x);
+        CREATE TABLE t1(id INT primary key, x INT);
         INSERT INTO t1 VALUES (1, 3), (2, 4), (3, 2), (4, 1), (5, 5), (6, 6);
     ]])
 
@@ -62,7 +62,7 @@ end
 test:do_execsql_test(
     2.0,
     [[
-        CREATE TABLE t2(id primary key, x, y);
+        CREATE TABLE t2(id INT primary key, x INT, y INT);
         INSERT INTO t2 VALUES (1, 5, 3), (2, 5, 4), (3, 5, 2), (4, 5, 1), (5, 5, 5), (6, 5, 6);
         INSERT INTO t2 VALUES (7, 1, 3), (8, 1, 4), (9, 1, 2), (10, 1, 1), (11, 1, 5), (12, 1, 6);
         INSERT INTO t2 VALUES (13, 3, 3), (14, 3, 4), (15, 3, 2), (16, 3, 1), (17, 3, 5), (18, 3, 6);
@@ -70,7 +70,7 @@ test:do_execsql_test(
         INSERT INTO t2 VALUES (25, 4, 3), (26, 4, 4), (27, 4, 2), (28, 4, 1), (29, 4, 5), (30, 4, 6);
         INSERT INTO t2 VALUES (31, 6, 3), (32, 6, 4), (33, 6, 2), (34, 6, 1), (35, 6, 5), (36, 6, 6);
 
-        CREATE TABLE t3(a primary key, b);
+        CREATE TABLE t3(a INT primary key, b INT);
         INSERT INTO t3 VALUES (2, 2), (4, 4), (5, 5);
         CREATE UNIQUE INDEX t3i1 ON t3(a ASC);
         CREATE UNIQUE INDEX t3i2 ON t3(b DESC);
@@ -214,11 +214,11 @@ end
 test:do_execsql_test(
     3.0,
     [[
-        CREATE TABLE t7(x primary key);
+        CREATE TABLE t7(x INT primary key);
         INSERT INTO t7 VALUES (1), (2), (3);
         CREATE INDEX i7 ON t7(x);
 
-        CREATE TABLE t8(y primary key);
+        CREATE TABLE t8(y INT primary key);
         INSERT INTO t8 VALUES (1), (2), (3);
     ]])
 
diff --git a/test/sql-tap/tkt-4ef7e3cfca.test.lua b/test/sql-tap/tkt-4ef7e3cfca.test.lua
index b86e177e36a8a4b358c42a566a8bb3cc8f56c9b6..29484ddbd04cc81d398d803ba40582a2dd281baf 100755
--- a/test/sql-tap/tkt-4ef7e3cfca.test.lua
+++ b/test/sql-tap/tkt-4ef7e3cfca.test.lua
@@ -24,7 +24,7 @@ testprefix = "tkt-4ef7e3cfca"
 test:do_catchsql_test(
     1.1,
     [[
-        CREATE TABLE x(a primary key);
+        CREATE TABLE x(a  INT primary key);
         CREATE TRIGGER t AFTER INSERT ON x BEGIN
           SELECT * FROM x WHERE abc.a = 1;
         END;
@@ -40,10 +40,10 @@ test:execsql("DROP TABLE x;");
 test:do_execsql_test(
     2.1,
     [[
-        CREATE TABLE w(a primary key);
-        CREATE TABLE x(a primary key);
-        CREATE TABLE y(a primary key);
-        CREATE TABLE z(a primary key);
+        CREATE TABLE w(a  INT primary key);
+        CREATE TABLE x(a  INT primary key);
+        CREATE TABLE y(a  INT primary key);
+        CREATE TABLE z(a  INT primary key);
 
         INSERT INTO x(a) VALUES(5);
         INSERT INTO y(a) VALUES(10);
@@ -52,7 +52,7 @@ test:do_execsql_test(
           INSERT INTO z
           SELECT (SELECT x.a + y.a FROM y) FROM x;
         END;
-        INSERT INTO w VALUES('incorrect');
+        INSERT INTO w VALUES(1);
     ]])
 
 test:do_execsql_test(
@@ -75,10 +75,10 @@ test:execsql([[
 test:do_execsql_test(
     3.1,
     [[
-        CREATE TABLE w(a primary key);
-        CREATE TABLE x(b primary key);
-        CREATE TABLE y(a primary key);
-        CREATE TABLE z(a primary key);
+        CREATE TABLE w(a  INT primary key);
+        CREATE TABLE x(b  INT primary key);
+        CREATE TABLE y(a  INT primary key);
+        CREATE TABLE z(a  INT primary key);
 
         INSERT INTO x(b) VALUES(5);
         INSERT INTO y(a) VALUES(10);
@@ -87,7 +87,7 @@ test:do_execsql_test(
           INSERT INTO z
           SELECT (SELECT x.b + y.a FROM y) FROM x;
         END;
-        INSERT INTO w VALUES('assert');
+        INSERT INTO w VALUES(2);
     ]])
 
 test:do_execsql_test(
diff --git a/test/sql-tap/tkt-54844eea3f.test.lua b/test/sql-tap/tkt-54844eea3f.test.lua
index be088eaa7905d4a1c26867679bab44df5167b3d2..2cb1986cc038b5dbb60a3f038cac6024381a066a 100755
--- a/test/sql-tap/tkt-54844eea3f.test.lua
+++ b/test/sql-tap/tkt-54844eea3f.test.lua
@@ -61,7 +61,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "1.2",
     [[
-        CREATE TABLE t4(id primary key, a, b, c);
+        CREATE TABLE t4(id INT primary key, a TEXT, b TEXT, c TEXT);
         INSERT INTO t4 VALUES(1, 'a', 1, 'one');
         INSERT INTO t4 VALUES(2, 'a', 2, 'two');
         INSERT INTO t4 VALUES(3, 'b', 1, 'three');
diff --git a/test/sql-tap/tkt-7bbfb7d442.test.lua b/test/sql-tap/tkt-7bbfb7d442.test.lua
index 2750b36d9d2911e5dfd1a8ad81e517f1c3018d3b..ad8747ad4aa612e0634672dad045b6ce32077d20 100755
--- a/test/sql-tap/tkt-7bbfb7d442.test.lua
+++ b/test/sql-tap/tkt-7bbfb7d442.test.lua
@@ -27,17 +27,17 @@ if (1 > 0)
     test:do_execsql_test(
         1.1,
         [[
-            CREATE TABLE t1(id primary key, a, b);
+            CREATE TABLE t1(id  INT primary key, a INT , b TEXT);
             INSERT INTO t1 VALUES(1, 1, 'one');
             INSERT INTO t1 VALUES(2, 2, 'two');
             INSERT INTO t1 VALUES(3, 3, 'three');
 
-            CREATE TABLE t2(id primary key, c, d);
+            CREATE TABLE t2(id  INT primary key, c TEXT, d TEXT);
             INSERT INTO t2 VALUES(1, 'one', 'I');
             INSERT INTO t2 VALUES(2, 'two', 'II');
             INSERT INTO t2 VALUES(3, 'three', 'III');
 
-            CREATE TABLE t3(t3_a PRIMARY KEY, t3_d);
+            CREATE TABLE t3(t3_a  INT PRIMARY KEY, t3_d TEXT);
             CREATE TRIGGER t3t AFTER INSERT ON t3 WHEN new.t3_d IS NULL BEGIN
               UPDATE t3 SET t3_d = (
                 SELECT d FROM 
@@ -93,7 +93,7 @@ if (1 > 0)
               Variant INTEGER NOT NULL DEFAULT 0,
               ControlDate DATE NOT NULL,
               ControlState INTEGER NOT NULL DEFAULT -1,
-              DeliveredQty VARCHAR(30)
+              DeliveredQty TEXT
             );
 
             CREATE TRIGGER TGR_InventoryControl_AfterInsert
@@ -161,7 +161,7 @@ if (1 > 0)
 
 
             INSERT INTO InventoryControl(SKU, Variant, ControlDate) SELECT 
-                II.SKU AS SKU, II.Variant AS Variant, '2011-08-30' AS ControlDate 
+                II.SKU AS SKU, II.Variant AS Variant, julianday('2011-08-30') AS ControlDate
                 FROM InventoryItem II;
         ]])
 
diff --git a/test/sql-tap/tkt-80ba201079.test.lua b/test/sql-tap/tkt-80ba201079.test.lua
index 368eae5a77b4d19cb6b5472b6ce85f0a248a17c6..9d204ac6636ccc7e741e64697cf95eaf33a53cd5 100755
--- a/test/sql-tap/tkt-80ba201079.test.lua
+++ b/test/sql-tap/tkt-80ba201079.test.lua
@@ -27,11 +27,11 @@ test:do_test(
     "tkt-80ba2-100",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key);
+            CREATE TABLE t1(a TEXT primary key);
             INSERT INTO t1 VALUES('A');
-            CREATE TABLE t2(b primary key);
+            CREATE TABLE t2(b TEXT primary key);
             INSERT INTO t2 VALUES('B');
-            CREATE TABLE t3(c primary key);
+            CREATE TABLE t3(c TEXT primary key);
             INSERT INTO t3 VALUES('C');
             SELECT * FROM t1, t2
              WHERE (a='A' AND b='X')
@@ -176,10 +176,10 @@ test:execsql([[
 test:do_execsql_test(
     301,
     [[
-        CREATE TABLE t1(a primary key, b, c);
+        CREATE TABLE t1(a TEXT primary key, b TEXT , c TEXT);
         CREATE INDEX i1 ON t1(a);
         CREATE INDEX i2 ON t1(b);
-        CREATE TABLE t2(d primary key, e);
+        CREATE TABLE t2(d TEXT primary key, e TEXT);
 
         INSERT INTO t1 VALUES('A', 'B', 'C');
         INSERT INTO t2 VALUES('D', 'E');
diff --git a/test/sql-tap/tkt-80e031a00f.test.lua b/test/sql-tap/tkt-80e031a00f.test.lua
index 5b5481d837c2b5ff2a068bbaec88d9a4b8edf706..0cbdb47a2bf9705075bd79823d67894a26d87de3 100755
--- a/test/sql-tap/tkt-80e031a00f.test.lua
+++ b/test/sql-tap/tkt-80e031a00f.test.lua
@@ -120,7 +120,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt-80e031a00f.5",
     [[
-        CREATE TABLE t1(x PRIMARY key);
+        CREATE TABLE t1(x  INT PRIMARY key);
         SELECT 1 IN t1;
     ]], {
         -- <tkt-80e031a00f.5>
@@ -340,23 +340,23 @@ test:do_execsql_test(
         -- </tkt-80e031a00f.26>
     })
 
-test:do_execsql_test(
+test:do_catchsql_test(
     "tkt-80e031a00f.27",
     [[
         SELECT 'hello' IN t1
     ]], {
         -- <tkt-80e031a00f.27>
-        0
+        1, 'Type mismatch: can not convert hello to numeric'
         -- </tkt-80e031a00f.27>
     })
 
-test:do_execsql_test(
+test:do_catchsql_test(
     "tkt-80e031a00f.28",
     [[
         SELECT 'hello' NOT IN t1
     ]], {
         -- <tkt-80e031a00f.28>
-        1
+        1, 'Type mismatch: can not convert hello to numeric'
         -- </tkt-80e031a00f.28>
     })
 
@@ -453,29 +453,29 @@ test:do_test(
     "tkt-80e031a00f.104",
     function()
         test:execsql [[
-            CREATE TABLE t4(a PRIMARY KEY);
+            CREATE TABLE t4(a  INT PRIMARY KEY);
             CREATE TABLE t5(b INTEGER PRIMARY KEY);
-            CREATE TABLE t6(c PRIMARY KEY);
+            CREATE TABLE t6(c  INT PRIMARY KEY);
             INSERT INTO t4 VALUES(2);
             INSERT INTO t4 VALUES(3);
             INSERT INTO t4 VALUES(4);
             INSERT INTO t5 SELECT * FROM t4;
             INSERT INTO t6 SELECT * FROM t4;
-            CREATE TABLE t4n(a, b PRIMARY KEY);
+            CREATE TABLE t4n(a INT , b  INT PRIMARY KEY);
             INSERT INTO t4n VALUES(2, 1),
                             (3, 2),
                             (4, 3),
                             (null, 4);
-            CREATE TABLE t6n(c, b PRIMARY KEY);
+            CREATE TABLE t6n(c INT , b  INT PRIMARY KEY);
             INSERT INTO t6n select * from t4n;
-            CREATE TABLE t7(a PRIMARY KEY);
-            CREATE TABLE t8(c PRIMARY KEY);
+            CREATE TABLE t7(a TEXT PRIMARY KEY);
+            CREATE TABLE t8(c TEXT PRIMARY KEY);
             INSERT INTO t7 VALUES('b');
             INSERT INTO t7 VALUES('c');
             INSERT INTO t7 VALUES('d');
             INSERT INTO t8 SELECT * FROM t7;
-            CREATE TABLE t7n(a, b PRIMARY KEY);
-            CREATE TABLE t8n(c, b PRIMARY KEY);
+            CREATE TABLE t7n(a TEXT, b  INT PRIMARY KEY);
+            CREATE TABLE t8n(c TEXT, b  INT PRIMARY KEY);
             INSERT INTO t7n VALUES('b', 1),
                                   ('c', 2),
                                   ('d', 3),
diff --git a/test/sql-tap/tkt-8c63ff0ec.test.lua b/test/sql-tap/tkt-8c63ff0ec.test.lua
index a52356a075f13edd52a5e6fa6980f69a0f26a50a..8e49db57d41be795cdf8219847efe31d29c5e9be 100755
--- a/test/sql-tap/tkt-8c63ff0ec.test.lua
+++ b/test/sql-tap/tkt-8c63ff0ec.test.lua
@@ -24,11 +24,11 @@ testprefix = "tkt-8c63ff0ec"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c, d, e);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT, c INT, d INT, e INT);
         INSERT INTO t1 VALUES(1,20,30,40,50),(3,60,70,80,90);
         CREATE TABLE t2(x INTEGER PRIMARY KEY);
         INSERT INTO t2 VALUES(2);
-        CREATE TABLE t3(id primary key, z);
+        CREATE TABLE t3(id INT primary key, z INT);
         INSERT INTO t3 VALUES(1, 2),(2, 2),(3, 2),(4, 2);
 
         SELECT a, b+c FROM t1
diff --git a/test/sql-tap/tkt-9a8b09f8e6.test.lua b/test/sql-tap/tkt-9a8b09f8e6.test.lua
index 043194277b1a6a5c17eb1c6303a9de90e10c9196..4d08cd657583bb9678c78081bfa7e52653a46e7c 100755
--- a/test/sql-tap/tkt-9a8b09f8e6.test.lua
+++ b/test/sql-tap/tkt-9a8b09f8e6.test.lua
@@ -72,10 +72,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     1.5,
     [[
-        CREATE TABLE t5(id primary key, x, y);
-        INSERT INTO t5 VALUES(1, '1', 'one');
+        CREATE TABLE t5(id  INT primary key, x INT , y TEXT);
+        INSERT INTO t5 VALUES(1, 1, 'one');
         INSERT INTO t5 VALUES(2, 1, 'two');
-        INSERT INTO t5 VALUES(3, '1.0', 'three');
+        INSERT INTO t5 VALUES(3, 1.0, 'three');
         INSERT INTO t5 VALUES(4, 1.0, 'four');
     ]], {
         -- <1.5>
@@ -139,7 +139,7 @@ test:do_execsql_test(
         SELECT x FROM t1 WHERE 1.0 IN (x);
     ]], {
         -- <2.6>
-        
+        "1"
         -- </2.6>
     })
 
@@ -239,7 +239,7 @@ test:do_execsql_test(
         SELECT x FROM t2 WHERE '1.0' IN (x);
     ]], {
         -- <3.8>
-        1
+
         -- </3.8>
     })
 
@@ -309,7 +309,7 @@ test:do_execsql_test(
         SELECT x FROM t3 WHERE '1' IN (x);
     ]], {
         -- <4.7>
-        1
+
         -- </4.7>
     })
 
@@ -449,7 +449,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE x IN (1);
     ]], {
         -- <6.1>
-        1, "two", 1.0, "four"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.1>
     })
 
@@ -459,7 +459,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE x IN (1.0);
     ]], {
         -- <6.2>
-        1, "two", 1.0, "four"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.2>
     })
 
@@ -469,7 +469,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE x IN ('1');
     ]], {
         -- <6.3>
-        "1", "one"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.3>
     })
 
@@ -479,7 +479,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE x IN ('1.0');
     ]], {
         -- <6.4>
-        "1.0", "three"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.4>
     })
 
@@ -489,7 +489,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE 1 IN (x);
     ]], {
         -- <6.5>
-        1, "two", 1.0, "four"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.5>
     })
 
@@ -499,7 +499,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE 1.0 IN (x);
     ]], {
         -- <6.6>
-        1, "two", 1.0, "four"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.6>
     })
 
@@ -509,7 +509,7 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE '1' IN (x);
     ]], {
         -- <6.7>
-        "1", "one"
+        1, "one", 1, "two", 1, "three", 1.0, "four"
         -- </6.7>
     })
 
@@ -519,7 +519,6 @@ test:do_execsql_test(
         SELECT x, y FROM t5 WHERE '1.0' IN (x);
     ]], {
         -- <6.8>
-        "1.0", "three"
         -- </6.8>
     })
 
diff --git a/test/sql-tap/tkt-a7b7803e.test.lua b/test/sql-tap/tkt-a7b7803e.test.lua
index 37c2c006a02946f7af83eb93d4282958e6eb5fa2..1827f40bcdea166732e189929a98ae3b4bbfc56b 100755
--- a/test/sql-tap/tkt-a7b7803e.test.lua
+++ b/test/sql-tap/tkt-a7b7803e.test.lua
@@ -25,7 +25,7 @@ test:do_test(
     "tkt-a7b7803e.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key,b);
+            CREATE TABLE t1(a INT primary key,b TEXT);
             INSERT INTO t1 VALUES(0,'first'),(99,'fuzzy');
             SELECT (t1.a==0) AS x, b
               FROM t1
diff --git a/test/sql-tap/tkt-a8a0d2996a.test.lua b/test/sql-tap/tkt-a8a0d2996a.test.lua
index 3b796ebd896ed7f02f24efd79e397333ac2cc28d..6f5860f82ba516aefdb04337fab4370e3a1b7a31 100755
--- a/test/sql-tap/tkt-a8a0d2996a.test.lua
+++ b/test/sql-tap/tkt-a8a0d2996a.test.lua
@@ -23,7 +23,7 @@ testprefix = "tkt-a8a0d2996a"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t(x primary key,y);
+        CREATE TABLE t(x TEXT primary key,y TEXT);
         INSERT INTO t VALUES('1','1');
         SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1';
     ]], {
@@ -244,4 +244,4 @@ test:do_execsql_test(
         -- </4.6>
     })
 
-test:finish_test()
\ No newline at end of file
+test:finish_test()
diff --git a/test/sql-tap/tkt-b1d3a2e531.test.lua b/test/sql-tap/tkt-b1d3a2e531.test.lua
index 324ffa0c86a6f47f0c552ca299382f0aa5119682..27fe595e909ea88c78adfadc6a286739d507659e 100755
--- a/test/sql-tap/tkt-b1d3a2e531.test.lua
+++ b/test/sql-tap/tkt-b1d3a2e531.test.lua
@@ -27,8 +27,8 @@ testprefix = "tkt-b1d3a2e531"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE pp(x PRIMARY KEY);
-        CREATE TABLE cc(y primary key REFERENCES pp DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE pp(x TEXT PRIMARY KEY);
+        CREATE TABLE cc(y TEXT primary key REFERENCES pp DEFERRABLE INITIALLY DEFERRED);
         INSERT INTO pp VALUES('abc');
         INSERT INTO cc VALUES('abc');
     ]])
@@ -43,8 +43,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     1.3,
     [[
-        CREATE TABLE pp(x PRIMARY KEY);
-        CREATE TABLE cc(y primary key REFERENCES pp DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE pp(x TEXT PRIMARY KEY);
+        CREATE TABLE cc(y TEXT primary key REFERENCES pp DEFERRABLE INITIALLY DEFERRED);
         INSERT INTO pp VALUES('abc');
         INSERT INTO cc VALUES('abc');
     ]])
@@ -95,11 +95,11 @@ test:do_execsql_test(
 test:do_execsql_test(
     3.1,
     [[
-        CREATE TABLE pp1(x PRIMARY KEY);
-        CREATE TABLE cc1(y REFERENCES pp1 DEFERRABLE INITIALLY DEFERRED, a primary key);
+        CREATE TABLE pp1(x  INT PRIMARY KEY);
+        CREATE TABLE cc1(y  INT REFERENCES pp1 DEFERRABLE INITIALLY DEFERRED, a  INT primary key);
 
-        CREATE TABLE pp2(x PRIMARY KEY);
-        CREATE TABLE cc2(y primary key REFERENCES pp1 DEFERRABLE INITIALLY DEFERRED);
+        CREATE TABLE pp2(x  INT PRIMARY KEY);
+        CREATE TABLE cc2(y  INT primary key REFERENCES pp1 DEFERRABLE INITIALLY DEFERRED);
 
         INSERT INTO pp1 VALUES(2200);
         INSERT INTO cc1 VALUES(NULL, 1);
diff --git a/test/sql-tap/tkt-b351d95f9.test.lua b/test/sql-tap/tkt-b351d95f9.test.lua
index 5f4c08e7ed8792a01be6b830ecaaeb517faea947..780950cfd463323a4e8b9d920d2a65a3cf0a2571 100755
--- a/test/sql-tap/tkt-b351d95f9.test.lua
+++ b/test/sql-tap/tkt-b351d95f9.test.lua
@@ -24,10 +24,10 @@ test:plan(3)
 test:do_execsql_test(
     "tkt-b351d95.1",
     [[
-        CREATE table t1(a primary key,b);
+        CREATE table t1(a text primary key,b text);
         INSERT INTO t1 VALUES('name1','This is a test');
         INSERT INTO t1 VALUES('name2','xyz');
-        CREATE TABLE t2(x primary key,y);
+        CREATE TABLE t2(x TEXT primary key,y TEXT);
         INSERT INTO t2 SELECT a, CASE b WHEN 'xyz' THEN null ELSE b END FROM t1;
         SELECT x, y FROM t2 ORDER BY x;
     ]], {
diff --git a/test/sql-tap/tkt-b75a9ca6b0.test.lua b/test/sql-tap/tkt-b75a9ca6b0.test.lua
index 5950892b708eed1ce3619fd4781fad8e46066666..0f61f0de5edcf43083373300f2ecac4469d6a49a 100755
--- a/test/sql-tap/tkt-b75a9ca6b0.test.lua
+++ b/test/sql-tap/tkt-b75a9ca6b0.test.lua
@@ -27,7 +27,7 @@ testprefix = "tkt-b75a9ca6b0"
 test:do_execsql_test(
     1,
     [[
-        CREATE TABLE t1 (id primary key, x, y);
+        CREATE TABLE t1 (id INT primary key, x INT, y INT);
         INSERT INTO t1 VALUES (1, 1, 3);
         INSERT INTO t1 VALUES (2, 2, 2);
         INSERT INTO t1 VALUES (3, 3, 1);
diff --git a/test/sql-tap/tkt-ba7cbfaedc.test.lua b/test/sql-tap/tkt-ba7cbfaedc.test.lua
index d4cf27e4748ba2ba2f0a8569c76ead12b9c772b9..2aad10f2d63146386c42c66a197821c86904aced 100755
--- a/test/sql-tap/tkt-ba7cbfaedc.test.lua
+++ b/test/sql-tap/tkt-ba7cbfaedc.test.lua
@@ -22,7 +22,7 @@ testprefix = "tkt-ba7cbfaedc"
 test:do_execsql_test(
     1,
     [[
-        CREATE TABLE t1 (id primary key, x, y);
+        CREATE TABLE t1 (id  INT primary key, x INT , y TEXT);
         INSERT INTO t1 VALUES (1, 3, 'a');
         INSERT INTO t1 VALUES (2, 1, 'a'); 
         INSERT INTO t1 VALUES (3, 2, 'b');
diff --git a/test/sql-tap/tkt-f973c7ac31.test.lua b/test/sql-tap/tkt-f973c7ac31.test.lua
index 8179f96e2aacc6fc1b81bb1c9ac9e4df227d48f7..e846c2aad74e906406560e2ac750d13844822bed 100755
--- a/test/sql-tap/tkt-f973c7ac31.test.lua
+++ b/test/sql-tap/tkt-f973c7ac31.test.lua
@@ -20,7 +20,7 @@ test:plan(21)
 test:do_execsql_test(
     "tkt-f973c7ac3-1.0",
     [[
-        CREATE TABLE t(id primary key, c1 INTEGER, c2 INTEGER);
+        CREATE TABLE t(id INT primary key, c1 INTEGER, c2 INTEGER);
         INSERT INTO t VALUES(1, 5, 5);
         INSERT INTO t VALUES(2, 5, 4);
     ]], {
diff --git a/test/sql-tap/tkt-fa7bf5ec.test.lua b/test/sql-tap/tkt-fa7bf5ec.test.lua
index cafc7ce98bef4a71bddfec0dabade0dffe7f333d..91d876c5a0abcb8eb5ec54ceb6d0b48f849ef9f5 100755
--- a/test/sql-tap/tkt-fa7bf5ec.test.lua
+++ b/test/sql-tap/tkt-fa7bf5ec.test.lua
@@ -30,7 +30,7 @@ test:plan(1)
 test:do_execsql_test(
     "tkt-fa7bf5ec-1",
     [[
-        CREATE TABLE t1(id primary key, x);
+        CREATE TABLE t1(id INT primary key, x TEXT);
         INSERT INTO t1 VALUES (1, 'a');
         INSERT INTO t1 VALUES (2, 'A');
         INSERT INTO t1 VALUES (3, 'A');
diff --git a/test/sql-tap/tkt1443.test.lua b/test/sql-tap/tkt1443.test.lua
index 44b96fc2cb84216bbdc724876db1975e81f8e28d..050e74acfc24b086e5e7bef800d1051c9462163b 100755
--- a/test/sql-tap/tkt1443.test.lua
+++ b/test/sql-tap/tkt1443.test.lua
@@ -54,7 +54,7 @@ test:do_test(
         return test:execsql(string.format([[
             CREATE TABLE Items(
                 itemId integer primary key,
-                 item str unique
+                 item  TEXT unique
             );
             INSERT INTO Items VALUES(0, 'ALL');
             INSERT INTO Items VALUES(1, 'double:source');
@@ -64,13 +64,13 @@ test:do_test(
 
             CREATE TABLE Labels(
                 labelId INTEGER PRIMARY KEY,
-                label STR UNIQUE
+                label  TEXT UNIQUE
             );
             INSERT INTO Labels VALUES(0, 'ALL');
             INSERT INTO Labels VALUES(1, 'localhost@rpl:linux');
             INSERT INTO Labels VALUES(2, 'localhost@rpl:branch');
 
-            CREATE TABLE LabelMap(id primary key,
+            CREATE TABLE LabelMap(id  INT primary key,
                 itemId INTEGER,
                 labelId INTEGER,
                 branchId integer
@@ -84,9 +84,9 @@ test:do_test(
 
             CREATE TABLE Users (
                 userId INTEGER PRIMARY KEY,
-                "user" STRING UNIQUE,
-                salt BINARY,
-                password STRING
+                "user" TEXT UNIQUE,
+                salt  BLOB,
+                password  TEXT
             );
             INSERT INTO Users VALUES(1, 'test', 'Šæ%s',
                        '43ba0f45014306bd6df529551ffdb3df');
@@ -94,7 +94,7 @@ test:do_test(
                        'cf07c8348fdf675cc1f7696b7d45191b');
             CREATE TABLE UserGroups (
                 userGroupId INTEGER PRIMARY KEY,
-                userGroup STRING UNIQUE
+                userGroup  TEXT UNIQUE
             );
             INSERT INTO UserGroups VALUES(1, 'test');
             INSERT INTO UserGroups VALUES(2, 'limited');
diff --git a/test/sql-tap/tkt1444.test.lua b/test/sql-tap/tkt1444.test.lua
index 945eab157e6f69a1bc6efb3d0c041a9fe7457a13..286e4a3e590f426fb5d3771da13d051396523d5e 100755
--- a/test/sql-tap/tkt1444.test.lua
+++ b/test/sql-tap/tkt1444.test.lua
@@ -28,7 +28,7 @@ test:plan(4)
 test:do_execsql_test(
     "tkt1444-1.1",
     [[
-        CREATE TABLE DemoTable (id primary key, x INTEGER, TextKey TEXT, DKey Real);
+        CREATE TABLE DemoTable (id  INT primary key, x INTEGER, TextKey TEXT, DKey NUM);
         CREATE INDEX DemoTableIdx ON DemoTable (TextKey);
         INSERT INTO DemoTable VALUES(1, 9,8,7);
         INSERT INTO DemoTable VALUES(2, 1,2,3);
diff --git a/test/sql-tap/tkt1449.test.lua b/test/sql-tap/tkt1449.test.lua
index 3bb931cf62bf8aff7266439566797324849c59e6..746c917b5414664c95ca6288974d584c504a8fa7 100755
--- a/test/sql-tap/tkt1449.test.lua
+++ b/test/sql-tap/tkt1449.test.lua
@@ -34,45 +34,45 @@ test:do_execsql_test(
     [[
         -- Tarantool: DDL is prohibited inside a transaction so far
         -- START TRANSACTION;
-        CREATE TABLE ACLS(ISSUEID text(50) not null, OBJECTID text(50) not null, PARTICIPANTID text(50) not null, PERMISSIONBITS int not null, constraint PK_ACLS primary key (ISSUEID, OBJECTID, PARTICIPANTID));
-        CREATE TABLE ACTIONITEMSTATUSES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, FRIENDLYNAME text(100) not null, REVISION int not null, SHORTNAME text(30) not null, LONGNAME text(200) not null, ATTACHMENTHANDLING int not null, RESULT int not null, NOTIFYCREATOR text(1) null, NOTIFYASSIGNEE text(1) null, NOTIFYFYI text(1) null, NOTIFYCLOSURETEAM text(1) null, NOTIFYCOORDINATORS text(1) null, COMMENTREQUIRED text(1) not null, constraint PK_ACTIONITEMSTATUSES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE ACTIONITEMTYPES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, REVISION int not null, LABEL text(200) not null, INSTRUCTIONS text not null, EMAILINSTRUCTIONS text null, ALLOWEDSTATUSES text not null, INITIALSTATUS text(100) not null, COMMENTREQUIRED text(1) not null, ATTACHMENTHANDLING int not null, constraint PK_ACTIONITEMTYPES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE ATTACHMENTS(TQUNID text(36) not null, OBJECTID text(50) null, ISSUEID text(50) null, DATASTREAM blob not null, CONTENTENCODING text(50) null, CONTENTCHARSET text(50) null, CONTENTTYPE text(100) null, CONTENTID text(100) null, CONTENTLOCATION text(100) null, CONTENTNAME text(100) not null, constraint PK_ATTACHMENTS primary key (TQUNID));
-        CREATE TABLE COMPLIANCEPOLICIES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, BODY text null, constraint PK_COMPLIANCEPOLICIES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE DBHISTORY(id primary key, DATETIME text(25) not null, OPERATION text(20) not null, KUBIVERSION text(100) not null, FROMVERSION int null, TOVERSION int null);
-        CREATE TABLE DBINFO(id primary key, FINGERPRINT text(32) not null, VERSION int not null);
-        CREATE TABLE DETACHEDATTACHMENTS (TQUNID text(36) not null, ISSUEID text(50) not null, OBJECTID text(50) not null, PATH text(300) not null, DETACHEDFILELASTMODTIMESTAMP text(25) null, CONTENTID text(100) not null, constraint PK_DETACHEDATTACHMENTS primary key (TQUNID));
-        CREATE TABLE DOCREFERENCES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, REFERENCEDOCUMENTID text(50) null, constraint PK_DOCREFERENCES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE DQ (TQUNID text(36) not null, ISSUEID text(50) not null, DEPENDSID text(50) null, DEPENDSTYPE int null, DEPENDSCOMMANDSTREAM blob null, DEPENDSNODEIDSEQNOKEY text(100) null, DEPENDSACLVERSION int null, constraint PK_DQ primary key (TQUNID));
-        CREATE TABLE EMAILQ(id primary key, TIMEQUEUED int not null, NODEID text(50) not null, MIME blob not null, TQUNID text(36) not null);
-        CREATE TABLE ENTERPRISEDATA(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, DATE1 text(25) null, DATE2 text(25) null, DATE3 text(25) null, DATE4 text(25) null, DATE5 text(25) null, DATE6 text(25) null, DATE7 text(25) null, DATE8 text(25) null, DATE9 text(25) null, DATE10 text(25) null, VALUE1 int null, VALUE2 int null, VALUE3 int null, VALUE4 int null, VALUE5 int null, VALUE6 int null, VALUE7 int null, VALUE8 int null, VALUE9 int null, VALUE10 int null, VALUE11 int null, VALUE12 int null, VALUE13 int null, VALUE14 int null, VALUE15 int null, VALUE16 int null, VALUE17 int null, VALUE18 int null, VALUE19 int null, VALUE20 int null, STRING1 text(300) null, STRING2 text(300) null, STRING3 text(300) null, STRING4 text(300) null, STRING5 text(300) null, STRING6 text(300) null, STRING7 text(300) null, STRING8 text(300) null, STRING9 text(300) null, STRING10 text(300) null, LONGSTRING1 text null, LONGSTRING2 text null, LONGSTRING3 text null, LONGSTRING4 text null, LONGSTRING5 text null, LONGSTRING6 text null, LONGSTRING7 text null, LONGSTRING8 text null, LONGSTRING9 text null, LONGSTRING10 text null, constraint PK_ENTERPRISEDATA primary key (ISSUEID, OBJECTID));
-        CREATE TABLE FILEMORGUE(TQUNID text(36) not null, PATH text(300) not null, DELETEFOLDERWHENEMPTY text(1) null, constraint PK_FILEMORGUE primary key (TQUNID));
-        CREATE TABLE FILES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARENTENTITYID text(50) null, BODY text null, BODYCONTENTTYPE text(100) null, ISOBSOLETE text(1) null, FILENAME text(300) not null, VISIBLENAME text(300) not null, VERSIONSTRING text(300) not null, DOCUMENTHASH text(40) not null, ISFINAL text(1) null, DOCREFERENCEID text(50) not null, constraint PK_FILES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE FOLDERS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, CONTAINERNAME text(300) null, CONTAINERACLSETTINGS text null, constraint PK_FOLDERS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE GLOBALSETTINGS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, SINGULARPROJECTLABEL text(30) not null, PLURALPROJECTLABEL text(30) not null, PROJECTREQUIRED text(1) not null, CUSTOMPROJECTSALLOWED text(1) not null, ACTIONITEMSPECXML text null, PROJECTLISTXML text null, ENTERPRISEDATALABELS text null, ENTERPRISEDATATABXSL text null, constraint PK_GLOBALSETTINGS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE GLOBALSTRINGPROPERTIES(ID int not null, VALUE text(300) not null, constraint PK_GLOBALSTRINGPROPERTIES primary key (ID));
-        CREATE TABLE IMQ(TQUNID text(36) not null, DATETIMEQUEUED text(25) not null, ISSUEID text(50) not null, KUBIBUILD text(30) not null, FAILCOUNT int not null, LASTRUN text(25) null, ENVELOPESTREAM blob not null, PAYLOADSTREAM blob not null, constraint PK_IMQ primary key (TQUNID));
-        CREATE TABLE INVITATIONNODES(INVITATIONID text(50) not null, RECIPIENTNODEID text(50) not null, DATECREATED text(25) not null, constraint PK_INVITATIONNODES primary key (INVITATIONID, RECIPIENTNODEID));
-        CREATE TABLE INVITATIONS (id primary key, INVITATIONID text(50) not null, SENDERNODEID text(50) not null, RECIPIENTEMAILADDR text(200) not null, RECIPIENTUSERID text(50) null, RECIPIENTNODES text null, ISSUEID text(50) not null, ENVELOPE text not null, MESSAGEBLOB blob not null, INVITATIONSTATE int not null, TQUNID text(36) not null, DATECREATED text(25) not null);
-        CREATE TABLE ISSUES (CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, CONTAINERNAME text(300) null, CONTAINERACLSETTINGS text null, ISINITIALIZED text(1) null, BLINDINVITES text null, ISSYSTEMISSUE text(1) not null, ISSUETYPE int not null, ACTIVITYTYPEID text(50) null, ISINCOMPLETE text(1) not null, constraint PK_ISSUES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE ISSUESETTINGS (CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, ISSUENAME text(300) not null, ISSUEACLSETTINGS text not null, ISSUEDUEDATE text(25) null, ISSUEPRIORITY int null, ISSUESTATUS int null, DESCRIPTION text null, PROJECTID text(100) null, PROJECTNAME text null, PROJECTNAMEISCUSTOM text(1) null, ISSYSTEMISSUE text(1) not null, ACTIONITEMREVNUM int not null, constraint PK_ISSUESETTINGS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE KMTPMSG (MSGID integer not null, SENDERID text(50) null, RECIPIENTIDLIST text not null, ISSUEID text(50) null, MESSAGETYPE int not null, ENVELOPE text null, MESSAGEBLOB blob not null, RECEIVEDDATE text(25) not null, constraint PK_KMTPMSG primary key (MSGID));
-        CREATE TABLE KMTPNODEQ(id primary key, NODEID text(50) not null, MSGID int not null, RECEIVEDDATE text(25) not null, SENDCOUNT int not null);
-        CREATE TABLE KMTPQ(MSGID integer not null, SENDERID text(50) null, RECIPIENTIDLIST text not null, ISSUEID text(50) null, MESSAGETYPE int not null, ENVELOPE text null, MESSAGEBLOB blob not null, constraint PK_KMTPQ primary key (MSGID));
-        CREATE TABLE LOGENTRIES(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARENTENTITYID text(50) null, BODY text null, BODYCONTENTTYPE text(100) null, ISOBSOLETE text(1) null, ACTIONTYPE int not null, ASSOCIATEDOBJECTIDS text null, OLDENTITIES text null, NEWENTITIES text null, OTHERENTITIES text null, constraint PK_LOGENTRIES primary key (ISSUEID, OBJECTID));
-        CREATE TABLE LSBI(TQUNID text(36) not null, ISSUEID text(50) not null, TABLEITEMID text(50) null, TABLENODEID text(50) null, TABLECMD int null, TABLECONTAINERID text(50) null, TABLESEQNO int null, DIRTYCONTENT text null, STUBBED text(1) null, ENTITYSTUBDATA text null, UPDATENUMBER int not null, constraint PK_LSBI primary key (TQUNID));
-        CREATE TABLE LSBN(TQUNID text(36) not null, ISSUEID text(50) not null, NODEID text(50) not null, STORESEQNO int not null, SYNCSEQNO int not null, LASTMSGDATE text(25) null, constraint PK_LSBN primary key (TQUNID));
-        CREATE TABLE MMQ(TQUNID text(36) not null, ISSUEID text(50) not null, TABLEREQUESTNODE text(50) null, MMQENTRYINDEX text(60) null, DIRECTION int null, NODEID text(50) null, TABLEFIRSTSEQNO int null, TABLELASTSEQNO int null, NEXTRESENDTIMEOUT text(25) null, TABLETIMEOUTMULTIPLIER int null, constraint PK_MMQ primary key (TQUNID));
-        CREATE TABLE NODEREG(id primary key, NODEID text(50) not null, USERID text(50) null, CREATETIME text(25) not null, TQUNID text(36) not null);
-        CREATE TABLE NODES (id primary key, NODEID text(50) not null, USERID text(50) null, NODESTATE int not null, NODECERT text null, KUBIVERSION int not null, KUBIBUILD text(30) not null, TQUNID text(36) not null, LASTBINDDATE text(25) null, LASTUNBINDDATE text(25) null, LASTBINDIP text(15) null, NUMBINDS int not null, NUMSENDS int not null, NUMPOLLS int not null, NUMRECVS int not null);
-        CREATE TABLE PARTICIPANTNODES(id primary key, ISSUEID text(50) not null, OBJECTID text(50) not null, NODEID text(50) not null, USERID text(50) null, NODESTATE int not null, NODECERT text null, KUBIVERSION int not null, KUBIBUILD text(30) not null, TQUNID text(36) not null);
-        CREATE TABLE PARTICIPANTS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARTICIPANTSTATE int not null, PARTICIPANTROLE int not null, PARTICIPANTTEAM int not null, ISREQUIREDMEMBER text(1) null, USERID text(50) null, ISAGENT text(1) null, NAME text(150) not null, EMAILADDRESS text(200) not null, ISEMAILONLY text(1) not null, INVITATION text null, ACCEPTRESENDCOUNT int null, ACCEPTRESENDTIMEOUT text(25) null, ACCEPTLASTSENTTONODEID text(50) null, constraint PK_PARTICIPANTS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE PARTICIPANTSETTINGS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARTICIPANTID text(50) not null, TASKPIMSYNC text(1) null, MOBILESUPPORT text(1) null, NOTIFYBYEMAIL text(1) null, MARKEDCRITICAL text(1) null, constraint PK_PARTICIPANTSETTINGS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE PARTITIONS(id primary key, PARTITIONID text(50) not null, NAME text(100) not null, LDAPDN text(300) not null, SERVERNODEID text(50) not null, TQUNID text(36) not null);
-        CREATE TABLE PROJECTS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, NAME text(100) not null, ID text(100) null, constraint PK_PROJECTS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE TASKCOMPLETIONS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARENTENTITYID text(50) null, BODY text null, BODYCONTENTTYPE text(100) null, ISOBSOLETE text(1) null, TASKID text(50) not null, DISPOSITION int not null, STATUSID text(50) not null, SHORTNAME text(30) not null, LONGNAME text(200) not null, constraint PK_TASKCOMPLETIONS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE TASKS(CLASSID int null, SEQNO int not null, LASTMODONNODEID text(50) not null, PREVMODONNODEID text(50) null, ISSUEID text(50) not null, OBJECTID text(50) not null, REVISIONNUM int not null, CONTAINERID text(50) not null, AUTHORID text(50) not null, CREATIONDATE text(25) null, LASTMODIFIEDDATE text(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD text(300) null, LASTMODIFIEDBYID text(50) null, PARENTENTITYID text(50) null, BODY text null, BODYCONTENTTYPE text(100) null, ISOBSOLETE text(1) null, DUETIME text(25) null, ASSIGNEDTO text(50) not null, TARGETOBJECTIDS text null, RESPONSEID text(50) not null, TYPEID text(50) not null, LABEL text(200) not null, INSTRUCTIONS text not null, ALLOWEDSTATUSES text not null, ISSERIALREVIEW text(1) null, DAYSTOREVIEW int null, REVIEWERIDS text(500) null, REVIEWTYPE int null, REVIEWGROUP text(300) null, constraint PK_TASKS primary key (ISSUEID, OBJECTID));
-        CREATE TABLE USERS (id primary key, USERID text(50) not null, USERSID text(100) not null, ENTERPRISEUSER text(1) not null, USEREMAILADDRESS text(200) null, EMAILVALIDATED text(1) null, VALIDATIONCOOKIE text(50) null, CREATETIME text(25) not null, TQUNID text(36) not null, PARTITIONID text(50) null);
+        CREATE TABLE ACLS(ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, PARTICIPANTID varchar(50) not null, PERMISSIONBITS int not null, constraint PK_ACLS primary key (ISSUEID, OBJECTID, PARTICIPANTID));
+        CREATE TABLE ACTIONITEMSTATUSES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, FRIENDLYNAME varchar(100) not null, REVISION int not null, SHORTNAME varchar(30) not null, LONGNAME varchar(200) not null, ATTACHMENTHANDLING int not null, RESULT int not null, NOTIFYCREATOR varchar(1) null, NOTIFYASSIGNEE varchar(1) null, NOTIFYFYI varchar(1) null, NOTIFYCLOSURETEAM varchar(1) null, NOTIFYCOORDINATORS varchar(1) null, COMMENTREQUIRED varchar(1) not null, constraint PK_ACTIONITEMSTATUSES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE ACTIONITEMTYPES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, REVISION int not null, LABEL varchar(200) not null, INSTRUCTIONS text not null, EMAILINSTRUCTIONS text null, ALLOWEDSTATUSES text not null, INITIALSTATUS varchar(100) not null, COMMENTREQUIRED varchar(1) not null, ATTACHMENTHANDLING int not null, constraint PK_ACTIONITEMTYPES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE ATTACHMENTS(TQUNID varchar(36) not null, OBJECTID varchar(50) null, ISSUEID varchar(50) null, DATASTREAM blob not null, CONTENTENCODING varchar(50) null, CONTENTCHARSET varchar(50) null, CONTENTTYPE varchar(100) null, CONTENTID varchar(100) null, CONTENTLOCATION varchar(100) null, CONTENTNAME varchar(100) not null, constraint PK_ATTACHMENTS primary key (TQUNID));
+        CREATE TABLE COMPLIANCEPOLICIES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, BODY text null, constraint PK_COMPLIANCEPOLICIES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE DBHISTORY(id INT primary key, "DATETIME" varchar(25) not null, OPERATION varchar(20) not null, KUBIVERSION varchar(100) not null, FROMVERSION int null, TOVERSION int null);
+        CREATE TABLE DBINFO(id INT primary key, FINGERPRINT varchar(32) not null, VERSION int not null);
+        CREATE TABLE DETACHEDATTACHMENTS (TQUNID varchar(36) not null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, PATH varchar(300) not null, DETACHEDFILELASTMODTIMESTAMP varchar(25) null, CONTENTID varchar(100) not null, constraint PK_DETACHEDATTACHMENTS primary key (TQUNID));
+        CREATE TABLE DOCREFERENCES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, REFERENCEDOCUMENTID varchar(50) null, constraint PK_DOCREFERENCES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE DQ (TQUNID varchar(36) not null, ISSUEID varchar(50) not null, DEPENDSID varchar(50) null, DEPENDSTYPE int null, DEPENDSCOMMANDSTREAM blob null, DEPENDSNODEIDSEQNOKEY varchar(100) null, DEPENDSACLVERSION int null, constraint PK_DQ primary key (TQUNID));
+        CREATE TABLE EMAILQ(id INT primary key, TIMEQUEUED int not null, NODEID varchar(50) not null, MIME blob not null, TQUNID varchar(36) not null);
+        CREATE TABLE ENTERPRISEDATA(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, DATE1 varchar(25) null, DATE2 varchar(25) null, DATE3 varchar(25) null, DATE4 varchar(25) null, DATE5 varchar(25) null, DATE6 varchar(25) null, DATE7 varchar(25) null, DATE8 varchar(25) null, DATE9 varchar(25) null, DATE10 varchar(25) null, VALUE1 int null, VALUE2 int null, VALUE3 int null, VALUE4 int null, VALUE5 int null, VALUE6 int null, VALUE7 int null, VALUE8 int null, VALUE9 int null, VALUE10 int null, VALUE11 int null, VALUE12 int null, VALUE13 int null, VALUE14 int null, VALUE15 int null, VALUE16 int null, VALUE17 int null, VALUE18 int null, VALUE19 int null, VALUE20 int null, STRING1 varchar(300) null, STRING2 varchar(300) null, STRING3 varchar(300) null, STRING4 varchar(300) null, STRING5 varchar(300) null, STRING6 varchar(300) null, STRING7 varchar(300) null, STRING8 varchar(300) null, STRING9 varchar(300) null, STRING10 varchar(300) null, LONGSTRING1 text null, LONGSTRING2 text null, LONGSTRING3 text null, LONGSTRING4 text null, LONGSTRING5 text null, LONGSTRING6 text null, LONGSTRING7 text null, LONGSTRING8 text null, LONGSTRING9 text null, LONGSTRING10 text null, constraint PK_ENTERPRISEDATA primary key (ISSUEID, OBJECTID));
+        CREATE TABLE FILEMORGUE(TQUNID varchar(36) not null, PATH varchar(300) not null, DELETEFOLDERWHENEMPTY varchar(1) null, constraint PK_FILEMORGUE primary key (TQUNID));
+        CREATE TABLE FILES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARENTENTITYID varchar(50) null, BODY text null, BODYCONTENTTYPE varchar(100) null, ISOBSOLETE varchar(1) null, FILENAME varchar(300) not null, VISIBLENAME varchar(300) not null, VERSIONSTRING varchar(300) not null, DOCUMENTHASH varchar(40) not null, ISFINAL varchar(1) null, DOCREFERENCEID varchar(50) not null, constraint PK_FILES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE FOLDERS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, CONTAINERNAME varchar(300) null, CONTAINERACLSETTINGS text null, constraint PK_FOLDERS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE GLOBALSETTINGS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, SINGULARPROJECTLABEL varchar(30) not null, PLURALPROJECTLABEL varchar(30) not null, PROJECTREQUIRED varchar(1) not null, CUSTOMPROJECTSALLOWED varchar(1) not null, ACTIONITEMSPECXML text null, PROJECTLISTXML text null, ENTERPRISEDATALABELS text null, ENTERPRISEDATATABXSL text null, constraint PK_GLOBALSETTINGS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE GLOBALSTRINGPROPERTIES(ID int not null, VALUE varchar(300) not null, constraint PK_GLOBALSTRINGPROPERTIES primary key (ID));
+        CREATE TABLE IMQ(TQUNID varchar(36) not null, DATETIMEQUEUED varchar(25) not null, ISSUEID varchar(50) not null, KUBIBUILD varchar(30) not null, FAILCOUNT int not null, LASTRUN varchar(25) null, ENVELOPESTREAM blob not null, PAYLOADSTREAM blob not null, constraint PK_IMQ primary key (TQUNID));
+        CREATE TABLE INVITATIONNODES(INVITATIONID varchar(50) not null, RECIPIENTNODEID varchar(50) not null, DATECREATED varchar(25) not null, constraint PK_INVITATIONNODES primary key (INVITATIONID, RECIPIENTNODEID));
+        CREATE TABLE INVITATIONS (id INT primary key, INVITATIONID varchar(50) not null, SENDERNODEID varchar(50) not null, RECIPIENTEMAILADDR varchar(200) not null, RECIPIENTUSERID varchar(50) null, RECIPIENTNODES text null, ISSUEID varchar(50) not null, ENVELOPE text not null, MESSAGEBLOB blob not null, INVITATIONSTATE int not null, TQUNID varchar(36) not null, DATECREATED varchar(25) not null);
+        CREATE TABLE ISSUES (CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, CONTAINERNAME varchar(300) null, CONTAINERACLSETTINGS text null, ISINITIALIZED varchar(1) null, BLINDINVITES text null, ISSYSTEMISSUE varchar(1) not null, ISSUETYPE int not null, ACTIVITYTYPEID varchar(50) null, ISINCOMPLETE varchar(1) not null, constraint PK_ISSUES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE ISSUESETTINGS (CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, ISSUENAME varchar(300) not null, ISSUEACLSETTINGS text not null, ISSUEDUEDATE varchar(25) null, ISSUEPRIORITY int null, ISSUESTATUS int null, DESCRIPTION text null, PROJECTID varchar(100) null, PROJECTNAME text null, PROJECTNAMEISCUSTOM varchar(1) null, ISSYSTEMISSUE varchar(1) not null, ACTIONITEMREVNUM int not null, constraint PK_ISSUESETTINGS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE KMTPMSG (MSGID integer not null, SENDERID varchar(50) null, RECIPIENTIDLIST text not null, ISSUEID varchar(50) null, MESSAGETYPE int not null, ENVELOPE text null, MESSAGEBLOB blob not null, RECEIVEDDATE varchar(25) not null, constraint PK_KMTPMSG primary key (MSGID));
+        CREATE TABLE KMTPNODEQ(id INT primary key, NODEID varchar(50) not null, MSGID int not null, RECEIVEDDATE varchar(25) not null, SENDCOUNT int not null);
+        CREATE TABLE KMTPQ(MSGID integer not null, SENDERID varchar(50) null, RECIPIENTIDLIST text not null, ISSUEID varchar(50) null, MESSAGETYPE int not null, ENVELOPE text null, MESSAGEBLOB blob not null, constraint PK_KMTPQ primary key (MSGID));
+        CREATE TABLE LOGENTRIES(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARENTENTITYID varchar(50) null, BODY text null, BODYCONTENTTYPE varchar(100) null, ISOBSOLETE varchar(1) null, ACTIONTYPE int not null, ASSOCIATEDOBJECTIDS text null, OLDENTITIES text null, NEWENTITIES text null, OTHERENTITIES text null, constraint PK_LOGENTRIES primary key (ISSUEID, OBJECTID));
+        CREATE TABLE LSBI(TQUNID varchar(36) not null, ISSUEID varchar(50) not null, TABLEITEMID varchar(50) null, TABLENODEID varchar(50) null, TABLECMD int null, TABLECONTAINERID varchar(50) null, TABLESEQNO int null, DIRTYCONTENT text null, STUBBED varchar(1) null, ENTITYSTUBDATA text null, UPDATENUMBER int not null, constraint PK_LSBI primary key (TQUNID));
+        CREATE TABLE LSBN(TQUNID varchar(36) not null, ISSUEID varchar(50) not null, NODEID varchar(50) not null, STORESEQNO int not null, SYNCSEQNO int not null, LASTMSGDATE varchar(25) null, constraint PK_LSBN primary key (TQUNID));
+        CREATE TABLE MMQ(TQUNID varchar(36) not null, ISSUEID varchar(50) not null, TABLEREQUESTNODE varchar(50) null, MMQENTRYINDEX varchar(60) null, DIRECTION int null, NODEID varchar(50) null, TABLEFIRSTSEQNO int null, TABLELASTSEQNO int null, NEXTRESENDTIMEOUT varchar(25) null, TABLETIMEOUTMULTIPLIER int null, constraint PK_MMQ primary key (TQUNID));
+        CREATE TABLE NODEREG(id INT primary key, NODEID varchar(50) not null, USERID varchar(50) null, CREATETIME varchar(25) not null, TQUNID varchar(36) not null);
+        CREATE TABLE NODES (id INT primary key, NODEID varchar(50) not null, USERID varchar(50) null, NODESTATE int not null, NODECERT text null, KUBIVERSION int not null, KUBIBUILD varchar(30) not null, TQUNID varchar(36) not null, LASTBINDDATE varchar(25) null, LASTUNBINDDATE varchar(25) null, LASTBINDIP varchar(15) null, NUMBINDS int not null, NUMSENDS int not null, NUMPOLLS int not null, NUMRECVS int not null);
+        CREATE TABLE PARTICIPANTNODES(id INT primary key, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, NODEID varchar(50) not null, USERID varchar(50) null, NODESTATE int not null, NODECERT text null, KUBIVERSION int not null, KUBIBUILD varchar(30) not null, TQUNID varchar(36) not null);
+        CREATE TABLE PARTICIPANTS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARTICIPANTSTATE int not null, PARTICIPANTROLE int not null, PARTICIPANTTEAM int not null, ISREQUIREDMEMBER varchar(1) null, USERID varchar(50) null, ISAGENT varchar(1) null, NAME varchar(150) not null, EMAILADDRESS varchar(200) not null, ISEMAILONLY varchar(1) not null, INVITATION text null, ACCEPTRESENDCOUNT int null, ACCEPTRESENDTIMEOUT varchar(25) null, ACCEPTLASTSENTTONODEID varchar(50) null, constraint PK_PARTICIPANTS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE PARTICIPANTSETTINGS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARTICIPANTID varchar(50) not null, TASKPIMSYNC varchar(1) null, MOBILESUPPORT varchar(1) null, NOTIFYBYEMAIL varchar(1) null, MARKEDCRITICAL varchar(1) null, constraint PK_PARTICIPANTSETTINGS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE PARTITIONS(id INT primary key, PARTITIONID varchar(50) not null, NAME varchar(100) not null, LDAPDN varchar(300) not null, SERVERNODEID varchar(50) not null, TQUNID varchar(36) not null);
+        CREATE TABLE PROJECTS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, NAME varchar(100) not null, ID varchar(100) null, constraint PK_PROJECTS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE TASKCOMPLETIONS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARENTENTITYID varchar(50) null, BODY text null, BODYCONTENTTYPE varchar(100) null, ISOBSOLETE varchar(1) null, TASKID varchar(50) not null, DISPOSITION int not null, STATUSID varchar(50) not null, SHORTNAME varchar(30) not null, LONGNAME varchar(200) not null, constraint PK_TASKCOMPLETIONS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE TASKS(CLASSID int null, SEQNO int not null, LASTMODONNODEID varchar(50) not null, PREVMODONNODEID varchar(50) null, ISSUEID varchar(50) not null, OBJECTID varchar(50) not null, REVISIONNUM int not null, CONTAINERID varchar(50) not null, AUTHORID varchar(50) not null, CREATIONDATE varchar(25) null, LASTMODIFIEDDATE varchar(25) null, UPDATENUMBER int null, PREVREVISIONNUM int null, LASTCMD int null, LASTCMDACLVERSION int null, USERDEFINEDFIELD varchar(300) null, LASTMODIFIEDBYID varchar(50) null, PARENTENTITYID varchar(50) null, BODY text null, BODYCONTENTTYPE varchar(100) null, ISOBSOLETE varchar(1) null, DUETIME varchar(25) null, ASSIGNEDTO varchar(50) not null, TARGETOBJECTIDS text null, RESPONSEID varchar(50) not null, TYPEID varchar(50) not null, LABEL varchar(200) not null, INSTRUCTIONS text not null, ALLOWEDSTATUSES text not null, ISSERIALREVIEW varchar(1) null, DAYSTOREVIEW int null, REVIEWERIDS varchar(500) null, REVIEWTYPE int null, REVIEWGROUP varchar(300) null, constraint PK_TASKS primary key (ISSUEID, OBJECTID));
+        CREATE TABLE USERS (id INT primary key, USERID varchar(50) not null, USERSID varchar(100) not null, ENTERPRISEUSER varchar(1) not null, USEREMAILADDRESS varchar(200) null, EMAILVALIDATED varchar(1) null, VALIDATIONCOOKIE varchar(50) null, CREATETIME varchar(25) not null, TQUNID varchar(36) not null, PARTITIONID varchar(50) null);
         CREATE VIEW CRITICALISSUES as
 
 
diff --git a/test/sql-tap/tkt1473.test.lua b/test/sql-tap/tkt1473.test.lua
index b2468d93ff4822515fddea108d4b5ddaf64f995a..d6bf388be85a6f13b2c133d2821b670248e9ea12 100755
--- a/test/sql-tap/tkt1473.test.lua
+++ b/test/sql-tap/tkt1473.test.lua
@@ -25,7 +25,7 @@ test:plan(57)
 test:do_execsql_test(
     "tkt1473-1.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b INT);
         INSERT INTO t1 VALUES(1,2);
         INSERT INTO t1 VALUES(3,4);
         SELECT * FROM t1
@@ -290,7 +290,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt1473-4.1",
     [[
-        CREATE TABLE t2(x primary key,y);
+        CREATE TABLE t2(x INT primary key,y INT);
         INSERT INTO t2 VALUES(1,2);
         INSERT INTO t2 SELECT x+2, y+2 FROM t2;
         INSERT INTO t2 SELECT x+4, y+4 FROM t2;
diff --git a/test/sql-tap/tkt1501.test.lua b/test/sql-tap/tkt1501.test.lua
index 3e1ed1e0d70e33c917f243990ce0cd05d0175a3a..23b0a798d59b3297d5cf036b9167a463ee313d86 100755
--- a/test/sql-tap/tkt1501.test.lua
+++ b/test/sql-tap/tkt1501.test.lua
@@ -25,7 +25,7 @@ test:plan(1)
 test:do_execsql_test(
     "tkt1501-1.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b INT);
         INSERT INTO t1 VALUES(1,2);
         SELECT a, b, 'abc' FROM t1
           UNION
diff --git a/test/sql-tap/tkt1514.test.lua b/test/sql-tap/tkt1514.test.lua
index 025c1065f4768ed74423f4c59b8ecd7b7877a931..83b8891e6edd7fb5f219da5830c13c1e3c0833cd 100755
--- a/test/sql-tap/tkt1514.test.lua
+++ b/test/sql-tap/tkt1514.test.lua
@@ -23,7 +23,7 @@ test:plan(1)
 test:do_catchsql_test(
     "tkt1514-1.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b INT);
         SELECT a FROM t1 WHERE max(b)<10 GROUP BY a;
     ]], {
         -- <tkt1514-1.1>
diff --git a/test/sql-tap/tkt1537.test.lua b/test/sql-tap/tkt1537.test.lua
index caa428409f355e346e4995eb9318042133fee219..8a53932c97413d2736329286d324e7d433921c2f 100755
--- a/test/sql-tap/tkt1537.test.lua
+++ b/test/sql-tap/tkt1537.test.lua
@@ -23,10 +23,10 @@ test:plan(15)
 test:do_execsql_test(
     "tkt1537-1.1",
     [[
-        CREATE TABLE t1(id primary key, a1, a2);
+        CREATE TABLE t1(id INT primary key, a1 INT, a2 INT);
         INSERT INTO t1 VALUES(1, NULL, NULL);
         INSERT INTO t1 VALUES(2, 1, 3);
-        CREATE TABLE t2(id primary key, b);
+        CREATE TABLE t2(id INT primary key, b INT);
         INSERT INTO t2 VALUES(3, 1);
         INSERT INTO t2 VALUES(4, NULL);
         SELECT * FROM t1 LEFT JOIN t2 ON a1=b OR a2=+b;
diff --git a/test/sql-tap/tkt2141.test.lua b/test/sql-tap/tkt2141.test.lua
index a08b6af68aa8fe544d48740b4d798d553dad5e86..3ce9d77db4836d26a2121f5334da5f56e0798ea4 100755
--- a/test/sql-tap/tkt2141.test.lua
+++ b/test/sql-tap/tkt2141.test.lua
@@ -27,11 +27,11 @@ test:plan(3)
 test:do_execsql_test(
     "tkt2141-1.1",
     [[
-        CREATE TABLE tab1 (t1_id integer PRIMARY KEY, t1_desc);
+        CREATE TABLE tab1 (t1_id integer PRIMARY KEY, t1_desc TEXT);
         INSERT INTO tab1 VALUES(1,'rec 1 tab 1');
-        CREATE TABLE tab2 (t2_id integer PRIMARY KEY, t2_id_t1, t2_desc);
+        CREATE TABLE tab2 (t2_id integer PRIMARY KEY, t2_id_t1 INT , t2_desc TEXT);
         INSERT INTO tab2 VALUES(1,1,'rec 1 tab 2');
-        CREATE TABLE tab3 (t3_id integer PRIMARY KEY, t3_id_t2, t3_desc);
+        CREATE TABLE tab3 (t3_id integer PRIMARY KEY, t3_id_t2 INT , t3_desc TEXT);
         INSERT INTO tab3 VALUES(1,1,'aa');
         SELECT *
         FROM tab1 t1 LEFT JOIN tab2 t2 ON t1.t1_id = t2.t2_id_t1
diff --git a/test/sql-tap/tkt2192.test.lua b/test/sql-tap/tkt2192.test.lua
index 7e96e0ce4058a4a423cd61961e04dbe44c6150eb..c76a9e5c2b7baa25fb21e26b463c8390723dcaee 100755
--- a/test/sql-tap/tkt2192.test.lua
+++ b/test/sql-tap/tkt2192.test.lua
@@ -109,7 +109,7 @@ test:do_test(
 test:do_execsql_test(
     "tkt2192-2.1",
     [[
-        CREATE TABLE t1(a,b primary key);
+        CREATE TABLE t1(a INT ,b  INT primary key);
         CREATE VIEW v1 AS
           SELECT * FROM t1 WHERE b%7=0 UNION SELECT * FROM t1 WHERE b%5=0;
         INSERT INTO t1 VALUES(1,7);
diff --git a/test/sql-tap/tkt2339.test.lua b/test/sql-tap/tkt2339.test.lua
index 8129d1cbfd68e43e34d4f72d7df664e3f664befa..0f25303a721c4e85b61923c39e7d16dcb50ea6a6 100755
--- a/test/sql-tap/tkt2339.test.lua
+++ b/test/sql-tap/tkt2339.test.lua
@@ -23,21 +23,21 @@ test:plan(9)
 test:do_execsql_test(
     "tkt2339.1",
     [[
-        create table t1(num int primary key);
+        create table t1(numb int primary key);
         insert into t1 values (1);
         insert into t1 values (2);
         insert into t1 values (3);
         insert into t1 values (4);
 
-        create table t2(num int primary key);
+        create table t2(numb int primary key);
         insert into t2 values (11);
         insert into t2 values (12);
         insert into t2 values (13);
         insert into t2 values (14);
 
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         UNION
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC LIMIT 2)
     ]], {
         -- <tkt2339.1>
         3, 4, 13, 14
@@ -47,9 +47,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.2",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         UNION ALL
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC LIMIT 2)
     ]], {
         -- <tkt2339.2>
         4, 3, 14, 13
@@ -59,9 +59,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.3",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC)
         UNION ALL
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC LIMIT 2)
     ]], {
         -- <tkt2339.3>
         4, 3, 2, 1, 14, 13
@@ -71,9 +71,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.4",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         UNION ALL
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC)
     ]], {
         -- <tkt2339.4>
         4, 3, 14, 13, 12, 11
@@ -83,9 +83,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.5",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         UNION
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC)
     ]], {
         -- <tkt2339.5>
         3, 4, 11, 12, 13, 14
@@ -95,9 +95,9 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.6",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         EXCEPT
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC)
     ]], {
         -- <tkt2339.6>
         3, 4
@@ -109,7 +109,7 @@ test:do_execsql_test(
     [[
         SELECT * FROM (SELECT * FROM t1 LIMIT 2)
         UNION
-        SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t2 ORDER BY numb DESC LIMIT 2)
     ]], {
         -- <tkt2339.7>
         1, 2, 13, 14
@@ -131,7 +131,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2339.9",
     [[
-        SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
+        SELECT * FROM (SELECT * FROM t1 ORDER BY numb DESC LIMIT 2)
         UNION
         SELECT * FROM (SELECT * FROM t2 LIMIT 2)
     ]], {
diff --git a/test/sql-tap/tkt2391.test.lua b/test/sql-tap/tkt2391.test.lua
index 1ccd922ab6f04646bc61ef19bc4dbdae22ebcc84..7fa5e1634db27e2dfb9f6bfa7adbd12ff2dc4afc 100755
--- a/test/sql-tap/tkt2391.test.lua
+++ b/test/sql-tap/tkt2391.test.lua
@@ -20,7 +20,7 @@ test:plan(4)
 test:do_execsql_test(
     "tkt2391.1",
     [[
-        CREATE TABLE folders(folderid, parentid, foldername COLLATE binary primary key);
+        CREATE TABLE folders(folderid INT , parentid INT , foldername TEXT COLLATE binary primary key);
         INSERT INTO folders VALUES(1, 3, 'FolderA');
         INSERT INTO folders VALUES(1, 3, 'folderB');
         INSERT INTO folders VALUES(4, 0, 'FolderC');
diff --git a/test/sql-tap/tkt2640.test.lua b/test/sql-tap/tkt2640.test.lua
index fa32b5e0da9af16bedf90c81b631a22f60dcd84a..2f3af1d8082097516ff86affc798096a44356fe4 100755
--- a/test/sql-tap/tkt2640.test.lua
+++ b/test/sql-tap/tkt2640.test.lua
@@ -35,16 +35,16 @@ test:plan(6)
 test:do_execsql_test(
     "tkt2640-1.1",
     [[
-        CREATE TABLE persons(person_id primary key, name);
+        CREATE TABLE persons(person_id  INT primary key, name TEXT);
         INSERT INTO persons VALUES(1,'fred');
         INSERT INTO persons VALUES(2,'barney');
         INSERT INTO persons VALUES(3,'wilma');
         INSERT INTO persons VALUES(4,'pebbles');
         INSERT INTO persons VALUES(5,'bambam');
-        CREATE TABLE directors(id primary key, person_id);
+        CREATE TABLE directors(id  INT primary key, person_id INT );
         INSERT INTO directors VALUES(1, 5);
         INSERT INTO directors VALUES(2, 3);
-        CREATE TABLE writers(person_id primary key);
+        CREATE TABLE writers(person_id  INT primary key);
         INSERT INTO writers VALUES(2);
         INSERT INTO writers VALUES(3);
         INSERT INTO writers VALUES(4);
diff --git a/test/sql-tap/tkt2767.test.lua b/test/sql-tap/tkt2767.test.lua
index 36d8f6c8ce0dd505cd7bb1328d31c5884b765b35..066c82100ac96537e422d5d64f80617a1440e942 100755
--- a/test/sql-tap/tkt2767.test.lua
+++ b/test/sql-tap/tkt2767.test.lua
@@ -31,7 +31,7 @@ if (1 > 0)
         "tkt2767-1.1",
         [[
             -- Construct a table with many rows of data
-            CREATE TABLE t1(x primary key);
+            CREATE TABLE t1(x  INT primary key);
             INSERT INTO t1 VALUES(1);
             INSERT INTO t1 VALUES(2);
             INSERT INTO t1 SELECT x+2 FROM t1;
diff --git a/test/sql-tap/tkt2822.test.lua b/test/sql-tap/tkt2822.test.lua
index bb846b56bd84f386d384bf7df2a597c53cce6db8..40d5ec21248c73dc9fc2827759b576cc4b6286d1 100755
--- a/test/sql-tap/tkt2822.test.lua
+++ b/test/sql-tap/tkt2822.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(37)
+test:plan(36)
 
 --!./tcltestrunner.lua
 -- 2007 Dec 4
@@ -62,8 +62,8 @@ test:plan(37)
 test:do_execsql_test(
     "tkt2822-0.1",
     [[
-        CREATE TABLE t1(a primary key, b, c);
-        CREATE TABLE t2(a primary key, b, c);
+        CREATE TABLE t1(a  INT primary key, b INT , c INT );
+        CREATE TABLE t2(a  INT primary key, b INT , c INT );
 
         INSERT INTO t1 VALUES(1, 3, 9);
         INSERT INTO t1 VALUES(3, 9, 27);
@@ -217,19 +217,6 @@ test:do_catchsql_test(
         -- </tkt2822-4.1>
     })
 
-test:do_catchsql_test(
-    "tkt2822-4.2",
-    [[
-        SELECT a, CAST (b AS TEXT) AS x, c FROM t1 
-          UNION ALL 
-        SELECT a, b, c FROM t2 
-          ORDER BY CAST (b AS INTEGER);
-    ]], {
-        -- <tkt2822-4.2>
-        1, "1st ORDER BY term does not match any column in the result set"
-        -- </tkt2822-4.2>
-    })
-
 -- Tests for rule (2).
 --
 -- The "ORDER BY b" should match the column alias (rule 2), not the
@@ -238,7 +225,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "tkt2822-5.1",
     [[
-        CREATE TABLE t3(a primary key,b);
+        CREATE TABLE t3(a  INT primary key,b INT );
         INSERT INTO t3 VALUES(1,8);
         INSERT INTO t3 VALUES(9,2);
 
@@ -294,10 +281,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2822-6.1",
     [[
-        CREATE TABLE t6a(p primary key,q);
+        CREATE TABLE t6a(p  INT primary key,q INT );
         INSERT INTO t6a VALUES(1,8);
         INSERT INTO t6a VALUES(9,2);
-        CREATE TABLE t6b(x primary key,y);
+        CREATE TABLE t6b(x  INT primary key,y INT );
         INSERT INTO t6b VALUES(1,7);
         INSERT INTO t6b VALUES(7,2);
 
@@ -371,8 +358,8 @@ test:do_test(
     "tkt2822-7.1",
     function()
         test:execsql [[
-            CREATE TABLE t7(a1 primary key,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,
-                            a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25);
+            CREATE TABLE t7(a1  INT primary key,a2 INT ,a3 INT ,a4 INT ,a5 INT ,a6 INT ,a7 INT ,a8 INT ,a9 INT ,a10 INT ,a11 INT ,a12 INT ,a13 INT ,a14 INT ,
+                            a15 INT ,a16 INT ,a17 INT ,a18 INT ,a19 INT ,a20 INT ,a21 INT ,a22 INT ,a23 INT ,a24 INT ,a25 INT );
         ]]
         return test:catchsql [[
             SELECT * FROM t7 ORDER BY 0;
diff --git a/test/sql-tap/tkt2832.test.lua b/test/sql-tap/tkt2832.test.lua
index 95cd1b5c2cd38b3f06ed3edd347be20826f9fd08..108c05cdb146dbcb6daf34ea56735dc9916e4ea6 100755
--- a/test/sql-tap/tkt2832.test.lua
+++ b/test/sql-tap/tkt2832.test.lua
@@ -25,7 +25,7 @@ test:plan(6)
 test:do_execsql_test(
     "tkt2832-1.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY);
+        CREATE TABLE t1(a INT PRIMARY KEY);
         INSERT INTO t1 VALUES(2);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t1 VALUES(3);
@@ -50,7 +50,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2832-2.1",
     [[
-        CREATE TABLE t2(a primary key, b);
+        CREATE TABLE t2(a INT primary key, b INT);
         CREATE TRIGGER t2_t AFTER UPDATE ON t2 BEGIN
           DELETE FROM t2 WHERE a = new.a + 1;
         END;
@@ -75,7 +75,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2832-3.1",
     [[
-        CREATE TABLE t3(a primary key, b);
+        CREATE TABLE t3(a INT primary key, b INT);
         CREATE TRIGGER t3_t AFTER DELETE ON t3 BEGIN
           DELETE FROM t3 WHERE a = old.a + 1;
         END;
diff --git a/test/sql-tap/tkt2927.test.lua b/test/sql-tap/tkt2927.test.lua
index 8a31bc63f348e706bba5372bd4d89fea82de6a2e..897e0777b4c5938fd98ea3c5a2d26777f1cb1d34 100755
--- a/test/sql-tap/tkt2927.test.lua
+++ b/test/sql-tap/tkt2927.test.lua
@@ -28,7 +28,7 @@ test:do_test(
     "tkt2927-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key, b);
+            CREATE TABLE t1(a  INT primary key, b INT );
             INSERT INTO t1 VALUES(1,11);
             INSERT INTO t1 VALUES(2,22);
             INSERT INTO t1 VALUES(3,33);
@@ -1204,12 +1204,12 @@ test:do_test(
             CREATE TABLE host (
              hostname text not null primary key,
              consoleHost text,
-             consolePort text
+             consolePort int
             );
-            INSERT INTO host VALUES('aald04','aalp03','4');
-            INSERT INTO host VALUES('aald17','aalp01','1');
+            INSERT INTO host VALUES('aald04','aalp03',4);
+            INSERT INTO host VALUES('aald17','aalp01',1);
             CREATE VIEW consolemap1a as
-              select hostname, consolehost, '/dev/cuaD0.' || (consoleport-1) consoleport
+              select hostname, consolehost, '/dev/cuaD0.' || cast(consoleport-1 as text) consoleport
                 from host where consolehost='aalp01';
             CREATE VIEW consolemap1b as
               select hostname hostname, consolehost consolehost, '/dev/cuaD' ||
diff --git a/test/sql-tap/tkt2942.test.lua b/test/sql-tap/tkt2942.test.lua
index 6ee3546173ec0726e42816970b8588be8707f90f..f83d30c2b321d4b01687a291ebf0bab3c1fb50c6 100755
--- a/test/sql-tap/tkt2942.test.lua
+++ b/test/sql-tap/tkt2942.test.lua
@@ -35,12 +35,12 @@ test:plan(4)
 test:do_execsql_test(
     "tkt2942.1",
     [[
-        create table t1(id primary key, num int);
+        create table t1(id  INT primary key, "num" int);
         insert into t1 values (1, 2);
         insert into t1 values (2, 1);
         insert into t1 values (3, 3);
         insert into t1 values (4, 4);
-        SELECT group_concat(num) FROM (SELECT num FROM t1 ORDER BY num DESC);
+        SELECT group_concat("num") FROM (SELECT "num" FROM t1 ORDER BY "num" DESC);
     ]], {
         -- <tkt2942.1>
         "4,3,2,1"
@@ -50,7 +50,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2942.2",
     [[
-        SELECT group_concat(num) FROM (SELECT num FROM t1 ORDER BY num);
+        SELECT group_concat("num") FROM (SELECT "num" FROM t1 ORDER BY "num");
     ]], {
         -- <tkt2942.2>
         "1,2,3,4"
@@ -60,7 +60,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2942.3",
     [[
-        SELECT group_concat(num) FROM (SELECT num FROM t1);
+        SELECT group_concat("num") FROM (SELECT "num" FROM t1);
     ]], {
         -- <tkt2942.3>
         "2,1,3,4"
@@ -70,7 +70,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt2942.4",
     [[
-        SELECT group_concat(num) FROM (SELECT num FROM t1 ORDER BY id DESC);
+        SELECT group_concat("num") FROM (SELECT "num" FROM t1 ORDER BY id DESC);
     ]], {
         -- <tkt2942.4>
         "4,3,1,2"
diff --git a/test/sql-tap/tkt3201.test.lua b/test/sql-tap/tkt3201.test.lua
index a16cfb980376ed87362ae03376a782a02de3156d..33700b88600a50e463d4defa7a828b0090fc7933 100755
--- a/test/sql-tap/tkt3201.test.lua
+++ b/test/sql-tap/tkt3201.test.lua
@@ -118,8 +118,8 @@ test:do_test(
     "tkt3201-4.0",
     function()
         return test:execsql [[
-            CREATE TABLE t4(x primary key);
-            CREATE TABLE t4_log(x primary key);
+            CREATE TABLE t4(x  INT primary key);
+            CREATE TABLE t4_log(x  INT primary key);
             CREATE TRIGGER r4_1 AFTER INSERT ON t4 WHEN new.x=1 BEGIN
               INSERT INTO t4_log(x) VALUES(new.x);
             END;
diff --git a/test/sql-tap/tkt3298.test.lua b/test/sql-tap/tkt3298.test.lua
index 11eb00f652c11b2e1551d47a2857638123e98438..d7553d4b8509194fcdbae0238a2c1212eca43566 100755
--- a/test/sql-tap/tkt3298.test.lua
+++ b/test/sql-tap/tkt3298.test.lua
@@ -94,10 +94,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt3298-2.1",
     [[
-        CREATE TABLE t2(p primary key,q);
+        CREATE TABLE t2(p  INT primary key,q INT );
         INSERT INTO t2 VALUES(1,11);
         INSERT INTO t2 VALUES(2,22);
-        CREATE TABLE t3(x primary key,y);
+        CREATE TABLE t3(x  INT primary key,y TEXT);
         INSERT INTO t3 VALUES(1,'one');
 
         SELECT *, (SELECT z FROM (SELECT y AS z FROM t3 WHERE x=t1.a+1) ) FROM t1;
diff --git a/test/sql-tap/tkt3334.test.lua b/test/sql-tap/tkt3334.test.lua
index 10a2393ebb83c1d632c78326ba55c04e65c2e742..9895cd0be7e0e1033081a9af9f9110854fee7422 100755
--- a/test/sql-tap/tkt3334.test.lua
+++ b/test/sql-tap/tkt3334.test.lua
@@ -24,7 +24,7 @@ test:plan(11)
 test:do_execsql_test(
     "tkt3334-1.0",
     [[
-        CREATE TABLE t1(id primary key, a,b);
+        CREATE TABLE t1(id  INT primary key, a INT ,b INT );
         INSERT INTO t1 VALUES(1, 1,934);
         INSERT INTO t1 VALUES(2, 2,221);
         INSERT INTO t1 VALUES(3, 1,372);
diff --git a/test/sql-tap/tkt3346.test.lua b/test/sql-tap/tkt3346.test.lua
index 1e8bd2ca604b00e1548359d274bf5a29e337e807..27ca72bb7acfe527c13a1a4cfc594f058e585bb4 100755
--- a/test/sql-tap/tkt3346.test.lua
+++ b/test/sql-tap/tkt3346.test.lua
@@ -24,7 +24,7 @@ test:do_test(
     "tkt3346-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(id primary key, a,b);
+            CREATE TABLE t1(id  INT primary key, a INT ,b TEXT);
             INSERT INTO t1 VALUES(1, 2,'bob');
             INSERT INTO t1 VALUES(2, 1,'alice');
             INSERT INTO t1 VALUES(3, 3,'claire');
@@ -55,7 +55,7 @@ test:do_test(
     function()
         return test:execsql [[
             SELECT b FROM (SELECT a,b FROM t1 ORDER BY a) AS x
-             WHERE (SELECT y FROM (SELECT a||b y FROM t1 WHERE t1.b=x.b))=(x.a||x.b)
+             WHERE (SELECT y FROM (SELECT CAST(a AS TEXT)||b y FROM t1 WHERE t1.b=x.b))=(CAST(x.a AS TEXT)||x.b)
         ]]
     end, {
         -- <tkt3346-1.3>
@@ -68,7 +68,7 @@ test:do_test(
     function()
         return test:execsql [[
             SELECT b FROM (SELECT a,b FROM t1 ORDER BY a) AS x
-             WHERE (SELECT y FROM (SELECT a||b y FROM t1 WHERE t1.b=x.b))=('2'||x.b)
+             WHERE (SELECT y FROM (SELECT CAST(a AS TEXT)||b y FROM t1 WHERE t1.b=x.b))=('2'||x.b)
         ]]
     end, {
         -- <tkt3346-1.4>
@@ -88,7 +88,7 @@ test:do_test(
 test:do_catchsql_test(
     "tkt3346-2.1",
     [[
-        CREATE TABLE t2(a primary key);
+        CREATE TABLE t2(a  INT primary key);
         INSERT INTO t2 VALUES(1);
 
         SELECT * FROM (SELECT a,b FROM t1 WHERE 1=x.a) AS x;
diff --git a/test/sql-tap/tkt3357.test.lua b/test/sql-tap/tkt3357.test.lua
index d302639ebdefb7379a9a8c5c302e09ff70788f55..4424afd275c5b33d344a804428bd6b7d061e53ab 100755
--- a/test/sql-tap/tkt3357.test.lua
+++ b/test/sql-tap/tkt3357.test.lua
@@ -23,8 +23,8 @@ test:plan(4)
 test:do_execsql_test(
     "tkt3357-1.1",
     [[
-        create table a(id integer primary key, b_id integer, myvalue varchar);
-        create table b(id integer primary key, bvalue varchar);
+        create table a(id integer primary key, b_id integer, myvalue text);
+        create table b(id integer primary key, bvalue text);
         insert into a values(1, 1,'Test');
         insert into a values(2, 1,'Test2');
         insert into a values(3, 1,'Test3');
diff --git a/test/sql-tap/tkt3424.test.lua b/test/sql-tap/tkt3424.test.lua
index 370677fb9ef80dcc3905a77079696fc7a5385c27..2bbd226b3dd15fb65798098e9ed5f7ef85b617e6 100755
--- a/test/sql-tap/tkt3424.test.lua
+++ b/test/sql-tap/tkt3424.test.lua
@@ -25,7 +25,7 @@ test:do_execsql_test(
         INSERT INTO names VALUES(1,'E1','AAA');
         INSERT INTO names VALUES(2,NULL,'BBB');
 
-        CREATE TABLE orig(id primary key, code TEXT, data TEXT);
+        CREATE TABLE orig(id INT primary key, code TEXT, data TEXT);
         INSERT INTO orig VALUES(1, 'AAA','E1');
         INSERT INTO orig VALUES(2, 'AAA','E2');
         INSERT INTO orig VALUES(3, 'AAA','E3');
diff --git a/test/sql-tap/tkt3442.test.lua b/test/sql-tap/tkt3442.test.lua
index 10267929247f352aee6cbc7433589d1c152c640f..f511f6a686a09eb6855caeb1ff5a52b42db07070 100755
--- a/test/sql-tap/tkt3442.test.lua
+++ b/test/sql-tap/tkt3442.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(5)
+test:plan(4)
 
 --!./tcltestrunner.lua
 -- 2008 October 20
@@ -45,9 +45,9 @@ local function EQP(sql)
     return test:execsql("EXPLAIN QUERY PLAN "..sql)
 end
 
--- These tests perform an EXPLAIN QUERY PLAN on both versions of the 
--- SELECT referenced in ticket #3442 (both '5000' and "5000") 
--- and verify that the query plan is the same.
+-- These tests perform an EXPLAIN QUERY PLAN on both versions of
+-- SELECT: with string literal and numeric constant and verify
+-- that the query plans are different.
 --
 test:do_test(
     "tkt3442-1.2",
@@ -62,34 +62,18 @@ test:do_test(
 test:do_test(
     "tkt3442-1.3",
     function()
-        return EQP([[ SELECT node FROM listhash WHERE id='5000' LIMIT 1; ]])
+        return EQP([[ SELECT node FROM listhash WHERE id=5000 LIMIT 1; ]])
     end, {
         -- <tkt3442-1.3>
-        0, 0, 0, "SEARCH TABLE LISTHASH USING COVERING INDEX IDIDX (ID=?)"
+        0, 0, 0, "SCAN TABLE LISTHASH"
         -- </tkt3442-1.3>
     })
 
-
-
--- Some extra tests testing other permutations of 5000.
---
-test:do_test(
-    "tkt3442-1.4",
-    function()
-        return EQP(" SELECT node FROM listhash WHERE id=5000 LIMIT 1; ")
-    end, {
-        -- <tkt3442-1.4>
-        0, 0, 0, "SEARCH TABLE LISTHASH USING COVERING INDEX IDIDX (ID=?)"
-        -- </tkt3442-1.4>
-    })
-
-
-
 test:do_catchsql_test(
-    "tkt3442-1.5",
-    [=[
+    "tkt3442-1.4",
+    [[
         SELECT node FROM listhash WHERE id="5000" LIMIT 1;
-    ]=], {
+    ]], {
         -- <tkt3442-1.5>
         1, "no such column: 5000"
         -- </tkt3442-1.5>
diff --git a/test/sql-tap/tkt3493.test.lua b/test/sql-tap/tkt3493.test.lua
index 85f3c089f7af459d8b8779694e4a8901e255a10f..31d81d52915bdc559e091063ea7ed9664af3bfd9 100755
--- a/test/sql-tap/tkt3493.test.lua
+++ b/test/sql-tap/tkt3493.test.lua
@@ -246,7 +246,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "tkt3493-3.1",
     [[
-        CREATE TABLE t2(a COLLATE "unicode_ci" PRIMARY KEY, b COLLATE BINARY);
+        CREATE TABLE t2(a  TEXT COLLATE "unicode_ci" PRIMARY KEY, b  TEXT COLLATE BINARY);
         INSERT INTO t2 VALUES('aBc', 'DeF');
     ]], {
         -- <tkt3493-3.1>
diff --git a/test/sql-tap/tkt3508.test.lua b/test/sql-tap/tkt3508.test.lua
index a13e53ef4d97c02d7f1b04b6aca2ad5141a7a5b6..2d56c21feee34c2ca5cc32e37108dcc9aaea1760 100755
--- a/test/sql-tap/tkt3508.test.lua
+++ b/test/sql-tap/tkt3508.test.lua
@@ -22,7 +22,7 @@ test:do_catchsql_test(
     "tkt3508-1.1",
     [[
         CREATE TABLE modificationsTmp (
-          id primary key,
+          id  INT primary key,
           SUBSTRATE_HPRD_ID VARCHAR(80),
           SUBSTRATE_GENE_SYMBOL VARCHAR(80),
           SUBSTRATE_ISOFORM_ID VARCHAR(80),
diff --git a/test/sql-tap/tkt3527.test.lua b/test/sql-tap/tkt3527.test.lua
index a7c2070f6d65b4aa264d7227abb9ded6f952aaad..14461dc607a4789b68a95070eef6e973683ee3cd 100755
--- a/test/sql-tap/tkt3527.test.lua
+++ b/test/sql-tap/tkt3527.test.lua
@@ -42,9 +42,9 @@ test:do_test(
             CREATE TABLE ElemAnd (
              CodeAnd INTEGER,
              Code INTEGER,
-             Attr1 INTEGER,
-             Attr2 INTEGER,
-             Attr3 INTEGER,
+             Attr1 TEXT,
+             Attr2 TEXT,
+             Attr3 TEXT,
              PRIMARY KEY(CodeAnd,Code)
             );
 
diff --git a/test/sql-tap/tkt3541.test.lua b/test/sql-tap/tkt3541.test.lua
index c1cc5e7c83d477516372176656bf057ffdfe1e2d..00f40faaa3ed194a198eaca605404a124866f1ec 100755
--- a/test/sql-tap/tkt3541.test.lua
+++ b/test/sql-tap/tkt3541.test.lua
@@ -25,7 +25,7 @@ test:do_test(
     "tkt3541-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(x primary key);
+            CREATE TABLE t1(x INT primary key);
             INSERT INTO t1 VALUES(123);
             SELECT CASE ~max(x) WHEN min(x) THEN 1 ELSE max(x) END FROM t1;
         ]]
diff --git a/test/sql-tap/tkt3554.test.lua b/test/sql-tap/tkt3554.test.lua
index 67b6325e490c35d8881de24f1ee0fa8ef0767da8..ed194107f577ef724828e956c4f82a7bb33c5a5f 100755
--- a/test/sql-tap/tkt3554.test.lua
+++ b/test/sql-tap/tkt3554.test.lua
@@ -26,7 +26,7 @@ test:plan(4)
 test:do_execsql_test(
     "tkt3544-1.1",
     [[
-        CREATE TABLE test ( obj, t1, t2, PRIMARY KEY(obj, t1, t2) );
+        CREATE TABLE test ( obj TEXT, t1 INT , t2 INT , PRIMARY KEY(obj, t1, t2) );
 
         CREATE TRIGGER test_insert BEFORE INSERT ON test BEGIN
           UPDATE test SET t1 = new.t1
diff --git a/test/sql-tap/tkt3581.test.lua b/test/sql-tap/tkt3581.test.lua
index b90ac950365f92eaafc7a44f8ec32f11da7246a4..4479b8abbbec94930f04f4629704a251fb9f0375 100755
--- a/test/sql-tap/tkt3581.test.lua
+++ b/test/sql-tap/tkt3581.test.lua
@@ -25,10 +25,10 @@ test:do_test(
     "tkt3581-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
+            CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT, c INT);
             INSERT INTO t1 VALUES(0,544,846);
             INSERT INTO t1 VALUES(1,345,51);
-            CREATE TABLE t2(a INTEGER PRIMARY KEY, b, c);
+            CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT, c INT);
             INSERT INTO t2 SELECT * FROM t1;
             CREATE INDEX i2 on t2(c);
         ]]
diff --git a/test/sql-tap/tkt3731.test.lua b/test/sql-tap/tkt3731.test.lua
index b2701c24c5278192c85cd2e763a7a4719c92d8fa..4f19aa8bbfe7aa74d05e4e3f8f4206cf3d20c7ef 100755
--- a/test/sql-tap/tkt3731.test.lua
+++ b/test/sql-tap/tkt3731.test.lua
@@ -26,7 +26,7 @@ test:catchsql " pragma recursive_triggers = off "
 test:do_execsql_test(
     "tkt3731-1.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b);
+        CREATE TABLE t1(a  TEXT PRIMARY KEY, b TEXT );
         CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
           INSERT INTO t1 VALUES(new.a || '+', new.b || '+');
         END;
@@ -52,7 +52,7 @@ test:do_execsql_test(
     "tkt3731-1.3",
     [[
         DELETE FROM t1;
-        CREATE TABLE t2(a primary key, b);
+        CREATE TABLE t2(a TEXT primary key, b TEXT);
         INSERT INTO t2 VALUES('e', 'f');
         INSERT INTO t2 VALUES('g', 'h');
         INSERT INTO t1 SELECT * FROM t2;
diff --git a/test/sql-tap/tkt3773.test.lua b/test/sql-tap/tkt3773.test.lua
index 24ab2e7aaac9895024bdf669651d14d900751958..04b991755521dcc0e4ef95ede25a40972593b6d6 100755
--- a/test/sql-tap/tkt3773.test.lua
+++ b/test/sql-tap/tkt3773.test.lua
@@ -27,10 +27,10 @@ test:do_test(
     "tkt3773-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a primary key,b);
+            CREATE TABLE t1(a INT primary key,b INT);
             INSERT INTO t1 VALUES(2,1);
             INSERT INTO t1 VALUES(33,3);
-            CREATE TABLE t2(x,y primary key);
+            CREATE TABLE t2(x INT,y INT primary key);
             INSERT INTO t2 VALUES(123,2);
             INSERT INTO t2 VALUES(4,4);
             SELECT a FROM (
diff --git a/test/sql-tap/tkt3791.test.lua b/test/sql-tap/tkt3791.test.lua
index aca265855af457488580ab23f7326000055fdc6c..388670a4bcf68922993684c011b92f05ca3b9fe9 100755
--- a/test/sql-tap/tkt3791.test.lua
+++ b/test/sql-tap/tkt3791.test.lua
@@ -28,7 +28,7 @@ test:do_test(
     "tkt3791-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(x primary key, y DEFAULT(datetime('now')));
+            CREATE TABLE t1(x  INT primary key, y TEXT DEFAULT(datetime('now')));
             INSERT INTO t1(x) VALUES(1);
             SELECT x, length(y) FROM t1;
         ]]
diff --git a/test/sql-tap/tkt3879.test.lua b/test/sql-tap/tkt3879.test.lua
index 8482b974c2939aefe6b809009f3a868979f47759..55dffe906de1426c78c143afed1a92cacca2c0b1 100755
--- a/test/sql-tap/tkt3879.test.lua
+++ b/test/sql-tap/tkt3879.test.lua
@@ -22,16 +22,16 @@ test:plan(3)
 test:do_execsql_test(
     "tkt3879.1.1",
     [[
-        CREATE TABLE t1 (a PRIMARY KEY, b);
+        CREATE TABLE t1 (a TEXT PRIMARY KEY, b INT );
         INSERT INTO t1 VALUES ('w',  1);
         INSERT INTO t1 VALUES ('z', -1);
 
-        CREATE TABLE t2 (m INTEGER PRIMARY KEY, n, a, p);
+        CREATE TABLE t2 (m INTEGER PRIMARY KEY, n INT , a TEXT, p INT );
         INSERT INTO t2 VALUES (25, 13, 'w', 1);
         INSERT INTO t2 VALUES (26, 25, 'z', 153);
         INSERT INTO t2 VALUES (27, 25, 'z', 68);
 
-        CREATE TABLE t3 (m PRIMARY KEY);
+        CREATE TABLE t3 (m  INT PRIMARY KEY);
         INSERT INTO t3 VALUES (25);
     ]], {
         -- <tkt3879.1.1>
diff --git a/test/sql-tap/tkt3911.test.lua b/test/sql-tap/tkt3911.test.lua
index 9600c49ef211986c59d403115eb6229792a495cc..64c43153a5575d9bbaa130ed8415031f7d148e7a 100755
--- a/test/sql-tap/tkt3911.test.lua
+++ b/test/sql-tap/tkt3911.test.lua
@@ -22,11 +22,11 @@ test:plan(5)
 test:do_execsql_test(
     "tkt3911.1",
     [[
-        CREATE TABLE t1(a primary key,b);
+        CREATE TABLE t1(a INT primary key,b INT);
         INSERT INTO t1 VALUES(1,2);
         INSERT INTO t1 VALUES(11,12);
 
-        CREATE TABLE t2(b primary key,c);
+        CREATE TABLE t2(b INT primary key,c INT);
         INSERT INTO t2 VALUES(2,3);
         INSERT INTO t2 VALUES(22,23);
 
@@ -65,7 +65,7 @@ test:do_test(
     "tkt3911.4",
     function()
         return test:execsql [[
-            CREATE TABLE t3(m,a primary key);
+            CREATE TABLE t3(m TEXT,a INT primary key);
             INSERT INTO t3 VALUES('one',1);
             INSERT INTO t3 VALUES('two',2);
 
diff --git a/test/sql-tap/tkt3935.test.lua b/test/sql-tap/tkt3935.test.lua
index 4e5e677dc741eb9a94efa0ec107ade6d9f6706eb..196656442b849e7e8825c984564533370c373e66 100755
--- a/test/sql-tap/tkt3935.test.lua
+++ b/test/sql-tap/tkt3935.test.lua
@@ -23,8 +23,8 @@ test:plan(10)
 test:do_execsql_test(
     "tkt3935.1",
     [[
-        CREATE TABLE t1(a primary key, b);
-        CREATE TABLE t2(c primary key, d);
+        CREATE TABLE t1(a INT primary key, b INT);
+        CREATE TABLE t2(c INT primary key, d INT);
     ]], {
         -- <tkt3935.1>
         
diff --git a/test/sql-tap/transitive1.test.lua b/test/sql-tap/transitive1.test.lua
index ed3238f0480bf419ca9ac288f8e666c1465e4f63..178fd9da61691ab3a84fc5df7549f049a231ed92 100755
--- a/test/sql-tap/transitive1.test.lua
+++ b/test/sql-tap/transitive1.test.lua
@@ -21,7 +21,7 @@ test:plan(26)
 test:do_execsql_test(
     "transitive1-100",
     [[
-        CREATE TABLE t1(id primary key, a TEXT, b TEXT, c TEXT COLLATE "unicode_ci");
+        CREATE TABLE t1(id  INT primary key, a TEXT, b TEXT, c TEXT COLLATE "unicode_ci");
         INSERT INTO t1 VALUES(1, 'abc','abc','Abc');
         INSERT INTO t1 VALUES(2, 'def','def','def');
         INSERT INTO t1 VALUES(3, 'ghi','ghi','GHI');
@@ -58,10 +58,10 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-200",
     [[
-        CREATE TABLE t2(id primary key, a INTEGER, b INTEGER, c TEXT);
-        INSERT INTO t2 VALUES(1, 100,100,100);
-        INSERT INTO t2 VALUES(2, 20,20,20);
-        INSERT INTO t2 VALUES(3, 3,3,3);
+        CREATE TABLE t2(id  INT primary key, a INTEGER, b INTEGER, c TEXT);
+        INSERT INTO t2 VALUES(1, 100,100,'100');
+        INSERT INTO t2 VALUES(2, 20,20,'20');
+        INSERT INTO t2 VALUES(3, 3,3,'3');
 
         SELECT a,b,c FROM t2 WHERE a=b AND c=b AND c=20;
     ]], {
@@ -73,7 +73,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-210",
     [[
-        SELECT a,b,c FROM t2 WHERE a=b AND c=b AND c>=20 ORDER BY +a;
+        SELECT a,b,c FROM t2 WHERE a=b AND c=b AND c>='20' ORDER BY +a;
     ]], {
         -- <transitive1-210>
         3, 3, "3", 20, 20, "20"
@@ -83,7 +83,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-220",
     [[
-        SELECT a,b,c FROM t2 WHERE a=b AND c=b AND c<=20 ORDER BY +a;
+        SELECT a,b,c FROM t2 WHERE a=b AND c=b AND c<='20' ORDER BY +a;
     ]], {
         -- <transitive1-220>
         20, 20, "20", 100, 100, "100"
@@ -96,8 +96,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-300",
     [[
-        CREATE TABLE t301(w INTEGER PRIMARY KEY, x);
-        CREATE TABLE t302(y INTEGER PRIMARY KEY, z);
+        CREATE TABLE t301(w INTEGER PRIMARY KEY, x INT );
+        CREATE TABLE t302(y INTEGER PRIMARY KEY, z INT );
         INSERT INTO t301 VALUES(1,2),(3,4),(5,6);
         INSERT INTO t302 VALUES(1,3),(3,6),(5,7);
         SELECT *
@@ -209,8 +209,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-400",
     [[
-        CREATE TABLE t401(a PRIMARY KEY);
-        CREATE TABLE t402(b PRIMARY KEY);
+        CREATE TABLE t401(a  INT PRIMARY KEY);
+        CREATE TABLE t402(b  INT PRIMARY KEY);
         CREATE TABLE t403(c INTEGER PRIMARY KEY);
         INSERT INTO t401 VALUES(1);
         INSERT INTO t403 VALUES(1);
@@ -229,7 +229,7 @@ test:do_execsql_test(
     "transitive1-410",
     [[
         CREATE TABLE bookmark ( idBookmark integer primary key, idFile integer, timeInSeconds double, totalTimeInSeconds double, thumbNailImage text, player text, playerState text, type integer);
-        CREATE TABLE path ( idPath integer primary key, strPath text, strContent text, strScraper text, strHash text, scanRecursive integer, useFolderNames bool, strSettings text, noUpdate bool, exclude bool, dateAdded text);
+        CREATE TABLE path ( idPath integer primary key, strPath text, strContent text, strScraper text, strHash text, scanRecursive integer, useFolderNames  INT , strSettings text, noUpdate  INT , exclude  INT , dateAdded text);
         INSERT INTO path VALUES(1,'/tmp/tvshows/','tvshows','metadata.tvdb.com','989B1CE5680A14F5F86123F751169B49',0,0,'<settings><setting id="absolutenumber" value="false" /><setting id="dvdorder" value="false" /><setting id="fanart" value="true" /><setting id="language" value="en" /></settings>',0,0,NULL);
         INSERT INTO path VALUES(2,'/tmp/tvshows/The.Big.Bang.Theory/','','','85E1DAAB2F5FF6EAE8AEDF1B5C882D1E',NULL,NULL,NULL,NULL,NULL,'2013-10-23 18:58:43');
         CREATE TABLE files ( idFile integer primary key, idPath integer, strFilename text, playCount integer, lastPlayed text, dateAdded text);
@@ -453,7 +453,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-540",
     [[
-        CREATE TABLE b1(x PRIMARY KEY, y);
+        CREATE TABLE b1(x TEXT PRIMARY KEY, y TEXT);
         INSERT INTO b1 VALUES('abc', 'ABC');
         CREATE INDEX b1x ON b1(x);
         SELECT * FROM b1 WHERE (x=y COLLATE "unicode_ci") AND y='ABC';
@@ -466,7 +466,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "transitive1-550",
     [[
-        CREATE TABLE c1(id PRIMARY KEY, x, y COLLATE "unicode_ci", z);
+        CREATE TABLE c1(id  INT PRIMARY KEY, x TEXT, y  TEXT COLLATE "unicode_ci", z TEXT);
         INSERT INTO c1 VALUES(1, 'ABC', 'ABC', 'abc');
         SELECT x, y, z FROM c1 WHERE x=y AND y=z AND z='abc';
     ]], {
diff --git a/test/sql-tap/trigger1.test.lua b/test/sql-tap/trigger1.test.lua
index b595c6b460d0324a53466f7797d2c8a48b1607a9..7b4fa3df159b36998b316928c3de096777139293 100755
--- a/test/sql-tap/trigger1.test.lua
+++ b/test/sql-tap/trigger1.test.lua
@@ -202,7 +202,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "trigger1-1.10",
     [[
-        create table t1(a int PRIMARY KEY,b);
+        create table t1(a int PRIMARY KEY,b TEXT);
         insert into t1 values(1,'a');
         insert into t1 values(2,'b');
         insert into t1 values(3,'c');
@@ -222,7 +222,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "trigger1-1.11",
     [[
-        create table t1(a int PRIMARY KEY,b);
+        create table t1(a int PRIMARY KEY,b TEXT);
         create table tt1(a int PRIMARY KEY);
         insert into t1 values(1,'a');
         insert into t1 values(2,'b');
@@ -245,7 +245,7 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "trigger1-1.12",
     [[
-        create table t1(a int PRIMARY KEY,b);
+        create table t1(a int PRIMARY KEY,b TEXT);
         create trigger t1t instead of update on t1 for each row begin
           delete from t1 WHERE a=old.a+2;
         end;
@@ -459,7 +459,7 @@ test:do_catchsql_test(
 --   }
 -- }
 test:execsql [[
-    CREATE TABLE t2(x int PRIMARY KEY,y);
+    CREATE TABLE t2(x int PRIMARY KEY,y INT);
     DROP VIEW v1;
     DROP TABLE t1;
     INSERT INTO t2 VALUES(3, 4);
@@ -747,7 +747,7 @@ test:do_catchsql_test(
 --   catchsql { INSERT INTO tA VALUES('abc', 2, 3) }
 -- } {1 {datatype mismatch}}
 test:execsql [[
-    CREATE TABLE tA(a INTEGER PRIMARY KEY, b, c);
+    CREATE TABLE tA(a INTEGER PRIMARY KEY, b INT, c INT);
     CREATE TRIGGER tA_trigger BEFORE UPDATE ON tA BEGIN SELECT 1; END;
     INSERT INTO tA VALUES(1, 2, 3);
 ]]
@@ -760,7 +760,7 @@ test:do_test(
     "trigger1-16.1",
     function()
         test:execsql [[
-            CREATE TABLE t16(a int PRIMARY KEY,b,c);
+            CREATE TABLE t16(a int PRIMARY KEY, b INT, c INT);
             CREATE INDEX t16b ON t16(b);
         ]]
         return test:catchsql [[
diff --git a/test/sql-tap/trigger2.test.lua b/test/sql-tap/trigger2.test.lua
index 578acf51a02b28715be2cbdccde3230956ad151b..5d84c312a428126d15ac5f3847cb8db7d4bfddde 100755
--- a/test/sql-tap/trigger2.test.lua
+++ b/test/sql-tap/trigger2.test.lua
@@ -61,10 +61,10 @@ test:plan(26)
 test:catchsql " pragma recursive_triggers = off "
 -- 1.
 ii = 0
-tbl_definitions = { "CREATE TABLE tbl (a INTEGER PRIMARY KEY, b);",
-                    "CREATE TABLE tbl (a PRIMARY KEY, b);",
-                    "CREATE TABLE tbl (a, b PRIMARY KEY);",
-                    "CREATE TABLE tbl (a, b INTEGER PRIMARY KEY);" }
+tbl_definitions = { "CREATE TABLE tbl (a INTEGER PRIMARY KEY, b INT );",
+                    "CREATE TABLE tbl (a  INT PRIMARY KEY, b INT );",
+                    "CREATE TABLE tbl (a INT , b  INT PRIMARY KEY);",
+                    "CREATE TABLE tbl (a INT , b INTEGER PRIMARY KEY);" }
 -- Tarantool: temporary tables are not supported so far. #2119
 -- table.insert(tbl_definitions,"CREATE TEMP TABLE tbl (a, b INTEGER PRIMARY KEY);")
 -- table.insert(tbl_definitions,"CREATE TEMP TABLE tbl (a INTEGER PRIMARY KEY, b);")
@@ -85,8 +85,8 @@ for _, tbl_defn in ipairs(tbl_definitions) do
         INSERT INTO tbl VALUES(3, 4);
     ]]
     test:execsql [[
-        CREATE TABLE rlog (idx INTEGER PRIMARY KEY, old_a, old_b, db_sum_a, db_sum_b, new_a, new_b);
-        CREATE TABLE clog (idx INTEGER PRIMARY KEY, old_a, old_b, db_sum_a, db_sum_b, new_a, new_b);
+        CREATE TABLE rlog (idx INTEGER PRIMARY KEY, old_a INT , old_b INT , db_sum_a INT , db_sum_b INT , new_a INT , new_b INT );
+        CREATE TABLE clog (idx INTEGER PRIMARY KEY, old_a INT , old_b INT , db_sum_a INT , db_sum_b INT , new_a INT , new_b INT );
     ]]
     test:execsql [[
         CREATE TRIGGER before_update_row BEFORE UPDATE ON tbl FOR EACH ROW
@@ -199,7 +199,7 @@ for _, tbl_defn in ipairs(tbl_definitions) do
         "trigger2-1."..ii..".3",
         [[
 
-            CREATE TABLE other_tbl(a PRIMARY KEY, b);
+            CREATE TABLE other_tbl(a  INT PRIMARY KEY, b INT );
             INSERT INTO other_tbl VALUES(1, 2);
             INSERT INTO other_tbl VALUES(3, 4);
             -- INSERT INTO tbl SELECT * FROM other_tbl;
@@ -293,8 +293,8 @@ test:catchsql [[
 --       DROP TABLE log;
 --     }
 --     execsql {
---       CREATE TABLE tbl(a PRIMARY KEY, b, c);
---       CREATE TABLE log(a, b, c);
+--       CREATE TABLE tbl(a  INT PRIMARY KEY, b INT , c INT );
+--       CREATE TABLE log(a INT , b INT , c INT );
 --     }
 --     set query {SELECT * FROM tbl; SELECT * FROM log;}
 --     set prep "$prep; INSERT INTO log VALUES(1, 2, 3);\
@@ -325,8 +325,8 @@ test:catchsql [[
 -- MUST_WORK_TEST
 -- trigger2-3.1: UPDATE OF triggers
 -- execsql {
---   CREATE TABLE tbl (a PRIMARY KEY, b, c, d);
---   CREATE TABLE log (a PRIMARY KEY);
+--   CREATE TABLE tbl (a  INT PRIMARY KEY, b INT , c INT , d INT );
+--   CREATE TABLE log (a  INT PRIMARY KEY);
 --   INSERT INTO log VALUES (0);
 --   INSERT INTO tbl VALUES (0, 0, 0, 0);
 --   INSERT INTO tbl VALUES (1, 0, 0, 0);
@@ -354,8 +354,8 @@ table.insert(when_triggers,"t2 BEFORE INSERT ON tbl WHEN (SELECT count(*) FROM t
 
 
 test:execsql [[
-    CREATE TABLE tbl (a , b PRIMARY KEY, c, d);
-    CREATE TABLE log (a PRIMARY KEY);
+    CREATE TABLE tbl (a  INT , b  INT PRIMARY KEY, c INT , d INT );
+    CREATE TABLE log (a  INT PRIMARY KEY);
     INSERT INTO log VALUES (0);
 ]]
 for _, trig in ipairs(when_triggers) do
@@ -396,9 +396,9 @@ test:execsql [[
 -- integrity_check trigger2-3.3
 -- # Simple cascaded trigger
 test:execsql [[
-    CREATE TABLE tblA(a PRIMARY KEY, b);
-    CREATE TABLE tblB(a PRIMARY KEY, b);
-    CREATE TABLE tblC(a PRIMARY KEY, b);
+    CREATE TABLE tblA(a  INT PRIMARY KEY, b INT );
+    CREATE TABLE tblB(a  INT PRIMARY KEY, b INT );
+    CREATE TABLE tblC(a  INT PRIMARY KEY, b INT );
 
     CREATE TRIGGER tr1 BEFORE INSERT ON tblA BEGIN
       INSERT INTO tblB values(new.a, new.b);
@@ -444,7 +444,7 @@ test:execsql [[
 ]]
 -- Simple recursive trigger
 test:execsql [[
-    CREATE TABLE tbl(a PRIMARY KEY, b, c);
+    CREATE TABLE tbl(a  INT PRIMARY KEY, b INT , c INT );
     CREATE TRIGGER tbl_trig BEFORE INSERT ON tbl
       BEGIN
         INSERT INTO tbl VALUES (new.a + 1, new.b + 1, new.c + 1);
@@ -467,7 +467,7 @@ test:execsql [[
 -- MUST_WORK_TEST
 -- 5.
 -- execsql {
---   CREATE TABLE tbl(a PRIMARY KEY, b, c);
+--   CREATE TABLE tbl(a  INT PRIMARY KEY, b INT , c INT );
 --   CREATE TRIGGER tbl_trig BEFORE INSERT ON tbl
 --     BEGIN
 --       INSERT INTO tbl VALUES (1, 2, 3);
@@ -490,7 +490,7 @@ test:execsql [[
 -- ifcapable conflict {
 --   # Handling of ON CONFLICT by INSERT statements inside triggers
 --   execsql {
---     CREATE TABLE tbl (a primary key, b, c);
+--     CREATE TABLE tbl (a  INT primary key, b INT , c INT );
 --     CREATE TRIGGER ai_tbl AFTER INSERT ON tbl BEGIN
 --       INSERT OR IGNORE INTO tbl values (new.a, 0, 0);
 --     END;
@@ -604,14 +604,14 @@ test:execsql [[
 test:do_execsql_test(
     "trigger2-7.1",
     [[
-        CREATE TABLE ab(a PRIMARY KEY, b);
-        CREATE TABLE cd(c PRIMARY KEY, d);
+        CREATE TABLE ab(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE cd(c  INT PRIMARY KEY, d INT );
         INSERT INTO ab VALUES (1, 2);
         INSERT INTO ab VALUES (0, 0);
         INSERT INTO cd VALUES (3, 4);
 
         CREATE TABLE tlog(ii INTEGER PRIMARY KEY,
-            olda, oldb, oldc, oldd, newa, newb, newc, newd);
+            olda INT , oldb INT , oldc INT , oldd INT , newa INT , newb INT , newc INT , newd INT );
 
         CREATE VIEW abcd AS SELECT a, b, c, d FROM ab, cd;
 
@@ -691,7 +691,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "trigger2-8.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY,b,c);
+        CREATE TABLE t1(a  INT PRIMARY KEY,b INT ,c INT );
         INSERT INTO t1 VALUES(1,2,3);
         CREATE VIEW v1 AS
           SELECT a+b AS x, b+c AS y, a+c AS z FROM t1;
@@ -705,7 +705,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "trigger2-8.2",
     [[
-        CREATE TABLE v1log(id PRIMARY KEY, a,b,c,d,e,f);
+        CREATE TABLE v1log(id  INT PRIMARY KEY, a INT ,b INT ,c INT ,d INT ,e INT ,f INT );
         CREATE TRIGGER r1 INSTEAD OF DELETE ON v1 BEGIN
           INSERT INTO v1log VALUES(OLD.x, OLD.x,NULL,OLD.y,NULL,OLD.z,NULL);
         END;
diff --git a/test/sql-tap/trigger4.test.lua b/test/sql-tap/trigger4.test.lua
index 32528cfaed617686c09916563af3fd7eeddb2dc1..f6056617fbe7900e91b7c647ad7e6a740b958c06 100755
--- a/test/sql-tap/trigger4.test.lua
+++ b/test/sql-tap/trigger4.test.lua
@@ -20,8 +20,8 @@ test:plan(1)
 test:do_execsql_test(
     "trigger4-1.1",
     [[
-        create table test1(id integer primary key,a);
-        create table test2(id integer primary key,b);
+        create table test1(id integer primary key,a INT);
+        create table test2(id integer primary key,b INT);
         create view test as
           select test1.id as id,a as a,b as b
           from test1 join test2 on test2.id =  test1.id;
@@ -111,7 +111,7 @@ test:do_execsql_test(
 -- } {1 22 4 5}
 -- do_test trigger4-3.5 {
 --   execsql {
---     create table test2(id,b);
+--     create table test2(id INT, b INT);
 --     insert into test values(7,8,9);
 --     select * from test1;
 --   }
diff --git a/test/sql-tap/trigger7.test.lua b/test/sql-tap/trigger7.test.lua
index f67140cd01fda513fd8df01d673fb8b6dbb96e23..21ff2af4d20e5adc4a48d5cc647d80efceb75683 100755
--- a/test/sql-tap/trigger7.test.lua
+++ b/test/sql-tap/trigger7.test.lua
@@ -40,7 +40,7 @@ test:do_test(
     "trigger7-2.1",
     function()
         test:execsql [[
-			CREATE TABLE t1(x PRIMARY KEY, y);
+			CREATE TABLE t1(x INT PRIMARY KEY, y INT);
             CREATE TRIGGER r1 AFTER UPDATE OF x ON t1 BEGIN
               SELECT '___update_t1.x___';
             END;
@@ -109,7 +109,7 @@ test:do_test(
 test:do_execsql_test(
     "trigger7-3.1",
     [[
-        CREATE TABLE t2(x PRIMARY KEY,y,z);
+        CREATE TABLE t2(x INT PRIMARY KEY,y INT,z INT);
         CREATE TRIGGER t2r1 AFTER INSERT ON t2 BEGIN SELECT 1; END;
         CREATE TRIGGER t2r2 BEFORE INSERT ON t2 BEGIN SELECT 1; END;
         CREATE TRIGGER t2r3 AFTER UPDATE ON t2 BEGIN SELECT 1; END;
diff --git a/test/sql-tap/trigger8.test.lua b/test/sql-tap/trigger8.test.lua
index abe567119bf183be78c1cdaa1a7293e9d06453d2..5c3e7737723afd603e3599deb4c01d5dfa85f7c0 100755
--- a/test/sql-tap/trigger8.test.lua
+++ b/test/sql-tap/trigger8.test.lua
@@ -34,8 +34,8 @@ test:do_test(
     "trigger8-1.1",
     function()
         test:execsql [[
-            CREATE TABLE t1(x PRIMARY KEY);
-            CREATE TABLE t2(y PRIMARY KEY);
+            CREATE TABLE t1(x INT PRIMARY KEY);
+            CREATE TABLE t2(y INT PRIMARY KEY);
         ]]
         sql = string.format([[CREATE TRIGGER r%s AFTER INSERT ON t1 BEGIN
 ]], nStatement)
diff --git a/test/sql-tap/trigger9.test.lua b/test/sql-tap/trigger9.test.lua
index 0dfd07ac36228039616195b75a097bff93bc84ef..fcefb4d5b8566e5c86aa1cb6552360efb59d96c2 100755
--- a/test/sql-tap/trigger9.test.lua
+++ b/test/sql-tap/trigger9.test.lua
@@ -52,11 +52,11 @@ box.internal.sql_create_function('randstr', 'TEXT', test.randstr, 1)
 test:do_execsql_test(
     "trigger9-1.1",
     [[
-        CREATE TABLE t1(x PRIMARY KEY, y, z);
+        CREATE TABLE t1(x TEXT PRIMARY KEY, y TEXT, z TEXT);
         INSERT INTO t1 VALUES('1', randstr(10000), '2');
         INSERT INTO t1 VALUES('2', randstr(10000), '4');
         INSERT INTO t1 VALUES('3', randstr(10000), '6');
-        CREATE TABLE t2(x PRIMARY KEY);
+        CREATE TABLE t2(x TEXT PRIMARY KEY);
     ]], {
         -- <trigger9-1.1>
 
@@ -281,10 +281,12 @@ test:do_execsql_test(
 test:do_execsql_test(
     "trigger9-3.1",
     [[
-        CREATE TABLE t3(id INTEGER PRIMARY KEY, a, b);
+        CREATE TABLE t3(id INTEGER PRIMARY KEY, a INT, b TEXT);
         INSERT INTO t3 VALUES(1, 1, 'one');
         INSERT INTO t3 VALUES(2, 2, 'two');
         INSERT INTO t3 VALUES(3, 3, 'three');
+        DROP TABLE t2;
+        CREATE TABLE t2(x INT PRIMARY KEY);
     ]], {
         -- <trigger9-3.1>
 
@@ -406,8 +408,8 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
         DROP TABLE t3;
-        CREATE TABLE t1(a PRIMARY KEY, b);
-        CREATE TABLE log(x PRIMARY KEY);
+        CREATE TABLE t1(a INT PRIMARY KEY, b INT);
+        CREATE TABLE log(x TEXT PRIMARY KEY);
         INSERT INTO t1 VALUES(1, 2);
         INSERT INTO t1 VALUES(3, 4);
         CREATE VIEW v1 AS SELECT a, b FROM t1;
diff --git a/test/sql-tap/triggerA.test.lua b/test/sql-tap/triggerA.test.lua
index da1add8e245edffbbed995c65b4b1d697d2cb05b..d16302453aa568aac80b0217f256d2a50dd35657 100755
--- a/test/sql-tap/triggerA.test.lua
+++ b/test/sql-tap/triggerA.test.lua
@@ -134,7 +134,7 @@ test:do_test(
     "triggerA-2.1",
     function()
         return test:execsql [[
-            CREATE TABLE result2(id INTEGER PRIMARY KEY, a,b);
+            CREATE TABLE result2(id INTEGER PRIMARY KEY, a TEXT,b INT);
             CREATE TRIGGER r1d INSTEAD OF DELETE ON v1 BEGIN
               INSERT INTO result2(id, a,b) VALUES((SELECT coalesce(max(id),0) + 1 FROM result2),
                                                   old.y, old.x);
@@ -152,7 +152,7 @@ test:do_test(
     "triggerA-2.2",
     function()
         return test:execsql [[
-            CREATE TABLE result4(id INTEGER PRIMARY KEY, a,b,c,d);
+            CREATE TABLE result4(id INTEGER PRIMARY KEY, a TEXT,b INT,c TEXT,d INT);
             CREATE TRIGGER r1u INSTEAD OF UPDATE ON v1 BEGIN
               INSERT INTO result4(id, a,b,c,d) VALUES((SELECT coalesce(max(id),0) + 1 FROM result4),
                                                       old.y, old.x, new.y, new.x);
@@ -206,7 +206,7 @@ test:do_test(
     "triggerA-2.5",
     function()
         return test:execsql [[
-            CREATE TABLE result1(id INTEGER PRIMARY KEY, a);
+            CREATE TABLE result1(id INTEGER PRIMARY KEY, a TEXT);
             CREATE TRIGGER r3d INSTEAD OF DELETE ON v3 BEGIN
               INSERT INTO result1(id, a) VALUES((SELECT coalesce(max(id),0) + 1 FROM result1),
                                                 old.c1);
@@ -224,7 +224,8 @@ test:do_test(
     "triggerA-2.6",
     function()
         return test:execsql [[
-            DELETE FROM result2;
+            DROP TABLE result2;
+            CREATE TABLE result2(id INTEGER PRIMARY KEY, a TEXT,b TEXT);
             CREATE TRIGGER r3u INSTEAD OF UPDATE ON v3 BEGIN
               INSERT INTO result2(id, a,b) VALUES((SELECT coalesce(max(id),0) + 1 FROM result2),
                                                   old.c1, new.c1);
@@ -278,7 +279,8 @@ test:do_test(
     "triggerA-2.9",
     function()
         return test:execsql [[
-            DELETE FROM result2;
+            DROP TABLE result2;
+            CREATE TABLE result2(id INTEGER PRIMARY KEY, a TEXT,b INT);
             CREATE TRIGGER r5d INSTEAD OF DELETE ON v5 BEGIN
               INSERT INTO result2(id, a,b) VALUES((SELECT coalesce(max(id),0) + 1 FROM result2),
                                                   old.x, old.b);
@@ -288,7 +290,7 @@ test:do_test(
         ]]
     end, {
         -- <triggerA-2.9>
-        5, 504
+        "5", 504
         -- </triggerA-2.9>
     })
 
@@ -306,7 +308,7 @@ test:do_test(
         ]]
     end, {
         -- <triggerA-2.10>
-        3, 305, 3, 9900305, 4, 404, 4, 9900404, 5, 504, 5, 9900504
+        "3", 305, "3", 9900305, "4", 404, "4", 9900404, "5", 504, "5", 9900504
         -- </triggerA-2.10>
     })
 
@@ -320,7 +322,7 @@ test:do_test(
         ]]
     end, {
         -- <triggerA-2.11>
-        3, 305, 3, 9900305, 4, 404, 4, 9900404, 5, 504, 5, 9900504
+        "3", 305, "3", 9900305, "4", 404, "4", 9900404, "5", 504, "5", 9900504
         -- </triggerA-2.11>
     })
 
diff --git a/test/sql-tap/triggerB.test.lua b/test/sql-tap/triggerB.test.lua
index df7e2c350935a0981f3c4669921fa0d837073160..455c3cb3eb90836247373581d6ca715acdb10ce9 100755
--- a/test/sql-tap/triggerB.test.lua
+++ b/test/sql-tap/triggerB.test.lua
@@ -81,9 +81,9 @@ test:do_test(
     "triggerB-2.3",
     function()
         test:execsql [[
-            CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+            CREATE TABLE t2(a INTEGER PRIMARY KEY, b INT );
             INSERT INTO t2 VALUES(1,2);
-            CREATE TABLE changes(x PRIMARY KEY,y);
+            CREATE TABLE changes(x  INT PRIMARY KEY,y INT );
             CREATE TRIGGER r1t2 AFTER UPDATE ON t2 BEGIN
               INSERT INTO changes VALUES(new.a, new.b);
             END;
@@ -128,15 +128,15 @@ test:do_test(
     function()
         test:execsql [[
             CREATE TABLE t3(
-               c0 PRIMARY KEY,  c1,  c2,  c3,  c4,  c5,  c6,  c7,  c8,  c9,
-               c10, c11, c12, c13, c14, c15, c16, c17, c18, c19,
-               c20, c21, c22, c23, c24, c25, c26, c27, c28, c29,
-               c30, c31, c32, c33, c34, c35, c36, c37, c38, c39,
-               c40, c41, c42, c43, c44, c45, c46, c47, c48, c49,
-               c50, c51, c52, c53, c54, c55, c56, c57, c58, c59,
-               c60, c61, c62, c63, c64, c65
+               c0  TEXT PRIMARY KEY,  c1 TEXT ,  c2 TEXT ,  c3 TEXT ,  c4 TEXT ,  c5 TEXT ,  c6 TEXT ,  c7 TEXT ,  c8 TEXT ,  c9 TEXT ,
+               c10 TEXT , c11 TEXT , c12 TEXT , c13 TEXT , c14 TEXT , c15 TEXT , c16 TEXT , c17 TEXT , c18 TEXT , c19 TEXT ,
+               c20 TEXT , c21 TEXT , c22 TEXT , c23 TEXT , c24 TEXT , c25 TEXT , c26 TEXT , c27 TEXT , c28 TEXT , c29 TEXT ,
+               c30 TEXT , c31 TEXT , c32 TEXT , c33 TEXT , c34 TEXT , c35 TEXT , c36 TEXT , c37 TEXT , c38 TEXT , c39 TEXT ,
+               c40 TEXT , c41 TEXT , c42 TEXT , c43 TEXT , c44 TEXT , c45 TEXT , c46 TEXT , c47 TEXT , c48 TEXT , c49 TEXT ,
+               c50 TEXT , c51 TEXT , c52 TEXT , c53 TEXT , c54 TEXT , c55 TEXT , c56 TEXT , c57 TEXT , c58 TEXT , c59 TEXT ,
+               c60 TEXT , c61 TEXT , c62 TEXT , c63 TEXT , c64 TEXT , c65 TEXT
             );
-            CREATE TABLE t3_changes(colnum PRIMARY KEY, oldval, newval);
+            CREATE TABLE t3_changes(colnum INT PRIMARY KEY, oldval TEXT , newval TEXT );
             INSERT INTO t3 VALUES(
                'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9',
                'a10','a11','a12','a13','a14','a15','a16','a17','a18','a19',
diff --git a/test/sql-tap/triggerC.test.lua b/test/sql-tap/triggerC.test.lua
index 42639edc9df1e6418377fa96f3eaf249cffaa91a..2303b5ca6d0c62169131881078a46c6b0f909e5a 100755
--- a/test/sql-tap/triggerC.test.lua
+++ b/test/sql-tap/triggerC.test.lua
@@ -1,6 +1,6 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
-test:plan(59)
+test:plan(48)
 
 --!./tcltestrunner.lua
 -- 2009 August 24
@@ -52,8 +52,8 @@ test:execsql " PRAGMA recursive_triggers = on "
 test:do_execsql_test(
     "triggerC-1.1",
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b, c);
-        CREATE TABLE log(t PRIMARY KEY, a1, b1, c1, a2, b2, c2);
+        CREATE TABLE t1(a TEXT PRIMARY KEY, b TEXT, c TEXT);
+        CREATE TABLE log(t TEXT PRIMARY KEY, a1 TEXT, b1 TEXT, c1 TEXT, a2 TEXT, b2 TEXT, c2 TEXT);
         CREATE TRIGGER trig1 BEFORE INSERT ON t1 BEGIN
           INSERT INTO log VALUES('before', NULL, NULL, NULL, new.a, new.b, new.c);
         END;
@@ -148,7 +148,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "triggerC-1.8",
     [[
-        CREATE TABLE t4(a PRIMARY KEY, b);
+        CREATE TABLE t4(a INT PRIMARY KEY, b INT);
         CREATE TRIGGER t4t AFTER DELETE ON t4 BEGIN
           SELECT RAISE(ABORT, 'delete is not supported');
         END;
@@ -182,7 +182,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "triggerC-1.11",
     [[
-        CREATE TABLE t5 (a primary key, b, c);
+        CREATE TABLE t5 (a INT primary key, b INT, c INT);
         INSERT INTO t5 values (1, 2, 3);
         CREATE TRIGGER au_tbl AFTER UPDATE ON t5 BEGIN
           UPDATE OR IGNORE t5 SET a = new.a, c = 10;
@@ -206,7 +206,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "triggerC-1.13",
     [[
-        CREATE TABLE t6(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t6(a INTEGER PRIMARY KEY, b INT);
         INSERT INTO t6 VALUES(1, 2);
         create trigger r1 after update on t6 for each row begin
           SELECT 1;
@@ -222,9 +222,9 @@ test:do_execsql_test(
     "triggerC-1.14",
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE cnt(n PRIMARY KEY);
+        CREATE TABLE cnt(n INT PRIMARY KEY);
         INSERT INTO cnt VALUES(0);
-        CREATE TABLE t1(a INTEGER PRIMARY KEY, b UNIQUE, c, d, e);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT UNIQUE, c INT, d INT, e INT);
         CREATE INDEX t1cd ON t1(c,d);
         CREATE TRIGGER t1r1 AFTER UPDATE ON t1 BEGIN UPDATE cnt SET n=n+1; END;
         INSERT INTO t1 VALUES(1,2,3,4,5);
@@ -253,7 +253,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "triggerC-2.1.0",
     [[
-        CREATE TABLE t2(a PRIMARY KEY);
+        CREATE TABLE t2(a INT PRIMARY KEY);
     ]], {
         -- <triggerC-2.1.0>
 
@@ -361,7 +361,7 @@ end
 test:do_execsql_test(
     "triggerC-3.1.1",
     [[
-        CREATE TABLE t3(a PRIMARY KEY, b);
+        CREATE TABLE t3(a INT PRIMARY KEY, b INT);
         CREATE TRIGGER t3i AFTER INSERT ON t3 BEGIN
           DELETE FROM t3 WHERE a = new.a;
         END;
@@ -397,7 +397,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "triggerC-3.2.1",
     [[
-        CREATE TABLE t3b(x PRIMARY KEY);
+        CREATE TABLE t3b(x INT PRIMARY KEY);
         CREATE TRIGGER t3bi AFTER INSERT ON t3b BEGIN INSERT INTO t3b VALUES(new.x+1); END;
     ]], {
         -- <triggerC-3.2.1>
@@ -423,180 +423,7 @@ test:do_execsql_test(
         -- </triggerC-3.2.3>
     })
 
--------------------------------------------------------------------------
--- This next block of tests, triggerC-4.*, checks that affinity
--- transformations and constraint processing is performed at the correct
--- times relative to BEFORE and AFTER triggers.
---
--- For an INSERT statement, for each row to be inserted:
---
---   1. Apply affinities to non-rowid values to be inserted.
---   2. Fire BEFORE triggers.
---   3. Process constraints.
---   4. Insert new record.
---   5. Fire AFTER triggers.
---
--- If the value of the rowid field is to be automatically assigned, it is
--- set to -1 in the new.* record. Even if it is explicitly set to NULL
--- by the INSERT statement.
---
--- For an UPDATE statement, for each row to be deleted:
---
---   1. Apply affinities to non-rowid values to be inserted.
---   2. Fire BEFORE triggers.
---   3. Process constraints.
---   4. Insert new record.
---   5. Fire AFTER triggers.
---
--- For a DELETE statement, for each row to be deleted:
---
---   1. Fire BEFORE triggers.
---   2. Remove database record.
---   3. Fire AFTER triggers.
---
--- When a numeric value that as an exact integer representation is stored
--- in a column with REAL affinity, it is actually stored as an integer.
--- These tests check that the typeof() such values is always 'real',
--- not 'integer'.
---
--- triggerC-4.1.*: Check that affinity transformations are made before
---                 triggers are invoked.
---
-test:do_test(
-    "triggerC-4.1.1",
-    function()
-        test:catchsql " DROP TABLE log "
-        test:catchsql " DROP TABLE t4 "
-        return test:execsql [[
-            CREATE TABLE log(id PRIMARY KEY, t);
-            CREATE TABLE t4(a TEXT PRIMARY KEY,b INTEGER,c REAL);
-            CREATE TRIGGER t4bi BEFORE INSERT ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     new.a     || ' ' || typeof(new.a)     || ' ' ||
-                                     new.b     || ' ' || typeof(new.b)     || ' ' ||
-                                     new.c     || ' ' || typeof(new.c)
-              );
-            END;
-            CREATE TRIGGER t4ai AFTER INSERT ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     new.a     || ' ' || typeof(new.a)     || ' ' ||
-                                     new.b     || ' ' || typeof(new.b)     || ' ' ||
-                                     new.c     || ' ' || typeof(new.c)
-              );
-            END;
-            CREATE TRIGGER t4bd BEFORE DELETE ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     old.a     || ' ' || typeof(old.a)     || ' ' ||
-                                     old.b     || ' ' || typeof(old.b)     || ' ' ||
-                                     old.c     || ' ' || typeof(old.c)
-              );
-            END;
-            CREATE TRIGGER t4ad AFTER DELETE ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     old.a     || ' ' || typeof(old.a)     || ' ' ||
-                                     old.b     || ' ' || typeof(old.b)     || ' ' ||
-                                     old.c     || ' ' || typeof(old.c)
-              );
-            END;
-            CREATE TRIGGER t4bu BEFORE UPDATE ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     old.a     || ' ' || typeof(old.a)     || ' ' ||
-                                     old.b     || ' ' || typeof(old.b)     || ' ' ||
-                                     old.c     || ' ' || typeof(old.c)
-              );
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     new.a     || ' ' || typeof(new.a)     || ' ' ||
-                                     new.b     || ' ' || typeof(new.b)     || ' ' ||
-                                     new.c     || ' ' || typeof(new.c)
-              );
-            END;
-            CREATE TRIGGER t4au AFTER UPDATE ON t4 BEGIN
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     old.a     || ' ' || typeof(old.a)     || ' ' ||
-                                     old.b     || ' ' || typeof(old.b)     || ' ' ||
-                                     old.c     || ' ' || typeof(old.c)
-              );
-              INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
-                                     new.a     || ' ' || typeof(new.a)     || ' ' ||
-                                     new.b     || ' ' || typeof(new.b)     || ' ' ||
-                                     new.c     || ' ' || typeof(new.c)
-              );
-            END;
-        ]]
-    end, {
-        -- <triggerC-4.1.1>
-
-        -- </triggerC-4.1.1>
-    })
-
-local
-tests4 = {{ [[INSERT INTO t4 VALUES('1', '1', '1');
-              DELETE FROM t4;]], {
-                 "1 text 1 integer 1.0 real",
-                 "1 text 1 integer 1.0 real",
-                 "1 text 1 integer 1.0 real",
-                 "1 text 1 integer 1.0 real"}},
-
-          { [[INSERT INTO t4(a,b,c) VALUES(45, 45, 45);
-              DELETE FROM t4;]], {
-                  "45 text 45 integer 45.0 real",
-                  "45 text 45 integer 45.0 real",
-                  "45 text 45 integer 45.0 real",
-                  "45 text 45 integer 45.0 real"}},
-
-          { [[INSERT INTO t4(a,b,c) VALUES(-42.0, -42.0, -42.0);
-              DELETE FROM t4;]], {
-                  "-42.0 text -42 integer -42.0 real",
-                  "-42.0 text -42 integer -42.0 real",
-                  "-42.0 text -42 integer -42.0 real",
-                  "-42.0 text -42 integer -42.0 real"}},
-
-          { [[INSERT INTO t4(a,b,c) VALUES(-42.4, -42.4, -42.4);
-              DELETE FROM t4;]], {
-                  "-42.4 text -42.4 real -42.4 real",
-                  "-42.4 text -42.4 real -42.4 real",
-                  "-42.4 text -42.4 real -42.4 real",
-                  "-42.4 text -42.4 real -42.4 real"}},
-
-          { [[INSERT INTO t4 VALUES(7, 7, 7);
-              UPDATE t4 SET a=8, b=8, c=8;]], {
-                  "7 text 7 integer 7.0 real",
-                  "7 text 7 integer 7.0 real",
-                  "7 text 7 integer 7.0 real",
-                  "8 text 8 integer 8.0 real",
-                  "7 text 7 integer 7.0 real",
-                  "8 text 8 integer 8.0 real"}},
-
-          { [[UPDATE t4 SET a=8;]], {
-                  "8 text 8 integer 8.0 real",
-                  "8 text 8 integer 8.0 real",
-                  "8 text 8 integer 8.0 real",
-                  "8 text 8 integer 8.0 real"}},
-
-          { [[UPDATE t4 SET a='9', b='9', c='9';]], {
-                  "8 text 8 integer 8.0 real",
-                  "9 text 9 integer 9.0 real",
-                  "8 text 8 integer 8.0 real",
-                  "9 text 9 integer 9.0 real"}},
-
-          { [[UPDATE t4 SET a='9.1', b='9.1', c='9.1';]], {
-                  "9 text 9 integer 9.0 real",
-                  "9.1 text 9.1 real 9.1 real",
-                  "9 text 9 integer 9.0 real",
-                  "9.1 text 9.1 real 9.1 real"}}}
-
-              -- MUST_WORK_TEST
--- for _ in X(0, "X!foreach", [=[["n insert log","\n\n  2 {\n   INSERT INTO t4 VALUES('1', '1', '1');\n   DELETE FROM t4;\n  } {\n     1 integer 1 text 1 integer 1.0 real\n     1 integer 1 text 1 integer 1.0 real\n     1 integer 1 text 1 integer 1.0 real\n  }\n\n  3 {\n   INSERT INTO t4(a,b,c) VALUES(45, 45, 45);\n   DELETE FROM t4;\n  } {\n    45 integer 45 text 45 integer 45.0 real\n    45 integer 45 text 45 integer 45.0 real\n    45 integer 45 text 45 integer 45.0 real\n  }\n\n  4 {\n   INSERT INTO t4(a,b,c) VALUES(-42.0, -42.0, -42.0);\n   DELETE FROM t4;\n  } {\n    -42 integer -42.0 text -42 integer -42.0 real\n    -42 integer -42.0 text -42 integer -42.0 real\n    -42 integer -42.0 text -42 integer -42.0 real\n  }\n\n  5 {\n   INSERT INTO t4(a,b,c) VALUES(-42.4, -42.4, -42.4);\n   DELETE FROM t4;\n  } {\n     1 integer -42.4 text -42.4 real -42.4 real\n     1 integer -42.4 text -42.4 real -42.4 real\n     1 integer -42.4 text -42.4 real -42.4 real\n  }\n\n  6 {\n   INSERT INTO t4 VALUES(7, 7, 7);\n   UPDATE t4 SET a=8, b=8, c=8;\n  } {\n    -1 integer 7 text 7 integer 7.0 real\n     1 integer 7 text 7 integer 7.0 real\n     1 integer 7 text 7 integer 7.0 real\n     1 integer 8 text 8 integer 8.0 real\n     1 integer 7 text 7 integer 7.0 real\n     1 integer 8 text 8 integer 8.0 real\n  }\n\n  8 {\n   UPDATE t4 SET a='9', b='9', c='9';\n  } {\n     2 integer 9 text 9 integer 9.0 real\n     2 integer 8 text 8 integer 8.0 real\n     2 integer 9 text 9 integer 9.0 real\n  }\n\n  9 {\n   UPDATE t4 SET a='9.1', b='9.1', c='9.1';\n  } {\n     2 integer 9.1 text 9.1 real    9.1 real\n     2 integer 9   text 9   integer 9.0 real\n     2 integer 9.1 text 9.1 real    9.1 real\n  }\n"]]=]) do
-
-for n, v in ipairs(tests4) do
-    test:do_execsql_test(
-        "triggerC-4.1."..(n+1),
-        string.format([[ DELETE FROM log;
-                         %s ;
-                         SELECT t FROM log ORDER BY id;]], v[1]),
-        v[2])
-end
----------------------------------------------------------------------------
+--------------------------------------------------------------------------
 -- This block of tests, triggerC-5.*, test that DELETE triggers are fired
 -- if a row is deleted as a result of OR REPLACE conflict resolution.
 --
@@ -604,13 +431,13 @@ test:do_execsql_test(
     "triggerC-5.1.0",
     [[
         DROP TABLE IF EXISTS t5;
-        CREATE TABLE t5(a INTEGER PRIMARY KEY, b);
+        CREATE TABLE t5(a INTEGER PRIMARY KEY, b TEXT);
         CREATE UNIQUE INDEX t5i ON t5(b);
         INSERT INTO t5 VALUES(1, 'a');
         INSERT INTO t5 VALUES(2, 'b');
         INSERT INTO t5 VALUES(3, 'c');
 
-        CREATE TABLE t5g(a PRIMARY KEY, b, c);
+        CREATE TABLE t5g(a INT PRIMARY KEY, b TEXT, c INT);
         CREATE TRIGGER t5t BEFORE DELETE ON t5 BEGIN
           INSERT INTO t5g VALUES(old.a, old.b, (SELECT count(*) FROM t5));
         END;
@@ -885,7 +712,7 @@ test:do_test(
     "triggerC-10.1",
     function()
         test:execsql [[
-            CREATE TABLE t10(a PRIMARY KEY, updatecnt DEFAULT 0);
+            CREATE TABLE t10(a TEXT PRIMARY KEY, updatecnt INT DEFAULT 0);
             CREATE TRIGGER t10_bu BEFORE UPDATE OF a ON t10 BEGIN
               UPDATE t10 SET updatecnt = updatecnt+1 WHERE a = old.a;
             END;
@@ -921,10 +748,10 @@ test:do_test(
     function()
         test:execsql [[
             CREATE TABLE t11(
-              c1 PRIMARY KEY,   c2,  c3,  c4,  c5,  c6,  c7,  c8,  c9, c10,
-              c11, c12, c13, c14, c15, c16, c17, c18, c19, c20,
-              c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
-              c31, c32, c33, c34, c35, c36, c37, c38, c39, c40
+              c1 INT PRIMARY KEY,   c2 INT,  c3 INT,  c4 INT,  c5 INT,  c6 INT,  c7 INT,  c8 INT,  c9 INT, c10 INT,
+              c11 INT, c12 INT, c13 INT, c14 INT, c15 INT, c16 INT, c17 INT, c18 INT, c19 INT, c20 INT,
+              c21 INT, c22 INT, c23 INT, c24 INT, c25 INT, c26 INT, c27 INT, c28 INT, c29 INT, c30 INT,
+              c31 INT, c32 INT, c33 INT, c34 INT, c35 INT, c36 INT, c37 INT, c38 INT, c39 INT, c40 INT
             );
 
             CREATE TRIGGER t11_bu BEFORE UPDATE OF c1 ON t11 BEGIN
@@ -960,7 +787,7 @@ test:do_test(
     "triggerC-11.0",
     function()
         test:catchsql " DROP TABLE IF EXISTS log "
-        return test:execsql " CREATE TABLE log(id INTEGER PRIMARY KEY, a, b) "
+        return test:execsql " CREATE TABLE log(id INTEGER PRIMARY KEY, a INT, b TEXT) "
     end, {
         -- <triggerC-11.0>
 
@@ -970,8 +797,7 @@ test:do_test(
 -- MUST_WORK_TEST
 local
 tests11 = {-- {"CREATE TABLE t1(a PRIMARY KEY, b)",                         {{}, {}}},
-           {"CREATE TABLE t1(a PRIMARY KEY DEFAULT 1, b DEFAULT 'abc')", {1, "abc"}},
-           {"CREATE TABLE t1(a, b PRIMARY KEY DEFAULT 4.5)",             {"", 4.5}}}
+           {"CREATE TABLE t1(a INT PRIMARY KEY DEFAULT 1, b TEXT DEFAULT 'abc')", {1, "abc"}}}
 
 --for _ in X(0, "X!foreach", [=[["testno tbl defaults","\n  1 \"CREATE TABLE t1(a PRIMARY KEY, b)\"                          {{} {}}\n  2 \"CREATE TABLE t1(a PRIMARY KEY DEFAULT 1, b DEFAULT 'abc')\"  {1 abc}\n  3 \"CREATE TABLE t1(a PRIMARY KEY, b DEFAULT 4.5)\"              {{} 4.5}\n"]]=]) do
 for testno, v in ipairs(tests11) do
@@ -1030,7 +856,7 @@ test:do_test(
         test:catchsql " DROP TABLE t2 "
         return test:execsql [[
             DELETE FROM log;
-            CREATE TABLE t2(a PRIMARY KEY, b);
+            CREATE TABLE t2(a INT PRIMARY KEY, b INT);
             CREATE VIEW v2 AS SELECT * FROM t2;
             CREATE TRIGGER tv2 INSTEAD OF INSERT ON v2 BEGIN
               INSERT INTO log VALUES((SELECT coalesce(max(id),0) + 1 FROM log),
@@ -1052,7 +878,7 @@ test:do_test(
 test:execsql(
     [[
     DROP TABLE t1;
-    CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b);
+    CREATE TABLE t1(id INTEGER PRIMARY KEY, a INT, b INT);
     INSERT INTO t1 VALUES(1, 1, 2);
     INSERT INTO t1 VALUES(2, 3, 4);
     INSERT INTO t1 VALUES(3, 5, 6);
@@ -1062,7 +888,7 @@ test:do_execsql_test(
     "triggerC-13.1",
     [[
         PRAGMA recursive_triggers = 'ON';
-        CREATE TABLE t12(id INTEGER PRIMARY KEY, a, b);
+        CREATE TABLE t12(id INTEGER PRIMARY KEY, a INT, b INT);
         INSERT INTO t12 VALUES(1, 1, 2);
         CREATE TRIGGER tr12 AFTER UPDATE ON t12 BEGIN
           UPDATE t12 SET a=new.a+1, b=new.b+1;
@@ -1100,21 +926,21 @@ SQL = [[
   DROP TABLE IF EXISTS t2;
   DROP TABLE IF EXISTS t4;
   DROP TABLE IF EXISTS t5;
-  CREATE TABLE t1(a PRIMARY KEY, b, c);
+  CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT);
   CREATE INDEX i1 ON t1(a, c);
   CREATE INDEX i2 ON t1(b, c);
   INSERT INTO t1 VALUES(1, 2, 3);
 
-  CREATE TABLE t2(e PRIMARY KEY, f);
+  CREATE TABLE t2(e INT PRIMARY KEY, f INT);
   CREATE INDEX i3 ON t2(e);
   INSERT INTO t2 VALUES(1234567, 3);
 
-  CREATE TABLE empty(x PRIMARY KEY);
-  CREATE TABLE not_empty(x PRIMARY KEY);
+  CREATE TABLE empty(x INT PRIMARY KEY);
+  CREATE TABLE not_empty(x INT PRIMARY KEY);
   INSERT INTO not_empty VALUES(2);
 
-  CREATE TABLE t4(x PRIMARY KEY);
-  CREATE TABLE t5(g PRIMARY KEY, h, i);
+  CREATE TABLE t4(x INT PRIMARY KEY);
+  CREATE TABLE t5(g INT PRIMARY KEY, h INT, i INT);
 
   CREATE TRIGGER trig BEFORE INSERT ON t4 BEGIN
     INSERT INTO t5 SELECT * FROM t1 WHERE
@@ -1147,10 +973,10 @@ test:do_execsql_test(
     [[
         PRAGMA recursive_triggers = 1;
         CREATE TABLE node(
-            id not null primary key,
-            pid int not null default 0,
-            key varchar not null,
-            path varchar default '',
+            id int not null primary key,
+            pid int not null default 0 references node,
+            key TEXT not null,
+            path TEXT default '',
             unique(pid, key)
             );
         CREATE TRIGGER node_delete_referencing AFTER DELETE ON node
diff --git a/test/sql-tap/triggerD.test.lua b/test/sql-tap/triggerD.test.lua
index ea2980394c16323ca602fa5c552d6b939910020a..f4d1c29a8ece9a03a9ac4900cabab3bde27e71e6 100755
--- a/test/sql-tap/triggerD.test.lua
+++ b/test/sql-tap/triggerD.test.lua
@@ -36,8 +36,8 @@ test:do_test(
     "triggerD-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(rowid PRIMARY KEY, oid, _rowid_, x);
-            CREATE TABLE log(a PRIMARY KEY,b,c,d,e);
+            CREATE TABLE t1(rowid INT PRIMARY KEY, oid INT, _rowid_ INT, x INT);
+            CREATE TABLE log(a TEXT PRIMARY KEY,b INT,c INT,d INT,e INT);
             CREATE TRIGGER r1 BEFORE INSERT ON t1 BEGIN
               INSERT INTO log VALUES('r1', new.rowid, new.oid, new._rowid_, new.x);
             END;
@@ -112,7 +112,7 @@ test:do_test(
 -- do_test triggerD-2.1 {
 --   db eval {
 --     DROP TABLE t1;
---     CREATE TABLE t1(w PRIMARY KEY,x,y,z);
+--     CREATE TABLE t1(w INT PRIMARY KEY,x INT,y INT,z INT);
 --     CREATE TRIGGER r1 BEFORE INSERT ON t1 BEGIN
 --       INSERT INTO log VALUES('r1', new.rowid, new.oid, new._rowid_, new.x);
 --     END;
@@ -165,9 +165,9 @@ test:do_test(
 -- # and a main database trigge is created on the main table, the trigger
 -- # is incorrectly bound to the TEMP table. For example:
 -- #
--- #   CREATE TABLE t1(x);
+-- #   CREATE TABLE t1(x INT);
 -- #   CREATE TEMP TABLE t1(x);
--- #   CREATE TABLE t2(z);
+-- #   CREATE TABLE t2(z INT);
 -- #   CREATE TRIGGER main.r1 AFTER INSERT ON t1 BEGIN
 -- #     INSERT INTO t2 VALUES(10000 + new.x);
 -- #   END;
@@ -180,9 +180,9 @@ test:do_test(
 -- #
 -- do_test triggerD-3.1 {
 --   db eval {
---     CREATE TABLE t300(x);
+--     CREATE TABLE t300(x INT );
 --     CREATE TEMP TABLE t300(x);
---     CREATE TABLE t301(y);
+--     CREATE TABLE t301(y INT );
 --     CREATE TRIGGER main.r300 AFTER INSERT ON t300 BEGIN
 --       INSERT INTO t301 VALUES(10000 + new.x);
 --     END;
@@ -221,10 +221,10 @@ test:do_test(
 --   forcedelete test.db test2.db
 --   sqlite3 db test.db
 --   db eval {
---     CREATE TABLE t1(x);
+--     CREATE TABLE t1(x INT);
 --     ATTACH 'test2.db' AS db2;
---     CREATE TABLE db2.t2(y);
---     CREATE TABLE db2.log(z);
+--     CREATE TABLE db2.t2(y INT);
+--     CREATE TABLE db2.log(z INT);
 --     CREATE TRIGGER db2.trig AFTER INSERT ON db2.t2 BEGIN
 --       INSERT INTO log(z) VALUES(new.y);
 --     END;
diff --git a/test/sql-tap/types.test.lua b/test/sql-tap/types.test.lua
index 1da251293e152813d44cf8502d0f5ed2bb8edd07..09c16f2e909dddd45c93a85d2db26b385ac3e506 100755
--- a/test/sql-tap/types.test.lua
+++ b/test/sql-tap/types.test.lua
@@ -1,7 +1,7 @@
 #!/usr/bin/env tarantool
 test = require("sqltester")
 NULL = require('msgpack').NULL
-test:plan(51)
+test:plan(14)
 
 --!./tcltestrunner.lua
 -- 2001 September 15
@@ -39,99 +39,6 @@ test:plan(51)
 -- types-2.5.*: Records with a few different storage classes.
 --
 -- types-3.*: Test that the '=' operator respects manifest types.
---
--- Disable encryption on the database for this test.
---db("close")
---DB = X(44, "X!expr", [=[[["sqlite3","db","test.db"],["sqlite3_connection_pointer","db"]]]=])
---sqlite3_rekey $DB {}
--- Create a table with one column for each type of affinity
-test:do_execsql_test(
-    "types-1.1.0",
-    [[
-        CREATE TABLE t1(id primary key, i integer, n numeric, t text, o blob);
-    ]], {
-        -- <types-1.1.0>
-        
-        -- </types-1.1.0>
-    })
-
--- Each element of the following list represents one test case.
---
--- The first value of each sub-list is an SQL literal. The following
--- four value are the storage classes that would be used if the
--- literal were inserted into a column with affinity INTEGER, NUMERIC, TEXT
--- or NONE, respectively.
-local values = {
-      {1, '5.0', {"integer", "integer", "text", "real"}},
-      {2, '5.1', {"real", "real", "text", "real"}},
-      {3, '5', {"integer", "integer", "text", "integer"}},
-      {4, "'5.0'", {"integer", "integer", "text", "text"}},
-      {5, "'5.1'", {"real", "real", "text", "text"}},
-      {6, "'-5.0'", {"integer", "integer", "text", "text"}},
-      {7, "'-5.0'", {"integer", "integer", "text", "text"}},
-      {8, "'5'", {"integer", "integer", "text", "text"}},
-      {9, "'abc'", {"text", "text", "text", "text"}},
-      {10, 'NULL', {"null", "null", "null", "null"}},
-      {11, "X'00'",  {"blob", "blob", "blob", "blob"}},
-}
-
-
--- This code tests that the storage classes specified above (in the $values
--- table) are correctly assigned when values are inserted using a statement
--- of the form:
---
--- INSERT INTO <table> VALUE(<values>);
-
-for _, val in ipairs(values) do
-    local tnum = val[1]
-    local lit = test.lindex(val, 1)
-    test:execsql "DELETE FROM t1;"
-    test:execsql(string.format("INSERT INTO t1 VALUES(1, %s, %s, %s, %s);", lit, lit, lit, lit))
-    test:do_execsql_test(
-        "types-1.1."..tnum,
-        [[
-            SELECT typeof(i), typeof(n), typeof(t), typeof(o) FROM t1;
-        ]], val[3])
-end
--- This code tests that the storage classes specified above (in the $values
--- table) are correctly assigned when values are inserted using a statement
--- of the form:
---
--- INSERT INTO t1 SELECT ....
---
-for _, val in ipairs(values) do
-    local tnum = val[1]
-    local lit = test.lindex(val, 1)
-    test:execsql "DELETE FROM t1;"
-    test:execsql(string.format("INSERT INTO t1 SELECT 1, %s, %s, %s, %s;", lit, lit, lit, lit))
-    test:do_execsql_test(
-        "types-1.2."..tnum,
-        [[
-            SELECT typeof(i), typeof(n), typeof(t), typeof(o) FROM t1;
-        ]], val[3])
-
-end
--- This code tests that the storage classes specified above (in the $values
--- table) are correctly assigned when values are inserted using a statement
--- of the form:
---
--- UPDATE <table> SET <column> = <value>;
---
-for _, val in ipairs(values) do
-    local tnum = val[1]
-    local lit = test.lindex(val, 1)
-    test:execsql(string.format("UPDATE t1 SET id = 1, i = %s, n = %s, t = %s, o = %s;", lit, lit, lit, lit))
-    test:do_execsql_test(
-        "types-1.3."..tnum,
-        [[
-            SELECT typeof(i), typeof(n), typeof(t), typeof(o) FROM t1;
-        ]], val[3])
-
-    tnum = tnum + 1
-end
-test:execsql [[
-    DROP TABLE t1;
-]]
 ---- Open the table with root-page $rootpage at the btree
 ---- level. Return a list that is the length of each record
 ---- in the table, in the tables default scanning order.
@@ -158,7 +65,7 @@ test:execsql [[
 test:do_execsql_test(
     "types-2.1.1",
     [[
-        CREATE TABLE t1(id primary key, a integer);
+        CREATE TABLE t1(id  INT primary key, a integer);
         INSERT INTO t1 VALUES(1, 0);
         INSERT INTO t1 VALUES(2, 120);
         INSERT INTO t1 VALUES(3, -120);
@@ -259,7 +166,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "types-2.2.1",
     [[
-        CREATE TABLE t2(id primary key, a float);
+        CREATE TABLE t2(id  INT primary key, a float);
         INSERT INTO t2 VALUES(1, 0.0);
         INSERT INTO t2 VALUES(2, 12345.678);
         INSERT INTO t2 VALUES(3, -12345.678);
@@ -295,7 +202,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "types-2.3.1",
     [[
-        CREATE TABLE t3(id primary key, a nullvalue);
+        CREATE TABLE t3(id  INT primary key, a INT null);
         INSERT INTO t3 VALUES(1, NULL);
     ]], {
         -- <types-2.3.1>
@@ -333,7 +240,7 @@ test:do_test(
     "types-2.4.1",
     function()
         return test:execsql(string.format([[
-            CREATE TABLE t4(id primary key, a string);
+            CREATE TABLE t4(id  INT primary key, a TEXT);
             INSERT INTO t4 VALUES(1, '%s');
             INSERT INTO t4 VALUES(2, '%s');
             INSERT INTO t4 VALUES(3, '%s');
@@ -354,42 +261,4 @@ test:do_execsql_test(
         -- </types-2.4.2>
     })
 
-test:do_execsql_test(
-    "types-2.5.1",
-    [[
-        DROP TABLE t1;
-        DROP TABLE t2;
-        DROP TABLE t3;
-        DROP TABLE t4;
-        CREATE TABLE t1(id primary key, a, b, c);
-    ]], {
-        -- <types-2.5.1>
-
-        -- </types-2.5.1>
-    })
-
-test:do_test(
-    "types-2.5.2",
-    function()
-        test:execsql("INSERT INTO t1 VALUES(1, NULL, '"..string10.."', 4000);")
-        test:execsql("INSERT INTO t1 VALUES(2, '"..string500.."', 4000, NULL);")
-        return test:execsql("INSERT INTO t1 VALUES(3, 4000, NULL, '"..string500000.."');")
-    end, {
-        -- <types-2.5.2>
-
-        -- </types-2.5.2>
-    })
-
-test:do_execsql_test(
-    "types-2.5.3",
-    [[
-        SELECT a,b,c FROM t1;
-    ]], {
-        -- <types-2.5.3>
-        "", string10, 4000, string500, 4000, "", 4000, "", string500000
-        -- </types-2.5.3>
-    })
-
-
-
 test:finish_test()
diff --git a/test/sql-tap/types2.test.lua b/test/sql-tap/types2.test.lua
index 06817aa18685b5ded8431d08f4c841b0f9bb8bd0..6b10bc226df75ed78601a392422aebc0413e5ea8 100755
--- a/test/sql-tap/types2.test.lua
+++ b/test/sql-tap/types2.test.lua
@@ -36,7 +36,7 @@ test:plan(398)
 -- handled similarly in the implementation.
 test:execsql [[
     CREATE TABLE t1(
-      id primary key,
+      id  INT primary key,
       i1 INTEGER,
       i2 INTEGER,
       n1 NUMERIC,
@@ -79,17 +79,17 @@ end
 -- Changed by ticket #805:  Use no affinity for literal comparisons.
 --
 test_bool("types2-1.1", "", "500 = 500.0", 1)
-test_bool("types2-1.2", "", "'500' = 500.0", 0)
+test_bool("types2-1.2", "", "'500' = 500.0", 1)
 test_bool("types2-1.3", "", "500 = '500.0'", 0)
 test_bool("types2-1.4", "", "'500' = '500.0'", 0)
 -- Compare literals against a column with TEXT affinity
 test_bool("types2-1.5", "t1=500", "500 = t1", 1)
 test_bool("types2-1.6", "t1=500", "'500' = t1", 1)
-test_bool("types2-1.7", "t1=500", "500.0 = t1", 0)
+test_bool("types2-1.7", "t1=500", "500.0 = t1", 1)
 test_bool("types2-1.8", "t1=500", "'500.0' = t1", 0)
 test_bool("types2-1.9", "t1='500'", "500 = t1", 1)
 test_bool("types2-1.10", "t1='500'", "'500' = t1", 1)
-test_bool("types2-1.11", "t1='500'", "500.0 = t1", 0)
+test_bool("types2-1.11", "t1='500'", "500.0 = t1", 1)
 test_bool("types2-1.12", "t1='500'", "'500.0' = t1", 0)
 -- Compare literals against a column with NUMERIC affinity
 test_bool("types2-1.13", "n1=500", "500 = n1", 1)
@@ -112,7 +112,7 @@ test_bool("types2-1.28", "o1='500'", "'500.0' = o1", 0)
 local vals = { 10, "10.0", "'10'", "'10.0'", 20, "20.0", "'20'", "'20.0'", 30, "30.0", "'30'", "'30.0'" }
 --             1    2      3         4      5  6       7        8      9    10       11   12
 test:execsql [[
-    CREATE TABLE t2(id primary key, i INTEGER, n NUMERIC, t TEXT, o XBLOBY);
+    CREATE TABLE t2(id  INT primary key, i INTEGER, n NUMERIC, t TEXT, o XBLOBY);
     CREATE INDEX t2i1 ON t2(i);
     CREATE INDEX t2i2 ON t2(n);
     CREATE INDEX t2i3 ON t2(t);
@@ -274,7 +274,7 @@ test_boolset("types2-6.9", "id IN (1, 6, 10)", {1, 6, 10})
 -- Tests types2-7.* concentrate on expressions of the form 
 -- "x IN (SELECT...)" with no index.
 test:execsql [[
-    CREATE TABLE t3(id primary key, i INTEGER, n NUMERIC, t TEXT, o BLOB);
+    CREATE TABLE t3(id  INT primary key, i INTEGER, n NUMERIC, t TEXT, o BLOB);
     INSERT INTO t3 VALUES(1, 1, 1, 1, 1);
     INSERT INTO t3 VALUES(2, 2, 2, 2, 2);
     INSERT INTO t3 VALUES(3, 3, 3, 3, 3);
@@ -306,7 +306,7 @@ test_bool("types2-7.15", "o1='2'", "o1 IN (SELECT o||'' FROM t3)", 1)
 -- set vals [list 10 10.0 '10' '10.0' 20 20.0 '20' '20.0' 30 30.0 '30' '30.0']
 --                1  2    3    4      5  6    7    8      9  10   11   12
 test:execsql [[
-    CREATE TABLE t4(id primary key, i INTEGER, n NUMERIC, t VARCHAR(20), o LARGE BLOB);
+    CREATE TABLE t4(id  INT primary key, i INTEGER, n NUMERIC, t VARCHAR(20), o  INT LARGE BLOB);
     INSERT INTO t4 VALUES(1, 10, 20, 20, 30);
 ]]
 test_boolset("types2-8.1", "i IN (SELECT i FROM t4)", {1, 2, 3, 4})
diff --git a/test/sql-tap/unique.test.lua b/test/sql-tap/unique.test.lua
index 3856d26f816cd013ddca031023f0527c9e11988c..5e2685d0dc7e6746a884913e4970925bde81a487 100755
--- a/test/sql-tap/unique.test.lua
+++ b/test/sql-tap/unique.test.lua
@@ -131,7 +131,7 @@ test:do_execsql_test(
     "unique-2.0",
     [[
         DROP TABLE t1;
-        CREATE TABLE t2(id primary key, a int, b int);
+        CREATE TABLE t2(id int primary key, a int, b int);
         INSERT INTO t2(id, a,b) VALUES(1, 1,2);
         INSERT INTO t2(id, a,b) VALUES(2, 3,4);
         SELECT a,b FROM t2 ORDER BY a;
@@ -245,7 +245,7 @@ test:do_catchsql_test(
     "unique-3.1",
     [[
         CREATE TABLE t3(
-          id primary key,
+          id int primary key,
            a int,
            b int,
            c int,
@@ -299,7 +299,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "unique-4.1",
     [[
-        CREATE TABLE t4(id primary key,a UNIQUE, b, c, UNIQUE(b,c));
+        CREATE TABLE t4(id int primary key,a int UNIQUE, b int, c int, UNIQUE(b,c));
         INSERT INTO t4 VALUES(1,1,2,3);
         INSERT INTO t4 VALUES(2, NULL, 2, NULL);
         SELECT a,b,c FROM t4;
@@ -414,13 +414,13 @@ test:do_execsql_test(
     "unique-5.1",
     [[
         CREATE TABLE t5(
-          id primary key,
-          first_column_with_long_name,
-          second_column_with_long_name,
-          third_column_with_long_name,
-          fourth_column_with_long_name,
-          fifth_column_with_long_name,
-          sixth_column_with_long_name,
+          id  INT primary key,
+          first_column_with_long_name INT ,
+          second_column_with_long_name INT ,
+          third_column_with_long_name INT ,
+            fourth_column_with_long_name INT ,
+          fifth_column_with_long_name INT ,
+          sixth_column_with_long_name INT ,
           UNIQUE(
             first_column_with_long_name,
             second_column_with_long_name,
diff --git a/test/sql-tap/update.test.lua b/test/sql-tap/update.test.lua
index d4debc74f57486a951ed791ebff974bce9d3c357..d0fc66ebbb58d11c6ac6ff433e4028d241e3e56f 100755
--- a/test/sql-tap/update.test.lua
+++ b/test/sql-tap/update.test.lua
@@ -39,7 +39,7 @@ test:do_catchsql_test("update-1.1", [[
 -- Create a table to work with
 --
 test:do_test("update-3.1", function()
-  test:execsql "CREATE TABLE test1(id primary key, f1 int,f2 int)"
+  test:execsql "CREATE TABLE test1(id  INT primary key, f1 int,f2 int)"
   -- for _ in X(0, "X!for", [=[["set i 1","$i<=10","incr i"]]=]) do
   for i = 1, 10 do    
     sql = string.format("INSERT INTO test1 VALUES(%s,%s,%s)", i, i, bit.lshift(1, i)) -- X(0, "X!expr", [=[["<<",1,["i"]]]=]))
@@ -889,9 +889,9 @@ test:do_execsql_test("update-10.1", [[
   DROP TABLE test1;
   CREATE TABLE t1(
      a integer primary key,
-     b UNIQUE, 
-     c, d,
-     e, f,
+     b  INT UNIQUE,
+     c INT , d INT ,
+     e INT , f INT ,
      UNIQUE(c,d)
   );
   INSERT INTO t1 VALUES(1,2,3,4,5,6);
@@ -1012,7 +1012,7 @@ test:do_catchsql_test("update-10.10", [[
 -- do_test update-13.1 {
 --   execsql {
 --     BEGIN;
---     CREATE TABLE t2(id primary key, a);
+--     CREATE TABLE t2(id  INT primary key, a INT );
 --     INSERT INTO t2 VALUES(1, 1);
 --     INSERT INTO t2 VALUES(2, 2);
 --     INSERT INTO t2 SELECT id+2,a+2 FROM t2;
@@ -1070,7 +1070,7 @@ test:do_catchsql_test("update-10.10", [[
 -- #
 -- do_test update-14.1 {
 --   execsql {
---     CREATE TABLE t3(a,b,c);
+--     CREATE TABLE t3(a INT ,b INT ,c INT );
 --     CREATE TRIGGER t3r1 BEFORE UPDATE on t3 WHEN nosuchcol BEGIN
 --       SELECT 'illegal WHEN clause';
 --     END;
@@ -1083,7 +1083,7 @@ test:do_catchsql_test("update-10.10", [[
 -- } {1 {no such column: nosuchcol}}
 -- do_test update-14.3 {
 --   execsql {
---     CREATE TABLE t4(a,b,c);
+--     CREATE TABLE t4(a INT ,b INT ,c INT );
 --     CREATE TRIGGER t4r1 AFTER UPDATE on t4 WHEN nosuchcol BEGIN
 --       SELECT 'illegal WHEN clause';
 --     END;
@@ -1100,7 +1100,7 @@ test:do_catchsql_test("update-10.10", [[
 -- # An assertion fault on UPDATE
 -- #
 -- do_execsql_test update-15.1 {
---   CREATE TABLE t15(a INTEGER PRIMARY KEY, b);
+--   CREATE TABLE t15(a INTEGER PRIMARY KEY, b INT );
 --   INSERT INTO t15(a,b) VALUES(10,'abc'),(20,'def'),(30,'ghi');
 --   ALTER TABLE t15 ADD COLUMN c;
 --   CREATE INDEX t15c ON t15(c);
@@ -1113,7 +1113,7 @@ test:do_catchsql_test("update-10.10", [[
 test:do_execsql_test(
     "insert-15.0",
     [[
-        create table test(a primary key);
+        create table test(a int primary key);
         insert into test(a) values(1);
     ]])
 
diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
index edb475434da030fd412618677b9fc6482e513038..d9ad623526172845bbae3eea1dabdd2dbd1ce5c9 100755
--- a/test/sql-tap/view.test.lua
+++ b/test/sql-tap/view.test.lua
@@ -25,7 +25,7 @@ test:plan(74)
 -- ORIGINAL_TEST
 -- do_test view-1.0 {
 --   execsql {
---     CREATE TABLE t1(a,b,c);
+--     CREATE TABLE t1(a INT,b INT,c INT);
 --     INSERT INTO t1 VALUES(1,2,3);
 --     INSERT INTO t1 VALUES(4,5,6);
 --     INSERT INTO t1 VALUES(7,8,9);
@@ -36,7 +36,7 @@ test:plan(74)
 test:do_execsql_test(
     "view-1.0",
     [[
-        CREATE TABLE t1(a primary key,b,c);
+        CREATE TABLE t1(a INT primary key,b INT,c INT);
         INSERT INTO t1 VALUES(1,2,3);
         INSERT INTO t1 VALUES(4,5,6);
         INSERT INTO t1 VALUES(7,8,9);
@@ -145,7 +145,7 @@ test:do_catchsql_test(
 -- ORIGINAL_TEST
 -- do_test view-1.7 {
 --   execsql {
---     CREATE TABLE t1(x,a,b,c);
+--     CREATE TABLE t1(x INT,a INT,b INT,c INT);
 --     INSERT INTO t1 VALUES(1,2,3,4);
 --     INSERT INTO t1 VALUES(4,5,6,7);
 --     INSERT INTO t1 VALUES(7,8,9,10);
@@ -155,7 +155,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "view-1.8",
     [[
-        CREATE TABLE t1(x primary key,a,b,c);
+        CREATE TABLE t1(x INT primary key,a INT,b INT,c INT);
         INSERT INTO t1 VALUES(1,2,3,4);
         INSERT INTO t1 VALUES(4,5,6,7);
         INSERT INTO t1 VALUES(7,8,9,10);
@@ -395,7 +395,7 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "view-5.1",
     [[
-        CREATE TABLE t2(y primary key,a);
+        CREATE TABLE t2(y INT primary key,a INT);
         INSERT INTO t2 VALUES(22,2);
         INSERT INTO t2 VALUES(33,3);
         INSERT INTO t2 VALUES(44,4);
@@ -504,8 +504,8 @@ test:do_execsql_test(
 test:do_execsql_test(
     "view-7.1",
     [[
-        CREATE TABLE test1(id integer primary key, a);
-        CREATE TABLE test2(id integer primary key, b);
+        CREATE TABLE test1(id integer primary key, a INT);
+        CREATE TABLE test2(id integer primary key, b INT);
         INSERT INTO test1 VALUES(1,2);
         INSERT INTO test2 VALUES(1,3);
         CREATE VIEW test AS
@@ -799,7 +799,7 @@ if (0 > 0)
     test:do_execsql_test(
         "view-11.1",
         [[
-            CREATE TABLE t4(a COLLATE "unicode_ci" primary key);
+            CREATE TABLE t4(a TEXT COLLATE "unicode_ci" primary key);
             INSERT INTO t4 VALUES('This');
             INSERT INTO t4 VALUES('this');
             INSERT INTO t4 VALUES('THIS');
@@ -814,7 +814,7 @@ if (0 > 0)
     test:do_execsql_test(
         "view-11.1",
         [[
-            CREATE TABLE t4(a COLLATE "unicode_ci" primary key);
+            CREATE TABLE t4(a TEXT COLLATE "unicode_ci" primary key);
             INSERT INTO t4 VALUES('This');
             INSERT INTO t4 VALUES('this');
             INSERT INTO t4 VALUES('THIS');
@@ -878,7 +878,7 @@ test:do_catchsql_test(
 --     forcedelete test2.db
 --     catchsql {
 --       ATTACH 'test2.db' AS two;
---       CREATE TABLE two.t2(x,y);
+--       CREATE TABLE two.t2(x INT,y INT);
 --       CREATE VIEW v13 AS SELECT y FROM two.t2;
 --     }
 --   } {1 {view v13 cannot reference objects in database two}}
@@ -888,7 +888,7 @@ test:do_catchsql_test(
 --    forcedelete test2.db
 --    catchsql {
 --      ATTACH 'test2.db' AS two;
---      CREATE TABLE two.t2(x primary key,y);
+--      CREATE TABLE two.t2(x INT primary key,y INT);
 --      CREATE VIEW v13 AS SELECT y FROM two.t2;
 --    }
 --  } {1 {view v13 cannot reference objects in database two}}
@@ -989,7 +989,7 @@ if (0 > 0)
         [[
             DROP VIEW t1;
             DROP TABLE t1;
-            CREATE TABLE t1(a, b, c);
+            CREATE TABLE t1(a INT, b INT, c INT);
             INSERT INTO t1 VALUES(1, 2, 3);
             INSERT INTO t1 VALUES(4, 5, 6);
 
@@ -1059,7 +1059,7 @@ test:do_execsql_test(
     "view-20.1",
     [[
         DROP VIEW v10;
-        CREATE TABLE t10(c1 primary key);
+        CREATE TABLE t10(c1 INT primary key);
         CREATE VIEW v10 AS SELECT c1 FROM (SELECT t10.c1 FROM t10);
     ]], {
         -- <view-20.1>
@@ -1072,7 +1072,7 @@ test:do_execsql_test(
     [[
         DROP VIEW IF EXISTS v10;
         DROP TABLE IF EXISTS t10;
-        CREATE TABLE t10(c1 primary key);
+        CREATE TABLE t10(c1 INT primary key);
         CREATE VIEW v10 AS SELECT c1 FROM (SELECT t10.c1 FROM t10);
     ]], {
         -- <view-20.1>
@@ -1096,7 +1096,7 @@ if (0 > 0)
     test:do_catchsql_test(
         "view-21.1",
         [[
-            CREATE TABLE t1(x primary key);
+            CREATE TABLE t1(x INT primary key);
             INSERT INTO t1 VALUES(5);
             CREATE VIEW v1 AS SELECT x*2 FROM t1;
             CREATE VIEW v2 AS SELECT * FROM v1 UNION SELECT * FROM v1;
diff --git a/test/sql-tap/where2.test.lua b/test/sql-tap/where2.test.lua
index e657996006cf81ecd54f25dd68f101ad681748f8..8e30f11cb339697142bb8d08e722df0b6e713d71 100755
--- a/test/sql-tap/where2.test.lua
+++ b/test/sql-tap/where2.test.lua
@@ -206,7 +206,7 @@ test:do_test(
     "where2-2.4",
     function()
         test:execsql [[
-            CREATE TABLE x1(a INTEGER PRIMARY KEY, b DEFAULT 1);
+            CREATE TABLE x1(a INTEGER PRIMARY KEY, b INT DEFAULT 1);
             WITH RECURSIVE
                cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<50)
             INSERT INTO x1 SELECT x, 1 FROM cnt;
@@ -880,10 +880,10 @@ test:do_test(
         "where2-7.1",
         function()
             return cksort([[
-    create table t8(a PRIMARY KEY, b, c);
+    create table t8(a INT PRIMARY KEY, b INT, c INT);
     insert into t8 values(1,2,3);
     insert into t8 values(2,3,4);
-    create table t9(x,y, PRIMARY key (x, y));
+    create table t9(x INT,y INT, PRIMARY key (x, y));
     insert into t9 values(2,4);
     insert into t9 values(2,3);
     select y from t8, t9 where a=1 order by a, y;
@@ -1213,7 +1213,7 @@ test:do_execsql_test(
         "where2-9.1",
         function()
             test:execsql [[
-                CREATE TABLE t10(id int PRIMARY KEY,a,b,c);
+                CREATE TABLE t10(id int PRIMARY KEY,a INT,b INT,c INT);
                 START TRANSACTION;
                 INSERT INTO t10 VALUES(1, 1,1,1);
                 INSERT INTO t10 VALUES(2, 1,2,2);
@@ -1316,7 +1316,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "where2-13.1",
     [[
-        CREATE TABLE t13(a primary key,b);
+        CREATE TABLE t13(a INT primary key,b INT);
         INSERT INTO t13 VALUES(4,5);
         SELECT * FROM t13 WHERE (1=2 AND a=3) OR a=4;
     ]], {
diff --git a/test/sql-tap/where3.test.lua b/test/sql-tap/where3.test.lua
index 45827373f9ab5e0ace521b68a8d03add43efd249..7ae964b88c24f972b8e81b4d2e51ae2a4bdd936d 100755
--- a/test/sql-tap/where3.test.lua
+++ b/test/sql-tap/where3.test.lua
@@ -29,9 +29,9 @@ test:plan(83)
 test:do_execsql_test(
     "where3-1.1",
     [[
-        CREATE TABLE t1(a primary key, b);
-        CREATE TABLE t2(p primary key, q);
-        CREATE TABLE t3(x primary key, y);
+        CREATE TABLE t1(a  INT primary key, b TEXT);
+        CREATE TABLE t2(p  INT primary key, q INT );
+        CREATE TABLE t3(x  INT primary key, y TEXT);
 
         INSERT INTO t1 VALUES(111,'one');
         INSERT INTO t1 VALUES(222,'two');
@@ -65,9 +65,9 @@ test:do_test(
 test:do_execsql_test(
     "where3-1.2",
     [[
-        CREATE TABLE test1(parent1key primary key, child1key, Child2key, child3key);
-        CREATE TABLE child1 ( child1key NVARCHAR primary key, value NVARCHAR );
-        CREATE TABLE child2 ( child2key NVARCHAR primary key, value NVARCHAR );
+        CREATE TABLE test1(parent1key  INT primary key, child1key TEXT, Child2key TEXT , child3key INT );
+        CREATE TABLE child1 ( child1key  TEXT primary key, value  TEXT );
+        CREATE TABLE child2 ( child2key  TEXT primary key, value  TEXT );
 
         INSERT INTO test1(parent1key,child1key,child2key)
            VALUES ( 1, 'C1.1', 'C2.1' );
@@ -181,10 +181,10 @@ test:do_test(
     "where3-2.1",
     function()
         test:execsql [[
-            CREATE TABLE tA(apk integer primary key, ax);
-            CREATE TABLE tB(bpk integer primary key, bx);
-            CREATE TABLE tC(cpk integer primary key, cx);
-            CREATE TABLE tD(dpk integer primary key, dx);
+            CREATE TABLE tA(apk integer primary key, ax INT );
+            CREATE TABLE tB(bpk integer primary key, bx INT );
+            CREATE TABLE tC(cpk integer primary key, cx INT );
+            CREATE TABLE tD(dpk integer primary key, dx INT );
         ]]
         return queryplan([[
     SELECT * FROM tA, tB, tC LEFT JOIN tD ON dpk=cx
@@ -347,11 +347,11 @@ test:do_test(
 test:do_execsql_test(
     "where3-3.0",
     [[
-        CREATE TABLE t301(a INTEGER PRIMARY KEY,b,c);
+        CREATE TABLE t301(a INTEGER PRIMARY KEY,b INT ,c INT );
         CREATE INDEX t301c ON t301(c);
         INSERT INTO t301 VALUES(1,2,3);
         INSERT INTO t301 VALUES(2,2,3);
-        CREATE TABLE t302(x primary key, y);
+        CREATE TABLE t302(x  INT primary key, y INT );
         INSERT INTO t302 VALUES(4,5);
         SELECT * FROM t302, t301 WHERE t302.x=5 AND t301.a=t302.y;
     ]], {
@@ -400,9 +400,9 @@ if 0
     test:do_execsql_test(
         "where3-4.0",
         [[
-            CREATE TABLE t400(a INTEGER PRIMARY KEY, b, c);
-            CREATE TABLE t401(p INTEGER PRIMARY KEY, q, r);
-            CREATE TABLE t402(x INTEGER PRIMARY KEY, y, z);
+            CREATE TABLE t400(a INTEGER PRIMARY KEY, b INT , c INT );
+            CREATE TABLE t401(p INTEGER PRIMARY KEY, q INT , r INT );
+            CREATE TABLE t402(x INTEGER PRIMARY KEY, y INT , z INT );
             EXPLAIN QUERY PLAN
             SELECT * FROM t400, t401, t402 WHERE t402.z GLOB 'abc*';
         ]], {
@@ -442,16 +442,16 @@ test:do_execsql_test(
     "where3-5.0",
     [[
         CREATE TABLE aaa (id INTEGER PRIMARY KEY, type INTEGER,
-                          fk INTEGER DEFAULT NULL, parent INTEGER,
-                          position INTEGER, title LONGVARCHAR,
+                          fk TEXT DEFAULT NULL, parent INTEGER,
+                          position INTEGER, title TEXT,
                           keyword_id INTEGER, folder_type TEXT,
                           dateAdded INTEGER, lastModified INTEGER);
         CREATE INDEX aaa_111 ON aaa (fk, type);
         CREATE INDEX aaa_222 ON aaa (parent, position);
         CREATE INDEX aaa_333 ON aaa (fk, lastModified);
         CREATE TABLE bbb (id INTEGER PRIMARY KEY, type INTEGER,
-                          fk INTEGER DEFAULT NULL, parent INTEGER,
-                          position INTEGER, title LONGVARCHAR,
+                          fk TEXT DEFAULT NULL, parent INTEGER,
+                          position INTEGER, title TEXT,
                           keyword_id INTEGER, folder_type TEXT,
                           dateAdded INTEGER, lastModified INTEGER);
         CREATE INDEX bbb_111 ON bbb (fk, type);
@@ -515,19 +515,19 @@ test:do_test(
     "where3-6.setup",
     function()
         return test:execsql [[
-            CREATE TABLE t6w(a primary key, w);
+            CREATE TABLE t6w(a  INT primary key, w TEXT);
             INSERT INTO t6w VALUES(1, 'w-one');
             INSERT INTO t6w VALUES(2, 'w-two');
             INSERT INTO t6w VALUES(9, 'w-nine');
-            CREATE TABLE t6x(a primary key, x);
+            CREATE TABLE t6x(a  INT primary key, x TEXT);
             INSERT INTO t6x VALUES(1, 'x-one');
             INSERT INTO t6x VALUES(3, 'x-three');
             INSERT INTO t6x VALUES(9, 'x-nine');
-            CREATE TABLE t6y(a primary key, y);
+            CREATE TABLE t6y(a  INT primary key, y TEXT);
             INSERT INTO t6y VALUES(1, 'y-one');
             INSERT INTO t6y VALUES(4, 'y-four');
             INSERT INTO t6y VALUES(9, 'y-nine');
-            CREATE TABLE t6z(a primary key, z);
+            CREATE TABLE t6z(a  INT primary key, z TEXT);
             INSERT INTO t6z VALUES(1, 'z-one');
             INSERT INTO t6z VALUES(5, 'z-five');
             INSERT INTO t6z VALUES(9, 'z-nine');
@@ -637,10 +637,10 @@ end
 test:do_execsql_test(
     "where3-7-setup",
     [[
-        CREATE TABLE t71(x1 INTEGER PRIMARY KEY, y1);
-        CREATE TABLE t72(x2 INTEGER PRIMARY KEY, y2);
-        CREATE TABLE t73(x3 primary key, y3);
-        CREATE TABLE t74(x4, y4 primary key);
+        CREATE TABLE t71(x1 INTEGER PRIMARY KEY, y1 INT );
+        CREATE TABLE t72(x2 INTEGER PRIMARY KEY, y2 INT );
+        CREATE TABLE t73(x3  INT primary key, y3 INT );
+        CREATE TABLE t74(x4 INT , y4  INT primary key);
         INSERT INTO t71 VALUES(123,234);
         INSERT INTO t72 VALUES(234,345);
         INSERT INTO t73 VALUES(123,234);
diff --git a/test/sql-tap/where4.test.lua b/test/sql-tap/where4.test.lua
index 5ed9e994d90c5b255d271b14c4b45ece2dcfff18..0b687a8d986ae69f1417ca54f53f3997e955d341 100755
--- a/test/sql-tap/where4.test.lua
+++ b/test/sql-tap/where4.test.lua
@@ -33,14 +33,10 @@ test:do_execsql_test(
     [[
         -- Tarantool. As far as rowid was replaced w/ PK - no NULLs allowed anymore.
         -- Comment those lines.
-            CREATE TABLE t1(w, x, y, primary key (w,x,y));
-            INSERT INTO t1 VALUES(1,2,3);
-        --    INSERT INTO t1 VALUES(1,NULL,3);
+            CREATE TABLE t1(w TEXT, x TEXT, y TEXT, primary key (w,x,y));
+            INSERT INTO t1 VALUES('1','2','3');
             INSERT INTO t1 VALUES('a','b','c');
-        --    INSERT INTO t1 VALUES('a',NULL,'c');
-            INSERT INTO t1 VALUES(X'78',x'79',x'7a');
-        --    INSERT INTO t1 VALUES(X'78',NULL,X'7A');
-        --    INSERT INTO t1 VALUES(NULL,NULL,NULL);
+            INSERT INTO t1 VALUES('78','79','7a');
             SELECT count(*) FROM t1;
     ]], {
         -- <where4-1.0>
@@ -134,11 +130,11 @@ test:do_execsql_test(
 -- Tarantool. As far as NULLs are prohibited for PKs (was UNIQUE + rowid) - block 4-3.* completely
 -- do_test where4-3.1 {
 --   execsql {
---     CREATE TABLE t2(a primary key);
+--     CREATE TABLE t2(a INT primary key);
 --     INSERT INTO t2 VALUES(1);
 --     INSERT INTO t2 VALUES(2);
 --     INSERT INTO t2 VALUES(3);
---     CREATE TABLE t3(x,y, primary key("x", 'y')); -- Goofy syntax allowed
+--     CREATE TABLE t3(x INT,y INT, primary key("x", 'y')); -- Goofy syntax allowed
 --     INSERT INTO t3 VALUES(1,11);
 --     INSERT INTO t3 VALUES(2,NULL);
 --     SELECT * FROM t2 LEFT JOIN t3 ON a=x WHERE +y IS NULL;
@@ -216,17 +212,17 @@ test:do_execsql_test(
 
 -- Ticket #2273.  Problems with IN operators and NULLs.
 --
--- X(203, "X!cmd", [=[["ifcapable","subquery","\ndo_test where4-5.1 {\n  execsql {\n    -- Allow the 'x' syntax for backwards compatibility\n    CREATE TABLE t4(x,y,z,PRIMARY KEY('x' ASC, \"y\" ASC));\n  } } {}\n# execsql {\n#   SELECT *\n#     FROM t2 LEFT JOIN t4 b1\n#             LEFT JOIN t4 b2 ON b2.x=b1.x AND b2.y IN (b1.y);\n# }\n# ","1 {} {} {} {} {} {} 2 {} {} {} {} {} {} 3 {} {} {} {} {} {}"]]=])
+-- X(203, "X!cmd", [=[["ifcapable","subquery","\ndo_test where4-5.1 {\n  execsql {\n    -- Allow the 'x' syntax for backwards compatibility\n    CREATE TABLE t4(x INT,y INT,z INT,PRIMARY KEY('x' ASC, \"y\" ASC));\n  } } {}\n# execsql {\n#   SELECT *\n#     FROM t2 LEFT JOIN t4 b1\n#             LEFT JOIN t4 b2 ON b2.x=b1.x AND b2.y IN (b1.y);\n# }\n# ","1 {} {} {} {} {} {} 2 {} {} {} {} {} {} 3 {} {} {} {} {} {}"]]=])
 test:do_execsql_test(
     "where4-5.1",
     [[
-        CREATE TABLE t2(a primary key);
+        CREATE TABLE t2(a INT primary key);
         INSERT INTO t2 VALUES(1);
         INSERT INTO t2 VALUES(2);
         INSERT INTO t2 VALUES(3);
 
         -- Allow the 'x' syntax for backwards compatibility
-        CREATE TABLE t4(x,y,z,PRIMARY KEY(x ASC, y ASC));
+        CREATE TABLE t4(x INT,y INT,z INT,PRIMARY KEY(x ASC, y ASC));
 
         SELECT *
           FROM t2 LEFT JOIN t4 b1
@@ -259,7 +255,7 @@ test:do_execsql_test(
 -- } {1 2 4}
 -- do_test where4-6.1 {
 --   execsql {
---     CREATE TABLE t5(a,b,c,d,e,f,UNIQUE(a,b,c,d,e,f));
+--     CREATE TABLE t5(a INT,b INT,c INT,d INT,e INT,f INT,UNIQUE INT (a,b INT,c INT,d INT,e INT,f INT));
 --     INSERT INTO t5 VALUES(1,1,1,1,1,11111);
 --     INSERT INTO t5 VALUES(2,2,2,2,2,22222);
 --     INSERT INTO t5 VALUES(1,2,3,4,5,12345);
@@ -280,7 +276,7 @@ test:do_test(
     "where4-7.1",
     function()
         test:execsql [[
-            CREATE TABLE t6(y,z,PRIMARY KEY(y,z));
+            CREATE TABLE t6(y INT,z INT,PRIMARY KEY(y,z));
         ]]
         return test:execsql [[
             SELECT * FROM t6 WHERE y=NULL AND z IN ('hello');
@@ -295,9 +291,9 @@ test:do_test(
 -- do_test where4-7.1 {
 --   execsql {
 --     BEGIN;
---     CREATE TABLE t8(a primary key, b, c, d);
+--     CREATE TABLE t8(a INT primary key, b INT, c INT, d INT);
 --     CREATE INDEX t8_i ON t8(a, b, c);
---     CREATE TABLE t7(i primary key);
+--     CREATE TABLE t7(i INT primary key);
 --     INSERT INTO t7 VALUES(1);
 --     INSERT INTO t7 SELECT i*2 FROM t7;
 --     INSERT INTO t7 SELECT i*2 FROM t7;
@@ -326,7 +322,7 @@ test:do_test(
 -- # correctly.
 -- unset -nocomplain null
 -- do_execsql_test 8.1 {
---   CREATE TABLE u9(a UNIQUE, b);
+--   CREATE TABLE u9(a INT UNIQUE, b INT);
 --   INSERT INTO u9 VALUES(NULL, 1);
 --   INSERT INTO u9 VALUES(NULL, 2);
 -- }
diff --git a/test/sql-tap/where5.test.lua b/test/sql-tap/where5.test.lua
index 5ba0ada1222a21341bdb7aef62dd2456dce76973..fb8820ba5f7c3ab2eb37d09d544efd07267db43e 100755
--- a/test/sql-tap/where5.test.lua
+++ b/test/sql-tap/where5.test.lua
@@ -25,7 +25,7 @@ test:plan(50)
 test:do_test("where5-1.0", function()
     test:execsql [[
         CREATE TABLE t1(x TEXT primary key);
-        CREATE TABLE t2(x integet primary key);
+        CREATE TABLE t2(x integer primary key);
         CREATE TABLE t3(x integer PRIMARY KEY);
         INSERT INTO t1 VALUES(-1);
         INSERT INTO t1 VALUES(0);
diff --git a/test/sql-tap/where6.test.lua b/test/sql-tap/where6.test.lua
index bdf6c6d4d5367b763d8e95e39bee6b603bda63e2..f98ad3ba58f93cd847dc878012a33748244047eb 100755
--- a/test/sql-tap/where6.test.lua
+++ b/test/sql-tap/where6.test.lua
@@ -25,7 +25,7 @@ test:plan(20)
 test:do_execsql_test(
     "where6-1.1",
     [[
-        CREATE TABLE t1(a INTEGER PRIMARY KEY,b,c);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY,b INT ,c INT );
         INSERT INTO t1 VALUES(1,3,1);
         INSERT INTO t1 VALUES(2,4,2);
         CREATE TABLE t2(x INTEGER PRIMARY KEY);
@@ -239,11 +239,11 @@ test:do_test(
     "where6-3.1",
     function()
         return test:execsql [[
-            CREATE TABLE t4(x PRIMARY key);
+            CREATE TABLE t4(x TEXT PRIMARY key);
             INSERT INTO t4 VALUES('abc');
             INSERT INTO t4 VALUES('def');
             INSERT INTO t4 VALUES('ghi');
-            CREATE TABLE t5(a, b, c, PRIMARY KEY(a,b));
+            CREATE TABLE t5(a TEXT, b TEXT , c INT , PRIMARY KEY(a,b));
             INSERT INTO t5 VALUES('abc','def',123);
             INSERT INTO t5 VALUES('def','ghi',456);
 
diff --git a/test/sql-tap/where7.test.lua b/test/sql-tap/where7.test.lua
index 6691dd03bd1852f194577ffd9c7e18b459b005ab..ab53f87281ea0cc61cc7c9a88fd16d5502694534 100755
--- a/test/sql-tap/where7.test.lua
+++ b/test/sql-tap/where7.test.lua
@@ -42,7 +42,7 @@ end
 test:do_execsql_test(
     "where7-1.1",
     [[
-        CREATE TABLE t1(a INTEGER PRIMARY KEY,b,c,d);
+        CREATE TABLE t1(a INTEGER PRIMARY KEY,b INT,c INT,d INT);
         INSERT INTO t1 VALUES(1,2,3,4);
         INSERT INTO t1 VALUES(2,3,4,5);
         INSERT INTO t1 VALUES(3,4,6,8);
@@ -320,7 +320,7 @@ test:do_test(
     "where7-2.1",
     function()
         return test:execsql [[
-            CREATE TABLE t2(a INTEGER PRIMARY KEY,b,c,d,e,f TEXT,g);
+            CREATE TABLE t2(a INTEGER PRIMARY KEY,b INT,c INT,d REAL,e REAL,f TEXT,g TEXT);
             INSERT INTO t2 VALUES(1,11,1001,1.001,100.1,'bcdefghij','yxwvuts');
             INSERT INTO t2 VALUES(2,22,1001,2.002,100.1,'cdefghijk','yxwvuts');
             INSERT INTO t2 VALUES(3,33,1001,3.0029999999999997,100.1,'defghijkl','xwvutsr');
@@ -427,7 +427,7 @@ test:do_test(
             CREATE INDEX t2e ON t2(e);
             CREATE INDEX t2f ON t2(f);
             CREATE INDEX t2g ON t2(g);
-            CREATE TABLE t3(a INTEGER PRIMARY KEY,b,c,d,e,f TEXT,g);
+            CREATE TABLE t3(a INTEGER PRIMARY KEY,b INT,c INT,d REAL,e REAL,f TEXT,g TEXT);
             INSERT INTO t3 SELECT * FROM t2;
             CREATE INDEX t3b ON t3(b,c);
             CREATE INDEX t3c ON t3(c,e);
diff --git a/test/sql-tap/whereA.test.lua b/test/sql-tap/whereA.test.lua
index 773023e01260997cad4f954cea6a22f6a269261f..488df9592193e9d920c25444b4598914e6bf19d4 100755
--- a/test/sql-tap/whereA.test.lua
+++ b/test/sql-tap/whereA.test.lua
@@ -23,15 +23,15 @@ test:do_test(
     "whereA-1.1",
     function()
         return test:execsql [[
-            CREATE TABLE t1(a INTEGER PRIMARY KEY, b UNIQUE, c);
-            INSERT INTO t1 VALUES(1,2,3);
-            INSERT INTO t1 values(2,'hello','world');
+            CREATE TABLE t1(a INTEGER PRIMARY KEY, b REAL UNIQUE, c TEXT);
+            INSERT INTO t1 VALUES(1,2,'3');
+            INSERT INTO t1 values(2,55,'world');
             INSERT INTO t1 VALUES(3,4.53,NULL);
             SELECT * FROM t1
         ]]
     end, {
         -- <whereA-1.1>
-        1, 2, 3, 2, "hello", "world", 3, 4.53, ""
+        1, 2, '3', 2, 55, "world", 3, 4.53, ""
         -- </whereA-1.1>
     })
 
@@ -44,7 +44,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-1.2>
-        3, 4.53, "", 2, "hello", "world", 1, 2, 3
+        3, 4.53, "", 2, 55, "world", 1, 2, '3'
         -- </whereA-1.2>
     })
 
@@ -60,7 +60,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-1.3>
-        3, 4.53, "", 2, "hello", "world", 1, 2, 3
+        3, 4.53, "", 2, 55, "world", 1, 2, '3'
         -- </whereA-1.3>
     })
 
@@ -100,7 +100,7 @@ test:do_execsql_test(
         SELECT * FROM t1 WHERE b=2 AND a IS NOT NULL;
     ]], {
         -- <whereA-1.9>
-        1, 2, 3
+        1, 2, '3'
         -- </whereA-1.9>
     })
 
@@ -113,7 +113,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-2.1>
-        1, 2, 3, 2, "hello", "world", 3, 4.53, ""
+        1, 2, '3', 2, 55, "world", 3, 4.53, ""
         -- </whereA-2.1>
     })
 
@@ -126,7 +126,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-2.2>
-        3, 4.53, "", 2, "hello", "world", 1, 2, 3
+        3, 4.53, "", 2, 55, "world", 1, 2, '3'
         -- </whereA-2.2>
     })
 
@@ -137,7 +137,7 @@ test:do_test(
 --   }
 -- } {1 2 3 2 hello world 3 4.53 {}}
 test:do_test(
-    "whereA-3.1",
+    "whe:reA-3.1",
     function()
         return test:execsql [[
             PRAGMA reverse_unordered_selects=0;
@@ -145,7 +145,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-3.1>
-        1, 2, 3, 3, 4.53, "", 2, "hello", "world"
+        1, 2, '3', 3, 4.53, "", 2, 55, "world"
         -- </whereA-3.1>
     })
 
@@ -158,7 +158,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-3.2>
-        2, "hello", "world", 3, 4.53, "", 1, 2, 3
+        2, 55, "world", 3, 4.53, "", 1, 2, '3'
         -- </whereA-3.2>
     })
 
@@ -171,7 +171,7 @@ test:do_test(
         ]]
     end, {
         -- <whereA-3.3>
-        1, 2, 3, 3, 4.53, "", 2, "hello", "world"
+        1, 2, '3', 3, 4.53, "", 2, 55, "world"
         -- </whereA-3.3>
     })
 
@@ -179,7 +179,7 @@ test:do_test(
     "whereA-4.1",
     function()
         return test:execsql [[
-            CREATE TABLE t2(id int primary key, x);
+            CREATE TABLE t2(id int primary key, x INT);
             INSERT INTO t2 VALUES(1, 1);
             INSERT INTO t2 VALUES(2, 2);
             SELECT x FROM t2;
diff --git a/test/sql-tap/whereB.test.lua b/test/sql-tap/whereB.test.lua
index 7b1d294091c603c0ddbbd4574a71d9271743b621..c7eb10bf693bd6a328ee0eec659343082c2557b3 100755
--- a/test/sql-tap/whereB.test.lua
+++ b/test/sql-tap/whereB.test.lua
@@ -30,18 +30,18 @@ test:plan(63)
 test:do_execsql_test(
     "whereB-1.1",
     [[
-        CREATE TABLE t1(x primary key,y);    -- affinity of t1.y is NONE
+        CREATE TABLE t1(x  INT primary key,y INT );    -- affinity of t1.y is NONE
         INSERT INTO t1 VALUES(1,99);
 
-        CREATE TABLE t2(a primary key, b TEXT);  -- affinity of t2.b is TEXT
+        CREATE TABLE t2(a  INT primary key, b TEXT);  -- affinity of t2.b is TEXT
         CREATE INDEX t2b ON t2(b);
-        INSERT INTO t2 VALUES(2,99);
+        INSERT INTO t2 VALUES(2,'99');
 
         SELECT x, a, y=b FROM t1, t2 ORDER BY +x, +a;
     ]],
     {
     -- <whereB-1.1>
-    1, 2, 0
+    1, 2, 1
     -- </whereB-1.1>
     })
 
@@ -52,7 +52,7 @@ test:do_execsql_test(
     ]],
     {
     -- <whereB-1.2>
-    
+    1, 2, 1
     -- </whereB-1.2>
     })
 
@@ -63,7 +63,7 @@ test:do_execsql_test(
     ]],
     {
     -- <whereB-1.3>
-    
+    1, 2, 1
     -- </whereB-1.3>
     })
 
@@ -74,7 +74,6 @@ test:do_execsql_test(
     ]],
     {
     -- <whereB-1.4>
-    
     -- </whereB-1.4>
     })
 
@@ -86,7 +85,7 @@ test:do_execsql_test(
     ]],
     {
     -- <whereB-1.100>
-    
+    1, 2, 1
     -- </whereB-1.100>
     })
 
@@ -97,7 +96,7 @@ test:do_execsql_test(
     ]],
     {
     -- <whereB-1.101>
-    
+    1, 2, 1
     -- </whereB-1.101>
     })
 
@@ -126,12 +125,12 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y TEXT);    -- affinity of t1.y is TEXT
+        CREATE TABLE t1(x  INT primary key, y TEXT);    -- affinity of t1.y is TEXT
         INSERT INTO t1 VALUES(1,99);
 
-        CREATE TABLE t2(a primary key, b BLOB);  -- affinity of t2.b is NONE
+        CREATE TABLE t2(a  INT primary key, b BLOB);  -- affinity of t2.b is NONE
         CREATE INDEX t2b ON t2(b);
-        INSERT INTO t2 VALUES(2,99);
+        INSERT INTO t2 VALUES(2, 99);
 
         SELECT x, a, y=b FROM t1, t2 ORDER BY +x, +a;
     ]],
@@ -222,10 +221,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y BLOB);    -- affinity of t1.y is NONE
+        CREATE TABLE t1(x  INT primary key, y BLOB);    -- affinity of t1.y is NONE
         INSERT INTO t1 VALUES(1,99);
 
-        CREATE TABLE t2(a primary key, b BLOB);  -- affinity of t2.b is NONE
+        CREATE TABLE t2(a  INT primary key, b BLOB);  -- affinity of t2.b is NONE
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,'99');
 
@@ -318,10 +317,10 @@ test:do_execsql_test(
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
 
-        CREATE TABLE t1(x primary key, y BLOB);    -- affinity of t1.y is NONE
+        CREATE TABLE t1(x  INT primary key, y BLOB);    -- affinity of t1.y is NONE
         INSERT INTO t1 VALUES(1,'99');
 
-        CREATE TABLE t2(a primary key, b NUMERIC);  -- affinity of t2.b is NUMERIC
+        CREATE TABLE t2(a  INT primary key, b NUMERIC);  -- affinity of t2.b is NUMERIC
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,99);
 
@@ -418,10 +417,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y BLOB);    -- affinity of t1.y is NONE
+        CREATE TABLE t1(x  INT primary key, y BLOB);    -- affinity of t1.y is NONE
         INSERT INTO t1 VALUES(1,'99');
 
-        CREATE TABLE t2(a primary key, b INT);  -- affinity of t2.b is INTEGER
+        CREATE TABLE t2(a  INT primary key, b INT);  -- affinity of t2.b is INTEGER
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,99);
 
@@ -518,10 +517,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y BLOB);    -- affinity of t1.y is NONE
+        CREATE TABLE t1(x  INT primary key, y BLOB);    -- affinity of t1.y is NONE
         INSERT INTO t1 VALUES(1,'99');
 
-        CREATE TABLE t2(a primary key, b REAL);  -- affinity of t2.b is REAL
+        CREATE TABLE t2(a  INT primary key, b FLOAT);  -- affinity of t2.b is REAL
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,99.0);
 
@@ -618,10 +617,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y NUMERIC);  -- affinity of t1.y is NUMERIC
+        CREATE TABLE t1(x  INT primary key, y NUMERIC);  -- affinity of t1.y is NUMERIC
         INSERT INTO t1 VALUES(1,99);
 
-        CREATE TABLE t2(a primary key, b BLOB);  -- affinity of t2.b is NONE
+        CREATE TABLE t2(a  INT primary key, b BLOB);  -- affinity of t2.b is NONE
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,'99');
 
@@ -718,10 +717,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y INT);  -- affinity of t1.y is INTEGER
+        CREATE TABLE t1(x  INT primary key, y INT);  -- affinity of t1.y is INTEGER
         INSERT INTO t1 VALUES(1,99);
 
-        CREATE TABLE t2(a primary key, b BLOB);  -- affinity of t2.b is NONE
+        CREATE TABLE t2(a  INT primary key, b BLOB);  -- affinity of t2.b is NONE
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,'99');
 
@@ -818,10 +817,10 @@ test:do_execsql_test(
         DROP TABLE t1;
         DROP TABLE t2;
 
-        CREATE TABLE t1(x primary key, y REAL);  -- affinity of t1.y is REAL
+        CREATE TABLE t1(x  INT primary key, y FLOAT);  -- affinity of t1.y is REAL
         INSERT INTO t1 VALUES(1,99.0);
 
-        CREATE TABLE t2(a primary key, b BLOB);  -- affinity of t2.b is NONE
+        CREATE TABLE t2(a  INT primary key, b BLOB);  -- affinity of t2.b is NONE
         CREATE INDEX t2b ON t2(b);
         INSERT INTO t2 VALUES(2,'99');
 
diff --git a/test/sql-tap/whereC.test.lua b/test/sql-tap/whereC.test.lua
index e7154c5e69bcbd7bba91d4c7791d9f2f0db32685..89459dee36bdfecb91c9e1269131595dfb1994b5 100755
--- a/test/sql-tap/whereC.test.lua
+++ b/test/sql-tap/whereC.test.lua
@@ -21,7 +21,7 @@ testprefix = "whereC"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(i INTEGER PRIMARY KEY, a, b INTEGER);
+        CREATE TABLE t1(i INTEGER PRIMARY KEY, a INT, b INTEGER);
 
         INSERT INTO t1 VALUES(1, 1, 1);
         INSERT INTO t1 VALUES(2, 1, 1);
diff --git a/test/sql-tap/whereD.test.lua b/test/sql-tap/whereD.test.lua
index 15e6fb28411f63b6b7103498d14535856319860c..6ba90dc6d35bbde606c2795c64761e8b7dc0569d 100755
--- a/test/sql-tap/whereD.test.lua
+++ b/test/sql-tap/whereD.test.lua
@@ -23,7 +23,7 @@ testprefix = "whereD"
 test:do_execsql_test(
     1.1,
     [[
-        CREATE TABLE t(i int PRIMARY key,j int,k,m,n);
+        CREATE TABLE t(i int PRIMARY key,j int,k TEXT, m INT, n TEXT);
         CREATE INDEX ijk ON t(i,j,k);
         CREATE INDEX jmn ON t(j,m,n);
 
@@ -186,11 +186,11 @@ test:do_execsql_test(
 test:do_execsql_test(
     2.0,
     [[
-        CREATE TABLE t1(a PRIMARY KEY,b,c,d);
+        CREATE TABLE t1(a  INT PRIMARY KEY,b INT ,c INT ,d INT );
         CREATE INDEX t1b ON t1(b);
         CREATE INDEX t1c ON t1(c);
         CREATE INDEX t1d ON t1(d);
-        CREATE TABLE t2(x PRIMARY KEY,y);
+        CREATE TABLE t2(x  INT PRIMARY KEY,y INT );
         CREATE INDEX t2y ON t2(y);
 
         INSERT INTO t1 VALUES(1,2,3,4);
@@ -247,7 +247,7 @@ end
 test:do_execsql_test(
     3.0,
     [[
-        CREATE TABLE t3(a PRIMARY KEY, b, c);
+        CREATE TABLE t3(a  INT PRIMARY KEY, b TEXT, c TEXT);
         CREATE UNIQUE INDEX i3 ON t3(a, b);
         INSERT INTO t3 VALUES(1, 'one', 'i');
         INSERT INTO t3 VALUES(3, 'three', 'iii');
@@ -256,7 +256,7 @@ test:do_execsql_test(
         INSERT INTO t3 VALUES(4, 'four', 'iv');
         INSERT INTO t3 VALUES(5, 'five', 'v');
 
-        CREATE TABLE t4(x PRIMARY KEY, y);
+        CREATE TABLE t4(x  TEXT PRIMARY KEY, y TEXT);
         INSERT INTO t4 VALUES('a', 'one');
         INSERT INTO t4 VALUES('b', 'two');
     ]])
@@ -307,9 +307,9 @@ test:do_test(
     4.1,
     function()
         return test:execsql [[
-            CREATE TABLE t41(a PRIMARY KEY,b,c);
+            CREATE TABLE t41(a  INT PRIMARY KEY,b INT ,c INT );
             INSERT INTO t41 VALUES(1,2,3), (4,5,6);
-            CREATE TABLE t42(d PRIMARY KEY,e,f);
+            CREATE TABLE t42(d  INT PRIMARY KEY,e INT ,f INT );
             INSERT INTO t42 VALUES(3,6,9), (4,8,12);
             SELECT * FROM t41 AS x LEFT JOIN t42 AS y ON (y.d=x.c) OR (y.e=x.b);
         ]]
@@ -408,7 +408,7 @@ test:do_execsql_test(
     5.1,
     [[
         DROP TABLE IF EXISTS t;
-        CREATE TABLE t(c0 PRIMARY key,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17);
+        CREATE TABLE t(c0  INT PRIMARY key,c1 INT ,c2 INT ,c3 INT ,c4 INT ,c5 INT ,c6 INT ,c7 INT ,c8 INT ,c9 INT ,c10 INT ,c11 INT ,c12 INT ,c13 INT ,c14 INT ,c15 INT ,c16 INT ,c17 INT );
         CREATE INDEX tc1 ON t(c1);
         CREATE INDEX tc2 ON t(c2);
         CREATE INDEX tc3 ON t(c3);
diff --git a/test/sql-tap/whereF.test.lua b/test/sql-tap/whereF.test.lua
index cd2cbde34fadda46ab1bb6462de37b21549b83db..5a894b74895b4602815889cc4380aca3c3e3318f 100755
--- a/test/sql-tap/whereF.test.lua
+++ b/test/sql-tap/whereF.test.lua
@@ -52,8 +52,8 @@ testprefix = "whereF"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(a PRIMARY KEY, b, c);
-        CREATE TABLE t2(d PRIMARY KEY, e, f);
+        CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT);
+        CREATE TABLE t2(d INT PRIMARY KEY, e INT, f INT);
     ]], {
         -- <1.0>
         
@@ -78,8 +78,8 @@ test:do_execsql_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a PRIMARY KEY, b, c);
-        CREATE TABLE t2(d PRIMARY KEY, e, f);
+        CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT);
+        CREATE TABLE t2(d INT PRIMARY KEY, e INT, f INT);
 
         CREATE UNIQUE INDEX i2 ON t1(b);
     ]], {
@@ -107,8 +107,8 @@ test:do_execsql_test(
     [[
         DROP TABLE t1;
         DROP TABLE t2;
-        CREATE TABLE t1(a, b, c, PRIMARY KEY(a,b));
-        CREATE TABLE t2(d PRIMARY KEY, e, f);
+        CREATE TABLE t1(a INT, b INT, c INT, PRIMARY KEY(a,b));
+        CREATE TABLE t2(d INT PRIMARY KEY, e INT, f INT);
     ]], {
         -- <3.0>
         
@@ -145,7 +145,7 @@ test:do_test(
 test:do_execsql_test(
     4.0,
     [[
-        CREATE TABLE t4(a,b,c,d,e, PRIMARY KEY(a,b,c));
+        CREATE TABLE t4(a INT,b INT,c INT,d INT,e INT, PRIMARY KEY(a,b,c));
         CREATE INDEX t4adc ON t4(a,d,c);
         CREATE UNIQUE INDEX t4aebc ON t4(a,e,b,c);
         EXPLAIN QUERY PLAN SELECT a FROM t4 WHERE a=? AND b=?;
diff --git a/test/sql-tap/whereG.test.lua b/test/sql-tap/whereG.test.lua
index ded983975a5dfe4ba35c37f1c5eca17a10b3b9d2..586ddd7d2e67ed889f7e69050597bf86be91e1db 100755
--- a/test/sql-tap/whereG.test.lua
+++ b/test/sql-tap/whereG.test.lua
@@ -23,11 +23,11 @@ test:do_execsql_test(
     "whereG-1.0",
     [[
         CREATE TABLE composer(
-          cid PRIMARY KEY,
+          cid INT PRIMARY KEY,
           cname TEXT
         );
         CREATE TABLE album(
-          aid PRIMARY KEY,
+          aid INT PRIMARY KEY,
           aname TEXT
         );
         CREATE TABLE track(
@@ -230,8 +230,8 @@ test:do_catchsql_test(
 test:do_execsql_test(
     "whereG-3.0",
     [[
-        CREATE TABLE a(a1 PRIMARY KEY, a2);
-        CREATE TABLE b(b1 PRIMARY KEY, b2);
+        CREATE TABLE a(a1  INT PRIMARY KEY, a2 INT );
+        CREATE TABLE b(b1  INT PRIMARY KEY, b2 INT );
     ]], {
         -- <whereG-3.0>
         
@@ -257,7 +257,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     "whereG-4.0",
     [[
-        CREATE TABLE t4(x PRIMARY key);
+        CREATE TABLE t4(x TEXT PRIMARY key);
         INSERT INTO t4 VALUES('right'),('wrong');
         SELECT DISTINCT x
          FROM (SELECT x FROM t4 GROUP BY x)
@@ -281,7 +281,7 @@ test:do_execsql_test(
     5.1,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a, b, c, PRIMARY KEY (a,b));
+        CREATE TABLE t1(a INT , b INT , c INT , PRIMARY KEY (a,b));
     ]])
 
 -- do_eqp_test 5.1.2 {
@@ -326,10 +326,10 @@ test:do_execsql_test(
     6.0,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(i int PRIMARY KEY, x, y, z);
+        CREATE TABLE t1(i int PRIMARY KEY, x INT , y INT , z INT );
         INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3), (4,4,4,4);
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(i int PRIMARY KEY, bool char);
+        CREATE TABLE t2(i int PRIMARY KEY, bool TEXT);
         INSERT INTO t2 VALUES(1,'T'), (2,'F');
         SELECT count(*) FROM t1 LEFT JOIN t2 ON t1.i=t2.i AND bool='T' union all
         SELECT count(*) FROM t1 LEFT JOIN t2 ON likely(t1.i=t2.i) AND bool='T';
@@ -346,10 +346,10 @@ test:do_execsql_test(
     7.0,
     [[
         DROP TABLE IF EXISTS t1;
-        CREATE TABLE t1(a, b, PRIMARY KEY(a,b));
+        CREATE TABLE t1(a INT , b INT , PRIMARY KEY(a,b));
         INSERT INTO t1 VALUES(9,1),(1,2);
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t2(x, y, PRIMARY KEY(x,y));
+        CREATE TABLE t2(x INT , y INT , PRIMARY KEY(x,y));
         INSERT INTO t2 VALUES(3,3),(4,4);
         SELECT likely(a), x FROM t1, t2 ORDER BY 1, 2;
     ]], {
diff --git a/test/sql-tap/whereI.test.lua b/test/sql-tap/whereI.test.lua
index 5f041c2bf10079aa436fc30da2053a3c9fbfa9f3..3ae5b82f257b3bd3e33ac8c8adeaf7a8352a00ff 100755
--- a/test/sql-tap/whereI.test.lua
+++ b/test/sql-tap/whereI.test.lua
@@ -22,7 +22,7 @@ test:plan(7)
 -- ["source",[["testdir"],"\/tester.tcl"]]
 testprefix = "whereI"
 test:do_execsql_test(1.0, [[
-    CREATE TABLE t1(a, b, c, PRIMARY KEY(a));
+    CREATE TABLE t1(a INT, b TEXT, c TEXT, PRIMARY KEY(a));
     INSERT INTO t1 VALUES(1, 'a', 'z');
     INSERT INTO t1 VALUES(2, 'b', 'y');
     INSERT INTO t1 VALUES(3, 'c', 'x');
@@ -57,7 +57,7 @@ test:do_execsql_test(1.3, [[
 -- Try that again, this time with non integer PRIMARY KEY values.
 --
 test:do_execsql_test(2.0, [[
-    CREATE TABLE t2(a, b, c, PRIMARY KEY(a));
+    CREATE TABLE t2(a TEXT, b TEXT, c TEXT, PRIMARY KEY(a));
     INSERT INTO t2 VALUES('i', 'a', 'z');
     INSERT INTO t2 VALUES('ii', 'b', 'y');
     INSERT INTO t2 VALUES('iii', 'c', 'x');
@@ -92,7 +92,7 @@ test:do_execsql_test(2.3, [[
 -- On a table with a multi-column PK.
 --
 test:do_execsql_test(3.0, [[
-    CREATE TABLE t3(a, b, c, d, PRIMARY KEY(c, b));
+    CREATE TABLE t3(a TEXT, b INT, c INT, d TEXT, PRIMARY KEY(c, b));
 
     INSERT INTO t3 VALUES('f', 1, 1, 'o');
     INSERT INTO t3 VALUES('o', 2, 1, 't');
@@ -102,7 +102,7 @@ test:do_execsql_test(3.0, [[
     CREATE INDEX t3i1 ON t3(d);
     CREATE INDEX t3i2 ON t3(a);
 
-    SELECT c||'.'||b FROM t3 WHERE a='t' OR d='t'
+    SELECT CAST(c AS TEXT)||'.'||CAST(b AS TEXT) FROM t3 WHERE a='t' OR d='t'
 ]], {
     -- <3.0>
     '2.1', '2.2', '1.2'
diff --git a/test/sql-tap/whereK.test.lua b/test/sql-tap/whereK.test.lua
index 2a9e778ec1c69538067b0c2973e8d0f1cc3c0337..3c27099c0769c6b1d35d3c4779ef98e3d2dfa92f 100755
--- a/test/sql-tap/whereK.test.lua
+++ b/test/sql-tap/whereK.test.lua
@@ -25,7 +25,7 @@ test:plan(10)
 -- ["source",[["testdir"],"\/tester.tcl"]]
 testprefix = "whereK"
 test:do_execsql_test(1.1, [[
-  CREATE TABLE t1(a,b,c, primary key (a,b,c));
+  CREATE TABLE t1(a INT ,b INT ,c INT , primary key (a,b,c));
   WITH RECURSIVE c(x) AS (VALUES(0) UNION ALL SELECT x+1 FROM c WHERE x<99)
     INSERT INTO t1(a,b,c) SELECT x, x/10, x%10 FROM c;
   CREATE INDEX t1bc ON t1(b,c);
diff --git a/test/sql-tap/with1.test.lua b/test/sql-tap/with1.test.lua
index c6a8958755f687b653349ff9da70c5cae5bd0436..faa99811cff65d8b36998e25da21c65537123224 100755
--- a/test/sql-tap/with1.test.lua
+++ b/test/sql-tap/with1.test.lua
@@ -68,7 +68,7 @@ test:do_execsql_test(1.4, [[
 ----------------------------------------------------------------------------
 test:do_execsql_test(2.1, [[
   DROP TABLE IF EXISTS t1;
-  CREATE TABLE t1(x PRIMARY KEY);
+  CREATE TABLE t1(x INT PRIMARY KEY);
   INSERT INTO t1 VALUES(1);
   INSERT INTO t1 VALUES(2);
   WITH tmp AS ( SELECT * FROM t1 ) SELECT x FROM tmp;
@@ -139,8 +139,8 @@ test:do_catchsql_test(3.2, [[
 })
 
 test:do_execsql_test(3.3, [[
-  CREATE TABLE t3(x PRIMARY KEY);
-  CREATE TABLE t4(x PRIMARY KEY);
+  CREATE TABLE t3(x TEXT PRIMARY KEY);
+  CREATE TABLE t4(x TEXT PRIMARY KEY);
 
   INSERT INTO t3 VALUES('T3');
   INSERT INTO t4 VALUES('T4');
@@ -185,7 +185,7 @@ test:do_catchsql_test(3.6, [[
 ---------------------------------------------------------------------------
 test:do_execsql_test(4.1, [[
   DROP TABLE IF EXISTS t1;
-  CREATE TABLE t1(x PRIMARY KEY);
+  CREATE TABLE t1(x INT PRIMARY KEY);
   INSERT INTO t1 VALUES(1);
   INSERT INTO t1 VALUES(2);
   INSERT INTO t1 VALUES(3);
@@ -241,7 +241,7 @@ test:do_catchsql_test(5.2, [[
 })
 
 test:do_execsql_test("5.2.1", [[
-  CREATE TABLE edge(xfrom, xto, seq, PRIMARY KEY(xfrom, xto));
+  CREATE TABLE edge(xfrom INT, xto INT, seq INT, PRIMARY KEY(xfrom, xto));
   INSERT INTO edge VALUES(0, 1, 10);
   INSERT INTO edge VALUES(1, 2, 20);
   INSERT INTO edge VALUES(0, 3, 30);
@@ -348,7 +348,7 @@ test:do_catchsql_test("5.6.2", [[
 })
 
 test:do_catchsql_test("5.6.3", [[
-  CREATE TABLE t5(a PRIMARY KEY, b);
+  CREATE TABLE t5(a  INT PRIMARY KEY, b INT );
   WITH i(x) AS ( SELECT * FROM t5 )
   SELECT * FROM i;
 ]], {
@@ -397,7 +397,7 @@ test:do_catchsql_test("5.6.7", [[
 --
 test:do_execsql_test(6.1, [[
   CREATE TABLE f(
-      id PRIMARY KEY, parentid REFERENCES f, name TEXT
+      id INTEGER PRIMARY KEY, parentid  INT REFERENCES f, name TEXT
   );
 
   INSERT INTO f VALUES(0, NULL, '');
@@ -458,7 +458,7 @@ test:do_execsql_test(6.4, [[
 
 ---------------------------------------------------------------------------
 test:do_execsql_test(7.1, [[
-  CREATE TABLE tree(i PRIMARY KEY, p);
+  CREATE TABLE tree(i  INT PRIMARY KEY, p INT );
   INSERT INTO tree VALUES(1, NULL);
   INSERT INTO tree VALUES(2, 1);
   INSERT INTO tree VALUES(3, 1);
@@ -470,7 +470,7 @@ test:do_execsql_test(7.2, [[
   WITH t(id, path) AS (
     SELECT i, '' FROM tree WHERE p IS NULL
     UNION ALL
-    SELECT i, path || '/' || i FROM tree, t WHERE p = id
+    SELECT i, path || '/' || CAST(i as TEXT) FROM tree, t WHERE p = id
   ) 
   SELECT path FROM t;
 ]], {
@@ -670,7 +670,7 @@ limit_test(9.9, -1, -1)
 -- #
 -- do_execsql_test 10.1 {
 --   DROP TABLE IF EXISTS tree;
---   CREATE TABLE tree(id INTEGER PRIMARY KEY, parentid, payload);
+--   CREATE TABLE tree(id INTEGER PRIMARY KEY, parentid INT , payload INT );
 -- }
 -- proc insert_into_tree {L} {
 --   db eval { DELETE FROM tree }
@@ -864,7 +864,7 @@ test:do_execsql_test("10.7.3", [[
 --   /a/b /a/C /a/d /B/e /B/F /B/g /c/h /c/I /c/j
 -- }
 test:do_execsql_test("10.8.4.1", [[
-  CREATE TABLE tst(a PRIMARY KEY,b);
+  CREATE TABLE tst(a  TEXT PRIMARY KEY,b TEXT );
   INSERT INTO tst VALUES('a', 'A');
   INSERT INTO tst VALUES('b', 'B');
   INSERT INTO tst VALUES('c', 'C');
diff --git a/test/sql-tap/with2.test.lua b/test/sql-tap/with2.test.lua
index 19051640c9906b4ee0709f8430abb0d184c2f21e..3fd91b62f23b96e48657688faf386a9f53926193 100755
--- a/test/sql-tap/with2.test.lua
+++ b/test/sql-tap/with2.test.lua
@@ -23,7 +23,7 @@ testprefix = "with2"
 test:do_execsql_test(
     1.0,
     [[
-        CREATE TABLE t1(a PRIMARY KEY);
+        CREATE TABLE t1(a  INT PRIMARY KEY);
         INSERT INTO t1 VALUES(1);
         INSERT INTO t1 VALUES(2);
     ]])
@@ -64,7 +64,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     1.4,
     [[
-        CREATE TABLE t2(i PRIMARY KEY);
+        CREATE TABLE t2(i  INT PRIMARY KEY);
         INSERT INTO t2 VALUES(2);
         INSERT INTO t2 VALUES(3);
         INSERT INTO t2 VALUES(5);
@@ -98,8 +98,8 @@ test:do_execsql_test(
     [[
         --CREATE TABLE t3 AS SELECT 3 AS x;
         --CREATE TABLE t4 AS SELECT 4 AS x;
-        CREATE TABLE t3(x PRIMARY KEY); INSERT INTO t3 VALUES(3);
-        CREATE TABLE t4(x PRIMARY KEY); INSERT INTO t4 VALUES(4);
+        CREATE TABLE t3(x  INT PRIMARY KEY); INSERT INTO t3 VALUES(3);
+        CREATE TABLE t4(x  INT PRIMARY KEY); INSERT INTO t4 VALUES(4);
 
         WITH x1 AS (SELECT * FROM t3),
              x2 AS (
@@ -409,8 +409,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(a PRIMARY KEY, b);
-        CREATE TABLE t2(a PRIMARY KEY, b);
+        CREATE TABLE t1(a INT PRIMARY KEY, b INT);
+        CREATE TABLE t2(a INT PRIMARY KEY, b INT);
         INSERT INTO t2 VALUES (1, 1), (2, 2);
     ]], {
         -- <5.1>
@@ -510,8 +510,8 @@ test:do_execsql_test(
     [[
         DROP TABLE IF EXISTS t1;
         DROP TABLE IF EXISTS t2;
-        CREATE TABLE t1(a PRIMARY KEY, b);
-        CREATE TABLE t2(a PRIMARY KEY, b);
+        CREATE TABLE t1(a  INT PRIMARY KEY, b INT );
+        CREATE TABLE t2(a  INT PRIMARY KEY, b INT );
     ]])
 
 test:do_catchsql_test(6.2, [[
@@ -674,7 +674,7 @@ test:do_execsql_test(
 test:do_execsql_test(
     8.1,
     [[
-        CREATE TABLE t7(id PRIMARY KEY, y);
+        CREATE TABLE t7(id  INT PRIMARY KEY, y INT );
         INSERT INTO t7 VALUES(1, NULL);
         CREATE VIEW v AS SELECT y FROM t7 ORDER BY y;
     ]])
diff --git a/test/sql/check-clear-ephemeral.result b/test/sql/check-clear-ephemeral.result
index 4ab1fe14ca500da953a2f444833a287798331921..cfc0f4f75f80fe769e7f4feb0e0e66c48baf52e9 100644
--- a/test/sql/check-clear-ephemeral.result
+++ b/test/sql/check-clear-ephemeral.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 ---
 ...
 -- Debug
diff --git a/test/sql/check-clear-ephemeral.test.lua b/test/sql/check-clear-ephemeral.test.lua
index c7ea7333df89a66b45e24437acdb3013c527085f..77dae511265707908fd0e860d732dc94db74a898 100644
--- a/test/sql/check-clear-ephemeral.test.lua
+++ b/test/sql/check-clear-ephemeral.test.lua
@@ -4,7 +4,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/clear.result b/test/sql/clear.result
index c75e1343c185885074a3368903ed28997793e000..9d4e9d386ae1f087a0bcbc17b92ee650f8cc61eb 100644
--- a/test/sql/clear.result
+++ b/test/sql/clear.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
diff --git a/test/sql/clear.test.lua b/test/sql/clear.test.lua
index 142cda812d51f6c2ac43b141877d7931d5a6facc..78923f15770bca6988e4c8f6c73e90e7047f8f3f 100644
--- a/test/sql/clear.test.lua
+++ b/test/sql/clear.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
 
 -- Debug
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 79ba9abc0f093fc005bb27fe18b3eb5902bf9398..419e469f78e781f202cf99a2f99e215eb9b63937 100644
--- a/test/sql/collation.result
+++ b/test/sql/collation.result
@@ -34,7 +34,7 @@ box.sql.execute("SELECT 1 LIMIT 1 COLLATE BINARY, 1;")
 ...
 -- gh-3052: upper/lower support only default locale
 -- For tr-TR result depends on collation
-box.sql.execute([[CREATE TABLE tu (descriptor CHAR(50) PRIMARY KEY, letter CHAR)]]);
+box.sql.execute([[CREATE TABLE tu (descriptor CHAR(50) PRIMARY KEY, letter CHAR(50))]]);
 ---
 ...
 box.internal.collation.create('TURKISH', 'ICU', 'tr-TR', {strength='primary'});
diff --git a/test/sql/collation.test.lua b/test/sql/collation.test.lua
index 935dea8245bbeb1448edc7cbd964934576f6387a..da577c9102f5c90f6e44c23a8d2239b416079bbd 100644
--- a/test/sql/collation.test.lua
+++ b/test/sql/collation.test.lua
@@ -14,7 +14,7 @@ box.sql.execute("SELECT 1 LIMIT 1 COLLATE BINARY, 1;")
 
 -- gh-3052: upper/lower support only default locale
 -- For tr-TR result depends on collation
-box.sql.execute([[CREATE TABLE tu (descriptor CHAR(50) PRIMARY KEY, letter CHAR)]]);
+box.sql.execute([[CREATE TABLE tu (descriptor CHAR(50) PRIMARY KEY, letter CHAR(50))]]);
 box.internal.collation.create('TURKISH', 'ICU', 'tr-TR', {strength='primary'});
 box.sql.execute([[INSERT INTO tu VALUES ('Latin Capital Letter I U+0049','I');]])
 box.sql.execute([[INSERT INTO tu VALUES ('Latin Small Letter I U+0069','i');]])
diff --git a/test/sql/delete-multiple-idx.result b/test/sql/delete-multiple-idx.result
index a163cf1533fb8225805767c4b2683b5d2d53075f..27c352aaa0c70abe1bb604bd73ea13332c6c1829 100644
--- a/test/sql/delete-multiple-idx.result
+++ b/test/sql/delete-multiple-idx.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- Create space.
-box.sql.execute("CREATE TABLE t3(id primary key,x,y);");
+box.sql.execute("CREATE TABLE t3(id INT primary key,x INT,y INT);");
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX t3y ON t3(y);");
diff --git a/test/sql/delete-multiple-idx.test.lua b/test/sql/delete-multiple-idx.test.lua
index e18735585618ef404e941c66f09bcddfcc1e43b6..4ce7f2df3d7a51959ac9461b334711f3e1cb5c2c 100644
--- a/test/sql/delete-multiple-idx.test.lua
+++ b/test/sql/delete-multiple-idx.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- Create space.
-box.sql.execute("CREATE TABLE t3(id primary key,x,y);");
+box.sql.execute("CREATE TABLE t3(id INT primary key,x INT,y INT);");
 box.sql.execute("CREATE UNIQUE INDEX t3y ON t3(y);");
 
 -- Debug.
diff --git a/test/sql/delete.result b/test/sql/delete.result
index 993e9e04d9895b9ff053e161aacb9027ebce2994..9071434091e22168b713851929dd0b2530d3ddb2 100644
--- a/test/sql/delete.result
+++ b/test/sql/delete.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 ---
 ...
 -- Debug
@@ -67,7 +67,7 @@ box.sql.execute("TRUNCATE TABLE \"_sql_stat1\";")
 ---
 - error: Can't truncate a system space, space '_sql_stat1'
 ...
-box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT, b STR);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT, b TEXT);")
 ---
 ...
 box.sql.execute("INSERT INTO t1 VALUES(1, 1, 'one');")
diff --git a/test/sql/delete.test.lua b/test/sql/delete.test.lua
index 0477d227c84efa6ce4d6b477e97c7c0a68ccf63a..5a0813071fac83a8ac9febaddf97572fd2d221ca 100644
--- a/test/sql/delete.test.lua
+++ b/test/sql/delete.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
@@ -46,7 +46,7 @@ box.sql.execute("DROP TABLE t2;")
 -- can't truncate system table.
 box.sql.execute("TRUNCATE TABLE \"_sql_stat1\";")
 
-box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT, b STR);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT, b TEXT);")
 box.sql.execute("INSERT INTO t1 VALUES(1, 1, 'one');")
 box.sql.execute("INSERT INTO t1 VALUES(2, 2, 'two');")
 
diff --git a/test/sql/drop-index.result b/test/sql/drop-index.result
index 2aaddac283bc24f9fe7e667135270d40d67010eb..8cd667bec7b8b366fdb774321b82166bbdf443df 100644
--- a/test/sql/drop-index.result
+++ b/test/sql/drop-index.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzoobar (c1 NUM, c2 INT PRIMARY KEY, c3 TEXT, c4 NUM)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zzoobar(c1, c4)")
diff --git a/test/sql/drop-index.test.lua b/test/sql/drop-index.test.lua
index 8bb51e157fcd7e39830b4bd5e10fcddc0256e481..4fa7b98674f0970f0585de84888416414a924c77 100644
--- a/test/sql/drop-index.test.lua
+++ b/test/sql/drop-index.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzoobar (c1 NUM, c2 INT PRIMARY KEY, c3 TEXT, c4 NUM)")
 
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zzoobar(c1, c4)")
 box.sql.execute("CREATE        INDEX zoobar3 ON zzoobar(c3)")
diff --git a/test/sql/drop-table.result b/test/sql/drop-table.result
index 1b941712ccc8aa2cbeafabc7468cae45e4a8e1d0..29318a8f92b5af2365b7fad10eb999ff16f29230 100644
--- a/test/sql/drop-table.result
+++ b/test/sql/drop-table.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zzzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzzoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 ---
 ...
 -- Debug
@@ -126,7 +126,7 @@ box.session.su('tmp')
 --
 -- Error: user do not have rights to write in _sequence.
 --
-box.sql.execute('CREATE TABLE t2 (id INT PRIMARY KEY AUTOINCREMENT, a UNIQUE, b UNIQUE, c UNIQUE, d UNIQUE)')
+box.sql.execute('CREATE TABLE t2 (id INT PRIMARY KEY AUTOINCREMENT, a INT UNIQUE, b INT UNIQUE, c INT UNIQUE, d INT UNIQUE)')
 ---
 - error: Write access to space '_sequence' is denied for user 'tmp'
 ...
@@ -167,7 +167,7 @@ box.sql.execute('CREATE TABLE t3(a INTEGER PRIMARY KEY);')
 --
 -- Error: Failed to create foreign key constraint.
 --
-box.sql.execute('CREATE TABLE t4(x INTEGER PRIMARY KEY REFERENCES t3, a INT UNIQUE, c INT REFERENCES t3);')
+box.sql.execute('CREATE TABLE t4(x INTEGER PRIMARY KEY REFERENCES t3, a INT UNIQUE, c TEXT REFERENCES t3);')
 ---
 - error: 'Failed to create foreign key constraint ''FK_CONSTRAINT_2_T4'': field type
     mismatch'
diff --git a/test/sql/drop-table.test.lua b/test/sql/drop-table.test.lua
index fadb6d42bb906bb465b201d3a1e20a2d2ba5ac8c..808e8fe52aa5a9ca795f4318bb29929cbc7dbf80 100644
--- a/test/sql/drop-table.test.lua
+++ b/test/sql/drop-table.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zzzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzzoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)")
@@ -80,7 +80,7 @@ box.session.su('tmp')
 --
 -- Error: user do not have rights to write in _sequence.
 --
-box.sql.execute('CREATE TABLE t2 (id INT PRIMARY KEY AUTOINCREMENT, a UNIQUE, b UNIQUE, c UNIQUE, d UNIQUE)')
+box.sql.execute('CREATE TABLE t2 (id INT PRIMARY KEY AUTOINCREMENT, a INT UNIQUE, b INT UNIQUE, c INT UNIQUE, d INT UNIQUE)')
 
 box.session.su('admin')
 
@@ -104,7 +104,7 @@ box.sql.execute('CREATE TABLE t3(a INTEGER PRIMARY KEY);')
 --
 -- Error: Failed to create foreign key constraint.
 --
-box.sql.execute('CREATE TABLE t4(x INTEGER PRIMARY KEY REFERENCES t3, a INT UNIQUE, c INT REFERENCES t3);')
+box.sql.execute('CREATE TABLE t4(x INTEGER PRIMARY KEY REFERENCES t3, a INT UNIQUE, c TEXT REFERENCES t3);')
 box.sql.execute('DROP TABLE t3;')
 
 --
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index a0ba60f45bd57bccd2f39f4cd50b7ceac5052737..2bcfdb7dbdb2e150192de2cae660eced1c74cfbe 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -16,7 +16,7 @@ errinj = box.error.injection
 fiber = require('fiber')
 ---
 ...
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 ---
 ...
 box.schema.user.grant('guest','read,write,execute', 'universe')
@@ -202,7 +202,7 @@ box.sql.execute("DROP TABLE t2;")
 -- Tests which are aimed at verifying work of commit/rollback
 -- triggers on _fk_constraint space.
 --
-box.sql.execute("CREATE TABLE t3 (id PRIMARY KEY, a REFERENCES t3, b INT UNIQUE);")
+box.sql.execute("CREATE TABLE t3 (id NUMERIC PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);")
 ---
 ...
 t = box.space._fk_constraint:select{}[1]:totable()
diff --git a/test/sql/errinj.test.lua b/test/sql/errinj.test.lua
index 25d73f0c278d384d65250f32f551c87fda561046..fa7f9f2d63d7ea128784a60c7977caa7f0624d29 100644
--- a/test/sql/errinj.test.lua
+++ b/test/sql/errinj.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 errinj = box.error.injection
 fiber = require('fiber')
 
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 box.schema.user.grant('guest','read,write,execute', 'universe')
 cn = remote.connect(box.cfg.listen)
 cn:ping()
@@ -75,7 +75,7 @@ box.sql.execute("DROP TABLE t2;")
 -- Tests which are aimed at verifying work of commit/rollback
 -- triggers on _fk_constraint space.
 --
-box.sql.execute("CREATE TABLE t3 (id PRIMARY KEY, a REFERENCES t3, b INT UNIQUE);")
+box.sql.execute("CREATE TABLE t3 (id NUMERIC PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);")
 t = box.space._fk_constraint:select{}[1]:totable()
 errinj = box.error.injection
 errinj.set("ERRINJ_WAL_IO", true)
diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
index f33b49a03954cb8d1c9018b9ccc335992f09c044..b6d23a554b6d447427c054e896e4740dff93728b 100644
--- a/test/sql/foreign-keys.result
+++ b/test/sql/foreign-keys.result
@@ -149,13 +149,8 @@ box.space._fk_constraint:insert(t)
 -- Temporary, in SQL all fields except for INTEGER PRIMARY KEY
 -- are scalar.
 --
-t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {1}, {0}}
----
-...
-box.space._fk_constraint:insert(t)
----
-- error: 'Failed to create foreign key constraint ''fk_1'': field type mismatch'
-...
+--t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {1}, {0}}
+--box.space._fk_constraint:insert(t)
 -- Each referenced column must appear once.
 --
 t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {0, 1}, {1, 1}}
diff --git a/test/sql/foreign-keys.test.lua b/test/sql/foreign-keys.test.lua
index 8d27aa00e0d91aef3eca9607b13f38dff084d220..677f3b1f45a286bb99aa849c6c2ea7fbab9b106c 100644
--- a/test/sql/foreign-keys.test.lua
+++ b/test/sql/foreign-keys.test.lua
@@ -68,8 +68,8 @@ box.space._fk_constraint:insert(t)
 -- Temporary, in SQL all fields except for INTEGER PRIMARY KEY
 -- are scalar.
 --
-t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {1}, {0}}
-box.space._fk_constraint:insert(t)
+--t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {1}, {0}}
+--box.space._fk_constraint:insert(t)
 
 -- Each referenced column must appear once.
 --
diff --git a/test/sql/gh-2929-primary-key.result b/test/sql/gh-2929-primary-key.result
index 66a9b96e34808b69393c5e715b25bcbebf0b87ba..5d95d4182f959034034786bdf48b25fd1e6cf1e7 100644
--- a/test/sql/gh-2929-primary-key.result
+++ b/test/sql/gh-2929-primary-key.result
@@ -13,22 +13,22 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 box.cfg{}
 ---
 ...
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b UNIQUE)")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE)")
 ---
 ...
-box.sql.execute("CREATE TABLE t2(a UNIQUE, b)")
+box.sql.execute("CREATE TABLE t2(a INT UNIQUE, b INT)")
 ---
 - error: PRIMARY KEY missing on table T2
 ...
-box.sql.execute("CREATE TABLE t3(a)")
+box.sql.execute("CREATE TABLE t3(a NUM)")
 ---
 - error: PRIMARY KEY missing on table T3
 ...
-box.sql.execute("CREATE TABLE t4(a, b)")
+box.sql.execute("CREATE TABLE t4(a DECIMAL, b TEXT)")
 ---
 - error: PRIMARY KEY missing on table T4
 ...
-box.sql.execute("CREATE TABLE t5(a, b UNIQUE)")
+box.sql.execute("CREATE TABLE t5(a DECIMAL, b NUM UNIQUE)")
 ---
 - error: PRIMARY KEY missing on table T5
 ...
diff --git a/test/sql/gh-2929-primary-key.test.lua b/test/sql/gh-2929-primary-key.test.lua
index 0e05354968ce4ec5f1c7d000e445dec353158d05..a1446b2e5aff06c9fbe00704c117a4c85b49ae26 100644
--- a/test/sql/gh-2929-primary-key.test.lua
+++ b/test/sql/gh-2929-primary-key.test.lua
@@ -8,12 +8,12 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 box.cfg{}
 
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b UNIQUE)")
-box.sql.execute("CREATE TABLE t2(a UNIQUE, b)")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE)")
+box.sql.execute("CREATE TABLE t2(a INT UNIQUE, b INT)")
 
-box.sql.execute("CREATE TABLE t3(a)")
-box.sql.execute("CREATE TABLE t4(a, b)")
-box.sql.execute("CREATE TABLE t5(a, b UNIQUE)")
+box.sql.execute("CREATE TABLE t3(a NUM)")
+box.sql.execute("CREATE TABLE t4(a DECIMAL, b TEXT)")
+box.sql.execute("CREATE TABLE t5(a DECIMAL, b NUM UNIQUE)")
 
 box.sql.execute("DROP TABLE t1")
 
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index 9d715e8cdb5a96e04c1e857ab66ca7c94b150a98..fff6abf92777576cf2d83e9af4196d0138281ab5 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -14,7 +14,7 @@ fiber = require('fiber')
 -- executing SQL queries.
 --
 -- box.cfg()
-box.sql.execute('CREATE TABLE test (id PRIMARY KEY, x INTEGER, y INTEGER)')
+box.sql.execute('CREATE TABLE test (id INT PRIMARY KEY, x INTEGER, y INTEGER)')
 ---
 ...
 box.sql.execute('INSERT INTO test VALUES (1, 1, 1), (2, 2, 2)')
@@ -53,7 +53,7 @@ fiber.info()[fiber.self().id()].memory.used
 ---
 - 0
 ...
-box.sql.execute('CREATE TABLE test2 (id PRIMARY KEY, a TEXT, b INTEGER)')
+box.sql.execute('CREATE TABLE test2 (id INT PRIMARY KEY, a TEXT, b INTEGER)')
 ---
 ...
 box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
@@ -62,12 +62,12 @@ box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
 box.sql.execute('INSERT INTO test2 VALUES (3, \'test\', 3), (4, \'xx\', 4)')
 ---
 ...
-box.sql.execute('SELECT a, id + 2 * a, b FROM test2 WHERE b < id * 2 ORDER BY a ')
+box.sql.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
 ---
-- - ['abc', 1, 1]
-  - ['hello', 2, 2]
-  - ['test', 3, 3]
-  - ['xx', 4, 4]
+- - ['abc', 3, 1]
+  - ['hello', 4, 2]
+  - ['test', 5, 3]
+  - ['xx', 6, 4]
 ...
 fiber.info()[fiber.self().id()].memory.used
 ---
diff --git a/test/sql/gh-3199-no-mem-leaks.test.lua b/test/sql/gh-3199-no-mem-leaks.test.lua
index 138166bad3a3740ae4fa05df49c6431ef4115ef9..1954e34be6c918ea75a832fd19ec29ce61d4950c 100644
--- a/test/sql/gh-3199-no-mem-leaks.test.lua
+++ b/test/sql/gh-3199-no-mem-leaks.test.lua
@@ -10,7 +10,7 @@ fiber = require('fiber')
 -- box.cfg()
 
 
-box.sql.execute('CREATE TABLE test (id PRIMARY KEY, x INTEGER, y INTEGER)')
+box.sql.execute('CREATE TABLE test (id INT PRIMARY KEY, x INTEGER, y INTEGER)')
 box.sql.execute('INSERT INTO test VALUES (1, 1, 1), (2, 2, 2)')
 box.sql.execute('SELECT x, y, x + y FROM test ORDER BY y')
 
@@ -23,10 +23,10 @@ box.sql.execute('SELECT x, y, x + y FROM test ORDER BY y')
 
 fiber.info()[fiber.self().id()].memory.used
 
-box.sql.execute('CREATE TABLE test2 (id PRIMARY KEY, a TEXT, b INTEGER)')
+box.sql.execute('CREATE TABLE test2 (id INT PRIMARY KEY, a TEXT, b INTEGER)')
 box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
 box.sql.execute('INSERT INTO test2 VALUES (3, \'test\', 3), (4, \'xx\', 4)')
-box.sql.execute('SELECT a, id + 2 * a, b FROM test2 WHERE b < id * 2 ORDER BY a ')
+box.sql.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
 
 fiber.info()[fiber.self().id()].memory.used
 
diff --git a/test/sql/gh2141-delete-trigger-drop-table.result b/test/sql/gh2141-delete-trigger-drop-table.result
index c1b64d11f26d8ed6c3554595c6c245f8a02955cc..82ff51a537e6bf75b94c186462f7f3adbd08a266 100644
--- a/test/sql/gh2141-delete-trigger-drop-table.result
+++ b/test/sql/gh2141-delete-trigger-drop-table.result
@@ -8,7 +8,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- create space
-box.sql.execute("CREATE TABLE t(id PRIMARY KEY)")
+box.sql.execute("CREATE TABLE t(id INT PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE TRIGGER tt_bu BEFORE UPDATE ON t BEGIN SELECT 1; END")
diff --git a/test/sql/gh2141-delete-trigger-drop-table.test.lua b/test/sql/gh2141-delete-trigger-drop-table.test.lua
index 19d3188a6ff64129b62affa78e0e82463073585e..be3adc3ccdd3758f356aae6a2e49d8e1f2ef8b23 100644
--- a/test/sql/gh2141-delete-trigger-drop-table.test.lua
+++ b/test/sql/gh2141-delete-trigger-drop-table.test.lua
@@ -3,7 +3,7 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- create space
-box.sql.execute("CREATE TABLE t(id PRIMARY KEY)")
+box.sql.execute("CREATE TABLE t(id INT PRIMARY KEY)")
 
 box.sql.execute("CREATE TRIGGER tt_bu BEFORE UPDATE ON t BEGIN SELECT 1; END")
 box.sql.execute("CREATE TRIGGER tt_au AFTER UPDATE ON t BEGIN SELECT 1; END")
diff --git a/test/sql/gh2251-multiple-update.result b/test/sql/gh2251-multiple-update.result
index 5e137eeb6c6b160bacb44e85529fea37bf6b4fb4..7066ca99f0a0206b2dadc7d95f2f6f0d45511780 100644
--- a/test/sql/gh2251-multiple-update.result
+++ b/test/sql/gh2251-multiple-update.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- box.cfg()
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);")
+box.sql.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);")
 ---
 ...
 box.sql.execute("INSERT INTO t1 VALUES(1,4,6);")
@@ -26,7 +26,7 @@ box.sql.execute("SELECT e FROM t1")
 - - [7]
   - [8]
 ...
-box.sql.execute("CREATE TABLE t2(a integer primary key, b UNIQUE, c, d, e,  UNIQUE(c,d));")
+box.sql.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c NUM, d NUM, e INT,  UNIQUE(c,d));")
 ---
 ...
 box.sql.execute("INSERT INTO t2 VALUES(1,2,3,4,5);")
diff --git a/test/sql/gh2251-multiple-update.test.lua b/test/sql/gh2251-multiple-update.test.lua
index 0166a17864bc791379f8204f5ee70e62a33f8091..6107125d782a5150421fa1018e5725cd28a44fe7 100644
--- a/test/sql/gh2251-multiple-update.test.lua
+++ b/test/sql/gh2251-multiple-update.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- box.cfg()
 
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);")
+box.sql.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);")
 box.sql.execute("INSERT INTO t1 VALUES(1,4,6);")
 box.sql.execute("INSERT INTO t1 VALUES(2,5,7);")
 
@@ -13,7 +13,7 @@ box.sql.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);")
 
 box.sql.execute("SELECT e FROM t1")
 
-box.sql.execute("CREATE TABLE t2(a integer primary key, b UNIQUE, c, d, e,  UNIQUE(c,d));")
+box.sql.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c NUM, d NUM, e INT,  UNIQUE(c,d));")
 box.sql.execute("INSERT INTO t2 VALUES(1,2,3,4,5);")
 box.sql.execute("INSERT INTO t2 VALUES(2,3,4,4,6);")
 
diff --git a/test/sql/gh2808-inline-unique-persistency-check.result b/test/sql/gh2808-inline-unique-persistency-check.result
index fdd000f3d2dd5316d501e8d5e96a00616294f758..6754af6e7b2206a5116bc957d77954c81f581748 100644
--- a/test/sql/gh2808-inline-unique-persistency-check.result
+++ b/test/sql/gh2808-inline-unique-persistency-check.result
@@ -12,7 +12,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- Create a table and insert a datum
-box.sql.execute([[CREATE TABLE t1(a PRIMARY KEY, b, UNIQUE(b));]])
+box.sql.execute([[CREATE TABLE t1(a INT PRIMARY KEY, b INT, UNIQUE(b));]])
 ---
 ...
 box.sql.execute([[INSERT INTO t1 VALUES(1,2);]])
diff --git a/test/sql/gh2808-inline-unique-persistency-check.test.lua b/test/sql/gh2808-inline-unique-persistency-check.test.lua
index eb4e051dc0e81efb1fa917860c9e52d5f2676978..81e2af5e74438222420eae407965cd84110dee23 100644
--- a/test/sql/gh2808-inline-unique-persistency-check.test.lua
+++ b/test/sql/gh2808-inline-unique-persistency-check.test.lua
@@ -5,7 +5,7 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- Create a table and insert a datum
-box.sql.execute([[CREATE TABLE t1(a PRIMARY KEY, b, UNIQUE(b));]])
+box.sql.execute([[CREATE TABLE t1(a INT PRIMARY KEY, b INT, UNIQUE(b));]])
 box.sql.execute([[INSERT INTO t1 VALUES(1,2);]])
 
 -- Sanity check
diff --git a/test/sql/insert-unique.result b/test/sql/insert-unique.result
index 797c8eff5ac0584110a4518bbbc1c8aaaf6fd5dc..adfa60ff417e5d363b6c05afa81f3c66e3393761 100644
--- a/test/sql/insert-unique.result
+++ b/test/sql/insert-unique.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
diff --git a/test/sql/insert-unique.test.lua b/test/sql/insert-unique.test.lua
index a004c57b41474b25e5b1dc3d27e47b12fbb5688b..b44a6e24732f82afa80e380cac1210af13563e54 100644
--- a/test/sql/insert-unique.test.lua
+++ b/test/sql/insert-unique.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)")
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
 
 -- Debug
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index ee34f6fc1e97a38718d0ecbe71829c4382e1b154..3baa99ae6a6089beb2108f4bf74bb7b00188975c 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -10,7 +10,7 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 ---
 ...
 space = box.space.TEST
@@ -331,7 +331,7 @@ cn:execute('select :value', parameters)
 - error: Bind value type MAP for parameter ':value' is not supported
 ...
 -- gh-2608 SQL iproto DDL
-cn:execute('create table test2(id primary key, a, b, c)')
+cn:execute('create table test2(id int primary key, a int, b int, c int)')
 ---
 - rowcount: 1
 ...
@@ -371,7 +371,7 @@ box.space.TEST2
 ...
 -- gh-2617 DDL row_count either 0 or 1.
 -- Test CREATE [IF NOT EXISTS] TABLE.
-cn:execute('create table test3(id primary key, a, b)')
+cn:execute('create table test3(id int primary key, a int, b int)')
 ---
 - rowcount: 1
 ...
@@ -381,7 +381,7 @@ cn:execute('insert into test3 values (1, 1, 1), (2, 2, 2), (3, 3, 3)')
 ---
 - rowcount: 3
 ...
-cn:execute('create table if not exists test3(id primary key)')
+cn:execute('create table if not exists test3(id int primary key)')
 ---
 - rowcount: 0
 ...
diff --git a/test/sql/iproto.test.lua b/test/sql/iproto.test.lua
index b0655907579c7ed5d7c344adea4f692273e8c7c8..ee581ce44b0a70730f22535996eac5d077ca7390 100644
--- a/test/sql/iproto.test.lua
+++ b/test/sql/iproto.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 space = box.space.TEST
 space:replace{1, 2, '3'}
 space:replace{4, 5, '6'}
@@ -116,7 +116,7 @@ parameters[1][':value'] = {kek = 300}
 cn:execute('select :value', parameters)
 
 -- gh-2608 SQL iproto DDL
-cn:execute('create table test2(id primary key, a, b, c)')
+cn:execute('create table test2(id int primary key, a int, b int, c int)')
 box.space.TEST2.name
 cn:execute('insert into test2 values (1, 1, 1, 1)')
 cn:execute('select * from test2')
@@ -128,11 +128,11 @@ box.space.TEST2
 -- gh-2617 DDL row_count either 0 or 1.
 
 -- Test CREATE [IF NOT EXISTS] TABLE.
-cn:execute('create table test3(id primary key, a, b)')
+cn:execute('create table test3(id int primary key, a int, b int)')
 -- Rowcount = 1, although two tuples were created:
 -- for _space and for _index.
 cn:execute('insert into test3 values (1, 1, 1), (2, 2, 2), (3, 3, 3)')
-cn:execute('create table if not exists test3(id primary key)')
+cn:execute('create table if not exists test3(id int primary key)')
 
 -- Test CREATE VIEW [IF NOT EXISTS] and
 --      DROP   VIEW [IF EXISTS].
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index b1076332d200fd05090a97d7f586d2dd9d5188bc..c4b590095fc60131dbdff76a84c192326f0d23e4 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -10,7 +10,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 -- create space
 -- scalar affinity
-box.sql.execute("CREATE TABLE test1 (f1, f2 INT, PRIMARY KEY(f1))")
+box.sql.execute("CREATE TABLE test1 (f1 INT, f2 INT, PRIMARY KEY(f1))")
 ---
 ...
 box.sql.execute("CREATE INDEX test1_index ON test1 (f2)")
diff --git a/test/sql/max-on-index.test.lua b/test/sql/max-on-index.test.lua
index b879e388fbcdb3e267d3eb997546165f9d6fabd8..7d89c3acda7c4c68cb946d1180e6cf4e0a834765 100644
--- a/test/sql/max-on-index.test.lua
+++ b/test/sql/max-on-index.test.lua
@@ -6,7 +6,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- create space
 -- scalar affinity
-box.sql.execute("CREATE TABLE test1 (f1, f2 INT, PRIMARY KEY(f1))")
+box.sql.execute("CREATE TABLE test1 (f1 INT, f2 INT, PRIMARY KEY(f1))")
 box.sql.execute("CREATE INDEX test1_index ON test1 (f2)")
 
 -- integer affinity
diff --git a/test/sql/misc.result b/test/sql/misc.result
index 93b383a8ffa62535fe553f79a8b23e5ab4f9f799..ef104c1c5a4d7f2aa9e82bdf9a76e6c803369960 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -16,7 +16,7 @@ box.sql.execute('select 1; select 2;')
 ---
 - error: keyword "select" is reserved
 ...
-box.sql.execute('create table t1 (id primary key); select 100;')
+box.sql.execute('create table t1 (id INT primary key); select 100;')
 ---
 - error: keyword "select" is reserved
 ...
diff --git a/test/sql/misc.test.lua b/test/sql/misc.test.lua
index 1ed01987494c1eb212fda255c85aeb2253acfbf3..994e64f3affaa0acc3d8d321d3f0a2182895934d 100644
--- a/test/sql/misc.test.lua
+++ b/test/sql/misc.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- Forbid multistatement queries.
 box.sql.execute('select 1;')
 box.sql.execute('select 1; select 2;')
-box.sql.execute('create table t1 (id primary key); select 100;')
+box.sql.execute('create table t1 (id INT primary key); select 100;')
 box.space.t1 == nil
 box.sql.execute(';')
 box.sql.execute('')
diff --git a/test/sql/on-conflict.result b/test/sql/on-conflict.result
index 63fe48e79f24e9a03e7a77e2b80d85eea43e8604..731f03c663838e239075b4fbff50056746e81f42 100644
--- a/test/sql/on-conflict.result
+++ b/test/sql/on-conflict.result
@@ -41,7 +41,7 @@ box.sql.execute("CREATE TABLE t2(a INT PRIMARY KEY ON CONFLICT IGNORE)")
 ...
 -- CHECK constraint is illegal with REPLACE option.
 --
-box.sql.execute("CREATE TABLE t (id INTEGER PRIMARY KEY, a CHECK (a > 5) ON CONFLICT REPLACE);")
+box.sql.execute("CREATE TABLE t (id INTEGER PRIMARY KEY, a INTEGER CHECK (a > 5) ON CONFLICT REPLACE);")
 ---
 - error: keyword "ON" is reserved
 ...
@@ -67,7 +67,7 @@ box.sql.execute("CREATE TABLE test (a int, b int NULL, c int, PRIMARY KEY(a, b,
 ...
 -- Several NOT NULL REPLACE constraints work
 --
-box.sql.execute("CREATE TABLE a (id INT PRIMARY KEY, a NOT NULL ON CONFLICT REPLACE DEFAULT 1, b NOT NULL ON CONFLICT REPLACE DEFAULT 2);")
+box.sql.execute("CREATE TABLE a (id INT PRIMARY KEY, a INT NOT NULL ON CONFLICT REPLACE DEFAULT 1, b INT NOT NULL ON CONFLICT REPLACE DEFAULT 2);")
 ---
 ...
 box.sql.execute("INSERT INTO a VALUES(1, NULL, NULL);")
diff --git a/test/sql/on-conflict.test.lua b/test/sql/on-conflict.test.lua
index b2d8e0589f04dbd7254d9628a11abeaa7d4514ef..aa58b854b8b6b2a8465c7571227a1cd132883720 100644
--- a/test/sql/on-conflict.test.lua
+++ b/test/sql/on-conflict.test.lua
@@ -15,7 +15,7 @@ box.sql.execute("CREATE TABLE t2(a INT PRIMARY KEY ON CONFLICT IGNORE)")
 
 -- CHECK constraint is illegal with REPLACE option.
 --
-box.sql.execute("CREATE TABLE t (id INTEGER PRIMARY KEY, a CHECK (a > 5) ON CONFLICT REPLACE);")
+box.sql.execute("CREATE TABLE t (id INTEGER PRIMARY KEY, a INTEGER CHECK (a > 5) ON CONFLICT REPLACE);")
 
 --
 -- gh-3473: Primary key can't be declared with NULL.
@@ -27,7 +27,7 @@ box.sql.execute("CREATE TABLE test (a int, b int NULL, c int, PRIMARY KEY(a, b,
 
 -- Several NOT NULL REPLACE constraints work
 --
-box.sql.execute("CREATE TABLE a (id INT PRIMARY KEY, a NOT NULL ON CONFLICT REPLACE DEFAULT 1, b NOT NULL ON CONFLICT REPLACE DEFAULT 2);")
+box.sql.execute("CREATE TABLE a (id INT PRIMARY KEY, a INT NOT NULL ON CONFLICT REPLACE DEFAULT 1, b INT NOT NULL ON CONFLICT REPLACE DEFAULT 2);")
 box.sql.execute("INSERT INTO a VALUES(1, NULL, NULL);")
 box.sql.execute("INSERT INTO a VALUES(2, NULL, NULL);")
 box.sql.execute("SELECT * FROM a;")
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index c65baa08ec452ea47ecbda80eefeee253c5c1f5c..36a7d555ba76a98414e174f268e539b542d9a48a 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -11,7 +11,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
 ---
 ...
 -- prepare data
@@ -125,7 +125,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 ...
 -- multi-index
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
@@ -151,7 +151,7 @@ box.sql.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
         INTO barfoo VALUES (''trigger test'', 9999); END'}]
 ...
 -- Many entries
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 ---
 ...
 box.sql.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
@@ -180,10 +180,11 @@ box.sql.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
 -- ... functional
 box.sql.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
 ---
+- error: datatype mismatch
 ...
 box.sql.execute("SELECT * FROM barfoo WHERE foo = 9999");
 ---
-- - ['trigger test', 9999]
+- []
 ...
 -- and still persistent
 box.sql.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
@@ -215,13 +216,11 @@ box.sql.execute("SELECT * FROM barfoo")
 - - ['foo', 1]
   - ['bar', 2]
   - ['foobar', 1000]
-  - ['trigger test', 9999]
 ...
 box.sql.execute("SELECT * FROM foobar");
 ---
 - - [2, 'bar']
   - [1000, 'foobar']
-  - ['foobar trigger test', 8888]
 ...
 box.sql.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
 ---
diff --git a/test/sql/persistency.test.lua b/test/sql/persistency.test.lua
index 417d8c098216d5730c6ae6ae785eb6dd6deaba83..e7b137b444c5a748388a724fad2d82ccdfd99ed1 100644
--- a/test/sql/persistency.test.lua
+++ b/test/sql/persistency.test.lua
@@ -4,7 +4,7 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
 
 -- prepare data
 box.sql.execute("INSERT INTO foobar VALUES (1, 'foo')")
@@ -41,7 +41,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 -- multi-index
 
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)")
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
 
 -- prepare data
@@ -54,7 +54,7 @@ box.sql.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar BEGIN INSERT INTO
 box.sql.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
 
 -- Many entries
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 box.sql.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
 box.sql.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
 
diff --git a/test/sql/select-null.result b/test/sql/select-null.result
index 53bef1b508dc95a88d15813f69e0652618160683..5ea23d067ca11a75543ec86d93abd57cb55e3b2e 100644
--- a/test/sql/select-null.result
+++ b/test/sql/select-null.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t3(id INT, a, b, PRIMARY KEY(id))")
+box.sql.execute("CREATE TABLE t3(id INT, a text, b TEXT, PRIMARY KEY(id))")
 ---
 ...
 -- Debug
diff --git a/test/sql/select-null.test.lua b/test/sql/select-null.test.lua
index 3e9cb816df8089686b2d1b60e71a1e32117bc425..ccbc030c555adb557ea72e411a4cb3fccbcb4709 100644
--- a/test/sql/select-null.test.lua
+++ b/test/sql/select-null.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t3(id INT, a, b, PRIMARY KEY(id))")
+box.sql.execute("CREATE TABLE t3(id INT, a text, b TEXT, PRIMARY KEY(id))")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/sql-statN-index-drop.result b/test/sql/sql-statN-index-drop.result
index a751eca678f00f22d8f9bdffe4bd2915289c0099..7605951883a0e4ec8307b50d7c2943bd27cadb0a 100644
--- a/test/sql/sql-statN-index-drop.result
+++ b/test/sql/sql-statN-index-drop.result
@@ -8,10 +8,10 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- Initializing some things.
-box.sql.execute("CREATE TABLE t1(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);")
 ---
 ...
-box.sql.execute("CREATE TABLE t2(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);")
 ---
 ...
 box.sql.execute("CREATE INDEX i1 ON t1(a);")
@@ -70,10 +70,10 @@ box.sql.execute("DROP TABLE t2;")
 ---
 ...
 -- Same test but dropping an INDEX ON t2.
-box.sql.execute("CREATE TABLE t1(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);")
 ---
 ...
-box.sql.execute("CREATE TABLE t2(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);")
 ---
 ...
 box.sql.execute("CREATE INDEX i1 ON t1(a);")
diff --git a/test/sql/sql-statN-index-drop.test.lua b/test/sql/sql-statN-index-drop.test.lua
index fe7e15b5744fc733817a0c3fa82c08fc164be7da..35f22910c7b9e1679267949f363ecc3f026cde14 100644
--- a/test/sql/sql-statN-index-drop.test.lua
+++ b/test/sql/sql-statN-index-drop.test.lua
@@ -3,8 +3,8 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- Initializing some things.
-box.sql.execute("CREATE TABLE t1(id PRIMARY KEY, a);")
-box.sql.execute("CREATE TABLE t2(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);")
+box.sql.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);")
 box.sql.execute("CREATE INDEX i1 ON t1(a);")
 box.sql.execute("CREATE INDEX i1 ON t2(a);")
 box.sql.execute("INSERT INTO t1 VALUES(1, 2);")
@@ -30,8 +30,8 @@ box.sql.execute("DROP TABLE t2;")
 
 -- Same test but dropping an INDEX ON t2.
 
-box.sql.execute("CREATE TABLE t1(id PRIMARY KEY, a);")
-box.sql.execute("CREATE TABLE t2(id PRIMARY KEY, a);")
+box.sql.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);")
+box.sql.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);")
 box.sql.execute("CREATE INDEX i1 ON t1(a);")
 box.sql.execute("CREATE INDEX i1 ON t2(a);")
 box.sql.execute("INSERT INTO t1 VALUES(1, 2);")
diff --git a/test/sql/transition.result b/test/sql/transition.result
index 805e8aa6c8d1937e5b8cd3da1bef32f9ed72ae50..04721596aa92bc81dde7504b2926c2e6e9d9a1eb 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -8,7 +8,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ---
 ...
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
 ---
 ...
 -- prepare data
@@ -122,7 +122,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 ...
 -- multi-index
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
@@ -178,17 +178,12 @@ box.sql.execute("DROP TABLE barfoo")
 ---
 ...
 -- attempt to create a table lacking PRIMARY KEY
-box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x)")
+box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x BLOB)")
 ---
 - error: PRIMARY KEY missing on table WITHOUT_ROWID_LACKING_PRIMARY_KEY
 ...
--- attempt to create a table lacking WITHOUT ROWID clause
-box.sql.execute("CREATE TABLE rowid(x)")
----
-- error: PRIMARY KEY missing on table ROWID
-...
 -- create a table with implicit indices (used to SEGFAULT)
-box.sql.execute("CREATE TABLE implicit_indices(a PRIMARY KEY,b,c,d UNIQUE)")
+box.sql.execute("CREATE TABLE implicit_indices(a INT PRIMARY KEY,b INT,c INT,d TEXT UNIQUE)")
 ---
 ...
 box.sql.execute("DROP TABLE implicit_indices")
diff --git a/test/sql/transition.test.lua b/test/sql/transition.test.lua
index cae45aa17a546573d83dd9f171b4c69164e6001c..5a7010d93177795ea1c46ff364e1491b2113305e 100644
--- a/test/sql/transition.test.lua
+++ b/test/sql/transition.test.lua
@@ -3,7 +3,7 @@ engine = test_run:get_cfg('engine')
 box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
 
 -- prepare data
 box.sql.execute("INSERT INTO foobar VALUES (1, 'foo')")
@@ -40,7 +40,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 -- multi-index
 
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)")
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
 
 -- prepare data
@@ -63,11 +63,8 @@ box.sql.execute("DROP TABLE foobar")
 box.sql.execute("DROP TABLE barfoo")
 
 -- attempt to create a table lacking PRIMARY KEY
-box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x)")
-
--- attempt to create a table lacking WITHOUT ROWID clause
-box.sql.execute("CREATE TABLE rowid(x)")
+box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x BLOB)")
 
 -- create a table with implicit indices (used to SEGFAULT)
-box.sql.execute("CREATE TABLE implicit_indices(a PRIMARY KEY,b,c,d UNIQUE)")
+box.sql.execute("CREATE TABLE implicit_indices(a INT PRIMARY KEY,b INT,c INT,d TEXT UNIQUE)")
 box.sql.execute("DROP TABLE implicit_indices")
diff --git a/test/sql/triggers.result b/test/sql/triggers.result
index f108a12f5ca85ab10b0b580c6738de0fb234c429..60e9a0ca87925153aa4c81e1801825aaafe20b67 100644
--- a/test/sql/triggers.result
+++ b/test/sql/triggers.result
@@ -197,7 +197,7 @@ immutable_part(box.space._trigger:select())
 - []
 ...
 -- Test target tables restricts.
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY,b);")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY,b INT);")
 ---
 ...
 space_id = box.space.T1.id
@@ -253,7 +253,7 @@ box.sql.execute("DROP TABLE T1;")
 box.sql.execute("PRAGMA sql_default_engine ('vinyl');")
 ---
 ...
-box.sql.execute("CREATE TABLE m (s1 SCALAR PRIMARY KEY);")
+box.sql.execute("CREATE TABLE m (s1 NUMERIC PRIMARY KEY);")
 ---
 ...
 box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = DATETIME('now'); END;")
@@ -262,10 +262,10 @@ box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE
 box.sql.execute("PRAGMA sql_default_engine('memtx');")
 ---
 ...
-box.sql.execute("CREATE TABLE n (s1 CHAR PRIMARY KEY, s2 char);")
+box.sql.execute("CREATE TABLE n (s1 TEXT PRIMARY KEY, s2 TEXT);")
 ---
 ...
-box.sql.execute("INSERT INTO m VALUES ('');")
+box.sql.execute("INSERT INTO m VALUES (0);")
 ---
 ...
 box.sql.execute("INSERT INTO n VALUES ('',null);")
@@ -289,7 +289,7 @@ box.sql.execute("DROP TABLE n;")
 box.sql.execute("PRAGMA sql_default_engine ('memtx');")
 ---
 ...
-box.sql.execute("CREATE TABLE m (s1 SCALAR PRIMARY KEY);")
+box.sql.execute("CREATE TABLE m (s1 NUMERIC PRIMARY KEY);")
 ---
 ...
 box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = DATETIME('now'); END;")
@@ -298,10 +298,10 @@ box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE
 box.sql.execute("PRAGMA sql_default_engine('vinyl');")
 ---
 ...
-box.sql.execute("CREATE TABLE n (s1 CHAR PRIMARY KEY, s2 char);")
+box.sql.execute("CREATE TABLE n (s1 TEXT PRIMARY KEY, s2 TEXT);")
 ---
 ...
-box.sql.execute("INSERT INTO m VALUES ('');")
+box.sql.execute("INSERT INTO m VALUES (0);")
 ---
 ...
 box.sql.execute("INSERT INTO n VALUES ('',null);")
diff --git a/test/sql/triggers.test.lua b/test/sql/triggers.test.lua
index 88243f9b72e921f294a3f7859cb3f4e775453339..243e9fc0b3d6799bdaa9e441938ba71b96a782a2 100644
--- a/test/sql/triggers.test.lua
+++ b/test/sql/triggers.test.lua
@@ -74,7 +74,7 @@ box.sql.execute("DROP TABLE t2;")
 immutable_part(box.space._trigger:select())
 
 -- Test target tables restricts.
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY,b);")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY,b INT);")
 space_id = box.space.T1.id
 
 tuple = {"T1T", space_id, {sql = [[create trigger t1t instead of update on t1 for each row begin delete from t1 WHERE a=old.a+2; end;]]}}
@@ -101,11 +101,11 @@ box.sql.execute("DROP TABLE T1;")
 --
 -- Case 1: Src 'vinyl' table; Dst 'memtx' table
 box.sql.execute("PRAGMA sql_default_engine ('vinyl');")
-box.sql.execute("CREATE TABLE m (s1 SCALAR PRIMARY KEY);")
+box.sql.execute("CREATE TABLE m (s1 NUMERIC PRIMARY KEY);")
 box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = DATETIME('now'); END;")
 box.sql.execute("PRAGMA sql_default_engine('memtx');")
-box.sql.execute("CREATE TABLE n (s1 CHAR PRIMARY KEY, s2 char);")
-box.sql.execute("INSERT INTO m VALUES ('');")
+box.sql.execute("CREATE TABLE n (s1 TEXT PRIMARY KEY, s2 TEXT);")
+box.sql.execute("INSERT INTO m VALUES (0);")
 box.sql.execute("INSERT INTO n VALUES ('',null);")
 box.sql.execute("UPDATE m SET s1 = 'The Rain In Spain';")
 
@@ -117,11 +117,11 @@ box.sql.execute("DROP TABLE n;")
 
 -- Case 2: Src 'memtx' table; Dst 'vinyl' table
 box.sql.execute("PRAGMA sql_default_engine ('memtx');")
-box.sql.execute("CREATE TABLE m (s1 SCALAR PRIMARY KEY);")
+box.sql.execute("CREATE TABLE m (s1 NUMERIC PRIMARY KEY);")
 box.sql.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = DATETIME('now'); END;")
 box.sql.execute("PRAGMA sql_default_engine('vinyl');")
-box.sql.execute("CREATE TABLE n (s1 CHAR PRIMARY KEY, s2 char);")
-box.sql.execute("INSERT INTO m VALUES ('');")
+box.sql.execute("CREATE TABLE n (s1 TEXT PRIMARY KEY, s2 TEXT);")
+box.sql.execute("INSERT INTO m VALUES (0);")
 box.sql.execute("INSERT INTO n VALUES ('',null);")
 box.sql.execute("UPDATE m SET s1 = 'The Rain In Spain';")
 
diff --git a/test/sql/update-with-nested-select.result b/test/sql/update-with-nested-select.result
index 51825a21d2faacb18b7896659fc172b06e58b6cc..e75fe5dbb964e4fc649fe98ee54c8d9a72251cd5 100644
--- a/test/sql/update-with-nested-select.result
+++ b/test/sql/update-with-nested-select.result
@@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);");
 ---
 ...
 -- Debug
diff --git a/test/sql/update-with-nested-select.test.lua b/test/sql/update-with-nested-select.test.lua
index f9f9b7aadeaceb77c5e48dac98c9a44ad513eb98..8e508b1644384196060481dfdd6c698c9396eedd 100644
--- a/test/sql/update-with-nested-select.test.lua
+++ b/test/sql/update-with-nested-select.test.lua
@@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);");
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/view.result b/test/sql/view.result
index 2e4230429da6b28cb0637027c105341c21ea217b..b211bcb2e2eaa8081737a162e4ab19cc9388ad86 100644
--- a/test/sql/view.result
+++ b/test/sql/view.result
@@ -10,7 +10,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- Verify that constraints on 'view' option are working.
 -- box.cfg()
 -- Create space and view.
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 ---
 ...
 box.sql.execute("CREATE VIEW v1 AS SELECT a+b FROM t1;");
diff --git a/test/sql/view.test.lua b/test/sql/view.test.lua
index 1d73133a2acdd412b90dacf267b4b8fd75faa2c1..a6269a1bf3856f6fb6aaaeb475cbfbcfb2446293 100644
--- a/test/sql/view.test.lua
+++ b/test/sql/view.test.lua
@@ -7,7 +7,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
 -- box.cfg()
 
 -- Create space and view.
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 box.sql.execute("CREATE VIEW v1 AS SELECT a+b FROM t1;");
 
 -- View can't have any indexes.