
Description: ============ 对于Binary类型来说,所有数据的存储看作二进制,是不需要校验字符集的。 但是OB在处理Binary类型的数据操作时,会校验字符集,举个例子,如果你在utf8mb4的表里,往binary写入GBK编码的"你"字,是会报错的。只能以 insert into t values(X'C4E3')方法插入 这对业务从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逻辑没有侵入。 ------------- wenghaixing@unionpay.com
What is OceanBase Database
OceanBase is a distributed relational SQL database built from scratch. It is highly scalable, resilient and can take on both transactional and analytical workloads, and it is highly compatible with MySQL syntax and features. OceanBase can be deployed on virtual machines in any cloud or physical hosts on-premise. Meanwhile, since it is a multi-tenant cluster, users can achieve database resource pooling and improve their efficiency.
Core features
- Scalable OLTP
- Linear scalability by adding nodes to the cluster
- Continuous availability with Paxos-based regional disaster tolerance
- Partition-level leader distribution and transparent data shuffling
- Convert distributed transactions across multi-node into local transactions via "table group" technology
- Highly concurrent updates on hot row through early lock release (ELR)
- Nearly unlimited connections in one instance on scalable nodes through decoupled session & thread
- Prevent silent data corruption (SDC) through multidimensional data consistency checksum
- No.1 in TPC-C benchmark with 707 million tpmC
- Operational OLAP
- Process analytical tasks in one engine, no need to migrate data to OLAP engine
- Analyze large amounts of data on multiple nodes in one OceanBase cluster with MPP architecture
- Advanced SQL engine with CBO optimizer, distributed execution scheduler and global index
- Fast data loading through parallel DML, and with 50% storage cost under compression in most cases
- No.2 in TPC-H 30,000 GB benchmark with 15.26 million QphH
- Multi-tenant
- Create multiple tenants (instances) in one OceanBase cluster with isolated resource and access
- Multidimensional and transparently scale up/out for each tenant, and scaling up takes effect immediately
- Database consolidation: multi-tenant and flexible scaling can achieve resource pooling and improve utilization
- Improve management efficiency and reduce costs without compromising performance and availability
Quick start
See Quick start to try out OceanBase Database.
System architecture
Roadmap
Link: 3.1.5 function list
Case study
For our success stories, see Success stories.
Contributing
Your contributions to our code will be highly appreciated. For details about how to contribute to OceanBase, see Contribute to OceanBase.
Licensing
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 follow the MulanPubL - 2.0 license.