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
7e336524
Commit
7e336524
authored
May 28, 2010
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge of bug#49161 into mysql-trunk-merge
(Added a real error message instead of ER_UNKNOWN_ERROR)
parents
8cf9db67
6498472b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+16
-0
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+20
-2
sql/ha_partition.cc
sql/ha_partition.cc
+1
-1
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+4
-0
No files found.
mysql-test/r/partition_error.result
View file @
7e336524
drop table if exists t1;
#
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
#
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
FLUSH TABLES;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Error Failed to read from the .par file
test.t1 check Error Incorrect information in file: './test/t1.frm'
test.t1 check error Corrupt
SELECT * FROM t1;
ERROR HY000: Failed to read from the .par file
# Note that it is currently impossible to drop a partitioned table
# without the .par file
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
#
# Bug#49477: Assertion `0' failed in ha_partition.cc:5530
# with temporary table and partitions
#
...
...
mysql-test/t/partition_error.test
View file @
7e336524
...
...
@@ -7,7 +7,26 @@
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
--
echo
#
--
echo
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
--
echo
#
CREATE
TABLE
t1
(
a
INT
)
PARTITION
BY
HASH
(
a
);
FLUSH
TABLES
;
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1
.
par
CHECK
TABLE
t1
;
--
error
ER_FAILED_READ_FROM_PAR_FILE
SELECT
*
FROM
t1
;
--
echo
# Note that it is currently impossible to drop a partitioned table
--
echo
# without the .par file
--
error
ER_BAD_TABLE_ERROR
DROP
TABLE
t1
;
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1
.
frm
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1
#P#p0.MYI
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1
#P#p0.MYD
--
echo
#
--
echo
# Bug#49477: Assertion `0' failed in ha_partition.cc:5530
--
echo
# with temporary table and partitions
...
...
@@ -167,7 +186,6 @@ partitions 3
partition
x2
tablespace
ts2
,
partition
x3
tablespace
ts3
);
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
select
load_file
(
'$MYSQLD_DATADIR/test/t1.par'
);
#
# Partition by hash, invalid field in function
...
...
sql/ha_partition.cc
View file @
7e336524
...
...
@@ -361,7 +361,7 @@ bool ha_partition::initialize_partition(MEM_ROOT *mem_root)
}
else
if
(
get_from_handler_file
(
table_share
->
normalized_path
.
str
,
mem_root
))
{
m
em_alloc_error
(
2
);
m
y_error
(
ER_FAILED_READ_FROM_PAR_FILE
,
MYF
(
0
)
);
DBUG_RETURN
(
1
);
}
/*
...
...
sql/share/errmsg-utf8.txt
View file @
7e336524
...
...
@@ -6336,3 +6336,7 @@ ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
ER_BINLOG_UNSAFE_MIXED_STATEMENT
eng "Statements that read from both transactional (or a temporary table of any engine type) and non-transactional tables and write to any of them are unsafe."
ER_FAILED_READ_FROM_PAR_FILE
eng "Failed to read from the .par file"
swe "Misslyckades läsa från .par filen"
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