summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-12-07 15:47:00 +0200
committerunknown <monty@mysql.com>2004-12-07 15:47:00 +0200
commit9ca50fe1446e3fa955ea0adeefc077b674f36112 (patch)
treeb1c918186908fb490aa860c35dc9e2154aa633c8 /tests
parent8379b61efb053da778846416baf23812a26e8f86 (diff)
downloadmariadb-git-9ca50fe1446e3fa955ea0adeefc077b674f36112.tar.gz
Update results for new varchar handling
Fixed compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length myisam/myisampack.c: Indentation cleanup mysql-test/r/analyse.result: Update results for new varchar handling mysql-test/r/case.result: Update results for new varchar handling mysql-test/r/cast.result: Update results for new varchar handling mysql-test/r/create.result: Update results for new varchar handling mysql-test/r/ctype_mb.result: Update results for new varchar handling mysql-test/r/ctype_ucs.result: Update results for new varchar handling mysql-test/r/ctype_utf8.result: Update results for new varchar handling mysql-test/r/func_group.result: Update results for new varchar handling mysql-test/r/func_str.result: Update results for new varchar handling mysql-test/r/func_system.result: Update results for new varchar handling mysql-test/r/heap.result: Update results for new varchar handling mysql-test/r/heap_hash.result: Update results for new varchar handling mysql-test/r/information_schema.result: Update results for new varchar handling mysql-test/r/metadata.result: Update results for new varchar handling mysql-test/r/null.result: Update results for new varchar handling mysql-test/r/ps_2myisam.result: Update results for new varchar handling mysql-test/r/ps_3innodb.result: Update results for new varchar handling mysql-test/r/ps_4heap.result: Update results for new varchar handling mysql-test/r/ps_5merge.result: Update results for new varchar handling mysql-test/r/ps_6bdb.result: Update results for new varchar handling mysql-test/r/subselect.result: Update results for new varchar handling mysql-test/r/type_ranges.result: Update results for new varchar handling mysql-test/r/union.result: Update results for new varchar handling mysql-test/t/heap.test: Update results for new varchar handling mysql-test/t/type_ranges.test: Added extra test to test generated type for string functions sql/field.cc: Update results for new varchar handling sql/field.h: Update results for new varchar handling We have to use orig_table instead of table as 'table' may point to a new field in the created table sql/field_conv.cc: Update results for new varchar handling sql/ha_heap.cc: Indentation fixes sql/ha_innodb.cc: Update results for new varchar handling sql/item.cc: Update results for new varchar handling Remove compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item.h: Update results for new varchar handling sql/item_func.cc: Update results for new varchar handling String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item_func.h: ANALYZE now return VARCHAR columns sql/procedure.h: Update results for new varchar handling sql/sql_acl.cc: After merge fixes sql/sql_select.cc: Update results for new varchar handling String results in temporary tables are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/sql_show.cc: After merge fixes sql/sql_table.cc: After merge fixes strings/ctype-tis620.c: After merge fixes tests/client_test.c: Fixed results, as in MySQL 5.0 strings in CREATE ... SELECT are creates VARCHAR columns
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index 6329b599e28..e6a530f786a 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -683,7 +683,14 @@ static void verify_prepare_field(MYSQL_RES *result,
expect.
*/
if (cs->mbmaxlen == 1)
- DIE_UNLESS(field->type == type);
+ {
+ if (field->type != type)
+ {
+ fprintf(stderr, "Expected field type: %d, got type: %d\n",
+ (int) type, (int) field->type);
+ DIE_UNLESS(field->type == type);
+ }
+ }
if (table)
DIE_UNLESS(strcmp(field->table, table) == 0);
if (org_table)
@@ -6804,7 +6811,8 @@ static void test_field_misc()
verify_prepare_field(result, 0,
"@@table_type", "", /* field and its org name */
- MYSQL_TYPE_STRING, /* field type */
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
"", "", /* table and its org name */
"", type_length*3, 0); /* db name, length */
@@ -7280,22 +7288,32 @@ static void test_explain_bug()
DIE_UNLESS(6 == mysql_num_fields(result));
verify_prepare_field(result, 0, "Field", "COLUMN_NAME",
- MYSQL_TYPE_STRING, 0, 0, "", 192, 0);
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
+ 0, 0, "", 192, 0);
verify_prepare_field(result, 1, "Type", "COLUMN_TYPE",
MYSQL_TYPE_BLOB, 0, 0, "", 0, 0);
verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
- MYSQL_TYPE_STRING, 0, 0, "", 9, 0);
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
+ 0, 0, "", 9, 0);
verify_prepare_field(result, 3, "Key", "COLUMN_KEY",
- MYSQL_TYPE_STRING, 0, 0, "", 9, 0);
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
+ 0, 0, "", 9, 0);
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
- MYSQL_TYPE_STRING, 0, 0, "", 192, 0);
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
+ 0, 0, "", 192, 0);
verify_prepare_field(result, 5, "Extra", "EXTRA",
- MYSQL_TYPE_STRING, 0, 0, "", 60, 0);
+ mysql_get_server_version(mysql) <= 50000 ?
+ MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
+ 0, 0, "", 60, 0);
mysql_free_result(result);
mysql_stmt_close(stmt);