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
e237d619
Commit
e237d619
authored
Sep 27, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup initial support for vector indexes
renames
parent
cac1ec19
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
sql/sql_base.cc
sql/sql_base.cc
+4
-4
sql/sql_select.cc
sql/sql_select.cc
+3
-3
sql/table.h
sql/table.h
+2
-2
sql/vector_mhnsw.cc
sql/vector_mhnsw.cc
+3
-3
sql/vector_mhnsw.h
sql/vector_mhnsw.h
+2
-2
No files found.
sql/sql_base.cc
View file @
e237d619
...
@@ -9954,7 +9954,7 @@ int TABLE::hlindexes_on_delete_all(bool truncate)
...
@@ -9954,7 +9954,7 @@ int TABLE::hlindexes_on_delete_all(bool truncate)
return
0
;
return
0
;
}
}
int
TABLE
::
hlindex_first
(
uint
nr
,
Item
*
item
,
ulonglong
limit
)
int
TABLE
::
hlindex_
read_
first
(
uint
nr
,
Item
*
item
,
ulonglong
limit
)
{
{
DBUG_ASSERT
(
s
->
total_keys
-
s
->
keys
==
1
);
DBUG_ASSERT
(
s
->
total_keys
-
s
->
keys
==
1
);
DBUG_ASSERT
(
nr
==
s
->
keys
);
DBUG_ASSERT
(
nr
==
s
->
keys
);
...
@@ -9964,10 +9964,10 @@ int TABLE::hlindex_first(uint nr, Item *item, ulonglong limit)
...
@@ -9964,10 +9964,10 @@ int TABLE::hlindex_first(uint nr, Item *item, ulonglong limit)
DBUG_ASSERT
(
hlindex
->
in_use
==
in_use
);
DBUG_ASSERT
(
hlindex
->
in_use
==
in_use
);
return
mhnsw_first
(
this
,
key_info
+
s
->
keys
,
item
,
limit
);
return
mhnsw_
read_
first
(
this
,
key_info
+
s
->
keys
,
item
,
limit
);
}
}
int
TABLE
::
hlindex_next
()
int
TABLE
::
hlindex_
read_
next
()
{
{
return
mhnsw_next
(
this
);
return
mhnsw_
read_
next
(
this
);
}
}
sql/sql_select.cc
View file @
e237d619
...
@@ -24759,8 +24759,8 @@ join_read_first(JOIN_TAB *tab)
...
@@ -24759,8 +24759,8 @@ join_read_first(JOIN_TAB *tab)
DBUG_ASSERT(tab->join->order->next == NULL);
DBUG_ASSERT(tab->join->order->next == NULL);
DBUG_ASSERT(tab->join->select_limit < HA_POS_ERROR);
DBUG_ASSERT(tab->join->select_limit < HA_POS_ERROR);
tab->read_record.read_record_func= join_hlindex_read_next;
tab->read_record.read_record_func= join_hlindex_read_next;
error= tab->table->hlindex_first(tab->index, *tab->join->order->item,
error= tab->table->hlindex_
read_
first(tab->index, *tab->join->order->item,
tab->join->select_limit);
tab->join->select_limit);
}
}
else
else
{
{
...
@@ -24795,7 +24795,7 @@ join_read_next(READ_RECORD *info)
...
@@ -24795,7 +24795,7 @@ join_read_next(READ_RECORD *info)
static int join_hlindex_read_next(READ_RECORD *info)
static int join_hlindex_read_next(READ_RECORD *info)
{
{
if (int error= info->table->hlindex_next())
if (int error= info->table->hlindex_
read_
next())
return report_error(info->table, error);
return report_error(info->table, error);
return 0;
return 0;
}
}
sql/table.h
View file @
e237d619
...
@@ -1794,8 +1794,8 @@ struct TABLE
...
@@ -1794,8 +1794,8 @@ struct TABLE
inline
ha_rows
stat_records
()
{
return
used_stat_records
;
}
inline
ha_rows
stat_records
()
{
return
used_stat_records
;
}
int
hlindex_open
(
uint
nr
);
int
hlindex_open
(
uint
nr
);
int
hlindex_first
(
uint
nr
,
Item
*
item
,
ulonglong
limit
);
int
hlindex_
read_
first
(
uint
nr
,
Item
*
item
,
ulonglong
limit
);
int
hlindex_next
();
int
hlindex_
read_
next
();
int
open_hlindexes_for_write
();
int
open_hlindexes_for_write
();
int
hlindexes_on_insert
();
int
hlindexes_on_insert
();
...
...
sql/vector_mhnsw.cc
View file @
e237d619
...
@@ -1197,7 +1197,7 @@ int mhnsw_insert(TABLE *table, KEY *keyinfo)
...
@@ -1197,7 +1197,7 @@ int mhnsw_insert(TABLE *table, KEY *keyinfo)
}
}
int
mhnsw_first
(
TABLE
*
table
,
KEY
*
keyinfo
,
Item
*
dist
,
ulonglong
limit
)
int
mhnsw_
read_
first
(
TABLE
*
table
,
KEY
*
keyinfo
,
Item
*
dist
,
ulonglong
limit
)
{
{
THD
*
thd
=
table
->
in_use
;
THD
*
thd
=
table
->
in_use
;
TABLE
*
graph
=
table
->
hlindex
;
TABLE
*
graph
=
table
->
hlindex
;
...
@@ -1272,10 +1272,10 @@ int mhnsw_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
...
@@ -1272,10 +1272,10 @@ int mhnsw_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
}
}
DBUG_ASSERT
(
context
-
sizeof
(
ulonglong
)
==
graph
->
context
);
DBUG_ASSERT
(
context
-
sizeof
(
ulonglong
)
==
graph
->
context
);
return
mhnsw_next
(
table
);
return
mhnsw_
read_
next
(
table
);
}
}
int
mhnsw_next
(
TABLE
*
table
)
int
mhnsw_
read_
next
(
TABLE
*
table
)
{
{
uchar
*
ref
=
(
uchar
*
)(
table
->
hlindex
->
context
);
uchar
*
ref
=
(
uchar
*
)(
table
->
hlindex
->
context
);
if
(
ulonglong
*
limit
=
(
ulonglong
*
)
ref
)
if
(
ulonglong
*
limit
=
(
ulonglong
*
)
ref
)
...
...
sql/vector_mhnsw.h
View file @
e237d619
...
@@ -27,10 +27,10 @@
...
@@ -27,10 +27,10 @@
*/
*/
const
LEX_CSTRING
mhnsw_hlindex_table_def
(
THD
*
thd
,
uint
ref_length
);
const
LEX_CSTRING
mhnsw_hlindex_table_def
(
THD
*
thd
,
uint
ref_length
);
int
mhnsw_insert
(
TABLE
*
table
,
KEY
*
keyinfo
);
int
mhnsw_insert
(
TABLE
*
table
,
KEY
*
keyinfo
);
int
mhnsw_first
(
TABLE
*
table
,
KEY
*
keyinfo
,
Item
*
dist
,
ulonglong
limit
);
int
mhnsw_read_first
(
TABLE
*
table
,
KEY
*
keyinfo
,
Item
*
dist
,
ulonglong
limit
);
int
mhnsw_read_next
(
TABLE
*
table
);
int
mhnsw_invalidate
(
TABLE
*
table
,
const
uchar
*
rec
,
KEY
*
keyinfo
);
int
mhnsw_invalidate
(
TABLE
*
table
,
const
uchar
*
rec
,
KEY
*
keyinfo
);
int
mhnsw_delete_all
(
TABLE
*
table
,
KEY
*
keyinfo
,
bool
truncate
);
int
mhnsw_delete_all
(
TABLE
*
table
,
KEY
*
keyinfo
,
bool
truncate
);
int
mhnsw_next
(
TABLE
*
table
);
void
mhnsw_free
(
TABLE_SHARE
*
share
);
void
mhnsw_free
(
TABLE_SHARE
*
share
);
bool
mhnsw_uses_distance
(
const
TABLE
*
table
,
KEY
*
keyinfo
,
const
Item
*
dist
);
bool
mhnsw_uses_distance
(
const
TABLE
*
table
,
KEY
*
keyinfo
,
const
Item
*
dist
);
...
...
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