Changeset: cef6a659b87f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cef6a659b87f
Modified Files:
        sql/server/rel_schema.c
        sql/test/SQLancer/Tests/sqlancer07.test
Branch: default
Log Message:

on create table like include not null constraint


diffs (25 lines):

diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c
--- a/sql/server/rel_schema.c
+++ b/sql/server/rel_schema.c
@@ -1366,6 +1366,8 @@ table_element(sql_query *query, symbol *
                                default:
                                        break;
                        }
+                       if (nc && oc->null != nc->null)
+                               mvc_null(sql, nc, oc->null);
                }
        }       break;
        case SQL_DROP_COLUMN:
diff --git a/sql/test/SQLancer/Tests/sqlancer07.test 
b/sql/test/SQLancer/Tests/sqlancer07.test
--- a/sql/test/SQLancer/Tests/sqlancer07.test
+++ b/sql/test/SQLancer/Tests/sqlancer07.test
@@ -524,6 +524,9 @@ CREATE TABLE t0(c0 BLOB DEFAULT (blob 'E
 statement ok
 CREATE TABLE t2(LIKE t0)
 
+statement ok
+ALTER TABLE t2 ALTER COLUMN c0 SET NULL
+
 statement ok rowcount 3
 INSERT INTO t2(c0) VALUES(blob ''), (NULL), (blob 'A0')
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to