Changeset: 889c2e69a722 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=889c2e69a722
Modified Files:
        NT/mksqlwxs.py
        clients/mapiclient/dump.c
        clients/mapiclient/mclient.c
        monetdb5/modules/mal/batcalc.c
Branch: default
Log Message:

Merge with Aug2018 branch.


diffs (136 lines):

diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -14,7 +14,7 @@ upgradecode = {
 # the Geom upgrade codes that we are replacing
 geomupgradecode = {
     'x64': '{8E6CDFDE-39B9-43D9-97B3-2440C012845C}',
-    'x86': '{C1F69378-3F5C-4120-8224-32F07D3458F3}'
+    'x86': '{92C89C36-0E86-45E1-B3D8-0D6C91108F30}'
 }
 
 def comp(features, id, depth, files, name=None, args=None, sid=None, 
vital=None):
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -47,14 +47,14 @@ get_with_comments_as_clause(Mapi mid)
                        "SELECT language_id, language_name, language_keyword "
                        "FROM sys.function_languages, (VALUES "
                                "(3, 'R'), "
-                               "(4, 'C', 'C'), "
+                               "(4, 'C'), "
                                "(6, 'PYTHON'), "
                                "(7, 'PYTHON_MAP'), "
                                "(8, 'PYTHON2'), "
                                "(9, 'PYTHON2_MAP'), "
                                "(10, 'PYTHON3'), "
                                "(11, 'PYTHON3_MAP'), "
-                               "(12, 'C++', 'CPP')) AS (id, language_keyword) "
+                               "(12, 'CPP')) AS (id, language_keyword) "
                        "WHERE id = language_id"
                     ")";
 
@@ -2109,7 +2109,7 @@ dump_database(Mapi mid, stream *toConsol
                              "t.system = FALSE AND "
                              "s.id = t.schema_id AND "
                              "s.name <> 'tmp' "
-                       "UNION "
+                       "UNION ALL "
                        "SELECT s.name AS sname, " /* functions */
                               "f.name AS name, "
                               "f.id AS id, "
@@ -2120,7 +2120,7 @@ dump_database(Mapi mid, stream *toConsol
                             "sys.functions f "
                        "WHERE s.id = f.schema_id "
                        "AND f.id NOT IN (SELECT function_id FROM 
sys.systemfunctions) "
-                       "UNION "
+                       "UNION ALL "
                        "SELECT s.name AS sname, " /* triggers */
                               "tr.name AS name, "
                               "tr.id AS id, "
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -85,7 +85,7 @@ enum formatters {
        NOformatter,
        RAWformatter,           // as the data is received
        TABLEformatter,         // render as a bordered table
-       CSVformatter,           // render as a comma separate file
+       CSVformatter,           // render as a comma or tab separated values 
list
        XMLformatter,           // render as a valid XML document
        TESTformatter,          // for testing, escape characters
        TRASHformatter,         // remove the result set
@@ -2183,7 +2183,7 @@ showCommands(void)
        /* shared control options */
        mnstr_printf(toConsole, "\\?       - show this message\n");
        if (mode == MAL)
-               mnstr_printf(toConsole, "?pat  - MAL function help. 
pat=[modnme[.fcnnme][(][)]] wildcard *\n");
+               mnstr_printf(toConsole, "?pat     - MAL function help. 
pat=[modnme[.fcnnme][(][)]] wildcard *\n");
        mnstr_printf(toConsole, "\\<file   - read input from file\n");
        mnstr_printf(toConsole, "\\>file   - save response in file, or stdout 
if no file is given\n");
 #ifdef HAVE_POPEN
@@ -2192,21 +2192,21 @@ showCommands(void)
 #ifdef HAVE_LIBREADLINE
        mnstr_printf(toConsole, "\\history - show the readline history\n");
 #endif
-       mnstr_printf(toConsole, "\\help    - synopsis of the SQL syntax\n");
        if (mode == SQL) {
-               mnstr_printf(toConsole, "\\D table- dumps the table, or the 
complete database if none given.\n");
+               mnstr_printf(toConsole, "\\help    - synopsis of the SQL 
syntax\n");
+               mnstr_printf(toConsole, "\\D table - dumps the table, or the 
complete database if none given.\n");
                mnstr_printf(toConsole, "\\d[Stvsfn]+ [obj] - list database 
objects, or describe if obj given\n");
-               mnstr_printf(toConsole, "\\A      - enable auto commit\n");
-               mnstr_printf(toConsole, "\\a      - disable auto commit\n");
+               mnstr_printf(toConsole, "\\A       - enable auto commit\n");
+               mnstr_printf(toConsole, "\\a       - disable auto commit\n");
        }
-       mnstr_printf(toConsole, "\\e      - echo the query in sql formatting 
mode\n");
-       mnstr_printf(toConsole, "\\t      - set the timer 
{none,clock,performance} (none is default)\n");
-       mnstr_printf(toConsole, "\\f      - format using a built-in renderer 
{csv,tab,raw,sql,xml,trash,rowcount}\n");
-       mnstr_printf(toConsole, "\\w#     - set maximal page width 
(-1=unlimited, 0=terminal width, >0=limit to num)\n");
-       mnstr_printf(toConsole, "\\r#     - set maximum rows per page 
(-1=raw)\n");
-       mnstr_printf(toConsole, "\\L file - save client/server interaction\n");
-       mnstr_printf(toConsole, "\\X      - trace mclient code\n");
-       mnstr_printf(toConsole, "\\q      - terminate session\n");
+       mnstr_printf(toConsole, "\\e       - echo the query in sql formatting 
mode\n");
+       mnstr_printf(toConsole, "\\t       - set the timer 
{none,clock,performance} (none is default)\n");
+       mnstr_printf(toConsole, "\\f       - format using renderer 
{csv,tab,raw,sql,xml,trash,rowcount,expanded,sam}\n");
+       mnstr_printf(toConsole, "\\w#      - set maximal page width 
(-1=unlimited, 0=terminal width, >0=limit to num)\n");
+       mnstr_printf(toConsole, "\\r#      - set maximum rows per page 
(-1=raw)\n");
+       mnstr_printf(toConsole, "\\L file  - save client/server interaction\n");
+       mnstr_printf(toConsole, "\\X       - trace mclient code\n");
+       mnstr_printf(toConsole, "\\q       - terminate session\n");
 }
 
 #define MD_TABLE    1
@@ -2795,7 +2795,7 @@ doFile(Mapi mid, stream *fp, bool useins
                                        int h;
                                        char *nl;
 
-                                       if (strcmp(line,"\\history") == 0) {
+                                       if (strcmp(line,"\\history\n") == 0) {
                                                for (h = 0; h < history_length; 
h++) {
                                                        nl = history_get(h) ? 
history_get(h)->line : 0;
                                                        if (nl)
@@ -2858,6 +2858,9 @@ doFile(Mapi mid, stream *fp, bool useins
                                                case EXPANDEDformatter:
                                                        mnstr_printf(toConsole, 
"expanded\n");
                                                        break;
+                                               case SAMformatter:
+                                                       mnstr_printf(toConsole, 
"sam\n");
+                                                       break;
                                                default:
                                                        mnstr_printf(toConsole, 
"none\n");
                                                        break;
diff --git a/monetdb5/modules/mal/batcalc.c b/monetdb5/modules/mal/batcalc.c
--- a/monetdb5/modules/mal/batcalc.c
+++ b/monetdb5/modules/mal/batcalc.c
@@ -977,7 +977,7 @@ CMDcalcavg(Client cntxt, MalBlkPtr mb, M
        bid = getArgReference_bat(stk, pci, pci->retc + 0);
        if ((b = BATdescriptor(*bid)) == NULL)
                throw(MAL, "aggr.avg", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
-       if (pci->retc == pci->retc + 2) {
+       if (pci->argc == pci->retc + 2) {
                bat *sid = getArgReference_bat(stk, pci, pci->retc + 1);
                if (*sid && (s = BATdescriptor(*sid)) == NULL) {
                        BBPunfix(b->batCacheid);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to