Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
45faabf4
Commit
45faabf4
authored
Feb 28, 2012
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
5da8fa1b
adf3deda
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
30 deletions
+85
-30
mysql-test/r/maria_mrr.result
mysql-test/r/maria_mrr.result
+5
-1
mysql-test/suite/maria/r/maria.result
mysql-test/suite/maria/r/maria.result
+19
-19
mysql-test/suite/maria/r/maria3.result
mysql-test/suite/maria/r/maria3.result
+25
-2
mysql-test/suite/maria/t/maria3.test
mysql-test/suite/maria/t/maria3.test
+20
-1
mysql-test/suite/maria/t/optimize.test
mysql-test/suite/maria/t/optimize.test
+2
-2
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+6
-3
storage/maria/ma_info.c
storage/maria/ma_info.c
+1
-1
storage/maria/ma_key_recover.c
storage/maria/ma_key_recover.c
+1
-1
storage/maria/ma_search.c
storage/maria/ma_search.c
+4
-0
storage/maria/ma_write.c
storage/maria/ma_write.c
+2
-0
No files found.
mysql-test/r/maria_mrr.result
View file @
45faabf4
...
@@ -385,6 +385,8 @@ col_varchar_1024_latin1_key varchar(1024) DEFAULT NULL,
...
@@ -385,6 +385,8 @@ col_varchar_1024_latin1_key varchar(1024) DEFAULT NULL,
PRIMARY KEY (pk),
PRIMARY KEY (pk),
KEY col_varchar_1024_latin1_key (col_varchar_1024_latin1_key)
KEY col_varchar_1024_latin1_key (col_varchar_1024_latin1_key)
) ENGINE=Aria;
) ENGINE=Aria;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
INSERT INTO t1 VALUES
INSERT INTO t1 VALUES
(1,'z'), (2,'abcdefjhjkl'), (3,'in'), (4,'abcdefjhjkl'), (6,'abcdefjhjkl'),
(1,'z'), (2,'abcdefjhjkl'), (3,'in'), (4,'abcdefjhjkl'), (6,'abcdefjhjkl'),
(11,'zx'), (12,'abcdefjhjm'), (13,'jn'), (14,'abcdefjhjp'), (16,'abcdefjhjr');
(11,'zx'), (12,'abcdefjhjm'), (13,'jn'), (14,'abcdefjhjp'), (16,'abcdefjhjr');
...
@@ -398,7 +400,7 @@ WHERE
...
@@ -398,7 +400,7 @@ WHERE
table1.col_varchar_1024_latin1_key = table2.col_varchar_10_latin1 AND table1.pk<>0 ;
table1.col_varchar_1024_latin1_key = table2.col_varchar_10_latin1 AND table1.pk<>0 ;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE table1 ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 10
27 test.table2.col_varchar_10_latin1 2 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE table1 ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 10
03 test.table2.col_varchar_10_latin1 2 Using where
SELECT count(*)
SELECT count(*)
FROM t1 AS table1, t2 AS table2
FROM t1 AS table1, t2 AS table2
WHERE
WHERE
...
@@ -420,6 +422,8 @@ f4 varchar(1024) COLLATE utf8_bin,
...
@@ -420,6 +422,8 @@ f4 varchar(1024) COLLATE utf8_bin,
f5 varchar(1024) COLLATE latin1_bin,
f5 varchar(1024) COLLATE latin1_bin,
KEY (f5)
KEY (f5)
) ENGINE=Aria TRANSACTIONAL=0 ;
) ENGINE=Aria TRANSACTIONAL=0 ;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
# Fill the table with some data
# Fill the table with some data
SELECT alias2.* , alias1.f2
SELECT alias2.* , alias1.f2
FROM
FROM
...
...
mysql-test/suite/maria/r/maria.result
View file @
45faabf4
...
@@ -351,14 +351,14 @@ Table Op Msg_type Msg_text
...
@@ -351,14 +351,14 @@ Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
drop table t1;
drop table t1;
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
ERROR 42000: Specified key was too long; max key length is 1
208
bytes
ERROR 42000: Specified key was too long; max key length is 1
000
bytes
CREATE TABLE t1 (a varchar(32000), unique key(a));
CREATE TABLE t1 (a varchar(32000), unique key(a));
ERROR 42000: Specified key was too long; max key length is 1
208
bytes
ERROR 42000: Specified key was too long; max key length is 1
000
bytes
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
ERROR 42000: Too many key parts specified; max 32 parts allowed
ERROR 42000: Too many key parts specified; max 32 parts allowed
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
ERROR 42000: Specified key was too long; max key length is 1
208
bytes
ERROR 42000: Specified key was too long; max key length is 1
000
bytes
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
...
@@ -1563,7 +1563,7 @@ a b
...
@@ -1563,7 +1563,7 @@ a b
drop table t1;
drop table t1;
create table t1 (v varchar(65530), key(v));
create table t1 (v varchar(65530), key(v));
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
drop table if exists t1;
drop table if exists t1;
create table t1 (v varchar(65536));
create table t1 (v varchar(65536));
Warnings:
Warnings:
...
@@ -1801,34 +1801,34 @@ t1 CREATE TABLE `t1` (
...
@@ -1801,34 +1801,34 @@ t1 CREATE TABLE `t1` (
drop table t1;
drop table t1;
create table t1 (a varchar(2048), key `a` (a));
create table t1 (a varchar(2048), key `a` (a));
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
`a` varchar(2048) DEFAULT NULL,
KEY `a` (`a`(1
208
))
KEY `a` (`a`(1
000
))
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
`a` varchar(2048) DEFAULT NULL,
KEY `a` (`a`(1
208
)) KEY_BLOCK_SIZE=8192
KEY `a` (`a`(1
000
)) KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
208
)) KEY_BLOCK_SIZE=8192
KEY `b` (`b`(1
000
)) KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024
alter table t1 key_block_size=2048;
alter table t1 key_block_size=2048;
show create table t1;
show create table t1;
...
@@ -1837,7 +1837,7 @@ t1 CREATE TABLE `t1` (
...
@@ -1837,7 +1837,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
208
)) KEY_BLOCK_SIZE=8192
KEY `b` (`b`(1
000
)) KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
alter table t1 add c int, add key (c);
alter table t1 add c int, add key (c);
show create table t1;
show create table t1;
...
@@ -1847,7 +1847,7 @@ t1 CREATE TABLE `t1` (
...
@@ -1847,7 +1847,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(2048) DEFAULT NULL,
`b` varchar(2048) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
208
)) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
000
)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192
KEY `c` (`c`) KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
alter table t1 key_block_size=0;
alter table t1 key_block_size=0;
...
@@ -1860,33 +1860,33 @@ t1 CREATE TABLE `t1` (
...
@@ -1860,33 +1860,33 @@ t1 CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
208
)) KEY_BLOCK_SIZE=8192,
KEY `b` (`b`(1
000
)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192,
KEY `d` (`d`)
KEY `d` (`d`)
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`),
KEY `a` (`a`),
KEY `b` (`b`(1
208
))
KEY `b` (`b`(1
000
))
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
drop table t1;
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`),
KEY `a` (`a`),
KEY `b` (`b`(1
208
))
KEY `b` (`b`(1
000
))
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
drop table t1;
drop table t1;
create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384;
create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384;
...
@@ -1909,12 +1909,12 @@ t1 CREATE TABLE `t1` (
...
@@ -1909,12 +1909,12 @@ t1 CREATE TABLE `t1` (
drop table t1;
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
`a` varchar(2048) DEFAULT NULL,
KEY `a` (`a`(1
208
)) KEY_BLOCK_SIZE=8192
KEY `a` (`a`(1
000
)) KEY_BLOCK_SIZE=8192
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
drop table t1;
create table t1 (a int not null, key `a` (a) key_block_size=1025);
create table t1 (a int not null, key `a` (a) key_block_size=1025);
...
...
mysql-test/suite/maria/r/maria3.result
View file @
45faabf4
...
@@ -17,12 +17,12 @@ t1 CREATE TABLE `t1` (
...
@@ -17,12 +17,12 @@ t1 CREATE TABLE `t1` (
drop table t1;
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 1
208
bytes
Warning 1071 Specified key was too long; max key length is 1
000
bytes
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
`a` varchar(2048) DEFAULT NULL,
KEY `a` (`a`(1
208
)) KEY_BLOCK_SIZE=8192
KEY `a` (`a`(1
000
)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
drop table t1;
create table t1 (a int not null, key `a` (a) key_block_size=1025);
create table t1 (a int not null, key `a` (a) key_block_size=1025);
...
@@ -645,3 +645,26 @@ a b c d e f g h i j
...
@@ -645,3 +645,26 @@ a b c d e f g h i j
1 A B C D 1 M H
1 A B C D 1 M H
2 Abcdefghi E F G 2 N H
2 Abcdefghi E F G 2 N H
drop table t1,t2;
drop table t1,t2;
CREATE TABLE t1 ( a VARCHAR(800),KEY(a) )
ENGINE=Aria DEFAULT CHARACTER SET latin1;
INSERT INTO t1 VALUES
(REPEAT('abc ',200)), (REPEAT('def ',200)),
(REPEAT('ghi ',200)), (REPEAT('jkl ',200));
INSERT INTO t1 SELECT * FROM t1;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
Warning 1071 Specified key was too long; max key length is 1000 bytes
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
SHOW CREATE table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(800) CHARACTER SET ucs2 DEFAULT NULL,
KEY `a` (`a`(500))
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
DROP TABLE t1;
mysql-test/suite/maria/t/maria3.test
View file @
45faabf4
...
@@ -554,9 +554,28 @@ INSERT INTO t2 VALUES (1,'M','','H'),
...
@@ -554,9 +554,28 @@ INSERT INTO t2 VALUES (1,'M','','H'),
SELECT
*
FROM
t1
,
t2
WHERE
a
=
g
ORDER
BY
b
;
SELECT
*
FROM
t1
,
t2
WHERE
a
=
g
ORDER
BY
b
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
# End of 5.1 tests
# End of 5.1 tests
#
# bug#905716: Assertion `page->size <= share->max_index_block_size'
#
CREATE
TABLE
t1
(
a
VARCHAR
(
800
),
KEY
(
a
)
)
ENGINE
=
Aria
DEFAULT
CHARACTER
SET
latin1
;
INSERT
INTO
t1
VALUES
(
REPEAT
(
'abc '
,
200
)),
(
REPEAT
(
'def '
,
200
)),
(
REPEAT
(
'ghi '
,
200
)),
(
REPEAT
(
'jkl '
,
200
));
INSERT
INTO
t1
SELECT
*
FROM
t1
;
# check table is not needed to reproduce the problem,
# but shows that by this time the table appears to be okay.
CHECK
TABLE
t1
;
ALTER
TABLE
t1
MODIFY
a
VARCHAR
(
800
)
CHARSET
`ucs2`
;
CHECK
TABLE
t1
;
SHOW
CREATE
table
t1
;
DROP
TABLE
t1
;
# End of 5.2 tests
--
disable_result_log
--
disable_result_log
--
disable_query_log
--
disable_query_log
eval
set
global
storage_engine
=
$default_engine
,
eval
set
global
storage_engine
=
$default_engine
,
...
...
mysql-test/suite/maria/t/optimize.test
View file @
45faabf4
This diff is collapsed.
Click to expand it.
storage/maria/ha_maria.cc
View file @
45faabf4
...
@@ -923,8 +923,11 @@ double ha_maria::scan_time()
...
@@ -923,8 +923,11 @@ double ha_maria::scan_time()
splitting algorithms depends on this. (With only one key on a page
splitting algorithms depends on this. (With only one key on a page
we also can't use any compression, which may make the index file much
we also can't use any compression, which may make the index file much
larger)
larger)
We use HA_MAX_KEY_BUFF as this is a stack restriction imposed by the
We use HA_MAX_KEY_LENGTH as this is a stack restriction imposed by the
handler interface.
handler interface. If we want to increase this, we have also to
increase HA_MARIA_KEY_BUFF and MARIA_MAX_KEY_BUFF as the buffer needs
to take be able to store the extra lenght bytes that is part of the stored
key.
We also need to reserve place for a record pointer (8) and 3 bytes
We also need to reserve place for a record pointer (8) and 3 bytes
per key segment to store the length of the segment + possible null bytes.
per key segment to store the length of the segment + possible null bytes.
...
@@ -3071,7 +3074,7 @@ void ha_maria::get_auto_increment(ulonglong offset, ulonglong increment,
...
@@ -3071,7 +3074,7 @@ void ha_maria::get_auto_increment(ulonglong offset, ulonglong increment,
{
{
ulonglong
nr
;
ulonglong
nr
;
int
error
;
int
error
;
uchar
key
[
HA_MAX_KEY_LENGTH
];
uchar
key
[
MARIA_MAX_KEY_BUFF
];
if
(
!
table
->
s
->
next_number_key_offset
)
if
(
!
table
->
s
->
next_number_key_offset
)
{
// Autoincrement at key-start
{
// Autoincrement at key-start
...
...
storage/maria/ma_info.c
View file @
45faabf4
...
@@ -31,7 +31,7 @@ MARIA_RECORD_POS maria_position(MARIA_HA *info)
...
@@ -31,7 +31,7 @@ MARIA_RECORD_POS maria_position(MARIA_HA *info)
uint
maria_max_key_length
()
uint
maria_max_key_length
()
{
{
uint
tmp
=
(
_ma_max_key_length
()
-
8
-
HA_MAX_KEY_SEG
*
3
);
uint
tmp
=
(
_ma_max_key_length
()
-
8
-
HA_MAX_KEY_SEG
*
3
);
return
min
(
HA_MAX_KEY_
BUFF
,
tmp
);
return
min
(
HA_MAX_KEY_
LENGTH
,
tmp
);
}
}
/* Get information about the table */
/* Get information about the table */
...
...
storage/maria/ma_key_recover.c
View file @
45faabf4
...
@@ -1107,7 +1107,7 @@ uint _ma_apply_redo_index(MARIA_HA *info,
...
@@ -1107,7 +1107,7 @@ uint _ma_apply_redo_index(MARIA_HA *info,
DBUG_PRINT
(
"redo"
,
(
"org_page_length: %u new_page_length: %u"
,
DBUG_PRINT
(
"redo"
,
(
"org_page_length: %u new_page_length: %u"
,
uint2korr
(
header
),
uint2korr
(
header
+
2
)));
uint2korr
(
header
),
uint2korr
(
header
+
2
)));
DBUG_ASSERT
(
uint2korr
(
header
)
==
page_length
);
DBUG_ASSERT
(
uint2korr
(
header
)
==
page_length
);
new_page_length
=
uint2korr
(
header
+
2
);
new_page_length
=
min
(
uint2korr
(
header
+
2
),
max_page_size
);
header
+=
4
;
header
+=
4
;
break
;
break
;
case
KEY_OP_MAX_PAGELENGTH
:
case
KEY_OP_MAX_PAGELENGTH
:
...
...
storage/maria/ma_search.c
View file @
45faabf4
...
@@ -1389,6 +1389,10 @@ uint _ma_get_binary_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag,
...
@@ -1389,6 +1389,10 @@ uint _ma_get_binary_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag,
memcpy
(
key
,
from
,
length
+
nod_flag
);
memcpy
(
key
,
from
,
length
+
nod_flag
);
*
page_pos
=
from
+
length
+
nod_flag
;
*
page_pos
=
from
+
length
+
nod_flag
;
#ifdef USEFUL_FOR_DEBUGGING
DBUG_DUMP
(
"key"
,
int_key
->
data
,
(
uint
)
(
int_key
->
data_length
+
int_key
->
ref_length
));
#endif
DBUG_RETURN
(
int_key
->
data_length
+
int_key
->
ref_length
);
DBUG_RETURN
(
int_key
->
data_length
+
int_key
->
ref_length
);
}
}
...
...
storage/maria/ma_write.c
View file @
45faabf4
...
@@ -726,6 +726,8 @@ static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key,
...
@@ -726,6 +726,8 @@ static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key,
{
{
error
=
_ma_insert
(
info
,
key
,
&
page
,
keypos
,
keybuff
,
error
=
_ma_insert
(
info
,
key
,
&
page
,
keypos
,
keybuff
,
father_page
,
father_keypos
,
insert_last
);
father_page
,
father_keypos
,
insert_last
);
if
(
error
<
0
)
goto
err
;
page_mark_changed
(
info
,
&
page
);
page_mark_changed
(
info
,
&
page
);
if
(
_ma_write_keypage
(
&
page
,
PAGECACHE_LOCK_LEFT_WRITELOCKED
,
if
(
_ma_write_keypage
(
&
page
,
PAGECACHE_LOCK_LEFT_WRITELOCKED
,
DFLT_INIT_HITS
))
DFLT_INIT_HITS
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment