Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: default value of autocommit is off and default value is not effective #10898

Closed
1 task done
aressu1985 opened this issue Jul 28, 2023 · 18 comments
Closed
1 task done
Assignees
Labels
Milestone

Comments

@aressu1985
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93):bdc86a4e934981340105cf051b50c5e9f36549ef
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

the default value:
mysql> show variables like 'auto%';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| auto_generate_certs | off |
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| autocommit | on |
| automatic_sp_privileges | off |
+--------------------------+-------+
5 rows in set (0.01 sec)

but when run a insert in a txn and do not commit:
mysql> create table t1(a int);
Query OK, 0 rows affected (0.08 sec)

mysql> create table t1(a int);
Query OK, 0 rows affected (0.08 sec)

mysql> insert into t1 values(1);
Query OK, 1 row affected (0.03 sec)

in a another txn, it can see the result:
Database changed
mysql> select * from t1;
+------+
| a |
+------+
| 1 |
+------+
1 row in set (0.01 sec)

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

@daviszhen
Copy link
Contributor

还没看

6 similar comments
@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

还没看

@daviszhen
Copy link
Contributor

@aressu1985
autocommit 是 on呀。自动提交结果。我认为行为是对的。

image

@daviszhen
Copy link
Contributor

@aressu1985 而且git log 里面没找到 commit bdc86a4

@tianyahui-python
Copy link
Contributor

最新代码, 复现步骤:
1.登录 sys 租户
2.创建普通租户create account test_tenant_1 admin_name 'test_account' identified by '111';
3.登录普通租户
4.mysql> show variables like '%autocommit%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit | off |
+---------------+-------+
1 row in set (0.01 sec)
bug 描述: 普通租户的默认autocommit配置为关闭的, 但是在执行sql的过程中的行为还是autocommit开启的行为

@daviszhen
Copy link
Contributor

变量v没有重新赋值。
image

@daviszhen daviszhen mentioned this issue Aug 7, 2023
7 tasks
@fengttt
Copy link
Contributor

fengttt commented Aug 7, 2023

bug 描述: 普通租户的默认autocommit配置为关闭的,

Why?

@daviszhen
Copy link
Contributor

pr 卡在#10882 上了

@daviszhen daviszhen assigned aressu1985 and unassigned daviszhen Aug 8, 2023
@daviszhen
Copy link
Contributor

it was fixed

@aronchanisme
Copy link
Contributor

commitid

root@test0:/data/mo/20230802/matrixone# mo_ctl get_cid
2023-08-10 10:41:33.641 UTC+0800    [INFO]    Try get mo commit id
commit 8af14455f059e657890f4249ca63699476bb7f63
Author: XuPeng-SH <[email protected]>
Date:   Thu Aug 10 00:01:28 2023 +0800

    dn vector wrapper supports const vector (#11133)
    
2023-08-10 10:41:33.678 UTC+0800    [INFO]    Get commit id succeeded

Currently it seems setting autocommit is set to on for common tenant user. And under this condition, the behavior is acting as expected.
image

@sukki37 sukki37 closed this as completed Aug 10, 2023
@matrix-meow
Copy link
Contributor

Hello @aressu1985. The bug issue in the BVT test code has not been removed,issues automatically open.

@matrix-meow matrix-meow reopened this Aug 10, 2023
@daviszhen daviszhen assigned daviszhen and unassigned aressu1985 Aug 10, 2023
@daviszhen daviszhen assigned daviszhen and unassigned daviszhen Aug 10, 2023
@daviszhen
Copy link
Contributor

好像还有点问题。我在看下结果

@daviszhen daviszhen assigned aressu1985 and unassigned daviszhen Aug 10, 2023
@daviszhen
Copy link
Contributor

daviszhen commented Aug 10, 2023

已经确认了pr没问题。应该解决掉了。再转给苏动。
@sukki37 会带为去掉10898的标签。感谢。

@daviszhen daviszhen assigned sukki37 and unassigned aressu1985 Aug 10, 2023
@sukki37 sukki37 closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants