diff options
author | unknown <msvensson@pilot.(none)> | 2007-06-01 12:01:42 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.(none)> | 2007-06-01 12:01:42 +0200 |
commit | 5b0e66a752a780e93f35e7cc5ff063cc1110384d (patch) | |
tree | 882f5324286a3268fd6eed5422e461dbc9a39958 /mysql-test/r/mysqltest.result | |
parent | 0930f2088971d8f9a30dc15d1072c14b53a6f5e8 (diff) | |
download | mariadb-git-5b0e66a752a780e93f35e7cc5ff063cc1110384d.tar.gz |
Bug#28497 wait_for_slave_to_stop can cause random replication mysql-test failures
- Add funtion "query_get_value to allow reading a fields value
into a $variable
client/mysqltest.c:
- Add function "let $var= query_get_value(<query>,<colname>,<row>)"
making it possible to read a value from a specific field in a query
into a $variable.
mysql-test/r/mysqltest.result:
Add test cases for "query_get_value"
mysql-test/t/mysqltest.test:
Add test cases for "query_get_value"
Diffstat (limited to 'mysql-test/r/mysqltest.result')
-rw-r--r-- | mysql-test/r/mysqltest.result | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 000bec7023c..92265c94c4b 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -655,4 +655,43 @@ INSERT INTO t1 SELECT f1 - 256 FROM t1; INSERT INTO t1 SELECT f1 - 512 FROM t1; SELECT * FROM t1; DROP TABLE t1; +CREATE TABLE t1( +a int, b varchar(255), c datetime +); +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +a int(11) YES NULL +b varchar(255) YES NULL +c datetime YES NULL +statement=SHOW COLUMNS FROM t1 row_number=1, column_name="Type", Value=int(11) +statement="SHOW COLUMNS FROM t1" row_number=1, column_name="Type", Value=int(11) +statement=SHOW COLUMNS FROM t1 row_number=1, column_name=Default, Value=NULL +value= ->A B<- +value= 1 +mysqltest: At line 1: query_get_value - argument list started with '(' must be ended with ')' +mysqltest: At line 1: Missing required argument 'query' to command 'query_get_value' +mysqltest: At line 1: Missing required argument 'column name' to command 'query_get_value' +mysqltest: At line 1: Missing required argument 'row number' to command 'query_get_value' +value= No such row +value= No such row +mysqltest: At line 1: Invalid row number: 'notnumber' +mysqltest: At line 1: Could not find column 'column_not_exists' in the result of 'SHOW COLUMNS FROM t1' +mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set +mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A' +value= No such row +mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1 + +Field Type Null Key Default Extra +a int(11) YES -><- NULL +b varchar(255) YES -><- NULL +c datetime YES -><- NULL + +Number of columns with Default NULL: 3 + +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +a int(11) YES NULL +b varchar(255) YES NULL +c datetime YES NULL +drop table t1; End of tests |