Changeset: 2072c4a5a078 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2072c4a5a078
Modified Files:
        clients/mapiclient/dump.c
        clients/mapiclient/mclient.c
        clients/mapiclient/tomograph.c
        clients/odbc/driver/SQLColumns.c
        clients/odbc/driver/SQLExecute.c
        clients/odbc/driver/SQLSpecialColumns.c
        gdk/gdk_bbp.c
        gdk/gdk_logger.c
        sql/backends/monet5/sql_upgrades.c
        sql/common/sql_types.c
        sql/storage/store.c
Branch: default
Log Message:

Remove last vestiges (i.e. upgrade code) of the wrd type.


diffs (truncated from 438 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -370,13 +370,6 @@ dump_type(Mapi mid, stream *toConsole, c
 {
        int space = 0;
 
-       /* map wrd type to something legal */
-       if (strcmp(c_type, "wrd") == 0) {
-               if (strcmp(c_type_scale, "32") == 0)
-                       c_type = "int";
-               else
-                       c_type = "bigint";
-       }
        if (strcmp(c_type, "boolean") == 0) {
                space = mnstr_printf(toConsole, "BOOLEAN");
        } else if (strcmp(c_type, "int") == 0) {
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1452,7 +1452,6 @@ SQLrenderer(MapiHdl hdl, char singleinst
                         strcmp(s, "tinyint") == 0 ||
                         strcmp(s, "bigint") == 0 ||
                         strcmp(s, "hugeint") == 0 ||
-                        strcmp(s, "wrd") == 0 ||
                         strcmp(s, "oid") == 0 ||
                         strcmp(s, "smallint") == 0 ||
                         strcmp(s, "double") == 0 ||
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -351,7 +351,6 @@ base_colors[NUM_COLORS] = {
 /*     9 */    { 0, 0, "calc", "ifthenelse", 0 },
 /*     8 */    { 0, 0, "sql", "copy_from", 0 },
 /*     8 */    { 0, 0, "sql", "affectedRows", 0 },
-/*     8 */    { 0, 0, "calc", "wrd", 0 },
 /*     8 */    { 0, 0, "calc", "isnil", 0 },
 /*     7 */    { 0, 0, "bat", "append", 0 },
 /*     6 */    { 0, 0, "mat", "pack", 0 },
diff --git a/clients/odbc/driver/SQLColumns.c b/clients/odbc/driver/SQLColumns.c
--- a/clients/odbc/driver/SQLColumns.c
+++ b/clients/odbc/driver/SQLColumns.c
@@ -204,11 +204,6 @@ MNDBColumns(ODBCStmt *stmt,
                            "when 'timetz' then %d "
                            "when 'tinyint' then %d "
                            "when 'varchar' then %d "
-                           "when 'wrd' then "
-                                "case c.type_digits "
-                                     "when 32 then %d "
-                                     "when 64 then %d "
-                                "end "
                       "end as data_type, "
                       "case c.type "
                            "when 'bigint' then 'BIGINT' "
@@ -247,11 +242,6 @@ MNDBColumns(ODBCStmt *stmt,
                            "when 'timetz' then 'TIME' "
                            "when 'tinyint' then 'TINYINT' "
                            "when 'varchar' then 'VARCHAR' "
-                           "when 'wrd' then "
-                                "case c.type_digits "
-                                     "when 32 then 'INTEGER' "
-                                     "when 64 then 'BIGINT' "
-                                "end "
                       "end as type_name, "
                       "case c.type "
                            "when 'date' then 10 "
@@ -314,11 +304,6 @@ MNDBColumns(ODBCStmt *stmt,
                            "when 'timetz' then 12 "
                            "when 'tinyint' then 4 "
                            "when 'varchar' then 2 * c.type_digits "
-                           "when 'wrd' then "
-                                "case c.type_digits "
-                                     "when 32 then 11 "
-                                     "when 64 then 20 "
-                                "end "
                            "else c.type_digits "
                       "end as buffer_length, "
                       "case c.type "
@@ -341,11 +326,6 @@ MNDBColumns(ODBCStmt *stmt,
                            "when 'timestamptz' then c.type_digits - 1 "
                            "when 'timetz' then c.type_digits - 1 "
                            "when 'tinyint' then 3 "
-                           "when 'wrd' then "
-                                "case c.type_digits "
-                                     "when 32 then 10 "
-                                     "when 64 then 19 "
-                                "end "
                            "else cast(null as smallint) "
                       "end as decimal_digits, "
                       "case c.type "
@@ -362,7 +342,6 @@ MNDBColumns(ODBCStmt *stmt,
                                 "end "
                            "when 'smallint' then 2 "
                            "when 'tinyint' then 2 "
-                           "when 'wrd' then 2 "
                            "else cast(null as smallint) "
                       "end as num_prec_radix, "
                       "case c.\"null\" "
@@ -391,11 +370,6 @@ MNDBColumns(ODBCStmt *stmt,
                            "when 'timetz' then %d "
                            "when 'tinyint' then %d "
                            "when 'varchar' then %d "
-                           "when 'wrd' then "
-                                "case c.type_digits "
-                                     "when 32 then %d "
-                                     "when 64 then %d "
-                                "end "
                       "end as sql_data_type, "
                       "case c.type "
                            "when 'date' then %d "
@@ -454,7 +428,7 @@ MNDBColumns(ODBCStmt *stmt,
                SQL_INTERVAL_MINUTE, SQL_INTERVAL_MINUTE_TO_SECOND,
                SQL_INTERVAL_SECOND, SQL_SMALLINT, SQL_TYPE_TIME,
                SQL_TYPE_TIMESTAMP, SQL_TYPE_TIMESTAMP, SQL_TYPE_TIME,
-               SQL_TINYINT, SQL_WVARCHAR, SQL_INTEGER, SQL_BIGINT,
+               SQL_TINYINT, SQL_WVARCHAR,
                /* nullable: */
                SQL_NULLABLE, SQL_NO_NULLS,
                /* sql_data_type: */
@@ -462,8 +436,7 @@ MNDBColumns(ODBCStmt *stmt,
                SQL_WLONGVARCHAR, SQL_DATETIME, SQL_DECIMAL, SQL_DOUBLE,
                SQL_INTEGER, SQL_INTERVAL, SQL_REAL, SQL_INTERVAL,
                SQL_SMALLINT, SQL_DATETIME, SQL_DATETIME, SQL_DATETIME,
-               SQL_DATETIME, SQL_TINYINT, SQL_WVARCHAR, SQL_INTEGER,
-               SQL_BIGINT,
+               SQL_DATETIME, SQL_TINYINT, SQL_WVARCHAR,
                /* sql_datetime_sub: */
                SQL_CODE_DATE, SQL_CODE_YEAR, SQL_CODE_YEAR_TO_MONTH,
                SQL_CODE_MONTH, SQL_CODE_DAY, SQL_CODE_DAY_TO_HOUR,
diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c
--- a/clients/odbc/driver/SQLExecute.c
+++ b/clients/odbc/driver/SQLExecute.c
@@ -56,7 +56,6 @@ static struct msql_types {
 /*     {"ubyte", SQL_TINYINT}, */
        {"uuid", SQL_GUID},
        {"varchar", SQL_WVARCHAR},
-       {"wrd", SQL_BIGINT},
        {0, 0},                 /* sentinel */
 };
 
diff --git a/clients/odbc/driver/SQLSpecialColumns.c 
b/clients/odbc/driver/SQLSpecialColumns.c
--- a/clients/odbc/driver/SQLSpecialColumns.c
+++ b/clients/odbc/driver/SQLSpecialColumns.c
@@ -260,11 +260,6 @@ MNDBSpecialColumns(ODBCStmt *stmt,
                                    "when 'timetz' then %d "
                                    "when 'tinyint' then %d "
                                    "when 'varchar' then %d "
-                                   "when 'wrd' then "
-                                        "case c.type_digits "
-                                             "when 32 then %d "
-                                             "when 64 then %d "
-                                        "end "
                               "end as data_type, "
                               "case c.type "
                                    "when 'bigint' then 'BIGINT' "
@@ -303,11 +298,6 @@ MNDBSpecialColumns(ODBCStmt *stmt,
                                    "when 'timetz' then 'TIME' "
                                    "when 'tinyint' then 'TINYINT' "
                                    "when 'varchar' then 'VARCHAR' "
-                                   "when 'wrd' then "
-                                        "case c.type_digits "
-                                             "when 32 then 'INTEGER' "
-                                             "when 64 then 'BIGINT' "
-                                        "end "
                               "end as type_name, "
                               "case c.type "
                                    "when 'month_interval' then "
@@ -369,11 +359,6 @@ MNDBSpecialColumns(ODBCStmt *stmt,
                                    "when 'varchar' then 6 * c.type_digits "
                                    "when 'double' then 24 "
                                    "when 'real' then 14 "
-                                   "when 'wrd' then "
-                                        "case c.type_digits "
-                                             "when 32 then 11 "
-                                             "when 64 then 20 "
-                                        "end "
                                    "else c.type_digits "
                               "end as buffer_length, "
                               "case c.type "
@@ -396,11 +381,6 @@ MNDBSpecialColumns(ODBCStmt *stmt,
                                    "when 'int' then 10 "
                                    "when 'smallint' then 5 "
                                    "when 'tinyint' then 3 "
-                                   "when 'wrd' then "
-                                        "case c.type_digits "
-                                             "when 32 then 10 "
-                                             "when 64 then 19 "
-                                        "end "
                               "end as decimal_digits, "
                               "cast(%d as smallint) as pseudo_column "
                         "from sys.schemas s, "
@@ -430,7 +410,7 @@ MNDBSpecialColumns(ODBCStmt *stmt,
                        SQL_INTERVAL_MINUTE_TO_SECOND, SQL_INTERVAL_SECOND,
                        SQL_SMALLINT, SQL_TYPE_TIMESTAMP, SQL_TYPE_TIMESTAMP,
                        SQL_TYPE_TIME, SQL_TYPE_TIME, SQL_TINYINT,
-                       SQL_WVARCHAR, SQL_INTEGER, SQL_BIGINT,
+                       SQL_WVARCHAR,
                        /* pseudo_column: */
                        SQL_PC_NOT_PSEUDO);
                assert(strlen(query) < 4300);
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1000,14 +1000,8 @@ heapinit(BAT *b, const char *buf, int *h
                GDKfatal("BBPinit: unknown properties are set: incompatible 
database\n");
        *hashash = var & 2;
        var &= ~2;
-       /* silently convert chr columns to bte */
-       if (strcmp(type, "chr") == 0)
-               strcpy(type, "bte");
-       /* silently convert wrd columns to int or lng */
-       else if (strcmp(type, "wrd") == 0)
-               strcpy(type, width == SIZEOF_INT ? "int" : "lng");
 #ifdef HAVE_HGE
-       else if (strcmp(type, "hge") == 0)
+       if (strcmp(type, "hge") == 0)
                havehge = 1;
 #endif
        if ((t = ATOMindex(type)) < 0) {
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -568,25 +568,11 @@ log_read_create(logger *lg, trans *tr, c
                return LOG_ERR;
        }
        *ta++ = 0;              /* skip over , */
-       if (strcmp(ha, "wrd") == 0) {
-#if SIZEOF_SSIZE_T == SIZEOF_INT
-               ha = "int";
-#else
-               ha = "lng";
-#endif
-       }
        if (strcmp(ha, "vid") == 0) {
                ht = -1;
        } else {
                ht = ATOMindex(ha);
        }
-       if (strcmp(ta, "wrd") == 0) {
-#if SIZEOF_SSIZE_T == SIZEOF_INT
-               ta = "int";
-#else
-               ta = "lng";
-#endif
-       }
        if (strcmp(ta, "vid") == 0) {
                tt = -1;
        } else {
diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -823,80 +823,6 @@ sql_update_dec2016(Client c, mvc *sql)
        return err;             /* usually MAL_SUCCEED */
 }
 
-static str
-sql_update_nowrd(Client c, mvc *sql)
-{
-       size_t bufsize = 10240, pos = 0;
-       char *buf = GDKmalloc(bufsize), *err = NULL;
-       char *schema = stack_get_string(sql, "current_schema");
-       sql_schema *s;
-
-
-       if (buf == NULL)
-               throw(SQL, "sql_update_nowrd", MAL_MALLOC_FAIL);
-       s = mvc_bind_schema(sql, "sys");
-       pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
-
-       {
-               sql_table *t;
-
-               if ((t = mvc_bind_table(sql, s, "querylog_calls")) != NULL)
-                       t->system = 0;
-               if ((t = mvc_bind_table(sql, s, "querylog_history")) != NULL)
-                       t->system = 0;
-       }
-
-       /* 15_querylog.sql */
-       pos += snprintf(buf + pos, bufsize - pos,
-                       "drop view sys.querylog_history;\n"
-                       "drop view sys.querylog_calls;\n"
-                       "drop function sys.querylog_calls();\n"
-                       "create function sys.querylog_calls()\n"
-                       "returns table(\n"
-                       " id oid,\n"
-                       " \"start\" timestamp,\n"
-                       " \"stop\" timestamp,\n"
-                       " arguments string,\n"
-                       " tuples bigint,\n"
-                       " run bigint,\n"
-                       " ship bigint,\n"
-                       " cpu int,\n"
-                       " io int\n"
-                       ")\n"
-                       "external name sql.querylog_calls;\n"
-                       "create view sys.querylog_calls as select * from 
sys.querylog_calls();\n"
-                       "create view sys.querylog_history as\n"
-                       "select qd.*, ql.\"start\",ql.\"stop\", ql.arguments, 
ql.tuples, ql.run, ql.ship, ql.cpu, ql.io\n"
-                       "from sys.querylog_catalog() qd, sys.querylog_calls() 
ql\n"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to