Changeset: cdc162d65f35 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cdc162d65f35
Modified Files:
        clients/mapiclient/dump.c
Branch: Jun2023
Log Message:

Compare strings properly.


diffs (21 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -810,7 +810,7 @@ dump_type(Mapi mid, stream *toConsole, c
                        space = mnstr_printf(toConsole, "INTERVAL MONTH");
                else
                        fprintf(stderr, "Internal error: unrecognized month 
interval %s\n", c_type_digits);
-       } else if (strlen(c_type) > 4 && strcmp(c_type+3, "_interval") == 0) {
+       } else if (strcmp(c_type, "day_interval") == 0 || strcmp(c_type, 
"sec_interval") == 0) {
                if (strcmp(c_type_digits, "4") == 0)
                        space = mnstr_printf(toConsole, "INTERVAL DAY");
                else if (strcmp(c_type_digits, "5") == 0)
@@ -1874,7 +1874,7 @@ dump_table_data(Mapi mid, const char *sc
                        if (s == NULL)
                                mnstr_printf(toConsole, "NULL");
                        else if (useInserts) {
-                               if (strlen(tp) > 4 && strcmp(tp+3, "_interval") 
== 0) {
+                               if (strcmp(tp, "day_interval") == 0 || 
strcmp(tp, "sec_interval") == 0) {
                                        const char *p = strchr(s, '.');
                                        if (p == NULL)
                                                p = s + strlen(s);
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to