diff options
author | tulin@dl145b.mysql.com <> | 2005-06-20 14:24:13 +0200 |
---|---|---|
committer | tulin@dl145b.mysql.com <> | 2005-06-20 14:24:13 +0200 |
commit | 27cdade716cf53418f892c9f5b8ab5838b49764c (patch) | |
tree | f108aa3b2c2f759ff0ae9f10da05ea6b1be4aa49 | |
parent | b217fc0692b2deb1ecfbe1da031a21331b39fc93 (diff) | |
parent | b875f7902d1b5960d7274351c7143d77656e1c78 (diff) | |
download | mariadb-git-27cdade716cf53418f892c9f5b8ab5838b49764c.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | sql/share/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 2 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 15 |
4 files changed, 20 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 3827a03445b..514cd21274f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,12 +102,13 @@ tags: # Test installation test: - cd mysql-test; ./mysql-test-run && ./mysql-test-run --ps-protocol + cd mysql-test; \ + perl mysql-test-run.pl && perl mysql-test-run.pl --ps-protocol test-force: cd mysql-test; \ - ./mysql-test-run --force ;\ - ./mysql-test-run --ps-protocol --force + perl mysql-test-run.pl --force ;\ + perl mysql-test-run.pl --ps-protocol --force # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index e7ec69fda39..fcc04c950aa 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5355,6 +5355,6 @@ ER_BINLOG_CREATE_ROUTINE_NEED_SUPER ER_EXEC_STMT_WITH_OPEN_CURSOR eng "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it." ER_STMT_HAS_NO_OPEN_CURSOR - eng "The statement (%d) has no open cursor." + eng "The statement (%lu) has no open cursor." ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG eng "Explicit or implicit commit is not allowed in stored function or trigger." diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 57deec91e8a..8ff77f5a404 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2209,7 +2209,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length) if (!stmt->cursor || !stmt->cursor->is_open()) { - my_error(ER_STMT_HAS_NO_OPEN_CURSOR, MYF(0)); + my_error(ER_STMT_HAS_NO_OPEN_CURSOR, MYF(0), stmt_id); DBUG_VOID_RETURN; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 8bea0a20a0f..8debf7614a3 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -12995,6 +12995,19 @@ static void test_bug9478() rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == MYSQL_NO_DATA); + { + char buff[8]; + /* Fill in the fethc packet */ + int4store(buff, stmt->stmt_id); + buff[4]= 1; /* prefetch rows */ + rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, buff, + sizeof(buff), 0,0,1) || + (*mysql->methods->read_query_result)(mysql)); + DIE_UNLESS(rc); + if (!opt_silent && i == 0) + printf("Got error (as expected): %s\n", mysql_error(mysql)); + } + rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); @@ -13039,7 +13052,7 @@ static void test_bug9478() /* Fill in the execute packet */ int4store(buff, stmt->stmt_id); buff[4]= 0; /* Flag */ - int4store(buff+5, 1); /* Return 1 row */ + int4store(buff+5, 1); /* Reserved for array bind */ rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), 0,0,1) || (*mysql->methods->read_query_result)(mysql)); |