summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:09:27 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:09:27 -0300
commit9fd9857e0bd02932543c03495599b19ea081031c (patch)
tree541cfc3d5f16c89cdcacdc7babd0c0fdf9de16a0 /tests
parent9e01fddb5b3bcceb760a86a10d2d07e05076c360 (diff)
downloadmariadb-git-9fd9857e0bd02932543c03495599b19ea081031c.tar.gz
WL#5498: Remove dead and unused source code
Remove code that has been disabled for a long time.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c209
1 files changed, 0 insertions, 209 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index a3640077889..61f9d4881cb 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -5775,215 +5775,6 @@ static void test_set_variable()
mysql_stmt_close(stmt1);
}
-#if NOT_USED
-
-/* Insert meta info .. */
-
-static void test_insert_meta()
-{
- MYSQL_STMT *stmt;
- int rc;
- MYSQL_RES *result;
- MYSQL_FIELD *field;
-
- myheader("test_insert_meta");
-
- rc= mysql_autocommit(mysql, TRUE);
- myquery(rc);
-
- rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_insert");
- myquery(rc);
-
- rc= mysql_query(mysql, "CREATE TABLE test_prep_insert(col1 tinyint, \
- col2 varchar(50), col3 varchar(30))");
- myquery(rc);
-
- strmov(query, "INSERT INTO test_prep_insert VALUES(10, 'venu1', 'test')");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 0);
-
- result= mysql_param_result(stmt);
- mytest_r(result);
-
- mysql_stmt_close(stmt);
-
- strmov(query, "INSERT INTO test_prep_insert VALUES(?, 'venu', ?)");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 2);
-
- result= mysql_param_result(stmt);
- mytest(result);
-
- my_print_result_metadata(result);
-
- mysql_field_seek(result, 0);
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- fprintf(stdout, "\n obtained: `%s` (expected: `%s`)", field->name, "col1");
- DIE_UNLESS(strcmp(field->name, "col1") == 0);
-
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- fprintf(stdout, "\n obtained: `%s` (expected: `%s`)", field->name, "col3");
- DIE_UNLESS(strcmp(field->name, "col3") == 0);
-
- field= mysql_fetch_field(result);
- mytest_r(field);
-
- mysql_free_result(result);
- mysql_stmt_close(stmt);
-}
-
-
-/* Update meta info .. */
-
-static void test_update_meta()
-{
- MYSQL_STMT *stmt;
- int rc;
- MYSQL_RES *result;
- MYSQL_FIELD *field;
-
- myheader("test_update_meta");
-
- rc= mysql_autocommit(mysql, TRUE);
- myquery(rc);
-
- rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_update");
- myquery(rc);
-
- rc= mysql_query(mysql, "CREATE TABLE test_prep_update(col1 tinyint, \
- col2 varchar(50), col3 varchar(30))");
- myquery(rc);
-
- strmov(query, "UPDATE test_prep_update SET col1=10, col2='venu1' WHERE col3='test'");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 0);
-
- result= mysql_param_result(stmt);
- mytest_r(result);
-
- mysql_stmt_close(stmt);
-
- strmov(query, "UPDATE test_prep_update SET col1=?, col2='venu' WHERE col3=?");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 2);
-
- result= mysql_param_result(stmt);
- mytest(result);
-
- my_print_result_metadata(result);
-
- mysql_field_seek(result, 0);
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- {
- fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col1");
- fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_update");
- }
- DIE_UNLESS(strcmp(field->name, "col1") == 0);
- DIE_UNLESS(strcmp(field->table, "test_prep_update") == 0);
-
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- {
- fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col3");
- fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_update");
- }
- DIE_UNLESS(strcmp(field->name, "col3") == 0);
- DIE_UNLESS(strcmp(field->table, "test_prep_update") == 0);
-
- field= mysql_fetch_field(result);
- mytest_r(field);
-
- mysql_free_result(result);
- mysql_stmt_close(stmt);
-}
-
-
-/* Select meta info .. */
-
-static void test_select_meta()
-{
- MYSQL_STMT *stmt;
- int rc;
- MYSQL_RES *result;
- MYSQL_FIELD *field;
-
- myheader("test_select_meta");
-
- rc= mysql_autocommit(mysql, TRUE);
- myquery(rc);
-
- rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_select");
- myquery(rc);
-
- rc= mysql_query(mysql, "CREATE TABLE test_prep_select(col1 tinyint, \
- col2 varchar(50), col3 varchar(30))");
- myquery(rc);
-
- strmov(query, "SELECT * FROM test_prep_select WHERE col1=10");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 0);
-
- result= mysql_param_result(stmt);
- mytest_r(result);
-
- strmov(query, "SELECT col1, col3 from test_prep_select WHERE col1=? AND col3='test' AND col2= ?");
- stmt= mysql_simple_prepare(mysql, query);
- check_stmt(stmt);
-
- verify_param_count(stmt, 2);
-
- result= mysql_param_result(stmt);
- mytest(result);
-
- my_print_result_metadata(result);
-
- mysql_field_seek(result, 0);
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- {
- fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col1");
- fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_select");
- }
- DIE_UNLESS(strcmp(field->name, "col1") == 0);
- DIE_UNLESS(strcmp(field->table, "test_prep_select") == 0);
-
- field= mysql_fetch_field(result);
- mytest(field);
- if (!opt_silent)
- {
- fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col2");
- fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_select");
- }
- DIE_UNLESS(strcmp(field->name, "col2") == 0);
- DIE_UNLESS(strcmp(field->table, "test_prep_select") == 0);
-
- field= mysql_fetch_field(result);
- mytest_r(field);
-
- mysql_free_result(result);
- mysql_stmt_close(stmt);
-}
-#endif
-
-
/* Test FUNCTION field info / DATE_FORMAT() table_name . */
static void test_func_fields()