summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2009-06-30 00:03:30 +0300
committerMichael Widenius <monty@askmonty.org>2009-06-30 00:03:30 +0300
commitbb55791994deb9677b487e7fcfde233cafbf9dbe (patch)
tree7df90e196dd7fe46b6be0a9e4d334dff7a1d3de9 /tests
parentc40d85c634a4946d3501b542148d4353fc04fbb4 (diff)
downloadmariadb-git-bb55791994deb9677b487e7fcfde233cafbf9dbe.tar.gz
Added some changes inspired by Zardosht Kasheff:
- Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. - Extended the maximun key parts for an index from 16 to 32 - Extended MyISAM and Maria engines to support up to 32 parts Added checks for return value from ha_index_init() include/my_handler.h: Extended number of key parts for MyISAM and Maria from 16 to 32 include/my_pthread.h: Ensure we always have 256M of stack. (Required to be able to handle the current number of keys and key parts in MyISAM) mysql-test/r/create.result: Extended to test for 32 key parts mysql-test/r/myisam.result: Test that we can create 32 but not 33 key parts mysql-test/r/ps_1general.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_2myisam.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_3innodb.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_4heap.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_5merge.result: Length of ref is now 2048 as we can have more key parts mysql-test/suite/maria/r/maria.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/maria3.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/ps_maria.result: Max key length is now 1208 byte mysql-test/t/create.test: Extended to test for 32 key parts mysql-test/t/myisam.test: Test that we can create 32 but not 33 key parts sql/handler.cc: Check return value from ha_index_init() sql/handler.h: Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. sql/sql_select.cc: Checks all return values from ha_index_init() Call prepare_index_scan()) to inform storage engines that an index scan is about to take place. Fixed indentation sql/table.cc: Fixed wrong types for key_length (rest of code assumed this was 32 bit) sql/unireg.h: Extended the maximun key parts for an index from 16 to 32 storage/maria/ha_maria.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/ha_myisam.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/mi_check.c: Fixed wrong check if value overflow tests/mysql_client_test.c: Added fflush() to fix output in case of error Fixed wrong check of 'ref' length in EXPLAIN
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index e26f6aa1cf5..95c1782921f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -33,6 +33,7 @@
#include <my_getopt.h>
#include <m_string.h>
#include <mysqld_error.h>
+#include <my_handler.h>
#define VER "2.1"
#define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */
@@ -789,8 +790,10 @@ static void do_verify_prepare_field(MYSQL_RES *result,
*/
if (length && (field->length != expected_field_length))
{
+ fflush(stdout);
fprintf(stderr, "Expected field length: %llu, got length: %lu\n",
expected_field_length, field->length);
+ fflush(stderr);
DIE_UNLESS(field->length == expected_field_length);
}
if (def)
@@ -7809,8 +7812,9 @@ static void test_explain_bug()
"", "", NAME_CHAR_LEN*MAX_KEY, 0);
}
+ /* The length of this may verify between MariaDB versions (1024 / 2048) */
verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING,
- "", "", "", NAME_CHAR_LEN*16, 0);
+ "", "", "", NAME_CHAR_LEN * HA_MAX_KEY_SEG, 0);
verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG,
"", "", "", 10, 0);