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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
10d5ff9a
Commit
10d5ff9a
authored
Feb 24, 2012
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge
parents
1050c564
a3eb2b3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
3 deletions
+64
-3
mysql-test/suite/maria/r/maria3.result
mysql-test/suite/maria/r/maria3.result
+24
-0
mysql-test/suite/maria/t/maria3.test
mysql-test/suite/maria/t/maria3.test
+31
-0
storage/maria/ma_open.c
storage/maria/ma_open.c
+9
-3
No files found.
mysql-test/suite/maria/r/maria3.result
View file @
10d5ff9a
...
...
@@ -621,3 +621,27 @@ ERROR 23000: Duplicate entry '2' for key 'a'
insert into t1 values(3);
insert into t2 values(3);
drop table t1, t2;
CREATE TABLE t1 (
a INT PRIMARY KEY,
b CHAR(255),
c VARCHAR(2048),
d VARCHAR(18990),
e CHAR(128),
f CHAR(192)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(1,'A','B','C','','D'),
(2,'Abcdefghi','E','F','','G');
CREATE TABLE t2 (
g INT PRIMARY KEY,
h CHAR(32),
i CHAR(255),
j TEXT
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t2 VALUES (1,'M','','H'),
(2,'N','','H');
SELECT * FROM t1, t2 WHERE a = g ORDER BY b;
a b c d e f g h i j
1 A B C D 1 M H
2 Abcdefghi E F G 2 N H
drop table t1,t2;
mysql-test/suite/maria/t/maria3.test
View file @
10d5ff9a
...
...
@@ -524,6 +524,37 @@ insert into t2 values(3);
connection
default
;
drop
table
t1
,
t2
;
#
# BUG#909635 - MariaDB crashes on a select with long varchar and blob fields
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
CHAR
(
255
),
c
VARCHAR
(
2048
),
d
VARCHAR
(
18990
),
e
CHAR
(
128
),
f
CHAR
(
192
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
;
INSERT
INTO
t1
VALUES
(
1
,
'A'
,
'B'
,
'C'
,
''
,
'D'
),
(
2
,
'Abcdefghi'
,
'E'
,
'F'
,
''
,
'G'
);
CREATE
TABLE
t2
(
g
INT
PRIMARY
KEY
,
h
CHAR
(
32
),
i
CHAR
(
255
),
j
TEXT
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
;
INSERT
INTO
t2
VALUES
(
1
,
'M'
,
''
,
'H'
),
(
2
,
'N'
,
''
,
'H'
);
SELECT
*
FROM
t1
,
t2
WHERE
a
=
g
ORDER
BY
b
;
drop
table
t1
,
t2
;
# End of 5.1 tests
--
disable_result_log
...
...
storage/maria/ma_open.c
View file @
10d5ff9a
...
...
@@ -1687,9 +1687,11 @@ my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
{
uchar
buff
[
MARIA_COLUMNDEF_SIZE
];
uchar
*
ptr
=
buff
;
uint
low_offset
=
(
uint
)
(
columndef
->
offset
&
0xffff
);
uint
high_offset
=
(
uint
)
(
columndef
->
offset
>>
16
);
mi_int2store
(
ptr
,(
ulong
)
columndef
->
column_nr
);
ptr
+=
2
;
mi_int2store
(
ptr
,
(
ulong
)
columndef
->
offset
);
ptr
+=
2
;
mi_int2store
(
ptr
,
low_offset
);
ptr
+=
2
;
mi_int2store
(
ptr
,
columndef
->
type
);
ptr
+=
2
;
mi_int2store
(
ptr
,
columndef
->
length
);
ptr
+=
2
;
mi_int2store
(
ptr
,
columndef
->
fill_length
);
ptr
+=
2
;
...
...
@@ -1698,12 +1700,14 @@ my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
(
*
ptr
++
)
=
columndef
->
null_bit
;
(
*
ptr
++
)
=
columndef
->
empty_bit
;
ptr
[
0
]
=
ptr
[
1
]
=
ptr
[
2
]
=
ptr
[
3
]
=
0
;
ptr
+=
4
;
/* For future */
mi_int2store
(
ptr
,
high_offset
);
ptr
+=
2
;
ptr
[
0
]
=
ptr
[
1
]
=
0
;
ptr
+=
2
;
/* For future */
return
my_write
(
file
,
buff
,
(
size_t
)
(
ptr
-
buff
),
MYF
(
MY_NABP
))
!=
0
;
}
uchar
*
_ma_columndef_read
(
uchar
*
ptr
,
MARIA_COLUMNDEF
*
columndef
)
{
uint
high_offset
;
columndef
->
column_nr
=
mi_uint2korr
(
ptr
);
ptr
+=
2
;
columndef
->
offset
=
mi_uint2korr
(
ptr
);
ptr
+=
2
;
columndef
->
type
=
mi_sint2korr
(
ptr
);
ptr
+=
2
;
...
...
@@ -1713,7 +1717,9 @@ uchar *_ma_columndef_read(uchar *ptr, MARIA_COLUMNDEF *columndef)
columndef
->
empty_pos
=
mi_uint2korr
(
ptr
);
ptr
+=
2
;
columndef
->
null_bit
=
(
uint8
)
*
ptr
++
;
columndef
->
empty_bit
=
(
uint8
)
*
ptr
++
;
ptr
+=
4
;
high_offset
=
mi_uint2korr
(
ptr
);
ptr
+=
2
;
columndef
->
offset
|=
((
ulong
)
high_offset
<<
16
);
ptr
+=
2
;
return
ptr
;
}
...
...
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