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
09e4d027
Commit
09e4d027
authored
Mar 23, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into chilla.local:/home/mydev/mysql-5.1-bug26782
parents
ab785bfe
eebba6a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
2 deletions
+64
-2
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+15
-0
mysql-test/t/heap_btree.test
mysql-test/t/heap_btree.test
+14
-0
storage/heap/hp_write.c
storage/heap/hp_write.c
+0
-1
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+35
-1
No files found.
mysql-test/r/heap_btree.result
View file @
09e4d027
...
...
@@ -280,6 +280,21 @@ a
1
1
drop table t1;
CREATE TABLE t1 (
c1 CHAR(3),
c2 INTEGER,
KEY USING BTREE(c1),
KEY USING BTREE(c2)
) ENGINE= MEMORY;
INSERT INTO t1 VALUES ('ABC',0), ('A',0), ('B',0), ('C',0);
UPDATE t1 SET c2= c2 + 1 WHERE c1 = 'A';
SELECT * FROM t1;
c1 c2
ABC 0
A 1
B 0
C 0
DROP TABLE t1;
End of 4.1 tests
CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
INSERT INTO t1 VALUES(0);
...
...
mysql-test/t/heap_btree.test
View file @
09e4d027
...
...
@@ -182,6 +182,20 @@ delete from t1 where a >= 2;
select
a
from
t1
order
by
a
;
drop
table
t1
;
#
# Bug#26996 - Update of a Field in a Memory Table ends with wrong result
#
CREATE
TABLE
t1
(
c1
CHAR
(
3
),
c2
INTEGER
,
KEY
USING
BTREE
(
c1
),
KEY
USING
BTREE
(
c2
)
)
ENGINE
=
MEMORY
;
INSERT
INTO
t1
VALUES
(
'ABC'
,
0
),
(
'A'
,
0
),
(
'B'
,
0
),
(
'C'
,
0
);
UPDATE
t1
SET
c2
=
c2
+
1
WHERE
c1
=
'A'
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
4.1
tests
#
...
...
storage/heap/hp_write.c
View file @
09e4d027
...
...
@@ -105,7 +105,6 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
heap_rb_param
custom_arg
;
uint
old_allocated
;
info
->
last_pos
=
NULL
;
/* For heap_rnext/heap_rprev */
custom_arg
.
keyseg
=
keyinfo
->
seg
;
custom_arg
.
key_length
=
hp_rb_make_key
(
keyinfo
,
info
->
recbuf
,
record
,
recpos
);
if
(
keyinfo
->
flag
&
HA_NOSAME
)
...
...
storage/myisam/ha_myisam.cc
View file @
09e4d027
...
...
@@ -632,6 +632,9 @@ bool ha_myisam::check_if_locking_is_allowed(uint sql_command,
int
ha_myisam
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
{
MI_KEYDEF
*
keyinfo
;
MI_COLUMNDEF
*
recinfo
=
0
;
uint
recs
;
uint
i
;
/*
...
...
@@ -654,6 +657,26 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
if
(
!
(
file
=
mi_open
(
name
,
mode
,
test_if_locked
|
HA_OPEN_FROM_SQL_LAYER
)))
return
(
my_errno
?
my_errno
:
-
1
);
if
(
!
table
->
s
->
tmp_table
)
/* No need to perform a check for tmp table */
{
if
((
my_errno
=
table2myisam
(
table
,
&
keyinfo
,
&
recinfo
,
&
recs
)))
{
/* purecov: begin inspected */
DBUG_PRINT
(
"error"
,
(
"Failed to convert TABLE object to MyISAM "
"key and column definition"
));
goto
err
;
/* purecov: end */
}
if
(
check_definition
(
keyinfo
,
recinfo
,
table
->
s
->
keys
,
recs
,
file
->
s
->
keyinfo
,
file
->
s
->
rec
,
file
->
s
->
base
.
keys
,
file
->
s
->
base
.
fields
,
true
))
{
/* purecov: begin inspected */
my_errno
=
HA_ERR_CRASHED
;
goto
err
;
/* purecov: end */
}
}
if
(
test_if_locked
&
(
HA_OPEN_IGNORE_IF_LOCKED
|
HA_OPEN_TMP_TABLE
))
VOID
(
mi_extra
(
file
,
HA_EXTRA_NO_WAIT_LOCK
,
0
));
...
...
@@ -674,7 +697,18 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
(
struct
st_mysql_ftparser
*
)
parser
->
plugin
->
info
;
table
->
key_info
[
i
].
block_size
=
file
->
s
->
keyinfo
[
i
].
block_length
;
}
return
(
0
);
my_errno
=
0
;
goto
end
;
err:
this
->
close
();
end:
/*
Both recinfo and keydef are allocated by my_multi_malloc(), thus only
recinfo must be freed.
*/
if
(
recinfo
)
my_free
((
gptr
)
recinfo
,
MYF
(
0
));
return
my_errno
;
}
int
ha_myisam
::
close
(
void
)
...
...
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