diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-05-25 17:19:20 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-05-25 17:19:20 +0200 |
commit | b12bb225d137d2773b05c406ac220c1dbca003ee (patch) | |
tree | 7d42d7a1730993e759511f4283655929592c7727 /mysql-test/t | |
parent | 20e09b39fc769a325ff3bca882ab1444f77cf845 (diff) | |
download | mariadb-git-b12bb225d137d2773b05c406ac220c1dbca003ee.tar.gz |
Bug #44922 mysqltest's query_get_value function can't work with queries containing ','
check_command_args() always looks for the first , (or whatever)
Extended check_command_args() to let arguments be quoted
Added test in mysqltest.test
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/connect.test | 3 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index f609240646a..9a29e4ff861 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -55,7 +55,8 @@ disconnect con4; connect (fail_con,localhost,test,,test2); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR -connect (fail_con,localhost,test,,""); +# Need to protect "" within '' so it's interpreted literally +connect (fail_con,localhost,test,,'""'); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR connect (fail_con,localhost,test,zorro,test2); diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 55cd041aaf5..0bc58d0f2f8 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -2037,6 +2037,10 @@ let $value= query_get_value(SELECT 'A B' AS "MyColumn", MyColumn, 1); let $value= query_get_value(SELECT 1 AS "My Column", My Column, 1); --echo value= $value # +# 4.1 Query containing , protected by quotes, quotes also on column +let $value= query_get_value('SELECT 1 as a, 2 as b', "b", 1); +--echo value= $value +# #------------ Negative tests ------------ # 5. Incomplete statement including missing parameters # 5.1 incomplete statement |