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
3a7b6d68
Commit
3a7b6d68
authored
Apr 27, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after-merge fix: make concurrent-insert-skip code ft2-aware
parent
4999203f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+13
-3
myisam/ft_nlq_search.c
myisam/ft_nlq_search.c
+5
-4
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+2
-0
No files found.
myisam/ft_boolean_search.c
View file @
3a7b6d68
...
@@ -205,6 +205,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
...
@@ -205,6 +205,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
int
r
;
int
r
;
uint
off
;
uint
off
;
int
subkeys
;
int
subkeys
;
my_bool
can_go_down
;
MI_INFO
*
info
=
ftb
->
info
;
MI_INFO
*
info
=
ftb
->
info
;
if
(
init_search
)
if
(
init_search
)
...
@@ -222,11 +223,22 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
...
@@ -222,11 +223,22 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
USE_WHOLE_KEY
,
SEARCH_BIGGER
,
ftbw
->
key_root
);
USE_WHOLE_KEY
,
SEARCH_BIGGER
,
ftbw
->
key_root
);
}
}
can_go_down
=
(
!
ftbw
->
off
&&
(
init_search
||
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)));
/* Skip rows inserted by concurrent insert */
/* Skip rows inserted by concurrent insert */
while
(
!
r
&&
info
->
lastpos
>=
info
->
state
->
data_file_length
)
while
(
!
r
)
{
if
(
can_go_down
)
{
/* going down ? */
off
=
info
->
lastkey_length
-
HA_FT_WLEN
-
info
->
s
->
base
.
rec_reflength
;
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
off
);
}
if
(
subkeys
<
0
||
info
->
lastpos
<
info
->
state
->
data_file_length
)
break
;
r
=
_mi_search_next
(
info
,
ftbw
->
keyinfo
,
info
->
lastkey
,
r
=
_mi_search_next
(
info
,
ftbw
->
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
info
->
lastkey_length
,
SEARCH_BIGGER
,
ftbw
->
key_root
);
SEARCH_BIGGER
,
ftbw
->
key_root
);
}
if
(
!
r
&&
!
ftbw
->
off
)
if
(
!
r
&&
!
ftbw
->
off
)
{
{
...
@@ -270,8 +282,6 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
...
@@ -270,8 +282,6 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
if
(
!
ftbw
->
off
&&
(
init_search
||
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)))
if
(
!
ftbw
->
off
&&
(
init_search
||
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)))
{
{
/* going down ? */
/* going down ? */
get_key_full_length_rdonly
(
off
,
info
->
lastkey
);
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
off
);
if
(
subkeys
<
0
)
if
(
subkeys
<
0
)
{
{
/*
/*
...
...
myisam/ft_nlq_search.c
View file @
3a7b6d68
...
@@ -90,6 +90,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -90,6 +90,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
/* Skip rows inserted by current inserted */
/* Skip rows inserted by current inserted */
for
(
r
=
_mi_search
(
info
,
keyinfo
,
keybuff
,
keylen
,
SEARCH_FIND
,
key_root
)
;
for
(
r
=
_mi_search
(
info
,
keyinfo
,
keybuff
,
keylen
,
SEARCH_FIND
,
key_root
)
;
(
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
info
->
lastkey_length
-
extra
))
>
0
&&
!
r
&&
info
->
lastpos
>=
info
->
state
->
data_file_length
;
!
r
&&
info
->
lastpos
>=
info
->
state
->
data_file_length
;
r
=
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
r
=
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
SEARCH_BIGGER
,
key_root
))
info
->
lastkey_length
,
SEARCH_BIGGER
,
key_root
))
...
@@ -105,7 +106,6 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -105,7 +106,6 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
info
->
lastkey_length
-
extra
-
1
,
keybuff
+
1
,
keylen
-
1
,
0
,
0
))
info
->
lastkey_length
-
extra
-
1
,
keybuff
+
1
,
keylen
-
1
,
0
,
0
))
break
;
break
;
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
info
->
lastkey_length
-
extra
);
if
(
subkeys
<
0
)
if
(
subkeys
<
0
)
{
{
if
(
doc_cnt
)
if
(
doc_cnt
)
...
@@ -119,7 +119,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -119,7 +119,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
key_root
=
info
->
lastpos
;
key_root
=
info
->
lastpos
;
keylen
=
0
;
keylen
=
0
;
r
=
_mi_search_first
(
info
,
keyinfo
,
key_root
);
r
=
_mi_search_first
(
info
,
keyinfo
,
key_root
);
continue
;
goto
do_skip
;
}
}
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
tmp_weight
=*
(
float
*
)
&
subkeys
;
tmp_weight
=*
(
float
*
)
&
subkeys
;
...
@@ -157,8 +157,9 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -157,8 +157,9 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
else
else
r
=
_mi_search
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
r
=
_mi_search
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
SEARCH_BIGGER
,
key_root
);
SEARCH_BIGGER
,
key_root
);
do_skip:
while
(
!
r
&&
info
->
lastpos
>=
info
->
state
->
data_file_length
)
while
((
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
info
->
lastkey_length
-
extra
))
>
0
&&
!
r
&&
info
->
lastpos
>=
info
->
state
->
data_file_length
)
r
=
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
r
=
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
SEARCH_BIGGER
,
key_root
);
SEARCH_BIGGER
,
key_root
);
...
...
mysql-test/t/func_group.test
View file @
3a7b6d68
...
@@ -366,7 +366,9 @@ explain
...
@@ -366,7 +366,9 @@ explain
select
concat
(
min
(
t1
.
a1
),
min
(
t2
.
a4
))
from
t1
,
t2
where
t2
.
a4
<>
'AME'
;
select
concat
(
min
(
t1
.
a1
),
min
(
t2
.
a4
))
from
t1
,
t2
where
t2
.
a4
<>
'AME'
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
--
disable_warnings
create
table
t1
(
USR_ID
integer
not
null
,
MAX_REQ
integer
not
null
,
constraint
PK_SEA_USER
primary
key
(
USR_ID
))
engine
=
InnoDB
;
create
table
t1
(
USR_ID
integer
not
null
,
MAX_REQ
integer
not
null
,
constraint
PK_SEA_USER
primary
key
(
USR_ID
))
engine
=
InnoDB
;
--
enable_warnings
insert
into
t1
values
(
1
,
3
);
insert
into
t1
values
(
1
,
3
);
select
count
(
*
)
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
from
t1
group
by
MAX_REQ
;
select
count
(
*
)
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
+
MAX_REQ
-
MAX_REQ
from
t1
group
by
MAX_REQ
;
select
Case
When
Count
(
*
)
<
MAX_REQ
Then
1
Else
0
End
from
t1
where
t1
.
USR_ID
=
1
group
by
MAX_REQ
;
select
Case
When
Count
(
*
)
<
MAX_REQ
Then
1
Else
0
End
from
t1
where
t1
.
USR_ID
=
1
group
by
MAX_REQ
;
...
...
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