oceanbase / miniob

MiniOB is a compact database that assists developers in understanding the fundamental workings of a database.
https://oceanbase.github.io/miniob/
Mulan Permissive Software License, Version 2
2.86k stars 1.01k forks source link

实现会话变量的能力 #344

Open hnwyllmm opened 2 months ago

hnwyllmm commented 2 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

当我们在使用一个数据库时,需要一些手段来调整当前会话或整个系统的行为。比如事务隔离级别、超时时间、show trace等。

Describe the solution you'd like A clear and concise description of what you want to happen.

使用会话变量来做这个控制。 会话变量,session variables,是MySQL中一个非常基础的功能,当前MiniOB中有非常简单的实现,但是没有到能够正常使用的程度。

由于MiniOB是一个学习使用的数据库,对各个功能要求尽量简介、够用,保持代码结构清晰,所以不用实现与MySQL完全相同的功能。 在初步阶段,需要实现一个会话变量的框架,后续能够在此基础上做扩展。

功能列表:

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

OceanBase 数据库的实现可以参考 https://github.com/oceanbase/oceanbase/tree/develop/src/share/system_variable

由于OceanBase 是一个生产级数据库,实现较复杂,可以浏览代码做参考。

如果对这个feature感兴趣,可以联系我,随时交流。

DylanGuo916 commented 2 months ago

Already sent you an email 🙋‍♂️