@@ -51,7 +51,7 @@ def test_mysql_client(mysql_client, server_address):
5151 -e "SELECT 'тест' as b;"
5252 ''' .format (host = server_address , port = server_port ), demux = True )
5353
54- assert stdout == 'a \n 1 \n b \n тест \n '
54+ assert stdout == '\n ' . join ([ 'a' , '1' , 'b' , 'тест' , '' ])
5555
5656 code , (stdout , stderr ) = mysql_client .exec_run ('''
5757 mysql --protocol tcp -h {host} -P {port} default -u default --password=abc -e "select 1 as a;"
@@ -75,14 +75,17 @@ def test_mysql_client(mysql_client, server_address):
7575 mysql --protocol tcp -h {host} -P {port} default -u default --password=123
7676 -e "CREATE DATABASE x;"
7777 -e "USE x;"
78- -e "CREATE TABLE table1 (a UInt32) ENGINE = Memory;"
78+ -e "CREATE TABLE table1 (column UInt32) ENGINE = Memory;"
7979 -e "INSERT INTO table1 VALUES (0), (1), (5);"
8080 -e "INSERT INTO table1 VALUES (0), (1), (5);"
81- -e "SELECT * FROM table1 ORDER BY a ;"
81+ -e "SELECT * FROM table1 ORDER BY column ;"
8282 -e "DROP DATABASE x;"
83+ -e "CREATE TEMPORARY TABLE tmp (tmp_column UInt32);"
84+ -e "INSERT INTO tmp VALUES (0), (1);"
85+ -e "SELECT * FROM tmp ORDER BY tmp_column;"
8386 ''' .format (host = server_address , port = server_port ), demux = True )
8487
85- assert stdout == 'a \n 0 \n 0 \n 1 \n 1 \n 5 \n 5 \n '
88+ assert stdout == '\n ' . join ([ 'column' , '0' , '0' , '1' , '1' , '5' , '5' , 'tmp_column' , '0' , '1' , '' ])
8689
8790
8891def test_python_client (server_address ):
0 commit comments