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
e80bd82e
Commit
e80bd82e
authored
Nov 24, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
bd6ccd46
e8203e43
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
12 deletions
+27
-12
myisam/mi_test3.c
myisam/mi_test3.c
+2
-2
myisam/mi_write.c
myisam/mi_write.c
+6
-10
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+6
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+13
-0
No files found.
myisam/mi_test3.c
View file @
e80bd82e
...
...
@@ -40,7 +40,7 @@
#endif
const
char
*
filename
=
"test3
.MSI
"
;
const
char
*
filename
=
"test3"
;
uint
tests
=
10
,
forks
=
10
,
key_cacheing
=
0
,
use_log
=
0
;
static
void
get_options
(
int
argc
,
char
*
argv
[]);
...
...
@@ -363,7 +363,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
}
sprintf
(
record
.
id
,
"%7d"
,
getpid
());
str
mov
(
record
.
text
,
"Testing..."
);
str
nmov
(
record
.
text
,
"Testing..."
,
sizeof
(
record
.
text
)
);
tries
=
(
uint
)
rnd
(
100
)
+
10
;
for
(
i
=
count
=
0
;
i
<
tries
;
i
++
)
...
...
myisam/mi_write.c
View file @
e80bd82e
...
...
@@ -165,12 +165,7 @@ err:
{
uint
j
;
for
(
j
=
0
;
j
<
share
->
base
.
keys
;
j
++
)
{
if
(
is_tree_inited
(
&
info
->
bulk_insert
[
j
]))
{
reset_tree
(
&
info
->
bulk_insert
[
j
]);
}
}
mi_flush_bulk_insert
(
info
,
j
);
}
info
->
errkey
=
(
int
)
i
;
while
(
i
--
>
0
)
...
...
@@ -329,7 +324,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar
*
temp_buff
,
*
keypos
;
uchar
keybuff
[
MI_MAX_KEY_BUFF
];
my_bool
was_last_key
;
my_off_t
next_page
;
my_off_t
next_page
,
dupp_key_pos
;
DBUG_ENTER
(
"w_search"
);
DBUG_PRINT
(
"enter"
,(
"page: %ld"
,
page
));
...
...
@@ -349,9 +344,9 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
/* get position to record with duplicated key */
tmp_key_length
=
(
*
keyinfo
->
get_key
)(
keyinfo
,
nod_flag
,
&
keypos
,
keybuff
);
if
(
tmp_key_length
)
info
->
dupp_key_pos
=
_mi_dpos
(
info
,
0
,
keybuff
+
tmp_key_length
);
dupp_key_pos
=
_mi_dpos
(
info
,
0
,
keybuff
+
tmp_key_length
);
else
info
->
dupp_key_pos
=
HA_OFFSET_ERROR
;
dupp_key_pos
=
HA_OFFSET_ERROR
;
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
{
uint
off
;
...
...
@@ -370,7 +365,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
else
{
/* popular word. two-level tree. going down */
my_off_t
root
=
info
->
dupp_key_pos
;
my_off_t
root
=
dupp_key_pos
;
keyinfo
=&
info
->
s
->
ft2_keyinfo
;
get_key_full_length_rdonly
(
off
,
key
);
key
+=
off
;
...
...
@@ -389,6 +384,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
}
else
/* not HA_FULLTEXT, normal HA_NOSAME key */
{
info
->
dupp_key_pos
=
dupp_key_pos
;
my_afree
((
byte
*
)
temp_buff
);
my_errno
=
HA_ERR_FOUND_DUPP_KEY
;
DBUG_RETURN
(
-
1
);
...
...
mysql-test/r/fulltext.result
View file @
e80bd82e
...
...
@@ -399,3 +399,9 @@ select count(*) from t1;
count(*)
1
drop table t1;
create table t1 (a int primary key, b text, fulltext(b));
create table t2 (a int, b text);
insert t1 values (1, "aaaa"), (2, "bbbb");
insert t2 values (10, "aaaa"), (2, "cccc");
replace t1 select * from t2;
drop table t1, t2;
mysql-test/t/fulltext.test
View file @
e80bd82e
...
...
@@ -308,3 +308,16 @@ REPAIR TABLE t1;
select
count
(
*
)
from
t1
;
drop
table
t1
;
#
# bug#6784
# mi_flush_bulk_insert (on dup key error in mi_write)
# was mangling info->dupp_key_pos
#
create
table
t1
(
a
int
primary
key
,
b
text
,
fulltext
(
b
));
create
table
t2
(
a
int
,
b
text
);
insert
t1
values
(
1
,
"aaaa"
),
(
2
,
"bbbb"
);
insert
t2
values
(
10
,
"aaaa"
),
(
2
,
"cccc"
);
replace
t1
select
*
from
t2
;
drop
table
t1
,
t2
;
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