diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-27 08:13:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-27 08:13:59 +0300 |
commit | 43c77bb937cbd2fff10b980047b9926a5711a8b3 (patch) | |
tree | 8316d8bedbd005283a09fb49259ef02155a31869 /tests | |
parent | ed61fddf241e2e7e1b3b4db8e60fd1f939568bdd (diff) | |
parent | 29624ea304b5893d3bc81670807285a89fce1a33 (diff) | |
download | mariadb-git-43c77bb937cbd2fff10b980047b9926a5711a8b3.tar.gz |
Merge 10.2 into bb-10.2-ext
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index b37e0e8bc2c..734f7790025 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -19601,6 +19601,40 @@ static void test_prepare_analyze() check_execute(stmt, rc); } +static void test_mdev12579() +{ + MYSQL_STMT *stmt= mysql_stmt_init(mysql); + MYSQL_BIND bind[2]; + int rc; + long l=3; + const char *data = "123456"; + + rc= mysql_query(mysql, "CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)"); + myquery(rc); + + rc= mysql_stmt_prepare(stmt, "INSERT INTO mdev12579 VALUES (1,?,NULL,?)", -1); + myquery(rc); + + rc= mysql_stmt_send_long_data(stmt, 0, data, 6); + rc= mysql_stmt_send_long_data(stmt, 0, data, 6); + rc= mysql_stmt_send_long_data(stmt, 0, data, 6); + + memset(bind, 0, sizeof(MYSQL_BIND) * 2); + bind[0].buffer_type= MYSQL_TYPE_VAR_STRING; + bind[1].buffer_type= MYSQL_TYPE_LONG; + bind[1].buffer= &l; + mysql_stmt_bind_param(stmt, bind); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + mysql_stmt_close(stmt); + + rc= mysql_query(mysql, "DROP TABLE mdev12579"); + myquery(rc); +} + + static struct my_tests_st my_tests[]= { { "disable_query_logs", disable_query_logs }, { "test_view_sp_list_fields", test_view_sp_list_fields }, @@ -19879,6 +19913,7 @@ static struct my_tests_st my_tests[]= { { "test_compressed_protocol", test_compressed_protocol }, { "test_big_packet", test_big_packet }, { "test_prepare_analyze", test_prepare_analyze }, + { "test_mdev12579", test_mdev12579 }, { 0, 0 } }; |