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
12b62521
Commit
12b62521
authored
Apr 07, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#6762 ALTER TABLE gives weird results and error message
- Removed hardcoded error message from 4.1
parent
a47bc288
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
include/my_base.h
include/my_base.h
+3
-1
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+3
-10
sql/handler.cc
sql/handler.cc
+4
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+3
-0
No files found.
include/my_base.h
View file @
12b62521
...
...
@@ -312,7 +312,9 @@ enum ha_base_keytype {
#define HA_ERR_TABLE_EXIST 156
/* The table existed in storage engine */
#define HA_ERR_NO_CONNECTION 157
/* Could not connect to storage engine */
#define HA_ERR_NULL_IN_SPATIAL 158
/* NULLs are not supported in spatial index */
#define HA_ERR_LAST 158
/*Copy last error nr.*/
#define HA_ERR_TABLE_DEF_CHANGED 159
/* The table changed in storage engine */
#define HA_ERR_LAST 159
/*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/t/ndb_alter_table.test
View file @
12b62521
...
...
@@ -147,7 +147,7 @@ select * from t1 where b = 'two';
connection
server1
;
alter
table
t1
drop
index
c
;
connection
server2
;
--
error
1
105
--
error
1
412
select
*
from
t1
where
b
=
'two'
;
select
*
from
t1
where
b
=
'two'
;
connection
server1
;
...
...
sql/ha_ndbcluster.cc
View file @
12b62521
...
...
@@ -192,6 +192,8 @@ static const err_code_mapping err_map[]=
{
827
,
HA_ERR_RECORD_FILE_FULL
,
1
},
{
832
,
HA_ERR_RECORD_FILE_FULL
,
1
},
{
284
,
HA_ERR_TABLE_DEF_CHANGED
,
0
},
{
0
,
1
,
0
},
{
-
1
,
-
1
,
1
}
...
...
@@ -470,16 +472,7 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
if
(
err
.
code
!=
709
)
DBUG_RETURN
(
1
);
}
else
{
DBUG_PRINT
(
"info"
,
(
"Table exist but must have changed"
));
/* In 5.0, this should be replaced with a mapping to a mysql error */
my_printf_error
(
ER_UNKNOWN_ERROR
,
"Table definition has changed, "
\
"please retry transaction"
,
MYF
(
0
));
DBUG_RETURN
(
1
);
}
DBUG_PRINT
(
"info"
,
(
"Table exists but must have changed"
));
}
break
;
default:
...
...
sql/handler.cc
View file @
12b62521
...
...
@@ -304,6 +304,7 @@ static int ha_init_errors(void)
SETMSG
(
HA_ERR_NO_SUCH_TABLE
,
"No such table: '%.64s'"
);
SETMSG
(
HA_ERR_TABLE_EXIST
,
ER
(
ER_TABLE_EXISTS_ERROR
));
SETMSG
(
HA_ERR_NO_CONNECTION
,
"Could not connect to storage engine"
);
SETMSG
(
HA_ERR_TABLE_DEF_CHANGED
,
ER
(
ER_TABLE_DEF_CHANGED
));
/* Register the error messages for use with my_error(). */
return
my_error_register
(
errmsgs
,
HA_ERR_FIRST
,
HA_ERR_LAST
);
...
...
@@ -1646,6 +1647,9 @@ void handler::print_error(int error, myf errflag)
case
HA_ERR_NO_REFERENCED_ROW
:
textno
=
ER_NO_REFERENCED_ROW
;
break
;
case
HA_ERR_TABLE_DEF_CHANGED
:
textno
=
ER_TABLE_DEF_CHANGED
;
break
;
case
HA_ERR_NO_SUCH_TABLE
:
{
/*
...
...
sql/share/errmsg.txt
View file @
12b62521
...
...
@@ -5336,3 +5336,6 @@ ER_CANT_CREATE_USER_WITH_GRANT 42000
eng "You are not allowed to create a user with GRANT"
ER_WRONG_VALUE_FOR_TYPE
eng "Incorrect %-.32s value: '%-.128s' for function %-.32s"
ER_TABLE_DEF_CHANGED
eng "Table definition has changed, please retry transaction"
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