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
ca002ec4
Commit
ca002ec4
authored
Jul 05, 2024
by
Sergey Vojtovich
Committed by
Sergei Golubchik
Sep 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test insert ... select with vector index
parent
a059f514
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
mysql-test/main/vector.result
mysql-test/main/vector.result
+39
-0
mysql-test/main/vector.test
mysql-test/main/vector.test
+19
-0
No files found.
mysql-test/main/vector.result
View file @
ca002ec4
...
@@ -263,3 +263,42 @@ t2 CREATE TABLE `t2` (
...
@@ -263,3 +263,42 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1, t2;
drop table t1, t2;
db.opt
db.opt
# Test insert ... select with vector index
create table t1 (id int auto_increment primary key, v blob not null, vector index (v));
create table t2 like t1;
insert t1 (v) values (x'e360d63ebe554f3fcdbc523f4522193f5236083d'),
(x'f511303f72224a3fdd05fe3eb22a133ffae86a3f'),
(x'f09baa3ea172763f123def3e0c7fe53e288bf33e'),
(x'b97a523f2a193e3eb4f62e3f2d23583e9dd60d3f'),
(x'f7c5df3e984b2b3e65e59d3d7376db3eac63773e'),
(x'de01453ffa486d3f10aa4d3fdd66813c71cb163f'),
(x'76edfc3e4b57243f10f8423fb158713f020bda3e'),
(x'56926c3fdf098d3e2c8c5e3d1ad4953daa9d0b3e'),
(x'7b713f3e5258323f80d1113d673b2b3f66e3583f'),
(x'6ca1d43e9df91b3fe580da3e1c247d3f147cf33e');
insert into t2 select id+10, v from t1;
insert into t1 select * from t2;
select id, hex(v) from t1;
id hex(v)
1 E360D63EBE554F3FCDBC523F4522193F5236083D
2 F511303F72224A3FDD05FE3EB22A133FFAE86A3F
3 F09BAA3EA172763F123DEF3E0C7FE53E288BF33E
4 B97A523F2A193E3EB4F62E3F2D23583E9DD60D3F
5 F7C5DF3E984B2B3E65E59D3D7376DB3EAC63773E
6 DE01453FFA486D3F10AA4D3FDD66813C71CB163F
7 76EDFC3E4B57243F10F8423FB158713F020BDA3E
8 56926C3FDF098D3E2C8C5E3D1AD4953DAA9D0B3E
9 7B713F3E5258323F80D1113D673B2B3F66E3583F
10 6CA1D43E9DF91B3FE580DA3E1C247D3F147CF33E
11 E360D63EBE554F3FCDBC523F4522193F5236083D
12 F511303F72224A3FDD05FE3EB22A133FFAE86A3F
13 F09BAA3EA172763F123DEF3E0C7FE53E288BF33E
14 B97A523F2A193E3EB4F62E3F2D23583E9DD60D3F
15 F7C5DF3E984B2B3E65E59D3D7376DB3EAC63773E
16 DE01453FFA486D3F10AA4D3FDD66813C71CB163F
17 76EDFC3E4B57243F10F8423FB158713F020BDA3E
18 56926C3FDF098D3E2C8C5E3D1AD4953DAA9D0B3E
19 7B713F3E5258323F80D1113D673B2B3F66E3583F
20 6CA1D43E9DF91B3FE580DA3E1C247D3F147CF33E
drop table t1, t2;
db.opt
mysql-test/main/vector.test
View file @
ca002ec4
...
@@ -82,3 +82,22 @@ replace_result InnoDB MyISAM;
...
@@ -82,3 +82,22 @@ replace_result InnoDB MyISAM;
show
create
table
t2
;
show
create
table
t2
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
list_files
$datadir
/
test
;
list_files
$datadir
/
test
;
--
echo
# Test insert ... select with vector index
create
table
t1
(
id
int
auto_increment
primary
key
,
v
blob
not
null
,
vector
index
(
v
));
create
table
t2
like
t1
;
insert
t1
(
v
)
values
(
x
'e360d63ebe554f3fcdbc523f4522193f5236083d'
),
(
x
'f511303f72224a3fdd05fe3eb22a133ffae86a3f'
),
(
x
'f09baa3ea172763f123def3e0c7fe53e288bf33e'
),
(
x
'b97a523f2a193e3eb4f62e3f2d23583e9dd60d3f'
),
(
x
'f7c5df3e984b2b3e65e59d3d7376db3eac63773e'
),
(
x
'de01453ffa486d3f10aa4d3fdd66813c71cb163f'
),
(
x
'76edfc3e4b57243f10f8423fb158713f020bda3e'
),
(
x
'56926c3fdf098d3e2c8c5e3d1ad4953daa9d0b3e'
),
(
x
'7b713f3e5258323f80d1113d673b2b3f66e3583f'
),
(
x
'6ca1d43e9df91b3fe580da3e1c247d3f147cf33e'
);
insert
into
t2
select
id
+
10
,
v
from
t1
;
insert
into
t1
select
*
from
t2
;
select
id
,
hex
(
v
)
from
t1
;
drop
table
t1
,
t2
;
list_files
$datadir
/
test
;
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