mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -1487,10 +1487,10 @@ ERROR 42000: Too many keys specified; max 64 keys allowed
|
||||
drop table t1;
|
||||
create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int,
|
||||
c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int,
|
||||
c16 int, c17 int);
|
||||
c16 int, c17 int, c18 int,c19 int,c20 int,c21 int,c22 int,c23 int,c24 int,c25 int,c26 int,c27 int,c28 int,c29 int,c30 int,c31 int,c32 int, c33 int);
|
||||
alter table t1 add key i1 (
|
||||
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16, c17);
|
||||
ERROR 42000: Too many key parts specified; max 16 parts allowed
|
||||
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16, c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33);
|
||||
ERROR 42000: Too many key parts specified; max 32 parts allowed
|
||||
alter table t1 add key
|
||||
a001_long_123456789_123456789_123456789_123456789_123456789_12345 (c1);
|
||||
ERROR 42000: Identifier name 'a001_long_123456789_123456789_123456789_123456789_123456789_12345' is too long
|
||||
@ -1513,7 +1513,23 @@ t1 CREATE TABLE `t1` (
|
||||
`c14` int(11) DEFAULT NULL,
|
||||
`c15` int(11) DEFAULT NULL,
|
||||
`c16` int(11) DEFAULT NULL,
|
||||
`c17` int(11) DEFAULT NULL
|
||||
`c17` int(11) DEFAULT NULL,
|
||||
`c18` int(11) DEFAULT NULL,
|
||||
`c19` int(11) DEFAULT NULL,
|
||||
`c20` int(11) DEFAULT NULL,
|
||||
`c21` int(11) DEFAULT NULL,
|
||||
`c22` int(11) DEFAULT NULL,
|
||||
`c23` int(11) DEFAULT NULL,
|
||||
`c24` int(11) DEFAULT NULL,
|
||||
`c25` int(11) DEFAULT NULL,
|
||||
`c26` int(11) DEFAULT NULL,
|
||||
`c27` int(11) DEFAULT NULL,
|
||||
`c28` int(11) DEFAULT NULL,
|
||||
`c29` int(11) DEFAULT NULL,
|
||||
`c30` int(11) DEFAULT NULL,
|
||||
`c31` int(11) DEFAULT NULL,
|
||||
`c32` int(11) DEFAULT NULL,
|
||||
`c33` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
||||
|
Reference in New Issue
Block a user