diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-02 07:39:33 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-02 07:39:33 +0300 |
commit | f347b3e0e6592329b1447fa460aca0a4b1f680b1 (patch) | |
tree | c671aced17dc9f6d0cc6c5a660b73b2e2dcfe841 /tests | |
parent | b0f836053b094b09999c102d10bf0ad6ed761ac6 (diff) | |
parent | 1df1a6392477ad211b2a66c6eccbe9d5c6316c7e (diff) | |
download | mariadb-git-f347b3e0e6592329b1447fa460aca0a4b1f680b1.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/big_record.pl | 2 | ||||
-rwxr-xr-x | tests/drop_test.pl | 2 | ||||
-rwxr-xr-x | tests/export.pl | 2 | ||||
-rwxr-xr-x | tests/fork2_test.pl | 2 | ||||
-rwxr-xr-x | tests/fork_big.pl | 2 | ||||
-rw-r--r-- | tests/fork_big2.pl | 2 | ||||
-rwxr-xr-x | tests/grant.pl | 2 | ||||
-rwxr-xr-x | tests/index_corrupt.pl | 2 | ||||
-rwxr-xr-x | tests/insert_and_repair.pl | 2 | ||||
-rwxr-xr-x | tests/lock_test.pl | 2 | ||||
-rwxr-xr-x | tests/mail_to_db.pl | 2 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 56 | ||||
-rwxr-xr-x | tests/pmail.pl | 2 | ||||
-rwxr-xr-x | tests/rename_test.pl | 2 | ||||
-rwxr-xr-x | tests/table_types.pl | 2 | ||||
-rwxr-xr-x | tests/test_delayed_insert.pl | 2 | ||||
-rwxr-xr-x | tests/truncate.pl | 2 |
17 files changed, 71 insertions, 17 deletions
diff --git a/tests/big_record.pl b/tests/big_record.pl index cb1f8998468..b08f7ea60e2 100755 --- a/tests/big_record.pl +++ b/tests/big_record.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. # diff --git a/tests/drop_test.pl b/tests/drop_test.pl index 329f65eb65d..e4ae5a2671f 100755 --- a/tests/drop_test.pl +++ b/tests/drop_test.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000 MySQL AB # Use is subject to license terms diff --git a/tests/export.pl b/tests/export.pl index f99798ecac8..dace79feb30 100755 --- a/tests/export.pl +++ b/tests/export.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (C) 2000, 2001 MySQL AB # Use is subject to license terms diff --git a/tests/fork2_test.pl b/tests/fork2_test.pl index 356055733fa..a05a9b96679 100755 --- a/tests/fork2_test.pl +++ b/tests/fork2_test.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000, 2001 MySQL AB # Use is subject to license terms diff --git a/tests/fork_big.pl b/tests/fork_big.pl index 623377ab5cd..b5f8770c903 100755 --- a/tests/fork_big.pl +++ b/tests/fork_big.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w use strict; # Copyright (c) 2001, 2006 MySQL AB diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl index c844d290834..7f055609108 100644 --- a/tests/fork_big2.pl +++ b/tests/fork_big2.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (c) 2002, 2003, 2005, 2006 MySQL AB # Use is subject to license terms diff --git a/tests/grant.pl b/tests/grant.pl index cd651643316..b50481a93fc 100755 --- a/tests/grant.pl +++ b/tests/grant.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (c) 2000, 2005 MySQL AB, 2009 Sun Microsystems, Inc. # Use is subject to license terms. diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl index 6b04ce8a59c..8194982755a 100755 --- a/tests/index_corrupt.pl +++ b/tests/index_corrupt.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2005 MySQL AB # Use is subject to license terms diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl index 18091c92718..91333746e79 100755 --- a/tests/insert_and_repair.pl +++ b/tests/insert_and_repair.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000, 2001 MySQL AB # Use is subject to license terms diff --git a/tests/lock_test.pl b/tests/lock_test.pl index 98c4ad6377d..8a8a0322467 100755 --- a/tests/lock_test.pl +++ b/tests/lock_test.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (C) 2000 MySQL AB # Use is subject to license terms diff --git a/tests/mail_to_db.pl b/tests/mail_to_db.pl index e50415d96f3..6e5c115f543 100755 --- a/tests/mail_to_db.pl +++ b/tests/mail_to_db.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright Abandoned 1998 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind # diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 923e4d01ca2..9435e434ff8 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002, 2014, Oracle and/or its affiliates. - Copyright (c) 2008, 2019, MariaDB + Copyright (c) 2008, 2020, MariaDB 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 @@ -20548,6 +20548,59 @@ static void test_bulk_replace() } #endif + +static void test_ps_params_in_ctes() +{ + int rc; + const char *query; + MYSQL_BIND ps_params[1]; + int int_data[1]; + MYSQL_STMT *stmt; + + rc= mysql_query(mysql, "create table t1(a int, b int, key(a))"); + myquery(rc); + + rc= mysql_query(mysql, "insert into t1 (a) values " + "(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)"); + myquery(rc); + + query= + "explain " + "with T as " + "( " + " select * from t1 where t1.a=? limit 2 " + ") " + "select * from T as TA, T as TB;"; + + stmt= mysql_stmt_init(mysql); + check_stmt(stmt); + + rc= mysql_stmt_prepare(stmt, query, (uint) strlen(query)); + check_execute(stmt, rc); + + int_data[0]=2; + + ps_params[0].buffer_type= MYSQL_TYPE_LONG; + ps_params[0].buffer= (char *) &int_data[0]; + ps_params[0].length= 0; + ps_params[0].is_null= 0; + + rc= mysql_stmt_bind_param(stmt, ps_params); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + rc= mysql_stmt_store_result(stmt); + check_execute(stmt, rc); + + mysql_stmt_close(stmt); + + rc= mysql_query(mysql, "drop table t1"); + myquery(rc); +} + + static void print_metadata(MYSQL_RES *rs_metadata, int num_fields) { int i; @@ -21224,6 +21277,7 @@ static struct my_tests_st my_tests[]= { { "test_bulk_delete", test_bulk_delete }, { "test_bulk_replace", test_bulk_replace }, #endif + { "test_ps_params_in_ctes", test_ps_params_in_ctes }, { "test_explain_meta", test_explain_meta }, { "test_mdev18408", test_mdev18408 }, { "test_mdev20261", test_mdev20261 }, diff --git a/tests/pmail.pl b/tests/pmail.pl index 359256c25b3..97e5914f794 100755 --- a/tests/pmail.pl +++ b/tests/pmail.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000, 2005 MySQL AB # Use is subject to license terms diff --git a/tests/rename_test.pl b/tests/rename_test.pl index d7097df1e4e..ec7254a4cf6 100755 --- a/tests/rename_test.pl +++ b/tests/rename_test.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000, 2001 MySQL AB # Use is subject to license terms diff --git a/tests/table_types.pl b/tests/table_types.pl index c633a153098..782b8f254bf 100755 --- a/tests/table_types.pl +++ b/tests/table_types.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (C) 2000, 2003 MySQL AB # Use is subject to license terms diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl index cb5b86a228d..2f8f97b25c6 100755 --- a/tests/test_delayed_insert.pl +++ b/tests/test_delayed_insert.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2000, 2001 MySQL AB # Use is subject to license terms diff --git a/tests/truncate.pl b/tests/truncate.pl index 98791a15b2c..e83ebab9291 100755 --- a/tests/truncate.pl +++ b/tests/truncate.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -w # Copyright (C) 2002 MySQL AB # Use is subject to license terms |