Changeset: de8d479a5f99 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de8d479a5f99 Modified Files: sql/storage/bat/bat_logger.c Branch: Jun2016 Log Message:
Fix args.inout column. In the past, the inout column may have been incorrectly created as a BIT column, even though the SQL catalog thinks it's a TINYINT. We recreate the column as a BTE column. diffs (32 lines): diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c --- a/sql/storage/bat/bat_logger.c +++ b/sql/storage/bat/bat_logger.c @@ -184,6 +184,28 @@ bl_postversion( void *lg) logger_add_bat(lg, tne, N(n, NULL, s, "types_eclass")); bat_destroy(te); + /* in the past, the args.inout column may have been + * incorrectly upgraded to a bit instead of a bte + * column */ + te = temp_descriptor(logger_find_bat(lg, N(n, NULL, s, "args_inout"))); + if (te == NULL) + return; + if (te->ttype == TYPE_bit) { + bi = bat_iterator(te); + tne = BATnew(TYPE_void, TYPE_bte, BATcount(te), PERSISTENT); + if (!tne) + return; + BATseqbase(tne, te->hseqbase); + for(p=BUNfirst(te), q=BUNlast(te); p<q; p++) { + bte inout = (bte) *(bit*)BUNtail(bi, p); + + BUNappend(tne, &inout, TRUE); + } + BATsetaccess(tne, BAT_READ); + logger_add_bat(lg, tne, N(n, NULL, s, "args_inout")); + } + bat_destroy(te); + // test whether the catalog contains information regarding geometry types b = BATdescriptor((bat) logger_find_bat(lg, N(n, NULL, s, "types_systemname"))); bi = bat_iterator(b); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list