summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
commit5f6380adde2dac3f32b40339b9b702c0135eb7d6 (patch)
tree31068acc0b39c208d35d524688a5985831af0447 /tests
parent8a23ae088dc38f591efeab9eccdef5eb9094add9 (diff)
parent97e640b9ae83e07b444fceede6b0524256c7a3cc (diff)
downloadmariadb-git-5f6380adde2dac3f32b40339b9b702c0135eb7d6.tar.gz
10.0-base merge
Diffstat (limited to 'tests')
-rw-r--r--tests/connect_test.c2
-rw-r--r--tests/deadlock_test.c2
-rwxr-xr-xtests/drop_test.pl2
-rwxr-xr-xtests/export.pl2
-rwxr-xr-xtests/fork2_test.pl2
-rwxr-xr-xtests/fork_big.pl2
-rw-r--r--tests/fork_big2.pl2
-rwxr-xr-xtests/index_corrupt.pl2
-rwxr-xr-xtests/insert_and_repair.pl2
-rw-r--r--tests/insert_test.c2
-rw-r--r--tests/list_test.c2
-rwxr-xr-xtests/lock_test.pl2
-rw-r--r--tests/mysql_client_fw.c5
-rw-r--r--tests/mysql_client_test.c73
-rwxr-xr-xtests/pmail.pl2
-rwxr-xr-xtests/rename_test.pl2
-rw-r--r--tests/select_test.c2
-rw-r--r--tests/showdb_test.c2
-rw-r--r--tests/ssl_test.c2
-rwxr-xr-xtests/table_types.pl2
-rwxr-xr-xtests/test_delayed_insert.pl2
-rwxr-xr-xtests/truncate.pl2
22 files changed, 95 insertions, 23 deletions
diff --git a/tests/connect_test.c b/tests/connect_test.c
index a0f2d7561d1..3e23922031b 100644
--- a/tests/connect_test.c
+++ b/tests/connect_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/deadlock_test.c b/tests/deadlock_test.c
index e386205a985..b518f531e15 100644
--- a/tests/deadlock_test.c
+++ b/tests/deadlock_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <mysql.h>
#include <stdio.h>
diff --git a/tests/drop_test.pl b/tests/drop_test.pl
index 272c4029e0f..ad9b0cfd1c2 100755
--- a/tests/drop_test.pl
+++ b/tests/drop_test.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test with uses processes to insert, select and drop tables.
diff --git a/tests/export.pl b/tests/export.pl
index d543ede8697..09a7f2b5dc2 100755
--- a/tests/export.pl
+++ b/tests/export.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# This is a test with uses two processes to a database.
# The other inserts records in two tables, the other does a lot of joins
diff --git a/tests/fork2_test.pl b/tests/fork2_test.pl
index 64e3e060b09..baf6bc47ba8 100755
--- a/tests/fork2_test.pl
+++ b/tests/fork2_test.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# This is a test with uses 5 processes to insert, update and select from
# two tables.
diff --git a/tests/fork_big.pl b/tests/fork_big.pl
index a674f7f7164..506a2fb0d8e 100755
--- a/tests/fork_big.pl
+++ b/tests/fork_big.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test with uses many processes to test a MySQL server.
diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
index 77b6f305ef5..516e8ff9478 100644
--- a/tests/fork_big2.pl
+++ b/tests/fork_big2.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test with uses many processes to test a MySQL server.
diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl
index fa4c8151277..85c6c5d9110 100755
--- a/tests/index_corrupt.pl
+++ b/tests/index_corrupt.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test for a key cache bug (bug #10167)
diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl
index 00ab20f051b..fb65a646d43 100755
--- a/tests/insert_and_repair.pl
+++ b/tests/insert_and_repair.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test of insert and repair/check.
diff --git a/tests/insert_test.c b/tests/insert_test.c
index bb7b0a2f928..e67d03dd435 100644
--- a/tests/insert_test.c
+++ b/tests/insert_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/list_test.c b/tests/list_test.c
index 8b752c8b6e4..5b984b9eca9 100644
--- a/tests/list_test.c
+++ b/tests/list_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifdef __WIN__
#include <windows.h>
diff --git a/tests/lock_test.pl b/tests/lock_test.pl
index a40bec681f6..c783e605d83 100755
--- a/tests/lock_test.pl
+++ b/tests/lock_test.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# This is a test with uses two processes to a database.
# The other inserts records in two tables, the other does a lot of joins
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index 207eaead135..90a1ea77a50 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <my_global.h>
#include <my_sys.h>
@@ -30,8 +30,9 @@
and use poll()/select() to wait for them to complete. This way we can get
a good coverage testing of the non-blocking API as well.
*/
+#include <my_context.h>
static my_bool non_blocking_api_enabled= 0;
-#if !defined(EMBEDDED_LIBRARY)
+#if !defined(EMBEDDED_LIBRARY) && !defined(MY_CONTEXT_DISABLE)
#define WRAP_NONBLOCK_ENABLED non_blocking_api_enabled
#include "nonblock-wrappers.h"
#endif
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 8519bd91d23..e4454fb8e41 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/***************************************************************************
This is a test sample to test the new features in MySQL client-server
@@ -18775,6 +18775,76 @@ static void test_bug11754979()
DBUG_VOID_RETURN;
}
+static void test_ps_sp_out_params()
+{
+ MYSQL *my;
+ MYSQL_STMT *stmt;
+ MYSQL_BIND bind[1];
+ char buffer[20];
+ int status, rc;
+
+ myheader("test_ps_sp_out_params");
+ my= mysql_client_init(NULL);
+
+ if (!mysql_real_connect(my, opt_host, opt_user,
+ opt_password, current_db, opt_port,
+ opt_unix_socket, CLIENT_MULTI_RESULTS))
+ DIE("mysql_real_connect failed");
+
+ rc= mysql_query(my, "DROP PROCEDURE IF EXISTS p1");
+ myquery(rc);
+
+ rc= mysql_query(my,
+ "CREATE PROCEDURE p1(OUT out_param VARCHAR(19)) "
+ "BEGIN"
+ " SELECT 'foo' FROM DUAL;"
+ " SET out_param='foo';"
+ " SELECT 'foo' FROM DUAL;"
+ "END");
+ myquery(rc);
+
+ stmt= mysql_stmt_init(my);
+
+ rc= mysql_stmt_prepare(stmt, "CALL P1(?)", 10);
+ DIE_UNLESS(rc==0);
+
+ DIE_UNLESS(mysql_stmt_param_count(stmt) == 1);
+
+ memset(bind, 0, sizeof(MYSQL_BIND));
+ bind[0].buffer= buffer;
+ bind[0].buffer_length= sizeof(buffer);
+ bind[0].buffer_type= MYSQL_TYPE_STRING;
+
+ mysql_stmt_bind_param(stmt, bind);
+
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+
+ do {
+ if (mysql_stmt_field_count(stmt))
+ {
+ /* since server sends a status packet at the end,
+ there must follow at least one additional packet */
+ DIE_UNLESS(mysql_more_results(stmt->mysql));
+
+ mysql_stmt_bind_result(stmt, bind);
+
+ rc= mysql_stmt_fetch(stmt);
+ DIE_UNLESS(rc== 0);
+
+ DIE_UNLESS(strcmp(buffer, "foo") == 0);
+ }
+ status= mysql_stmt_next_result(stmt);
+ } while (status == 0);
+
+ rc= mysql_stmt_reset(stmt);
+ DIE_UNLESS(rc== 0);
+
+ mysql_stmt_close(stmt);
+ mysql_close(my);
+
+ printf("end\n");
+}
/*
Bug#13001491: MYSQL_REFRESH CRASHES WHEN STORED ROUTINES ARE RUN CONCURRENTLY.
@@ -19224,6 +19294,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug11754979", test_bug11754979 },
{ "test_bug13001491", test_bug13001491 },
{ "test_mdev4326", test_mdev4326 },
+ { "test_ps_sp_out_params", test_ps_sp_out_params },
{ 0, 0 }
};
diff --git a/tests/pmail.pl b/tests/pmail.pl
index 38905832069..393d459a717 100755
--- a/tests/pmail.pl
+++ b/tests/pmail.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# Prints mails to standard output
diff --git a/tests/rename_test.pl b/tests/rename_test.pl
index 23fc33c9095..9355641dcc8 100755
--- a/tests/rename_test.pl
+++ b/tests/rename_test.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test with uses processes to insert, select and drop tables.
diff --git a/tests/select_test.c b/tests/select_test.c
index 5a9021c4dd6..f85a7bee2bf 100644
--- a/tests/select_test.c
+++ b/tests/select_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
diff --git a/tests/showdb_test.c b/tests/showdb_test.c
index 4be48c28205..05c42b531cd 100644
--- a/tests/showdb_test.c
+++ b/tests/showdb_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifdef __WIN__
diff --git a/tests/ssl_test.c b/tests/ssl_test.c
index ad6bc925cc6..3793538b4d2 100644
--- a/tests/ssl_test.c
+++ b/tests/ssl_test.c
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifdef __WIN__
diff --git a/tests/table_types.pl b/tests/table_types.pl
index 23d26215abe..2591d4b6f99 100755
--- a/tests/table_types.pl
+++ b/tests/table_types.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
use DBI;
use Benchmark;
diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl
index 5046c4fb580..ac00afaaba4 100755
--- a/tests/test_delayed_insert.pl
+++ b/tests/test_delayed_insert.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# This is a test for INSERT DELAYED
#
diff --git a/tests/truncate.pl b/tests/truncate.pl
index 85e826fd4cd..bf0fb779fe5 100755
--- a/tests/truncate.pl
+++ b/tests/truncate.pl
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# This is a test with uses many processes to test a MySQL server.