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
c6429f79
Commit
c6429f79
authored
Oct 28, 2007
by
gshchepa/uchum@gleb.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge gleb.loc:/home/uchum/work/bk/PA/5.1-opt-31036-v
into gleb.loc:/home/uchum/work/bk/5.1-opt
parents
c8a4b86e
5eb3b270
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
7 deletions
+33
-7
mysql-test/r/archive.result
mysql-test/r/archive.result
+4
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+22
-0
storage/archive/azio.c
storage/archive/azio.c
+5
-5
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+2
-2
No files found.
mysql-test/r/archive.result
View file @
c6429f79
...
...
@@ -12683,3 +12683,7 @@ check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
CREATE TABLE t1(a VARCHAR(510)) ENGINE = ARCHIVE;
INSERT INTO t1(a) VALUES ('');
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
mysql-test/t/archive.test
View file @
c6429f79
...
...
@@ -1567,3 +1567,25 @@ insert into t1 set a='';
insert
into
t1
set
a
=
'a'
;
check
table
t1
extended
;
drop
table
t1
;
#
# BUG#31036 - Using order by with archive table crashes server
#
CREATE
TABLE
t1
(
a
VARCHAR
(
510
))
ENGINE
=
ARCHIVE
;
let
$bug31036
=
41
;
--
disable_query_log
while
(
$bug31036
)
{
INSERT
INTO
t1
(
a
)
VALUES
(
REPEAT
(
'a'
,
510
));
dec
$bug31036
;
}
--
enable_query_log
INSERT
INTO
t1
(
a
)
VALUES
(
''
);
--
disable_result_log
SELECT
*
FROM
t1
ORDER
BY
a
;
--
enable_result_log
DROP
TABLE
t1
;
storage/archive/azio.c
View file @
c6429f79
...
...
@@ -681,8 +681,8 @@ my_off_t azseek (s, offset, whence)
/* There was a zmemzero here if inbuf was null -Brian */
while
(
offset
>
0
)
{
uInt
size
=
AZ_BUFSIZE_
WRITE
;
if
(
offset
<
AZ_BUFSIZE_
WRITE
)
size
=
(
uInt
)
offset
;
uInt
size
=
AZ_BUFSIZE_
READ
;
if
(
offset
<
AZ_BUFSIZE_
READ
)
size
=
(
uInt
)
offset
;
size
=
azwrite
(
s
,
s
->
inbuf
,
size
);
if
(
size
==
0
)
return
-
1L
;
...
...
@@ -725,11 +725,11 @@ my_off_t azseek (s, offset, whence)
}
while
(
offset
>
0
)
{
int
error
;
unsigned
int
size
=
AZ_BUFSIZE_
READ
;
if
(
offset
<
AZ_BUFSIZE_
READ
)
size
=
(
int
)
offset
;
unsigned
int
size
=
AZ_BUFSIZE_
WRITE
;
if
(
offset
<
AZ_BUFSIZE_
WRITE
)
size
=
(
int
)
offset
;
size
=
azread
(
s
,
s
->
outbuf
,
size
,
&
error
);
if
(
error
<
=
0
)
return
-
1L
;
if
(
error
<
0
)
return
-
1L
;
offset
-=
size
;
}
return
s
->
out
;
...
...
storage/archive/ha_archive.cc
View file @
c6429f79
...
...
@@ -1241,8 +1241,8 @@ int ha_archive::rnd_pos(uchar * buf, uchar *pos)
DBUG_ENTER
(
"ha_archive::rnd_pos"
);
ha_statistic_increment
(
&
SSV
::
ha_read_rnd_next_count
);
current_position
=
(
my_off_t
)
my_get_ptr
(
pos
,
ref_length
);
(
void
)
azseek
(
&
archive
,
current_position
,
SEEK_SET
);
if
(
azseek
(
&
archive
,
current_position
,
SEEK_SET
)
<
0
)
DBUG_RETURN
(
HA_ERR_CRASHED_ON_USAGE
);
DBUG_RETURN
(
get_row
(
&
archive
,
buf
));
}
...
...
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