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
c4adaed0
Commit
c4adaed0
authored
Jul 28, 2023
by
Nikita Malyavin
Committed by
Sergei Golubchik
Aug 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-31781 ALTER TABLE ENGINE=s3 fails
s3 is read-only. No need to update to a read-only engine with LOCK=NONE.
parent
30c965f8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
mysql-test/suite/s3/alter.result
mysql-test/suite/s3/alter.result
+4
-0
mysql-test/suite/s3/alter.test
mysql-test/suite/s3/alter.test
+6
-0
storage/maria/ha_maria.h
storage/maria/ha_maria.h
+1
-1
storage/maria/ha_s3.cc
storage/maria/ha_s3.cc
+1
-0
No files found.
mysql-test/suite/s3/alter.result
View file @
c4adaed0
...
@@ -130,3 +130,7 @@ count(*) sum(a) sum(b)
...
@@ -130,3 +130,7 @@ count(*) sum(a) sum(b)
select count(*), sum(a), sum(b) from t1;
select count(*), sum(a), sum(b) from t1;
ERROR 42S02: Table 'database.t1' doesn't exist
ERROR 42S02: Table 'database.t1' doesn't exist
drop table t2;
drop table t2;
# MDEV-31781 ALTER TABLE ENGINE=s3 fails
create table t (a int) engine=Aria;
alter table t engine=S3, algorithm=copy, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: S3. Try LOCK=SHARED
mysql-test/suite/s3/alter.test
View file @
c4adaed0
...
@@ -93,6 +93,12 @@ select count(*), sum(a), sum(b) from t2;
...
@@ -93,6 +93,12 @@ select count(*), sum(a), sum(b) from t2;
select
count
(
*
),
sum
(
a
),
sum
(
b
)
from
t1
;
select
count
(
*
),
sum
(
a
),
sum
(
b
)
from
t1
;
drop
table
t2
;
drop
table
t2
;
--
echo
# MDEV-31781 ALTER TABLE ENGINE=s3 fails
create
table
t
(
a
int
)
engine
=
Aria
;
--
error
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter
table
t
engine
=
S3
,
algorithm
=
copy
,
lock
=
none
;
#
#
# clean up
# clean up
#
#
...
...
storage/maria/ha_maria.h
View file @
c4adaed0
...
@@ -67,7 +67,7 @@ class __attribute__((visibility("default"))) ha_maria :public handler
...
@@ -67,7 +67,7 @@ class __attribute__((visibility("default"))) ha_maria :public handler
~
ha_maria
()
=
default
;
~
ha_maria
()
=
default
;
handler
*
clone
(
const
char
*
name
,
MEM_ROOT
*
mem_root
)
override
final
;
handler
*
clone
(
const
char
*
name
,
MEM_ROOT
*
mem_root
)
override
final
;
const
char
*
index_type
(
uint
key_number
)
override
final
;
const
char
*
index_type
(
uint
key_number
)
override
final
;
ulonglong
table_flags
()
const
override
final
ulonglong
table_flags
()
const
override
{
return
int_table_flags
;
}
{
return
int_table_flags
;
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
override
final
;
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
override
final
;
uint
max_supported_keys
()
const
override
final
uint
max_supported_keys
()
const
override
final
...
...
storage/maria/ha_s3.cc
View file @
c4adaed0
...
@@ -238,6 +238,7 @@ ha_s3::ha_s3(handlerton *hton, TABLE_SHARE *table_arg)
...
@@ -238,6 +238,7 @@ ha_s3::ha_s3(handlerton *hton, TABLE_SHARE *table_arg)
/* Remove things that S3 doesn't support */
/* Remove things that S3 doesn't support */
int_table_flags
&=
~
(
HA_BINLOG_ROW_CAPABLE
|
HA_BINLOG_STMT_CAPABLE
|
int_table_flags
&=
~
(
HA_BINLOG_ROW_CAPABLE
|
HA_BINLOG_STMT_CAPABLE
|
HA_CAN_EXPORT
);
HA_CAN_EXPORT
);
int_table_flags
|=
HA_NO_ONLINE_ALTER
;
can_enable_indexes
=
0
;
can_enable_indexes
=
0
;
}
}
...
...
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