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
3edaeafc
Commit
3edaeafc
authored
Jul 05, 2024
by
Sergey Vojtovich
Committed by
Sergei Golubchik
Sep 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CREATE TABLE ... LIKE loses VECTOR index
parent
097a7ea1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
mysql-test/main/vector.result
mysql-test/main/vector.result
+13
-0
mysql-test/main/vector.test
mysql-test/main/vector.test
+8
-0
sql/sql_table.cc
sql/sql_table.cc
+1
-1
No files found.
mysql-test/main/vector.result
View file @
3edaeafc
...
...
@@ -250,3 +250,16 @@ insert t1 (v) values (x'12345678');
ERROR 22007: Incorrect vector value: '...' for column `test`.`t1`.`v` at row 1
drop table t1;
db.opt
# Check if CREATE TABLE ... LIKE inherits VECTOR index
create table t1 (id int auto_increment primary key, v blob not null, vector index (v));
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`v` blob NOT NULL,
PRIMARY KEY (`id`),
VECTOR KEY `v` (`v`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1, t2;
db.opt
mysql-test/main/vector.test
View file @
3edaeafc
...
...
@@ -74,3 +74,11 @@ insert t1 (v) values (x'12345678');
drop
table
t1
;
let
$datadir
=
`select @@datadir`
;
list_files
$datadir
/
test
;
--
echo
# Check if CREATE TABLE ... LIKE inherits VECTOR index
create
table
t1
(
id
int
auto_increment
primary
key
,
v
blob
not
null
,
vector
index
(
v
));
create
table
t2
like
t1
;
replace_result
InnoDB
MyISAM
;
show
create
table
t2
;
drop
table
t1
,
t2
;
list_files
$datadir
/
test
;
sql/sql_table.cc
View file @
3edaeafc
...
...
@@ -8705,7 +8705,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Collect all keys which isn't in drop list. Add only those
for which some fields exists.
*/
for
(
uint
i
=
0
;
i
<
table
->
s
->
keys
;
i
++
,
key_info
++
)
for
(
uint
i
=
0
;
i
<
table
->
s
->
total_keys
;
i
++
,
key_info
++
)
{
bool
long_hash_key
=
false
;
if
(
key_info
->
flags
&
HA_INVISIBLE_KEY
)
...
...
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