Skip to content

Commit

Permalink
show variables not support mysql handlers but can use table function …
Browse files Browse the repository at this point in the history
…show_variables() to query all vars in session
  • Loading branch information
TCeason committed Sep 6, 2024
1 parent 6d674fd commit e46f6e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/sqllogictests/src/client/mysql_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct MySQLClient {

impl MySQLClient {
pub async fn create(database: &str) -> Result<Self> {
let url = format!("mysql://root:@127.0.0.1:3307/{database}");
let url = format!("mysql://root:@127.0.0.1:3308/{database}");
let pool = Pool::new(url.as_str());
let conn = pool.get_conn().await?;
Ok(Self {
Expand Down
10 changes: 9 additions & 1 deletion tests/sqllogictests/suites/query/show_variables.test
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
statement ok
set variable (a, b) = (select 3, 'x')

onlyif http
query TTT
show variables
----
a 3 UInt8
b 'x' String

onlyif http
query TTT
show variables where name like 'a'
----
a 3 UInt8


onlyif http
query TTT
show variables where type = 'UInt8'
----
a 3 UInt8

onlyif http
query TTT
show variables where value = '\'x\''
----
b 'x' String

query TTT
select name, value, type from show_variables() where name='a';
----
a 3 UInt8

0 comments on commit e46f6e9

Please sign in to comment.