diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2022-02-15 11:35:18 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2022-02-15 11:35:18 +0400 |
commit | 14cc679c95e99c494e1bc15d89929588b95c27e7 (patch) | |
tree | 40b9146a2c5c83dac0c94bc697c67a98b24adfe1 /mysql-test | |
parent | 33fd136c61baf79b01a7602e8bd5cae9a6ec0844 (diff) | |
download | mariadb-git-bb-10.7-mdev-27831-hf.tar.gz |
MDEV-27831 Let the SQL SERVICE user set the current user name.bb-10.7-mdev-27831-hf
The 'user' argument added to the mysql_real_connect_local.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/plugins/r/test_sql_service.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/test_sql_service.test | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result index 00f0411b665..4d81152659f 100644 --- a/mysql-test/suite/plugins/r/test_sql_service.result +++ b/mysql-test/suite/plugins/r/test_sql_service.result @@ -65,6 +65,16 @@ show status like 'test_sql_query_result'; Variable_name Value Test_sql_query_result Query returned 5 rows. drop table t1; +set global test_sql_service_execute_sql_global= 'create table test.t1 select current_user()'; +select * from t1; +current_user() +test_sql_service_gl@ +drop table t1; +set global test_sql_service_execute_sql_local= 'create table test.t1 select current_user()'; +select * from t1; +current_user() +test_sql_service@ +drop table t1; uninstall plugin test_sql_service; Warnings: Warning 1620 Plugin is busy and will be uninstalled on shutdown diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test index b80d78fe6e5..f924f06dfc6 100644 --- a/mysql-test/suite/plugins/t/test_sql_service.test +++ b/mysql-test/suite/plugins/t/test_sql_service.test @@ -56,5 +56,12 @@ set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time show status like 'test_sql_query_result'; drop table t1; +set global test_sql_service_execute_sql_global= 'create table test.t1 select current_user()'; +select * from t1; +drop table t1; +set global test_sql_service_execute_sql_local= 'create table test.t1 select current_user()'; +select * from t1; +drop table t1; + uninstall plugin test_sql_service; |