OceanBase is an enterprise distributed relational database with high availability, high performance, horizontal scalability, and compatibility with SQL standards.

What is OceanBase database

OceanBase Database is a native distributed relational database. It is developed entirely by Alibaba and Ant Group. OceanBase Database is built on a common server cluster. Based on the Paxos protocol and its distributed structure, OceanBase Database provides high availability and linear scalability. OceanBase Database is not dependent on specific hardware architectures.

OceanBase Database has these features:

  • High availability Single server failure recovers automatically. OceanBase Database supports cross-city disaster tolerance for multiple IDCs and zero data loss. OceanBase Database meets the financial industry Level 6 disaster recovery standard (RPO=0, RTO<=30 seconds).
  • Linear scalability OceanBase Database scales transparently to applications and balances the system load automatically. Its cluster can contain more than 1500 nodes. The data volume can reach petabytes. The records in a single table can be more than a trillion rows.
  • Highly compatible with MySQL OceanBase Database is compatible with MySQL protocol and syntax. You can access to OceanBase Database by using MySQL client.
  • High performance OceanBase Database supports quasi memory level data change and exclusive encoding compression. Together with the linear scalability, OceanBase Database provides high performance.
  • Low cost OceanBase Database uses PC servers and cheap SSDs. Its high storage compression ratio and high performance also reduce the storage cost and the computing cost.
  • Multi-tenancy OceanBase Database supports native multi-tenancy architecture. One cluster supports multiple businesses. Data is isolated among tenants. This reduces the deployment, operation, and maintenance costs.

OceanBase Database supports the entire core business of Alipay and the core systems of hundreds of financial institutions, such as banks and insurance companies.

Quick start

Refer to the Get Started guide (Simplified Chinese, English will be ready soon) to try out OceanBase Database.

Documentation

Supported clients

Licencing

OceanBase Database is under MulanPubL - 2.0 license. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPubL - 2.0 license.

How to build

debug mode

sh build.sh debug --init --make

release mode

sh build.sh release --init --make

rpm packages

sh build.sh rpm --init && cd build_rpm && make -j16 rpm

Contributing

Contributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:

Support

In case you have any problems when using OceanBase Database, welcome reach out for help:

Owner
OceanBase
The Leading Scalable HTAP Database.
OceanBase
Comments
  • OceanBase game issue list

    OceanBase game issue list

    • https://github.com/oceanbase/oceanbase/issues/486
    • https://github.com/oceanbase/oceanbase/issues/483
    • https://github.com/oceanbase/oceanbase/issues/482
    • https://github.com/oceanbase/oceanbase/issues/481
    • https://github.com/oceanbase/oceanbase/issues/480
    • https://github.com/oceanbase/oceanbase/issues/477
    • https://github.com/oceanbase/oceanbase/issues/476
    • https://github.com/oceanbase/oceanbase/issues/474
    • https://github.com/oceanbase/oceanbase/issues/470
    • https://github.com/oceanbase/oceanbase/issues/469
    • https://github.com/oceanbase/oceanbase/issues/462
  • Please STOP star purchase

    Please STOP star purchase

    It's really embarrassing to purchase GitHub stars in disguise over social networks. It means nothing to the project but pollutes the community, which significantly reduces the credibility of the star number.

    For the courtesy, I won't post any screenshots or other proofs here. But, please, STOP doing it.

    Thank you.

  • [Bug]: 写入varbinary字段时校验字符集

    [Bug]: 写入varbinary字段时校验字符集

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - 3.1.4版本
    - 任意环境均可复现
    

    Fast Reproduce Steps(Required)

    创建utf8mb4的表格,包含varbinary字段

    写入GBK编码汉字

    Actual Behavior

    image

    Expected Behavior

    varbinary不应该校验字符集

    other information

    提了个PR https://github.com/oceanbase/oceanbase/pull/1086

    请审议

  • Support using Ubuntu for development and deployment

    Support using Ubuntu for development and deployment

    Hey guys!

    I have successfully compiled and deployed on Ubuntu 20.04 image. I will open a PR after further test.

    [email protected]:/data/oceanbase# cat /etc/issue
    Ubuntu 20.04.2 LTS \n \l
    
    [email protected]:/data/oceanbase# build_debug/src/observer/observer --version
    build_debug/src/observer/observer --version
    observer (OceanBase CE 3.1.0)
    
    REVISION: -377fa3d62f0b4a7a20dd2e7ebaaa0ef38f190759
    BUILD_BRANCH: master
    BUILD_TIME: Jun  2 2021 16:39:57
    BUILD_FLAGS: Debug
    BUILD_INFO:
    
    Copyright (c) 2021 Ant Group Co., Ltd.
    
    OceanBase CE is licensed under Mulan PubL v2.
    You can use this software according to the terms and conditions of the Mulan PubL v2.
    You may obtain a copy of Mulan PubL v2 at:
                http://license.coscl.org.cn/MulanPubL-2.0
    THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
    EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
    MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
    See the Mulan PubL v2 for more details.
    
    [email protected]:/data/observer# obd cluster display ubuntu-test
    Get local repositories and plugins ok
    Connect to observer ok
    Wait for observer init ok
    +---------------------------------------------+
    |                   observer                  |
    +-----------+---------+------+-------+--------+
    | ip        | version | port | zone  | status |
    +-----------+---------+------+-------+--------+
    | 127.0.0.1 | 3.1.0   | 5001 | zone1 | active |
    +-----------+---------+------+-------+--------+
    
    [email protected]:/data/observer#  mysql -h127.0.0.1 -uroot -P5001
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MySQL connection id is 3221487781
    Server version: 5.7.25 OceanBase 3.1.0 (r-377fa3d62f0b4a7a20dd2e7ebaaa0ef38f190759) (Built Jun  2 2021 16:39:57)
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MySQL [(none)]> use oceanbase
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    MySQL [oceanbase]> select * from __all_server;
    +----------------------------+----------------------------+-----------+----------+----+-------+------------+-----------------+--------+-----------------------+-----------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
    | gmt_create                 | gmt_modified               | svr_ip    | svr_port | id | zone  | inner_port | with_rootserver | status | block_migrate_in_time | build_version                                                         | stop_time | start_service_time | first_sessid | with_partition | last_offline_time |
    +----------------------------+----------------------------+-----------+----------+----+-------+------------+-----------------+--------+-----------------------+-----------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
    | 2021-06-02 17:05:41.848472 | 2021-06-02 17:06:13.652835 | 127.0.0.1 |     5002 |  1 | zone1 |       5001 |               1 | active |                     0 | 3.1.0_-377fa3d62f0b4a7a20dd2e7ebaaa0ef38f190759(Jun  2 2021 16:39:57) |         0 |   1622624771655757 |            0 |              1 |                 0 |
    +----------------------------+----------------------------+-----------+----------+----+-------+------------+-----------------+--------+-----------------------+-----------------------------------------------------------------------+-----------+--------------------+--------------+----------------+-------------------+
    1 row in set (0.004 sec)
    
    MySQL [oceanbase]> Ctrl-C -- exit!
    Aborted
    

    BTW, all mysqltest cases work well on Ubuntu :)

    +---------------------------------------------------------------------------+
    |                  Result (Total 152, Passed 152, Failed 0)                 |
    +-------------------------------------------------------+----------+--------+
    | Case                                                  | Cost (s) | Status |
    +-------------------------------------------------------+----------+--------+
    | alter.alter_log_archive_option                        |     0.40 | PASSED |
    | delete.delete_from_mysql                              |     8.35 | PASSED |
    
  • Questions on the partition of OB

    Questions on the partition of OB

    The several replicas of the same partition in OceanBase can form a PAXOS group, and the partitions seems to be created with DDL in the database. I would like to ask if OceanBase does not have the concept of fixed size data shards like TiDB's raft-group. If so, how does OceanBase deal with the scenario that the partition is too big to be accommodated by a single node, and how does OceanBase do load balancing when the partition size is unbalanced.

  • [Bug-3]: This following SQL query caused observer crash.

    [Bug-3]: This following SQL query caused observer crash.

    Please check the issue list for the same bug

    • [X] I have checked issue list and this bug is encountered for the first time.

    Environment

    - OceanBase 3.1.4 (r1-e8452fc9476833d40576e73fe208f579d3c06655)
    - Ubuntu 18.04
    - obclient  Ver 15.1 Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1
    

    Fast Reproduce Steps(Required)

    This following SQL query caused observer crash.

    CREATE TABLE v81754 ( v81755 INT , v81756 CHAR ) ; CREATE VIEW v81757 AS SELECT v81756 , ( SELECT v81755 FROM ( WITH v81763 AS ( WITH v81761 AS ( SELECT v81755 FROM ( WITH v81759 AS ( SELECT v81756 FROM ( SELECT NOT v81755 <= 'x' , v81756 FROM v81754 GROUP BY v81756 ) AS v81758 ) SELECT DISTINCT v81756 , ( v81756 = 38 OR v81756 > 'x' ) FROM v81759 ) AS v81760 NATURAL JOIN v81754 ) SELECT v81755 FROM ( SELECT NOT v81755 <= 'x' , v81755 FROM v81754 GROUP BY v81755 ) AS v81762 ) SELECT DISTINCT v81755 , ( v81756 = 26 OR v81755 > 'x' ) FROM v81754 ) AS v81764 NATURAL JOIN v81754 WHERE v81755 = v81756 ) AS v81765 FROM v81754 ;

    Actual Behavior

    observer crashed in debug version

    Expected Behavior

    No response

    other information

    #0 __GI_raise ([email protected]=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007fe764c3c7f1 in __GI_abort () at abort.c:79 #2 0x00007fe764c2c3fa in __assert_fail_base (fmt=0x7fe64d11de50 "%s%s%s:%u:%s%s?? '%s' ???\n%n", [email protected]=0x317345 "v", [email protected]=0x3bc677 "/oceanbase_fuzz/oceanbase/deps/oblib/src/lib/container/ob_array_wrap.h", [email protected]=41, [email protected]=0x8ceb08 "const T &oceanbase::common::ObIArrayWrap<oceanbase::sql::TableItem *>::at(int64_t) const [T = oceanbase::sql::TableItem *]") at assert.c:92 #3 0x00007fe764c2c472 in __GI___assert_fail (assertion=0x317345 "v", file=0x3bc677 "/oceanbase_fuzz/oceanbase/deps/oblib/src/lib/container/ob_array_wrap.h", line=41, function=0x8ceb08 "const T &oceanbase::common::ObIArrayWrap<oceanbase::sql::TableItem *>::at(int64_t) const [T = oceanbase::sql::TableItem *]") at assert.c:101 #4 0x00000000048a3b73 in oceanbase::common::ObIArrayWrapoceanbase::sql::TableItem*::at (this= 0x7fe6bff162d0, idx=0) at ./deps/oblib/src/lib/container/ob_array_wrap.h:41 #5 0x00000000066500e5 in oceanbase::sql::ObSelectStmtPrinter::print_with (this=0x7fe67da34848) at ./src/sql/ob_select_stmt_printer.cpp:835 #6 0x000000000664f8cc in oceanbase::sql::ObSelectStmtPrinter::print (this=0x7fe67da34848) at ./src/sql/ob_select_stmt_printer.cpp:83 #7 0x0000000006607579 in oceanbase::sql::ObSelectStmtPrinter::do_print (this=0x7fe67da34848) at ./src/sql/ob_select_stmt_printer.cpp:58 #8 0x0000000006603730 in oceanbase::sql::ObDMLStmtPrinter::print_table (this=0x7fe67da357e8, table_item=0x7fe6bfe32250, expand_cte_table=true, no_print_alias=false) at ./src/sql/ob_dml_stmt_printer.cpp:477 #9 0x0000000006650356 in oceanbase::sql::ObSelectStmtPrinter::print_with (this=0x7fe67da357e8) at ./src/sql/ob_select_stmt_printer.cpp:846 #10 0x000000000664f8cc in oceanbase::sql::ObSelectStmtPrinter::print (this=0x7fe67da357e8) at ./src/sql/ob_select_stmt_printer.cpp:83 #11 0x0000000006607579 in oceanbase::sql::ObSelectStmtPrinter::do_print (this=0x7fe67da357e8) at ./src/sql/ob_select_stmt_printer.cpp:58 #12 0x0000000006603730 in oceanbase::sql::ObDMLStmtPrinter::print_table (this=0x7fe67da36e98, table_item=0x7fe6bfe372b0, expand_cte_table=false, no_print_alias=false) at ./src/sql/ob_dml_stmt_printer.cpp:477 #13 0x0000000006600b13 in oceanbase::sql::ObDMLStmtPrinter::print_table (this=0x7fe67da36e98, table_item=0x7fe6bfe275b0, expand_cte_table=false, no_print_alias=false) at ./src/sql/ob_dml_stmt_printer.cpp:367 #14 0x00000000065f5fae in oceanbase::sql::ObDMLStmtPrinter::print_from (this=0x7fe67da36e98, need_from=true) at ./src/sql/ob_dml_stmt_printer.cpp:302 #15 0x000000000665215c in oceanbase::sql::ObSelectStmtPrinter::print_basic_stmt (this=0x7fe67da36e98) at ./src/sql/ob_select_stmt_printer.cpp:318 #16 0x000000000664fa94 in oceanbase::sql::ObSelectStmtPrinter::print (this=0x7fe67da36e98) at ./src/sql/ob_select_stmt_printer.cpp:93 #17 0x0000000006607579 in oceanbase::sql::ObSelectStmtPrinter::do_print (this=0x7fe67da36e98) at ./src/sql/ob_select_stmt_printer.cpp:58 ---Type to continue, or q to quit--- #18 0x0000000006384839 in oceanbase::sql::ObRawExprPrinter::print (this=0x7fe67da37f18, expr=0x7fe6bfed1cd0) at ./src/sql/resolver/expr/ob_raw_expr_printer.cpp:242 #19 0x0000000006381ecd in oceanbase::sql::ObRawExprPrinter::print (this=0x7fe67da37f18, expr=0x7fe6bfed1cd0) at ./src/sql/resolver/expr/ob_raw_expr_printer.cpp:108 #20 0x0000000006381524 in oceanbase::sql::ObRawExprPrinter::do_print (this=0x7fe67da37f18, expr=0x7fe6bfed1cd0, scope=oceanbase::sql::T_FIELD_LIST_SCOPE, only_column_namespace=false) at ./src/sql/resolver/expr/ob_raw_expr_printer.cpp:72 #21 0x0000000006653950 in oceanbase::sql::ObSelectStmtPrinter::print_select (this=0x7fe67da37ee0) at ./src/sql/ob_select_stmt_printer.cpp:404 #22 0x000000000665206f in oceanbase::sql::ObSelectStmtPrinter::print_basic_stmt (this=0x7fe67da37ee0) at ./src/sql/ob_select_stmt_printer.cpp:316 #23 0x000000000664fa94 in oceanbase::sql::ObSelectStmtPrinter::print (this=0x7fe67da37ee0) at ./src/sql/ob_select_stmt_printer.cpp:93 #24 0x0000000006607579 in oceanbase::sql::ObSelectStmtPrinter::do_print (this=0x7fe67da37ee0) at ./src/sql/ob_select_stmt_printer.cpp:58 #25 0x0000000006c72f50 in oceanbase::sql::ObCreateViewResolver::stmt_print (this=0x7fe5e5299d30, stmt=0x7fe6bfe58d50, column_list=0x0, expanded_view=...) at ./src/sql/resolver/ddl/ob_create_view_resolver.cpp:528 #26 0x0000000006c701fd in oceanbase::sql::ObCreateViewResolver::resolve (this=0x7fe5e5299d30, parse_tree=...) at ./src/sql/resolver/ddl/ob_create_view_resolver.cpp:396 #27 0x0000000005ba5488 in oceanbase::sql::ObResolver::stmt_resolver_funcoceanbase::sql::ObCreateViewResolver (this=0x7fe67da3be28, params=..., parse_tree=..., [email protected]: 0x0) at ./src/sql/resolver/ob_resolver.cpp:125 #28 0x0000000005b3d5bf in oceanbase::sql::ObResolver::resolve (this=0x7fe67da3be28, if_prepared=oceanbase::sql::ObResolver::IS_NOT_PREPARED_STMT, parse_tree=..., [email protected]: 0x0) at ./src/sql/resolver/ob_resolver.cpp:238 #29 0x000000000666e7ca in oceanbase::sql::ObSql::generate_stmt (this=0xbddc740 oceanbase::observer::ObServer::get_instance()::THE_ONE+1111488, parse_result=..., pc_ctx=0x7fe5e5289960, context=..., allocator=..., result=..., [email protected]: 0x0) at ./src/sql/ob_sql.cpp:1406 #30 0x000000000667352e in oceanbase::sql::ObSql::generate_physical_plan (this=0xbddc740 oceanbase::observer::ObServer::get_instance()::THE_ONE+1111488, parse_result=..., pc_ctx=0x7fe5e5289960, sql_ctx=..., result=..., is_ps_mode=false) at ./src/sql/ob_sql.cpp:1527 #31 0x00000000066718d5 in oceanbase::sql::ObSql::handle_physical_plan (this=0xbddc740 oceanbase::observer::ObServer::get_instance()::THE_ONE+1111488, trimed_stmt=..., context=..., result=..., pc_ctx=..., get_plan_err=-5138) at ./src/sql/ob_sql.cpp:3224 #32 0x00000000066f6ee4 in oceanbase::sql::ObSql::handle_text_query (this=0xbddc740 oceanbase::observer::ObServer::get_instance()::THE_ONE+1111488, stmt=..., context=..., result=...) at ./src/sql/ob_sql.cpp:1205 #33 0x00000000066641e1 in oceanbase::sql::ObSql::stmt_query (this=0xbddc740 oceanbase::observer::ObServer::get_instance()::THE_ONE+1111488, stmt=..., context=..., result=...) at ./src/sql/ob_sql.cpp:169 #34 0x000000000ad2940d in oceanbase::observer::ObMPQuery::do_process (this=0x7fe5e52774d0, session=..., has_more_result=false, force_sync_resp=false, [email protected]: false, [email protected]: true) at ./src/observer/mysql/obmp_query.cpp:628 #35 oceanbase::observer::ObMPQuery::process_single_stmt (this=0x7fe5e52774d0, multi_stmt_item=..., session=..., has_more_result=false, force_sync_resp=false, [email protected]: false, [email protected]: true) at ./src/observer/mysql/obmp_query.cpp:431 #36 0x000000000ad25bab in oceanbase::observer::ObMPQuery::process (this=0x7fe5e52774d0) at ./src/observer/mysql/obmp_query.cpp:248 #37 0x000000000b6c24ad in oceanbase::rpc::frame::ObReqProcessor::run (this=0x7fe5e52774d0) at ./deps/oblib/src/rpc/frame/ob_req_processor.cpp:50 #38 0x000000000aa86880 in oceanbase::omt::ObWorkerProcessor::process_one (this=0xc647b00 oceanbase::observer::ObServer::get_instance()::THE_ONE+9939328, req=..., [email protected]: 0) at ./src/observer/omt/ob_worker_processor.cpp:64 #39 0x000000000aa6342a in oceanbase::omt::ObWorkerProcessor::process (this=0xc647b00 oceanbase::observer::ObServer::get_instance()::THE_ONE+9939328, req=...) at ./src/observer/omt/ob_worker_processor.cpp:125 #40 0x000000000aa84636 in oceanbase::omt::ObThWorker::process_request (this=0x7fe6bc6b3dd0, req=...) at ./src/observer/omt/ob_th_worker.cpp:286 #41 0x000000000aa6134f in oceanbase::omt::ObThWorker::worker (this=0x7fe6bc6b3dd0, [email protected]: 1, [email protected]: 1657802052890209, [email protected]: 0) at ./src/observer/omt/ob_th_worker.cpp:450 #42 0x000000000aa6181c in oceanbase::omt::ObThWorker::run (this=0x7fe6bc6b3dd0, idx=0) at ./src/observer/omt/ob_th_worker.cpp:486 #43 0x0000000002961e1c in oceanbase::lib::CoKThreadTemp<oceanbase::lib::CoUserThreadTempoceanbase::lib::CoSetSched >::start()::{lambda()#1}::operator()() const ( this=0x7fe692772808) at ./deps/oblib/src/lib/coro/co_user_thread.h:295 #44 0x0000000002961cad in std::_Function_handler<void (), oceanbase::lib::CoKThreadTemp<oceanbase::lib::CoUserThreadTempoceanbase::lib::CoSetSched >::start()::{lambd---Type to continue, or q to quit--- a()#1}>::_M_invoke(std::_Any_data const&) (__functor=...) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/5.2.0/../../../../include/c++/5.2.0/functional:1871 #45 0x0000000001ee4d3e in std::function<void ()>::operator()() const (this=0x7fe692772808) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/5.2.0/../../../../include/c++/5.2.0/functional:2271 #46 0x000000000b1fbc25 in oceanbase::lib::CoSetSched::Worker::run (this=0x7fe69276e568) at ./deps/oblib/src/lib/coro/co_set_sched.cpp:92 #47 0x000000000b1fa3c5 in oceanbase::lib::CoRoutine::__start (from=...) at ./deps/oblib/src/lib/coro/co_routine.cpp:137 #48 0x000000000b1f302f in make_fcontext () at /oceanbase_fuzz/oceanbase/deps/oblib/src/lib/coro/context/asm/make_x86_64_sysv_elf_gas.S:71 #49 0x0000000000000000 in ?? ()

  • Better compatible with  mysql  golang driver or packages

    Better compatible with mysql golang driver or packages

    Is your feature request related to a problem? Please describe.

    currently do some tests with golang driver find s error

    • while parameter _ob_enable_prepared_statement is disabled, prepared statement not supported

    • Alter charset or collation type not supported

    • xorm do With Sync2 for multi-time will cause duplicate

    Maybe add some notes or do better test for golang or other languages MySQL driver ?

  • Can `oceanbase` be deployed in k8s environment?

    Can `oceanbase` be deployed in k8s environment?

    For most the popular distributed database, they could be deployed in k8s environment by various operators like cockroach-operator, cass-operator, tidb-operator. I am curious if oceanbase has tools like these to deploy itself in k8s env? If it does, any documentation am I missing?

  • Fix typo error: transfomer -> transformer

    Fix typo error: transfomer -> transformer

    What changes were proposed in this pull request?

    fix type error

    Why are the changes needed?

    #654

    Will break the compatibility? How if so?

    Does this PR introduce any user-facing change?

    How was this patch tested?

    Checklist

    • [ ] I've run the tests to see all new and existing tests pass.
    • [ ] If this Pull Request resolves an issue, I linked to the issue in the text above.
    • [ ] I've informed the technical writer about the documentation change if necessary.
  • OB-FIX(#1088) : 修复Binary类型的数据校验字符集的问题

    OB-FIX(#1088) : 修复Binary类型的数据校验字符集的问题

    Description:

    对于Binary类型来说,所有数据的存储看作二进制,是不需要校验字符集的。

    但是OB在处理Binary类型的数据操作时,会校验字符集,举个例子,如果你在utf8mb4的表里,往binary写入一个错误编码的"E688"字,是会报错的。只能以 insert into t values(X'E688')方法插入

    img_v2_b1110546-0d2f-4e6d-a9d0-38af5e3c243g

    这对业务从mysql迁移到OB是很痛苦的事情。

    Analysis:

    OB的binary类型底层实现和varchar相同,只在DDL阶段会区分binary类型。

    出错的原因是在SQL解析阶段(transform_tree)将binary的字段按varchar处理进行字符集编码检查。这是因为在词法语法解析时数据库无从得知当前的字符串是否为binary(目前SQL解析阶段还获取不到实际表结构)

    Fix:

    修复方法:

    个人觉得词法语法解析阶段进行字符集检查完全没有必要,后续物理执行计划算子打开时,OB也会对字符集编码进行处理。

    因此,建议删除resolve_const函数中的check_well_formed_str

    目前来看,这个函数只用来处理SQL解析后的parseNode节点,对后续的SQL逻辑没有侵入。

    [email protected]

  • Lower system resource requirement. I hope i can full replace mysql

    Lower system resource requirement. I hope i can full replace mysql

    For my thought, If you want to beat off MySQL, You must do more powerfull than MySQL

    I hope there be a minimal version OceanBase, which can beat MySQL,

    1 core cpu is ok, if it large than 1Ghz 128MB memory is ok?

    5GB disk or less requirement

    a tiny single execute file less than 500MB(pelase no so big)

    a single exe + a config file can start up a full standard OceanBase server.

    simple , fast, but powerful.

  • [Bug]: bash build.sh debug --init --make fail with ubuntu2004/centos85

    [Bug]: bash build.sh debug --init --make fail with ubuntu2004/centos85

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
    - Hardware parameter:OS type & Compliler & CPU etc. 
    - Others
    [email protected]:~/oceanbase# gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:hsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
    [email protected]:~/oceanbase# cat /etc/issue
    Ubuntu 20.04.3 LTS \n \l
    

    Fast Reproduce Steps(Required)

    按官网编译文档bash build.sh debug --init --make

    Actual Behavior

    错误r日志 image

    CMakeError.log image

    Expected Behavior

    No response

    other information

    No response

  • [Bug]: typo in sql/ob_spi.cpp cournt -> count

    [Bug]: typo in sql/ob_spi.cpp cournt -> count

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
    - Hardware parameter:OS type & Compliler & CPU etc. 
    - Others
    

    Fast Reproduce Steps(Required)

    typo

    Actual Behavior

    typo

    Expected Behavior

    No response

    other information

    No response

  • [Bug]: typo in sql/ob_spi.cpp initilize -> initialize

    [Bug]: typo in sql/ob_spi.cpp initilize -> initialize

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
    - Hardware parameter:OS type & Compliler & CPU etc. 
    - Others
    

    Fast Reproduce Steps(Required)

    typo

    Actual Behavior

    typo

    Expected Behavior

    No response

    other information

    No response

  • [Bug]: typo in sql/ob_spi.cpp convinence -> convenience

    [Bug]: typo in sql/ob_spi.cpp convinence -> convenience

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
    - Hardware parameter:OS type & Compliler & CPU etc. 
    - Others
    

    Fast Reproduce Steps(Required)

    typo

    Actual Behavior

    typo

    Expected Behavior

    No response

    other information

    No response

  • lock wait mgr sleep 10ms in non-mini mode

    lock wait mgr sleep 10ms in non-mini mode

    What changes were proposed in this pull request?

    in non-mini mode, lock wait mgr sleep interval is too long before(1s) and this pull request use 10ms instead fix https://github.com/oceanbase/oceanbase/issues/1255

    Why are the changes needed?

    Will break the compatibility? How if so?

    Does this PR introduce any user-facing change?

    How was this patch tested?

    Checklist

    • [ ] I've run the tests to see all new and existing tests pass.
    • [ ] If this Pull Request resolves an issue, I linked to the issue in the text above.
    • [ ] I've informed the technical writer about the documentation change if necessary.
  • [Bug]: lock wait too long time in non-mini mode

    [Bug]: lock wait too long time in non-mini mode

    Please check the issue list for the same bug

    • [X] Please checked issue list and confirm this bug is encountered for the first time.
    • [X] Please try full text in English and attach precise description.

    Environment

    - OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
    - Hardware parameter:OS type & Compliler & CPU etc. 
    - Others
    

    Fast Reproduce Steps(Required)

    ob_lock_wait_mgr.cpp:

    void ObLockWaitMgr::run1()
    {
      const int interval_us = (lib::is_mini_mode() ? 10 : 1000) * 1000; // sleep too long time to wake up others in non-mini mode
    
      (void)prctl(PR_SET_NAME, "ObLockWaitMgr", 0, 0, 0);
      while (!has_set_stop() || !is_hash_empty()) {
        ObLink* iter = check_timeout();
        while (NULL != iter) {
          Node* cur = CONTAINER_OF(iter, Node, retire_link_);
          iter = iter->next_;
          (void)repost(cur);
        }
    
        usleep(interval_us);
      }
    }
    

    Actual Behavior

    sleep too long time to wake up others in non-mini mode

    Expected Behavior

    No response

    other information

    No response

Kunlun distributed DBMS is a NewSQL OLTP relational distributed database management system

Kunlun distributed DBMS is a NewSQL OLTP relational distributed database management system. Application developers can use Kunlun 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 Kunlun.

Dec 26, 2022
dqlite is a C library that implements an embeddable and replicated SQL database engine with high-availability and automatic failover

dqlite dqlite is a C library that implements an embeddable and replicated SQL database engine with high-availability and automatic failover. The acron

Jan 9, 2023
YugabyteDB is a high-performance, cloud-native distributed SQL database that aims to support all PostgreSQL features
YugabyteDB is a high-performance, cloud-native distributed SQL database that aims to support all PostgreSQL features

YugabyteDB is a high-performance, cloud-native distributed SQL database that aims to support all PostgreSQL features. It is best to fit for cloud-native OLTP (i.e. real-time, business-critical) applications that need absolute data correctness and require at least one of the following: scalability, high tolerance to failures, or globally-distributed deployments.

Jan 7, 2023
HybridSE (Hybrid SQL Engine) is an LLVM-based, hybrid-execution and high-performance SQL engine
HybridSE (Hybrid SQL Engine) is an LLVM-based, hybrid-execution and high-performance SQL engine

HybridSE (Hybrid SQL Engine) is an LLVM-based, hybrid-execution and high-performance SQL engine. It can provide fast and consistent execution on heterogeneous SQL data systems, e.g., OLAD database, HTAP system, SparkSQL, and Flink Stream SQL.

Sep 12, 2021
PGSpider: High-Performance SQL Cluster Engine for distributed big data.

PGSpider: High-Performance SQL Cluster Engine for distributed big data.

Sep 8, 2022
A MariaDB-based command line tool to connect to OceanBase Database.

什么是 OceanBase Client OceanBase Client(简称 OBClient) 是一个基于 MariaDB 开发的客户端工具。您可以使用 OBClient 访问 OceanBase 数据库的集群。OBClient 采用 GPL 协议。 OBClient 依赖 libobclie

Nov 9, 2022
A proxy server for OceanBase Database.

OceanBase Database Proxy TODO: some badges here OceanBase Database Proxy (ODP for short) is a dedicated proxy server for OceanBase Database. OceanBase

Dec 9, 2022
DuckDB is an in-process SQL OLAP Database Management System
DuckDB is an in-process SQL OLAP Database Management System

DuckDB is an in-process SQL OLAP Database Management System

Jan 3, 2023
TimescaleDB is an open-source database designed to make SQL scalable for time-series data.

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.

Jan 2, 2023
BaikalDB, A Distributed HTAP Database.

BaikalDB supports sequential and randomised realtime read/write of structural data in petabytes-scale. BaikalDB is compatible with MySQL protocol and it supports MySQL style SQL dialect, by which users can migrate their data storage from MySQL to BaikalDB seamlessly.

Dec 28, 2022
GalaxyEngine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.

GalaxyEngine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.

Jan 4, 2023
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

Dec 26, 2022
A mini database for learning database

A mini database for learning database

Nov 14, 2022
A PostgreSQL extension providing an async networking interface accessible via SQL using a background worker and curl.

pg_net is a PostgreSQL extension exposing a SQL interface for async networking with a focus on scalability and UX.

Dec 14, 2022
A lightweight header-only C++11 library for quick and easy SQL querying with QtSql classes.

EasyQtSql EasyQtSql is a lightweight header-only C++11 library for quick and easy SQL querying with QtSql classes. Features: Header only C++11 library

Dec 30, 2022
Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.

Dec 31, 2022
A type safe SQL template library for C++

sqlpp11 A type safe embedded domain specific language for SQL queries and results in C++ Documentation is found in the wiki So what is this about? SQL

Dec 30, 2022
A bare-bone SQL implementation

MiniSQL A bare-bone SQL implementation. Project Structure include folder contains header files of all modules. These header files are meant to be shar

Apr 23, 2022
DB Browser for SQLite (DB4S) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.
DB Browser for SQLite (DB4S) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.

DB Browser for SQLite What it is DB Browser for SQLite (DB4S) is a high quality, visual, open source tool to create, design, and edit database files c

Jan 2, 2023