Skip to content

select multiple information functions will get wrong result #59183

@silverbullet233

Description

@silverbullet233

Steps to reproduce the behavior (Required)

mysql>   select current_user(),database(),connection_id();
+----------------+------------+-----------------+
| CURRENT_USER() | DATABASE() | CONNECTION_ID() |
+----------------+------------+-----------------+
| tpch_1g        | tpch_1g    |        16777217 |
+----------------+------------+-----------------+
1 row in set (0.01 sec)

Expected behavior (Required)

mysql>   select current_user(),database(),connection_id();
+----------------+------------+-----------------+
| CURRENT_USER() | DATABASE() | CONNECTION_ID() |
+----------------+------------+-----------------+
| 'root'@'%'     | tpch_1g    |        16777217 |
+----------------+------------+-----------------+
1 row in set (0.00 sec)

Real behavior (Required)

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions