zettadb / kunlun

KunlunBase is a distributed relational database management system(RDBMS) with complete NewSQL capabilities and robust transaction ACID guarantees and is compatible with standard SQL. Applications which used PostgreSQL or MySQL can work with KunlunBase as-is without any code change or rebuild because KunlunBase supports both PostgreSQL and MySQL connection protocols and DML SQL grammars. MySQL DBAs can quickly work on a KunlunBase cluster because we use MySQL as storage nodes of KunlunBase. KunlunBase can elastically scale out as needed, and guarantees transaction ACID under error conditions, and KunlunBase fully passes TPC-C, TPC-H and TPC-DS test suites, so it not only support OLTP workloads but also OLAP workloads. Application developers can use KunlunBase to build IT systems that handles terabytes of data, without any effort on their part to implement data sharding, distributed transaction processing, distributed query processing, crash safety, high availability, strong consistency, horizontal scalability. All these powerful features are provided by KunlunBase. KunlunBase supports powerful and user friendly cluster management, monitor and provision features, can be readily used as DBaaS.
http://www.kunlunbase.com
Apache License 2.0
144 stars 19 forks source link

Need to add support default value for text column #821

Open jd-zhang opened 3 years ago

jd-zhang commented 3 years ago

Issue migrated from trac ticket # 119 www.kunlunbase.com

component: computing nodes | priority: minor

2021-06-24 17:23:23: zhangjindong@zettadb.com created the issue


Currently, we do not allow default value for text column, but, text is used heavily in postgres, so I think we need to find a way to support this. At this partially support this.

This SR is kind of duplicate to [#70], see that SR for the sql code example.

sql code: tdb1=# DROP table if exists T; DROP TABLE tdb1=# CREATE TABLE T(pk INT NOT NULL PRIMARY KEY); CREATE TABLE tdb1=# ALTER TABLE T ADD COLUMN c_text TEXT DEFAULT 'Hello'; ERROR: MySQL storage node (2, 2) returned error: 1101, BLOB, TEXT, GEOMETRY or JSON column 'c_text' can't have a default value.

jd-zhang commented 3 years ago

2021-06-29 11:56:47: zhaowei@zettadb.com commented


This is caused by a restriction of MySQL --- MySQL doesn't allow default values for text columns. Let's figure out how to fix this in future.

But this restriction only impacts 'alter table set default' stmts, i.e. to set default values to an existing TEXT column which didn't have default value. it doesn't impact 'CREATE TABLE' stmts or 'ALTER TABLE ADD COLUMN' stmts.

jd-zhang commented 3 years ago

2021-06-29 11:56:47: zhaowei@zettadb.com

jd-zhang commented 3 years ago

2021-06-29 16:40:06: zhangjindong@zettadb.com edited the issue description

jd-zhang commented 3 years ago

2021-06-29 16:40:37: zhangjindong@zettadb.com edited the issue description

jd-zhang commented 2 years ago

2022-06-06 14:03:13: vito@zettadb.com changed owner from david to smith