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
e52940aa
Commit
e52940aa
authored
Jul 11, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-engines
into rama.(none):/home/jimw/my/mysql-5.0-17766
parents
a810c61f
97cdd9df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
2 deletions
+38
-2
include/my_base.h
include/my_base.h
+2
-1
mysql-test/r/merge.result
mysql-test/r/merge.result
+12
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+16
-1
sql/ha_myisammrg.cc
sql/ha_myisammrg.cc
+4
-0
sql/handler.cc
sql/handler.cc
+4
-0
No files found.
include/my_base.h
View file @
e52940aa
...
...
@@ -347,8 +347,9 @@ enum ha_base_keytype {
#define HA_ERR_NULL_IN_SPATIAL 158
/* NULLs are not supported in spatial index */
#define HA_ERR_TABLE_DEF_CHANGED 159
/* The table changed in storage engine */
#define HA_ERR_TABLE_NEEDS_UPGRADE 160
/* The table changed in storage engine */
#define HA_ERR_TABLE_READONLY 161
/* The table is not writable */
#define HA_ERR_LAST 16
0
/*Copy last error nr.*/
#define HA_ERR_LAST 16
1
/*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
...
...
mysql-test/r/merge.result
View file @
e52940aa
...
...
@@ -782,3 +782,15 @@ create table tm (b bit(1)) engine = merge union = (t1,t2);
select * from tm;
b
drop table tm, t1, t2;
create table t1 (a int) insert_method = last engine = merge;
insert into t1 values (1);
ERROR HY000: Table 't1' is read only
create table t2 (a int) engine = myisam;
alter table t1 union (t2);
insert into t1 values (1);
alter table t1 insert_method = no;
insert into t1 values (1);
ERROR HY000: Table 't1' is read only
drop table t2;
drop table t1;
End of 5.0 tests
mysql-test/t/merge.test
View file @
e52940aa
...
...
@@ -399,4 +399,19 @@ create table tm (b bit(1)) engine = merge union = (t1,t2);
select
*
from
tm
;
drop
table
tm
,
t1
,
t2
;
# End of 5.0 tests
#
# Bug #17766: The server accepts to create MERGE tables which cannot work
#
create
table
t1
(
a
int
)
insert_method
=
last
engine
=
merge
;
--
error
ER_OPEN_AS_READONLY
insert
into
t1
values
(
1
);
create
table
t2
(
a
int
)
engine
=
myisam
;
alter
table
t1
union
(
t2
);
insert
into
t1
values
(
1
);
alter
table
t1
insert_method
=
no
;
--
error
ER_OPEN_AS_READONLY
insert
into
t1
values
(
1
);
drop
table
t2
;
drop
table
t1
;
--
echo
End
of
5.0
tests
sql/ha_myisammrg.cc
View file @
e52940aa
...
...
@@ -132,6 +132,10 @@ int ha_myisammrg::close(void)
int
ha_myisammrg
::
write_row
(
byte
*
buf
)
{
statistic_increment
(
table
->
in_use
->
status_var
.
ha_write_count
,
&
LOCK_status
);
if
(
file
->
merge_insert_method
==
MERGE_INSERT_DISABLED
||
!
file
->
tables
)
return
(
HA_ERR_TABLE_READONLY
);
if
(
table
->
timestamp_field_type
&
TIMESTAMP_AUTO_SET_ON_INSERT
)
table
->
timestamp_field
->
set_time
();
if
(
table
->
next_number_field
&&
buf
==
table
->
record
[
0
])
...
...
sql/handler.cc
View file @
e52940aa
...
...
@@ -426,6 +426,7 @@ static int ha_init_errors(void)
SETMSG
(
HA_ERR_NO_CONNECTION
,
"Could not connect to storage engine"
);
SETMSG
(
HA_ERR_TABLE_DEF_CHANGED
,
ER
(
ER_TABLE_DEF_CHANGED
));
SETMSG
(
HA_ERR_TABLE_NEEDS_UPGRADE
,
ER
(
ER_TABLE_NEEDS_UPGRADE
));
SETMSG
(
HA_ERR_TABLE_READONLY
,
ER
(
ER_OPEN_AS_READONLY
));
/* Register the error messages for use with my_error(). */
return
my_error_register
(
errmsgs
,
HA_ERR_FIRST
,
HA_ERR_LAST
);
...
...
@@ -1799,6 +1800,9 @@ void handler::print_error(int error, myf errflag)
case
HA_ERR_TABLE_NEEDS_UPGRADE
:
textno
=
ER_TABLE_NEEDS_UPGRADE
;
break
;
case
HA_ERR_TABLE_READONLY
:
textno
=
ER_OPEN_AS_READONLY
;
break
;
default:
{
/* The error was "unknown" to this function.
...
...
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