PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

Overview

LICENSE Language

中文文档

What is PolarDB-X ?

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage and complex querying scenarios. It has a shared-nothing architecture in which computing is decoupled from storage. It supports horizontal scaling, distributed transactions and Hybrid Transactional and Analytical Processing (HTAP) workloads, and is characterized by enterprise-class, cloud native, high availability, highly compatible with MySQL and its ecosystem.

PolarDB-X was originally created to solve the database's scalability bottleneck of Alibaba Tmall's "Double Eleven" core transaction system, and has grown with AliCloud along the way, and is a mature and stable database system that has been verified by many customers' core business systems.

The core features of PolarDB-X include:

  • Horizontal Scalability

PolarDB-X is designed with Shared-nothing architecture, supporting multiple Hash and Range data sharding algorithms and achieving transparent horizontal scaling through implicit primary key sharding and dynamic scheduling of data shard.

  • Distributed Transactions

PolarDB-X adopts MVCC + TSO approach and 2PC protocol to implement distributed transactions. Transactions meet ACID characteristics, support RC/RR isolation levels, and achieve high performance through optimizations such as one-stage commit, read-only transaction, and asynchronous commit.

  • HTAP

PolarDB-X supports analytical queries through native MPP capability, and achieves strong isolation of OLTP and OLAP traffic through CPU quota constraint, memory pooling, storage resource separation, etc.

  • Enterprise-class

PolarDB-X has many capabilities designed for enterprise scenarios, such as SQL Concurrency Control, SQL Advisor, TDE, Triple Authority Seperation, Flashback Query, etc.

  • Cloud Native

PolarDB-X has years of cloud native practice on AliCloud, supports managing cluster resources via K8S Operator, supports public cloud, hybrid cloud, private cloud and other forms for deployment.

  • High Availability

PolarDB-X achieves strong data consistency through Multi-Paxos protocol, supports cross-data center deployment, and improves system availability through Table Group, Geo-locality, etc.

  • Compatible with MySQL and Its Ecosystem

The goal of PolarDB-X is to be fully compatible with MySQL, which currently includes MySQL protocol, most of MySQL SQL syntax, Collations, transaction isolation level, binary log, etc.

Quick Start

To quick start with PolarDB-X

PolarDB-X supports one-click installation by PXD tool, through which you can quickly try the functions of PolarDB-X.

See the PXD Quick Start.

To quick start with PolarDB-X on Kubernetes

PolarDB-X provides K8S deployment mode, through which you can customize the configuration of PolarDB-X cluster.

See the K8S Quick Start.

To start developing PolarDB-X

If you want to compile and install PolarDB-X from source code, or start development, you can refer the Development Guide.

The core features of PolarDB-X community version will be consistent with the commercial version, and more manuals can be found in the documentations of the commercial version. The documentations of the community version are being compiled and will be released to the public in the near future.

Architecture

image.png PolarDB-X has a shared-nothing architecture in which compute and storage is decoupled, and the system consists of 4 core components.

  • CN (Compute Node)

The Compute Node is the entry point of the system and is stateless, which includes modules such as SQL parser, optimizer, and executor. It is responsible for distributed data routing, 2PC coordination, global secondary index maintenance, etc. It also provides enterprise features such as SQL concurrency control and triple authority separation.

  • DN (Data Node)

The Data Node is responsible for data persistence, providing strong data consistency based on the Multi-Paxos protocol, while maintaining distributed transaction visibility through MVCC.

  • GMS (Global Meta Service)

The Gloal Meta Service is responsible for maintaining globally consistent Table/Schema, Statistics and other system Meta information, maintaining security information such as accounts and permissions, and providing global timing services (i.e. TSO).

  • CDC (Change Data Capture)

The CDC Node provides change data capture capability that is fully compatible with the MySQL binary log format and MySQL DUMP protocol, and master-slave replication capability that is compatible with the MySQL Replication protocol.

PolarDB-X provides tool to manage the above components through K8S Operator, and the RPC between the CN and DN can be done through private protocol component. The corresponding repositories of these components are as follows.

Component Name Repository
CN (Compute Node) galaxysql
GMS (Global Meta Service) galaxyengine
DN (Data Node) galaxyengine
CDC (Change Data Capture) galaxycdc
RPC galaxyglue
K8S Operator galaxykube

What is ApsaraDB GalaxySQL ?

ApsaraDB GalaxySQL is one component of PolarDB-X, namely CN (Compute Node).

Licensing

ApsaraDB GalaxySQL is under the Apache License 2.0. See the License file for details.

Contributing

You are welcome to make contributions to PolarDB-X. We appreciate all the contributions. For more information about how to start development and pull requests, see contributing.

Community

You can join these groups and chats to discuss and ask PolarDB-X related questions:

  • DingTalk Group: 32432897
    DingTalk Group
  • WeChat Group: 阿里云 PolarDB-X 开源交流群 (Contact group manager to get into wechat group. Managers' ID: oldbread3, hustfxj, agapple0002)
    WeChat Manager 1 WeChat Manager 2 WeChat Manager 3

Acknowledgements

ApsaraDB GalaxySQL references from many open source projects, such as Calcite, Presto etc. Sincere thanks to these projects and contributors.

Comments
  • 【PXC-9001】CN启动失败, 报错: “No found any leader for metadb storage”

    【PXC-9001】CN启动失败, 报错: “No found any leader for metadb storage”

    操作路径: 源码编译DN启动后 1 初始化 执行能够正常完成 bin/startup.sh -I -P asdf1234ghjk5678 -r "admin" -d 127.0.0.1:4886:32886 -u polardbx_root -S "123456" 2 把 metaDbPasswd=BVUB3NoOBdCXPv+X2Wa3es6Ng1tzChSd9Vzdm2RVaBo= 放到 conf/server.properties 3 启动 命令没有报错 bin/startup.sh -P asdf1234ghjk5678
    4 连接数据库报错了,8527端口没有监听 mysql -h127.0.0.1 -P8527 -upolardbx_root -p123456 ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

    配置如下: image

    报错日志: image

    opened by Cleverdada 11
  • I ran benchmark but  got trapped in a trouble, error message would be pasted followed.

    I ran benchmark but got trapped in a trouble, error message would be pasted followed.

    alter table bmsql_district add constraint d_warehouse_fkey foreign key (d_w_id) references bmsql_warehouse (w_id); [134bc68428001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' . alter table bmsql_customer add constraint c_district_fkey foreign key (c_w_id, c_d_id) references bmsql_district (d_w_id, d_id); [134bc6855f801000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_district' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_district' . alter table bmsql_history add constraint h_customer_fkey foreign key (h_c_w_id, h_c_d_id, h_c_id) references bmsql_customer (c_w_id, c_d_id, c_id); [134bc68699001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' . alter table bmsql_history add constraint h_district_fkey foreign key (h_w_id, h_d_id) references bmsql_district (d_w_id, d_id); [134bc687cf401000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423191423291392' with operation 'ALTER_TABLE' is pending on db_test.bmsql_history in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded. alter table bmsql_new_order add constraint no_order_fkey foreign key (no_w_id, no_d_id, no_o_id) references bmsql_oorder (o_w_id, o_d_id, o_id); [134bc688d1001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' . alter table bmsql_oorder add constraint o_customer_fkey foreign key (o_w_id, o_d_id, o_c_id) references bmsql_customer (c_w_id, c_d_id, c_id); [134bc68a08001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' . alter table bmsql_order_line add constraint ol_order_fkey foreign key (ol_w_id, ol_d_id, ol_o_id) references bmsql_oorder (o_w_id, o_d_id, o_id); [134bc68b3f001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' . alter table bmsql_order_line add constraint ol_stock_fkey foreign key (ol_supply_w_id, ol_i_id) references bmsql_stock (s_w_id, s_i_id); [134bc68c77001000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423211413344256' with operation 'ALTER_TABLE' is pending on db_test.bmsql_order_line in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded. alter table bmsql_stock add constraint s_warehouse_fkey foreign key (s_w_id) references bmsql_warehouse (w_id); [134bc68d78801000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' . alter table bmsql_stock add constraint s_item_fkey foreign key (s_i_id) references bmsql_item (i_id); [134bc68eaf001000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423220942802944' with operation 'ALTER_TABLE' is pending on db_test.bmsql_stock in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded.

    documentation 
    opened by adzfolc 5
  • [Enhancement] refactor to simplify the judge bottom-join

    [Enhancement] refactor to simplify the judge bottom-join

    https://github.com/ApsaraDB/galaxysql/blob/aa0b41ca6db291c0561089b5c25bd4171a969194/polardbx-calcite/src/main/java/org/apache/calcite/rel/rules/JoinCommuteRule.java#L190-L200

    I think we don't need to judge it's bottom-join by using size() > 1.

    Instead, we can just use left() instance of Join.

    opened by jackwener 4
  • CBOLogicalSemiJoinLogicalJoinTransposeRule.LASSCOM is redundant

    CBOLogicalSemiJoinLogicalJoinTransposeRule.LASSCOM is redundant

    This rule is SemiJoin(LogicalJoin(X, Y), Z).

    inside LogicalJoin isn't semi/anti join, which means that left must exist project.

    So the patterm must be SemiJoin-project-LogicalJoin, this INSTANCE is redundant

    opened by jackwener 3
  • auto模式数据库BROADCAST表创建失败

    auto模式数据库BROADCAST表创建失败

    mysql> show create database sbtest; +----------+----------------------------------------------+ | DATABASE | CREATE DATABASE | +----------+----------------------------------------------+ | sbtest | CREATE DATABASEsbtest/* MODE = 'auto' */ | +----------+----------------------------------------------+ 1 row in set (0.01 sec) `mysql> CREATE TABLE broadcast_tbl(` ` -> id bigint not null auto_increment,` ` -> bid int,` ` -> name varchar(30),` ` -> primary key(id)` ` -> ) BROADCAST;` `Query OK, 0 rows affected (0.86 sec)` mysql> show rule from broadcast_tbl; +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ | ID | TABLE_NAME | BROADCAST | DB_PARTITION_KEY | DB_PARTITION_POLICY | DB_PARTITION_COUNT | TB_PARTITION_KEY | TB_PARTITION_POLICY | TB_PARTITION_COUNT | +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ | 0 | broadcast_tbl | 0 | NULL | NULL | 1 | NULL | NULL | 1 | +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ 1 row in set (0.00 sec) ``

    bug 
    opened by welyss 3
  • pxd tryout fails

    pxd tryout fails

    Following https://www.polardbx.com/document , I run pxd tryout, but I got error below:

    Digest: sha256:41d4f23930d5bce8d176944a784b6b40c79d97b7faf5423d2077a1ba526b7b8c
    Status: Image is up to date for polardbx/polardbx-init:latest
    Pull image: polardbx/xstore-tools:latest at 127.0.0.1
    
    
    latest:Pulling from polardbx/xstore-tools 
    Digest: sha256:5c0b19954c18fd2347eee46dffd82c4babf7e57b2e405d8b4ccb4d5a647c19a7
    Status: Image is up to date for polardbx/xstore-tools:latest
    Processing  [#########---------------------------]   25%    create gms node
    
    Traceback (most recent call last):
      File "/workdir/polar-x/venv/lib64/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status
        response.raise_for_status()
      File "/workdir/polar-x/venv/lib64/python3.6/site-packages/requests/models.py", line 953, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.30/containers/9175e58605d9cc143ee42c1e14f7f22b945f09b0fcc7f041e348da707abd9d4c/start
    
    During handling of the above exception, another exception occurred:
    
    ...
    
    
    raise cls(e, response=response, explanation=explanation)
    docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.30/containers/9175e58605d9cc143ee42c1e14f7f22b945f09b0fcc7f041e348da707abd9d4c/start: Internal Server Error ("oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"read init-p: connection reset by peer\""
    ")
    
    
    opened by yangyueren 3
  • 执行json_object,结果返回字段顺序会改变,和mariadb,mysql数据库不一样

    执行json_object,结果返回字段顺序会改变,和mariadb,mysql数据库不一样

    mysql> SELECT JSON_OBJECT('id', 123, 'name', 'polardb-x'); +---------------------------------------------+ | JSON_OBJECT('id', 123, 'name', 'polardb-x') | +---------------------------------------------+ | {"name":"polardb-x","id":123} | +---------------------------------------------+ 1 row in set (0.00 sec)

    mariadb数据库的结果为,这应该是和mysql数据库一样 MariaDB [(none)]> SELECT JSON_OBJECT('id', 123, 'name', 'polardb-x'); +---------------------------------------------+ | JSON_OBJECT('id', 123, 'name', 'polardb-x') | +---------------------------------------------+ | {"id": 123, "name": "polardb-x"} | +---------------------------------------------+ 1 row in set (0.000 sec)

    opened by co63oc 3
  • polardb-x支持udf

    polardb-x支持udf

    数据库中 SQL 函数可以大致分为以下几类:内部函数、系统生成的函数、用 户定义的函数(UDF),其中用户定义的函数是指由用户通过 CREATE FUNCTION 显示创建并命名的函数 ,其语义也由用户自己确定,能够在一定程度上扩展数 据库的功能。 目标效果:

    • PolarDB-X 支持 CREATE FUNCTION 创建 UDF
    • 支持一些系统视图,可以方便查询和管理已注册 UDF
    opened by joeCarf 3
  • Let the 32 databases limit configurable

    Let the 32 databases limit configurable

    Try to deploy LMS product with polardbx as it database, We need to create database over 100 schools. Then I have been told about that the limit about number of databases is 32, ant Can't adjust by config file. Wish this limit can be configurable and please tell me why we really need this limitation?

    opened by datouxia 3
  • pxd layout failed.docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''

    pxd layout failed.docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''

    os info

    [root@VM ~]# cat /etc/redhat-release
    CentOS Linux release 7.3.1611 (Core)
    
    [root@VM ~]# uname -a
    Linux VM 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    
    [root@VM ~]# python3 --version
    Python 3.6.8
    

    run pxd layout output

    Digest: sha256:5c0b19954c18fd2347eee46dffd82c4babf7e57b2e405d8b4ccb4d5a647c19a7
    Status: Downloaded newer image for docker.io/polardbx/xstore-tools:latest
    Processing  [#########---------------------------]   25%    create gms node
    Processing  [############------------------------]   33%    create gms db and tables
    Processing  [###############---------------------]   41%    create PolarDB-X root account
    Processing  [##################------------------]   50%    create dn
    Processing  [#####################---------------]   58%    register dn to gms
    Processing  [########################------------]   66%    create cn
    --- Logging error ---
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 32, in wrapper
        ret = func(*args, **kw)
      File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 380, in _create_cn_containers
        name=self.pxc_name + '-cn-init-' + ''.join(secrets.choice(string.ascii_letters) for i in range(4)))
      File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 841, in run
        container, exit_status, command, image, out
    docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 35, in execute_update
        cursor.execute(sql)
    sqlite3.OperationalError: near "' in image '": syntax error
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/logging/handlers.py", line 71, in emit
        if self.shouldRollover(record):
      File "/usr/local/lib/python3.6/logging/handlers.py", line 187, in shouldRollover
        msg = "%s\n" % self.format(record)
      File "/usr/local/lib/python3.6/logging/__init__.py", line 840, in format
        return fmt.format(record)
      File "/usr/local/lib/python3.6/logging/__init__.py", line 577, in format
        record.message = record.getMessage()
      File "/usr/local/lib/python3.6/logging/__init__.py", line 338, in getMessage
        msg = msg % self.args
    TypeError: not all arguments converted during string formatting
    Call stack:
      File "/usr/local/bin/pxd", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1668, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/deployer/pxd.py", line 40, in tryout
        create_tryout_pxc(name, cn_replica, cn_version, dn_replica, dn_version, cdc_replica, cdc_version)
      File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_manager.py", line 35, in create_tryout_pxc
        pxc.create()
      File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 143, in create
        result = create_task()
      File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 37, in wrapper
        update_polardbx_record(pxc, ex)
      File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 52, in update_polardbx_record
        SQLiteManager.execute_update(sql)
      File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 38, in execute_update
        logger.error("execute update for xdb failed, xdb: %s, sql: %s", SQLiteManager.db_file, sql, e)
    Message: 'execute update for xdb failed, xdb: %s, sql: %s'
    Arguments: ('/root/.pxd/polardbx.db', "replace into polardbx_cluster ('id', 'gmt_created', 'gmt_modified', 'pxc_name', 'pxc_status', 'cn_replica', 'cn_version', 'dn_replica', 'dn_version', 'leader_only', 'root_account', 'root_password', 'details', 'cdc_replica', 'cdc_version') values (NULL, date('now'), date('now'), 'pxc-tryout', 'failed', '1', 'latest', '1', 'latest', 'True', 'polardbx_root', 'qdWlIjKB', 'Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''', '1', 'latest')", OperationalError('near "\' in image \'": syntax error',))
    --- Logging error ---
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 32, in wrapper
        ret = func(*args, **kw)
      File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 380, in _create_cn_containers
        name=self.pxc_name + '-cn-init-' + ''.join(secrets.choice(string.ascii_letters) for i in range(4)))
      File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 841, in run
        container, exit_status, command, image, out
    docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 35, in execute_update
        cursor.execute(sql)
    sqlite3.OperationalError: near "' in image '": syntax error
    
    opened by clot09 3
  • 安装步骤疑问

    安装步骤疑问

    源码安装参考文档中

    启动PolarDB-X DN
    此步骤启动一个mysql进程,作为metadb和dn
    参考附录中的mysql配置文件,可进行相应修改,默认使用 4886 作为 mysql端口,32886 作为私有协议端口
    默认使用 /u01/my3306 作为mysql数据目录,可以修改成其他目录
    注意:启动 DN 需要使用非 root 账号完成
    
    启动mysql:
    
    mkdir -p /u01/my3306/{data,log,run,tmp,mysql}
    /u01/mysql/bin/mysqld --defaults-file=my.cnf --initialize-insecure
    /u01/mysql/bin/mysqld --defaults-file=my.cnf
    

    这里的mysql是需要单独装一个mysql server端?还是客户端?还是需要软链接到对应目录下?

    question 
    opened by Hoxxx 3
  • Fix a 'recreate compound primary key' issue

    Fix a 'recreate compound primary key' issue

    Problems solved in this PR

    Issue #114

    Changes proposed in this PR

    Also hide metadata for dropped primary key before executing physical DDL operations.

    Tests

    Added a new test case: AlterTableTest.testAlterTableDropAddCompPrimaryKey()

    opened by mybjlife 1
  • close #101 fix rename table failed

    close #101 fix rename table failed

    Problems solved in this PR

    Fix the bug that failed to rename table.

    Changes proposed in this PR

    rename table

    Tests

    • [ ] Unit test
    • [ ] DML_DDL test

    Release note

    None

    opened by hustStt 1
  • Fix (issuse: #104) : Cast error when 'set password'

    Fix (issuse: #104) : Cast error when 'set password'

    Problems solved in this PR

    issuse: https://github.com/ApsaraDB/galaxysql/issues/104

    Changes proposed in this PR

    Tests

    • [ ] Unit test
    • [ ] DML_DDL test

    Release note

    None

    opened by joeCarf 0
  • mysql client occasionally encounters errors

    mysql client occasionally encounters errors

    mysql> show create table t1;
    +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | TABLE | CREATE TABLE                                                                                                                                                                                                                                                        |
    +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | t1    | CREATE TABLE `t1` (
            `id` bigint(11) NOT NULL AUTO_INCREMENT,
            `score` tinyint(4) NOT NULL,
            `grade` tinyint(4) NOT NULL,
            PRIMARY KEY (`id`),
            KEY `ig` (`grade`)
    ) ENGINE = InnoDB AUTO_INCREMENT = 12 DEFAULT CHARSET = utf8
    PARTITION BY KEY(`id`)
    PARTITIONS 8 |
    +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)
    
    mysql> alter table t1 add age tinyint not null;
    ERROR 2013 (HY000): Lost connection to MySQL server during query
    No connection. Trying to reconnect...
    ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
    ERROR:
    Can't connect to the server
    
    mysql> alter table t1 add age tinyint not null;
    No connection. Trying to reconnect...
    Connection id:    3
    Current database: d3
    
    Query OK, 0 rows affected (3.63 sec)
    
    opened by yejr 1
Releases(galaxysql-5.4.15-16669515)
  • galaxysql-5.4.15-16669515(Oct 28, 2022)

    RELEASE NOTE

    Feature enhancement

    Add New Sequence: a globally unique, monotonically increasing, high-performance sequence. Support for specifying and modifying locality properties in AUTO mode. Support partition-level heatmap. Support for automatic partition splitting. Support stored procedure. Suuport user defined function. Support partitioned table change at table-level. support insert overwrite. Support online modification of column types. Support server-side cursor. Add sharding advise syntax to recommend table splitting method. Support archive history of DDL task. Support STATEMENTS_SUMMARY and STATEMENTS_SUMMARY_HISTORY table. Add ALTER TABLE PARTITIONS syntax to modify the table's number of partitions. Support automatically pause scheduled tasks of TTL-table. Support configurate and detecte password complexity and expiration date. Add audit user's login and logout (disabled by default). Optimize read and write performance of auto-mode table. Optimize memory usage of the Scan operator during streaming mergesort. Optimize type comparison logic of new partition table. Optimize the logic of set global variables. Optimize the speed of data migration when creating global secondary indexes, scaling and shrinking, changing partitions, and so on. Optimize the execution of insert, update, delete, and select statements. Optimize memory usage of query with in clause. Optimize logic of permission verification. Optimize the logic of change partitions on auto-partitioned tables. Remove the restriction that user tables cannot have the same name as system tables. Optimize the implementation of optimize table.

    Bugfix

    Fixed an issue where read-only traffic could not be switched back to the primary node in read/write splitting scenarios when the log-copy thread is interrupted. Fixed an issue that the alias of having clause in physical SQL is incorrect. Fixed an issue that SQL throttling might cause client blocking. Fixed an compatibility issue of SQL throttling when table name with backticks. Fixed the compatibility issue when cachePrepStmts and useServerPrepStmts were enabled at the same time and the mysql connector is 8.0. Fixed the broadcast shuffle selection issue in Outer Join in MPP mode. Fixed an incorrect result issue of union distinct query in MPP mode. Fix an icompatibility issue of primary key for Navicat. Fix an error of 'IN' statement in Prepare mode. Fix that the value of 'Current timestamp' don't change when used in the same session. Fix an error of 'Update' statement for BINARY type. Fix an incurrent result issue of JSON operator '->'. Fix an incorrect result issue of to_base64 function when parsing binary variables Fix an array out of bounds issue of HashGroupJoin operator. Fix an incorrect result issue of AES encryption function. Fix an incorrect result issue of covering index. Fix an incorrect result issue of window functions in some cases. Fix that the table name is not correctly replaced in single table Update statement with subquery. Fix a NPE issue in multi table Update command. Fix an occasional error in subquery. Fix an incorrect result issue of yyyyweek in a range query which cross years. Fix that the actual index selected is different from 'Explain Execute' in some case. Fix an unexpected pushdown issue of non pushdown functions in some scenarios. Fix an error when trying to create an user without host. Fix an error of escape character of JSON_QUOTE function. Fix a NPE issue of 'Explain Optimizer'. Fix a lock wait timeout issue when recording physical DDL status during DDL task execution. Fix an empty or incomplete result issue of 'Trace ddl' Fix an incompatibility issue of 'show rule' in auto partition database. Fix an index metadata lost issue when adding columns and adding indexes at the same time. Fix a statistics lost issue of 'Rename Table' or 'Change Columns'. Fix a plan pollution issue when the comparative object inside changed. Fix a primary key lost issue of global unique index in auto partition database. Fix that GSI related indexes are pushed down incorrectly while using 'ignore index' in auto partition database. Fix that single table cannot be pushed down in the auto partition database. Fix a NPE issue when initializing sequence in the read-only instance. Fix an error when changing the column name to a special character. Fix an error of 'alter table modify column after'. Fix an error when using constant expressions as partition keys. Fix an error of 'DROP CLUSTERED GSI'. Fix an incorrect result issue of month partition function in a range query. Fix an error of 'Truncate Table' with LOCAL FULLTEXT KEY Fix a concurrency security issue when unwarping subqueries. Fix an empty result issue of 'show status' Fix an incorrect result issue of when join broadcast table and single table in auto partition database. Fix that read/write separation does not take effect in read-only transactions. Fix an error of rebalance task when trying to update system tables. Fix a NPE issue during MDL lock acquisition. Fix that table name maybe wrong in CDC Fix an error of executing DDL with CDC.

    发布说明

    特性更新

    新增支持全局唯一、单调递增、高性能的New Sequence。 新增支持在AUTO模式下指定和修改locality属性。 新增分区热力图功能。 新增支持分区自动分裂。 新增支持存储过程。 新增支持自定义函数。 新增支持表级别的分区表变更。 新增支持Insert Overwrite语法。 新增支持在线修改列类型。 新增支持服务端的游标。 新增sharding advise语法进行表的拆分方式推荐。 新增DDL任务历史数据归档。 新增支持STATEMENTS_SUMMARY和STATEMENTS_SUMMARY_HISTORY元数据库表。 新增支持ALTER TABLE PARTITIONS语法,一键修改分区数。 新增支持自动暂停TTL表的定时任务。 新增支持密码复杂度、有效期的配置和检测。 新增支持用户的登入登出审计功能(默认关闭)。 优化AUTO库的读写并行度及其读写性能。 优化Scan算子在流式归并排序过程中的内存使用。 优化新分区表DML类型比较逻辑。 优化set global变量的设置逻辑。 优化创建全局二级索引、扩缩容、分区变更等操作时数据迁移的速度。 优化insert、update、delete和select语句的执行性能。 优化IN查询内存占用过高的问题。 优化权限校验流程。 优化默认自动分区的表进行分区变更的逻辑。 解除用户表不能与系统表同名的限制。 优化Optimize table的实现。

    问题修复

    修复当日志复制线程中断时,读写分离场景中只读流量无法切回主库的问题。 修复物理SQL的Having别名语法不正确的问题。 修复SQL限流可能导致客户端阻塞的问题。 修复SQL限流匹配表名时带反引号,无法匹配表名的问题。 修复8.0驱动下同时开启cachePrepStmts和useServerPrepStmts时的兼容性问题。 修复MPP执行模式下Outer Join的Broadcast Shuffle选择问题。 修复union distinct查询在MPP执行模式下查询结果不正确的问题。 修复PolarDB-X对于Navicat主键元信息的兼容性。 修复Prepare模式下,IN语句转子查询报错的问题。 修复同一个会话中使用Current timestamp时,值不会变化的问题。 修复执行UPDATE语句时BINARY类型处理不正确的问题。 修复JSON操作符->在表达式中解析不正确的问题。 修复to_base64解析binary变量不正确的问题。 修复HashGroupJoin算子存在数组越界的问题。 修复AES加密函数返回结果不符合预期的问题。 修复使用覆盖索引查询时返回错误结果的问题。 修复某些情况下窗口函数计算错误的问题。 修复单表Update语句时子查询的表名没有被正确替换的问题。 修复Update命令中的多表NPE的问题。 修复部分子查询偶发报错的问题。 修复对于yyyyweek跨年周闭区间范围查询分片缺失的问题。 修复私有协议传递执行计划时,Explain Eexcute结果与实际选择索引不同的问题。 修复不可下推函数在某些场景下的非预期下推问题。 修复没有带host的用户创建语句报错的问题。 修复非下推JSON_QUOTE函数的转义字符问题。 修复Explain Optimizer抛空指针的问题。 修复DDL任务执行过程中,记录物理DDL状态时可能发生的Lock wait timeout问题。 修复trace ddl后,可能出现show ddl为空或者不完整的问题。 修复SHOW RULE命令不兼容新分区表的问题。 修复加列同时创建索引后缺失索引元数据的问题。 修复Rename Table或Alter Table变更列后统计信息被清除的问题。 修复Comparative对象变更导致计划污染的问题。 修复AUTO库下全局唯一索引丢失主键信息的问题。 修复AUTO模式数据库中ignore index时GSI相关的索引被错误下推的问题。 修复AUTO模式数据库中单表无法下推的问题。 修复只读实例中Sequence初始化失败上报NPE的问题。 修复ALTER TABLE将列名改为特殊字符时,元数据处理失败的问题。 修复alter table modify after失败的问题。 修复使用常量表达式作为分区键时,缺少语法校验并导致建表失败的问题。 修复执行DROP CLUSTERED GSI失败问题。 修复使用month分区函数时区间范围查询结果不正确的问题。 修复带LOCAL FULLTEXT KEY的表无法truncate的问题。 修复子查询消除时并发安全的问题。 修复show status视图返回空的问题。 修复AUTO模式数据库下广播表与单表Join下推时,选错物理库导致执行报错的问题。 修复读写分离在只读事务下未生效的问题。 修复rebalance任务更新系统表的SQL错误的问题。 修复MDL锁获取过程中抛空指针的问题。 修复CDC打标信息中表名不一致的问题。 修复CDC启动时执行DDL失败的问题。

    Source code(tar.gz)
    Source code(zip)
  • galaxysql-5.4.15-alpha-1(Oct 28, 2022)

  • galaxysql-5.4.13-16615127(Aug 26, 2022)

    RELEASE NOTE

    Feature enhancement

    support dragonwell11 #66 support bool type #76 support add channel for change replication filter support add dest applier type for change master support CI/CD optimize shutdown.sh script optimize use metaDb user rather than metaDb root user when initialization optimize dockfile, use galaxybaseimage optimize change protoc version to 3.17.3 optimize doc

    Bugfix

    fix overflow when calc direct memory size. fix ccl reschedule return error when exception is threw fix NEVarcharColCharConstVectorizedExpression

    发布说明

    特性更新

    支持 dragonwell11 #66 支持 bool 类型 #76 支持 修改单个主备链路的配置 支持 修改主备链路的写入方式 支持 CI/CD 流程 优化 shutdown.sh 脚本 优化 配置初始化步骤,使用 metadb_user 而非 metadb_root_user 连接元数据库 优化 dockerfile, 使用 galaxybaseimage 作为基础镜像 优化 protoc 版本 到 3.17.3 优化 帮助文档

    问题修复

    修复 私有协议预分配内存在系统内存过大时,数值计算溢出的问题 修复 被SQL限流设置为等待的查询偶发无法返回的问题 修复 NEVarcharColCharConstVectorizedExpression 错误

    Source code(tar.gz)
    Source code(zip)
  • galaxysql-5.4.13-16615127-alpha-1(Aug 26, 2022)

  • galaxysql-5.4.13-16512132(Apr 29, 2022)

    RELEASE NOTE

    Feature enhancement

    • support file storage quick-start
    • support CREATE FileStorage {'OSS'| 'LOCAL_DISK' } with (xxx)
    • support DROP FileStorage {'OSS'| 'LOCAL_DISK' }
    • support CREATE TABLE t_oss LIKE t_innodb engine = {'OSS'| 'LOCAL_DISK' } archive_mode = {'empty' | 'loading' | 'ttl'}
    • support ALTER TABLE new_table EXCHANGE PARTITION partition_name WITH TABLE old_table;
    • support SELECT * from table AS OF TIMESTAMP 'yyyy-mm-dd hh:mm;dd'
    • support ALTER TABLE table_name DROP FILE file_name [,file_name...]
    • support SHOW FileStorage
    • support SHOW FILES FROM oss_table
    • support SHOW CACHE_STATS
    • support SHOW ARCHIVE
    • support UNARCHIVE table source_table

    发布说明

    特性更新

    • 支持 file storage quick-start
    • 支持 CREATE FileStorage {'OSS'| 'LOCAL_DISK' } with (xxx)
    • 支持 DROP FileStorage {'OSS'| 'LOCAL_DISK' }
    • 支持 CREATE TABLE t_oss LIKE t_innodb engine = {'OSS'| 'LOCAL_DISK' } archive_mode = {'empty' | 'loading' | 'ttl'}
    • 支持 ALTER TABLE new_table EXCHANGE PARTITION partition_name WITH TABLE old_table;
    • 支持 SELECT * from table AS OF TIMESTAMP 'yyyy-mm-dd hh:mm;dd'
    • 支持 ALTER TABLE table_name DROP FILE file_name [,file_name...]
    • 支持 SHOW FileStorage
    • 支持 SHOW FILES FROM oss_table
    • 支持 SHOW CACHE_STATS
    • 支持 SHOW ARCHIVE
    • 支持 UNARCHIVE table source_table
    Source code(tar.gz)
    Source code(zip)
  • galaxysql-5.4.13-16512132-alpha-2(Apr 29, 2022)

  • galaxysql-5.4.13-16511320-alpha-1(Apr 28, 2022)

  • galaxysql-5.4.13(Mar 31, 2022)

    RELEASE NOTE

    Feature enhancement

    • Support create database with auto mode (two optional mode: auto or drds mode) , drds is the default option
    • Support create table with MySQL compatible syntax for partition-table, including hash/key/list/range types, but not support subpartition yet.
    • Support dynamic partition pruning, including collapse conditions of constant/literal, prefix match prunning, combine overlapping range scan etc.
    • Support join-wise push down for partitioning table.
    • Support add/drop/split/merge/move partition operation for partitioning table.
    • Support create GSI for hash/key/list/range partitioning table.
    • Support use primary key as partition key and compute the partition member automatically for the tables in auto-mode database.
    • Support to change the partition strategy for tables in auto-mode database.
    • Support to add primary key as additional partition key for GSI to avoid the GSI table data skew.
    • Support Scale-in.
    • Support TTL in auto-mode database.
    • Optimize check table to validate the meta consistency(including partitioning information, column information) for table and its GSI.
    • Support broadcast table as candiate for SQL Advisor feature.
    • Support instant add column.
    • Support to collect all information for optimizer when use explain statistics command.
    • Support limit the search space of CBO and reduce the optimization time of complex queries.
    • Optimize the validation data phase of ddl operation to speed up the GSI/Scale in/out operation.
    • Support MySQL compatible replica command.
    • Support GalaxyEngine cluster.

    Bugfix

    • Fix the NPE and sort error issues of heuristic join reorder
    • Fix the RelNode rowtype error cause by AccessPathRule
    • Fix the GSI data inconsistency issue when the collaction is utf8mb4_0900_ai_ci
    • Fix the maximum login times cannot take effect
    • Fix inaccurate estimate size in some block data types
    • Fix missing accuracy of Deciaml for GalaxySQL communication protocol.
    • Fix the Byte and Char types error when push down execution plan to MySQL in GalaxySQL communition protocol.
    • Fix index metadata is missing after alter table add/drop primary Key
    • Fix the shards/partitions definition inconsistency issue caused by interrupt or timeout during alter Table
    • Fix can't rollback automatically when all the sub-operations are failed for alter table
    • Fix possible NPE when input the empty resultset for the sortAgg operation

    发布说明

    特性更新

    • 新增 支持创建数据库指定建表模式(新的分区表模式与老的分库分表模式),默认是分库分表模式
    • 新增 支持使用 MySQL分区表语法 创建一级分区的分区表,分区策略包括Hash/Range/List等
    • 新增 支持分区表的动态裁剪能力,包括支持分区列条件的常量折叠、区间合并以及前缀查询裁剪等功能
    • 新增 支持分区表的JOIN计算下推
    • 新增 提供分区表的分区管理能力,包括分区的添加、删除、分裂、合并与迁移等功能
    • 新增 提供表组及其他能力(包括表组的创建、删除、变更等),支持分区变更期间JOIN计算下推不受影响
    • 新增 支持全局索引表使用MySQL分区表语法并按Hash/Range/List等分区策略进行分区
    • 新增 自动拆分支持使用分区表语法
    • 新增 拆分变更增加支持分区表
    • 新增 新分区表GSI自动拆分会携带主键,可以处理GSI热点问题
    • 新增 支持实例的缩容
    • 新增 支持分区表的TTL及其管理能力(包括调整TTL的初始时间与时间间隔等)
    • 优化 Check Table 指令,支持校验主表分区、索引表分区与列定义等元数据一致性
    • 新增 SQL Advisor支持推荐广播表
    • 新增 支持Instant Add Column功能
    • 新增 支持Explain Statistics拉取优化器优化需要的所有信息
    • 新增 限制cbo的搜索空间,减少复杂查询的优化耗时
    • 优化 部分DDL后台操作的数据校验任务的性能,使GSI/扩缩容DDL变更操作加速
    • 新增 支持兼容MySQL的Replica相关指令
    • 新增 支持存储节点PAXOS三节点集群

    问题修复

    • 修复 heuristic join reorder的空指针和排序报错的问题
    • 修复 AccessPathRule导致的RelNode rowtype错误的问题
    • 修复 当 collate 为 utf8mb4_0900_ai_ci 时,建 GSI 导致数据不一致的问题。
    • 修复 最大登录次数无法生效的问题
    • 修复 某些block中estimateSize不准确的问题
    • 修复 私有协议下Deciaml精度缺失是问题
    • 修复 私有协议下执行计划传输byte和char类型对比报错的问题
    • 修复 Alter Table Add/Drop Primary Key后索引元数据缺失问题
    • 修复 Alter Table期间外部中断或物理分片超时导致的表结构不一致问题
    • 修复 Drop index所有物理分片都失败时不自动回滚的问题
    • 修复 sortAgg在结果集为空时可能抛NPE的问题
    Source code(tar.gz)
    Source code(zip)
  • galaxysql-5.4.13-alpha-1(Mar 30, 2022)

  • galaxysql-5.4.12(Jan 28, 2022)

    RELEASE NOTE

    Feature enhancement

    • Support access GalaxySQL from maxwell and debezium
    • Support the separation of reading and writing for RW node
    • Support set TLS version based on jdk version
    • Support statement SHOW GRANTS FOR CURRENT_USER
    • Support disable cost estimation for LogicalView with hint ENABLE_LOGICALVIEW_COST=false
    • Support auto rollback for ALTER TABLE ddl task
    • Add precheck for ALTER TABLE task
    • Add records for information_shema in result of SHOW DATASOURCES
    • Avoid pushing uncorrelate node into lv with variables set
    • Try transform filter downside of projects with uncorrelate scalar subquery
    • Change the level of spm null point log from error to info
    • More literal expression supported for SET statement
    • Optimize the execution of apply executor for IN subquery
    • Optimize duplicate check for insert statement executed with logical multi write
    • Optimize physical query with limit
    • Remove PostPlanner segmented check
    • Optimize Compare function for FactorCostComparator
    • Support huge memory size in startup.sh
    • Limit length of SHOW JOBS result to 500
    • Add sample rate to accurate count num from TopN
    • Rollback transaction after ERR_TRANS_DEADLOCK exception

    Bugfix

    • Fix AES encryption when key length greater than 16 bytes
    • Fix the issue of LIMIT + physical sql cache leads to empty result set of SELECT statement with LIMIT clause
    • Fix alter table add index without specifying index name issue that can cause failure of inserting index metadata
    • Fix index meta missed issue when altering table add multiple indexes with the same columns
    • Fix a NPE issue of simple sequence validation
    • Fix DDL task issue of executed by 2 CN during leader election
    • Fix a concurrent physical ddl issue that cannot recover ddl task after task paused
    • Fix the issue of traceid of transaction changed after execution of ddl
    • Fix the issue of subtask not exit correctly while there occurs an out of memory exception
    • Fix the issue of MOVE DATABASE task cannot be recovered for some case
    • Fix cn/dn mapping maintaining issue that can cause failure of scale out task
    • Fix the invalidation of baseline caused by DDL
    • Fix the NPE issue for baseline sync
    • Fix the issue of plan leaking in baseline
    • Fix backfillRows of show stats
    • Fix memorypool leaking issue for some case
    • Fix case sensitive issue for table meta initialization that can cause some column mata not loaded
    • Fix virtual_statistic result not correct issue which is caused by lack of table meta
    • Fix physical sql for statement using inventory hint
    • Fix execution error of statement using SCAN HINT, which is caused by table name not surrounded by backquote
    • Fix execution error of BkaJoin, which is caused by physical sql like ' xx in row(EMPTY)' generated
    • Fix wrong physical sql of order by [index]
    • Fix sql template cache when there exists scalar subquery in logicalview.
    • Fix rex literal transform issue in subquery apply executor.
    • Fix for get cost after execution
    • Fix npe issue when optimizer trying to get the statisic of index
    • Fix estimated size in some block
    • Fix the issue of "Snapshot Too Old" for long-lasting transaction
    • Fix the wrong UPDATE result issue for some case of using ON UPDATE TIMESTAMP column as partition key
    • Fix the issue of UPDATE column with property AUTO_INCREMENT
    • Fix UPSERT BIT type column issue that can cause UPSERT failure
    • Fix UPDATE blob type column issue that in some case can cause wrong update result
    • Fix setting value for AUTO_INCREMENT column issue for INSERT SELECT statement without target column
    • Fix logical multi-write issue for REPLACE statement in isolation level read committed
    • Fix ddl validation for not support using SET type column as sharding key
    • Fix undefined user variable for sum
    • Fix the issue of SetHandler#parserValue
    • Fix DESC issue that can cause executeion failure on system table
    • Fix execution issue of statament EXPLAIN ANALYZE LIMIT
    • Fix exception "Failed to create vectorized expression"
    • Fix aggregation function execution issue for UNION statement without actual table
    • Fix the issue of SHOW DS STATUS and KILL ALL not work at RO instance in some case
    • Fix execution issue of SHOW TABLES using readonly connection
    • Fix the issue that condition derivation not adapted for subquery materialize
    • Fix a issue about login
    • Fix issues about MySQL compatibility

    发布说明

    特性更新

    • 新增 ALTER TABLE 校验,提前拒绝执行不支持的 ALTER TABLE 语句
    • 新增 CN 启动参数,支持设置 LargePage
    • 新增 SHOW DATASOURCES 中加入 information_schema 的相关信息
    • 新增 兼容 debezium 使用到的特殊 sql 语句
    • 新增 在主实例上引入读写分离能力
    • 新增 基于 JDK 版本自适应设置 TLS 版本号
    • 新增 支持 SHOW GRANTS FOR CURRENT_USER 语句
    • 新增 通过 HINT ENABLE_LOGICALVIEW_COST 关闭 LogicalView 的代价估算
    • 新增 限制 SHOW JOBS 的 phyProcess 最长为500
    • 优化 非相关联子查询物理 SQL 结构
    • 优化 IN 类 APPLY 子查询的执行效率, APPLY 执行器支持物化方式执行
    • 优化 逻辑多写 Duplicate Check 的执行性能
    • 优化 SET 语句支持的表达式范围
    • 优化 ALTER TABLE 支持自动回滚
    • 优化 物理 SQL 包含 LIMIT 的场景
    • 优化 去除 PostPlanner segmented check
    • 优化 禁用集合类型作为拆分键
    • 优化 FactorCostComparator 中的 Compare 函数性能

    问题修复

    • 修复 AES加密函数当密钥长度超过16字节时结果不正确
    • 修复 LIMIT + 物理 SQL CACHE 导致 LIMIT 查询结果为空的问题
    • 修复 ALTER TABLE 为同一列多次新增不带索引名的索引时元数据插入失败的问题
    • 修复 ALTER TABLE 新增多个包含同一字段的索引后,部分索引元数据缺失
    • 修复 ALTER TABLE 语句通过 Auto_Increment 子句修改 Sequence 起始值时发生 NPE
    • 修复 CN 发生切主时,2 个 CN 可能同时执行同一个 DDL 任务的问题
    • 修复 DDL 分库间并行策略下的任务中断后,任务恢复执行卡住的问题
    • 修复 DDL 导致事务 ID 发生变化
    • 修复 OOM 时 DDL 引擎中子线程没有正确退出的问题
    • 修复 MOVE DATABASE 任务中断恢复的问题
    • 修复 创建建连接池异常,导致 scaleout 任务中断的问题
    • 修复 SPM 在 fix sql 时不会受 DDL 影响而失效
    • 修复 baseline fix 时会概率性 sync 失败的问题
    • 修复 在复杂 SQL 较多的场景中, baseline 存储的 plan 有概率超出最大值泄露的问题
    • 修复 TopN 因采集数据过大导致的估算问题
    • 修复 SHOW STATS 中的 backfillRows 统计
    • 修复 异常情况下,memory pool 对象未被 destory 情况
    • 修复 批量加载 table meta 时候,表名的大小写会导致列加载不到的问题
    • 修复 virtual_statistic 视图因 table meta 获取不到导致的展示问题
    • 修复 热点更新的下推 SQL
    • 修复 通过 HINT 下推的 SQL 表名没有带反引号,导致报错的问题
    • 修复 物理 SQL 中出现' xx in row(EMPTY)' 导致报错的问题
    • 修复 物理 SQL 生成 ORDER BY 带 index 的问题
    • 修复 物理 SQL CACHE 涉及子查询问题
    • 修复 执行结束后 getCost 报错问题
    • 修复 统计信息涉及索引部分场景下 NPE 问题
    • 修复 部分 block 的 estimatedSize 不准确问题
    • 修复 部分场景下,只读实例上 SHOW DS STATUS 和 KILL ALL 指令不能正确执行的问题
    • 修复 长事务导致 Snapshot too old 报错的问题
    • 修复 死锁检测报错 ERR_TRANS_DEADLOCK 之后未主动回滚事务
    • 修复 ON UPDATE TIMESTAMP 作为拆分键时,部分场景下 UPDATE 结果不符合预期的问题
    • 修复 UPDATE 自增列的问题
    • 修复 UPSERT BIT 类型报错的问题
    • 修复 部分场景下 UPDATE blob 字段结果不符合预期的问题
    • 修复 使用隐式目标列 + LIMIT 且不可下推的 INSERT SELECT 语句,主键没有使用 Sequence 填充的问题
    • 修复 禁止 LogicalReplace 在隔离级别为 RC 时的下推
    • 修复 未知的用户变量问题
    • 修复 SetHandler#parserValue 的问题
    • 修复 DESC 系统表报错的问题
    • 修复 EXPLAIN ANALYZE + LIMIT 报错的问题
    • 修复 Failed to create vectorized expression 错误
    • 修复 不包含表的 FROM UNION 上聚合函数执行报错的问题
    • 修复 使用只读连接串执行 SHOW TABLES 报错问题
    • 修复 子查询物化适配条件推导
    • 修复 登陆相关问题
    • 修复 SQL 兼容性相关问题修复
    Source code(tar.gz)
    Source code(zip)
  • galaxysql-5.4.12-alpha-1(Jan 27, 2022)

Owner
Alibaba Cloud Database
null
Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.

English | 中文 Apollo - A reliable configuration management system Apollo is a reliable configuration management system. It can centrally manage the con

Apollo 27.6k Jan 5, 2023
A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency

A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency.

Project-Hephaestus 2 Feb 8, 2022
A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

LeiH 1 Oct 26, 2022
Java SQL (JDBC) code generator with GUI. SQL and OOP finally united.

jSQL-Gen Java SQL (JDBC) code generator with GUI. SQL and OOP finally united. Usage Install the latest release. Create a database, tables and their co

Osiris-Team 11 Nov 14, 2022
Source codes of book Java Concurrency In Practice, rebuild by maven.

Introduction Source codes of book: Java Concurrency In Practice(2011, Brain Goetz etc. jcip for short.), rebuild from https://jcip.net/ with maven. Mo

Sam Sune 2 Jun 9, 2022
Duel Threads - Concurrency techniques duel it out for the championship (and bragging rights)

Duel Threads Concurrency techniques duel it out for the championship (and bragging rights) Phases: Argue over rules, challenges and the grand prize Se

Jason Sipula 2 May 9, 2022
Operating Systems - Concepts of computer operating systems including concurrency, memory management, file systems, multitasking, performance analysis, and security. Offered spring only.

Nachos for Java README Welcome to Nachos for Java. We believe that working in Java rather than C++ will greatly simplify the development process by p

Sabir Kirpal 1 Nov 28, 2021
Docker-compose-integration-tstst - An exploration of how to run integration tests against an application that has inconvenient external dependencies (e.g. a SQL database).

Tstst? it was supposed to be docker-compose-integration-tests but i was too lazy to fix it at the outset, and now im trying to convince myself its fun

null 1 Jan 4, 2022
Student management system with sql database,Jsp & Java (Front end with HTML & CSS)

studentmanagementsystem Student management system with sql database,Jsp & Java (Front end with HTML & CSS) what this basically is that it integrates t

Isaac 7 Oct 3, 2022
Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.

Spring Cloud Alibaba A project maintained by Alibaba. See the 中文文档 for Chinese readme. Spring Cloud Alibaba provides a one-stop solution for distribut

Alibaba 24.4k Jan 1, 2023
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024

友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。 胖友可以根据自己的需要,修改 pom.xml 即可。 一个涵盖六个主流技术栈的正经仓库: 《Spring Boot 专栏》 《Spring Cloud Alibaba 专栏》 《Spring Clou

芋道源码 15.7k Dec 31, 2022
一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖大部分应用场景。

springcloud-learning 简介 一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖

macro 5.6k Dec 30, 2022
Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker.

spring-microservice Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Arc

null 4 Sep 13, 2022
Universal, flexible, high-performance distributed ID generator

CosId Universal, flexible, high-performance distributed ID generator 中文文档 Introduction CosId aims to provide a universal, flexible and high-performanc

Ahoo Wang 256 Dec 27, 2022
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!

Introduction ActiveJ is a full-featured modern Java platform, created from the ground up as an alternative to Spring/Micronauts/Netty/Jetty. It is des

ActiveJ LLC 579 Jan 7, 2023
Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.

An open source rule engine, DMN engine and complex event processing (CEP) engine for Java™ and the JVM Platform. Drools is a business rule management

KIE (Drools, OptaPlanner and jBPM) 4.9k Dec 31, 2022
Lattice is a powerful, lightweight business extension invoke framework. By using the Lattice framework, complex business customization can be efficiently organized and managed.

Lattice Framework Introduction Lattice is a powerful, lightweight business extension invoke framework. By using the Lattice framework, complex busines

null 41 Dec 30, 2022
Joyce is a highly scalable event-driven Cloud Native Data Hub.

Joyce Component docker latest version Build Import Gateway sourcesense/joyce-import-gateway Joyce Kafka Connect sourcesense/joyce-kafka-connect Mongod

Sourcesense 37 Oct 6, 2022