summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/big_record.pl4
-rw-r--r--tests/bug25714.c5
-rwxr-xr-xtests/grant.pl5
-rw-r--r--tests/mysql_client_test.c45
-rw-r--r--tests/thread_test.c4
5 files changed, 47 insertions, 16 deletions
diff --git a/tests/big_record.pl b/tests/big_record.pl
index ceedb6f114a..0d5766e5f5d 100755
--- a/tests/big_record.pl
+++ b/tests/big_record.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright (C) 2000, 2003 MySQL AB
+# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -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 St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a test with stores big records in a blob.
# Note that for the default test the mysql server should have been
diff --git a/tests/bug25714.c b/tests/bug25714.c
index c0d9fbf7652..40c631d76a5 100644
--- a/tests/bug25714.c
+++ b/tests/bug25714.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2007 MySQL AB
+/* Copyright (c) 2007 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -11,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 St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>
#include <my_sys.h>
diff --git a/tests/grant.pl b/tests/grant.pl
index 368ce0b3254..23a7d2110fb 100755
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl
-# Copyright (C) 2000, 2005 MySQL AB, 2009 Sun Microsystems, Inc.
+# Copyright (c) 2000, 2005 MySQL AB, 2009 Sun Microsystems, Inc.
+# Use is subject to license terms.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,7 +14,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 St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Testing of grants.
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index f8cdc57b4be..d62220e2aa8 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -13486,7 +13486,10 @@ static void test_truncation()
")";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
- stmt_text= "insert into t1 VALUES ("
+
+ {
+ const char insert_text[]=
+ "insert into t1 VALUES ("
"-10, " /* i8 */
"200, " /* ui8 */
"32000, " /* i16 */
@@ -13502,8 +13505,9 @@ static void test_truncation()
"'12345.67 ', " /* tx_1 */
"'12345.67abc'" /* ch_2 */
")";
- rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
- myquery(rc);
+ rc= mysql_real_query(mysql, insert_text, strlen(insert_text));
+ myquery(rc);
+ }
stmt_text= "select i8 c1, i8 c2, ui8 c3, i16_1 c4, ui16 c5, "
" i16 c6, ui16 c7, i32 c8, i32_1 c9, i32_1 c10, "
@@ -18638,11 +18642,8 @@ static void test_bug38486(void)
static void test_bug33831(void)
{
MYSQL *l_mysql;
- my_bool error;
DBUG_ENTER("test_bug33831");
-
- error= 0;
if (!(l_mysql= mysql_client_init(NULL)))
{
@@ -18665,9 +18666,8 @@ static void test_bug33831(void)
DIE_UNLESS(0);
}
-
mysql_close(l_mysql);
-
+
DBUG_VOID_RETURN;
}
@@ -19774,6 +19774,34 @@ static void test_bug12337762()
DBUG_VOID_RETURN;
}
+
+/*
+ BUG 11754979 - 46675: ON DUPLICATE KEY UPDATE AND UPDATECOUNT() POSSIBLY WRONG
+*/
+
+static void test_bug11754979()
+{
+ MYSQL* conn;
+ DBUG_ENTER("test_bug11754979");
+
+ myheader("test_bug11754979");
+ DIE_UNLESS((conn= mysql_client_init(NULL)));
+ DIE_UNLESS(mysql_real_connect(conn, opt_host, opt_user,
+ opt_password, opt_db ? opt_db:"test", opt_port,
+ opt_unix_socket, CLIENT_FOUND_ROWS));
+ myquery(mysql_query(conn, "DROP TABLE IF EXISTS t1"));
+ myquery(mysql_query(conn, "CREATE TABLE t1(id INT, label CHAR(1), PRIMARY KEY(id))"));
+ myquery(mysql_query(conn, "INSERT INTO t1(id, label) VALUES (1, 'a')"));
+ myquery(mysql_query(conn, "INSERT INTO t1(id, label) VALUES (1, 'a') "
+ "ON DUPLICATE KEY UPDATE id = 4"));
+ DIE_UNLESS(mysql_affected_rows(conn) == 2);
+ myquery(mysql_query(conn, "DROP TABLE t1"));
+ mysql_close(conn);
+
+ DBUG_VOID_RETURN;
+}
+
+
/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -20119,6 +20147,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug11766854", test_bug11766854 },
{ "test_bug12337762", test_bug12337762 },
{ "test_progress_reporting", test_progress_reporting },
+ { "test_bug11754979", test_bug11754979 },
{ 0, 0 }
};
diff --git a/tests/thread_test.c b/tests/thread_test.c
index e0be59aa7c5..bf0fb8ea2c0 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -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 St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>