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
15b92915
Commit
15b92915
authored
Jun 19, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe
parent
e4252160
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
1 deletion
+31
-1
mysql-test/std_data/frm/t1.frm
mysql-test/std_data/frm/t1.frm
+0
-0
mysql-test/suite/vcol/r/vcol_misc.result
mysql-test/suite/vcol/r/vcol_misc.result
+10
-0
mysql-test/suite/vcol/t/vcol_misc.test
mysql-test/suite/vcol/t/vcol_misc.test
+16
-0
sql/table.cc
sql/table.cc
+5
-1
No files found.
mysql-test/std_data/frm/t1.frm
0 → 100644
View file @
15b92915
This diff was suppressed by a .gitattributes entry.
mysql-test/suite/vcol/r/vcol_misc.result
View file @
15b92915
...
...
@@ -354,5 +354,15 @@ a b c
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
# MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe
#
SHOW TABLES;
Tables_in_test
t1
SHOW CREATE TABLE t1;
ERROR HY000: Incorrect information in file: './test/t1.frm'
ALTER TABLE t1;
ERROR HY000: Incorrect information in file: './test/t1.frm'
#
# End of 5.5 tests
#
mysql-test/suite/vcol/t/vcol_misc.test
View file @
15b92915
--
source
include
/
have_ucs2
.
inc
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
...
...
@@ -318,6 +320,20 @@ SELECT * FROM t1;
DROP
TABLE
t1
;
SET
sql_mode
=
DEFAULT
;
--
echo
#
--
echo
# MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe
--
echo
#
--
copy_file
std_data
/
frm
/
t1
.
frm
$MYSQLD_DATADIR
/
test
/
t1
.
frm
SHOW
TABLES
;
--
error
ER_NOT_FORM_FILE
SHOW
CREATE
TABLE
t1
;
--
error
ER_NOT_FORM_FILE
ALTER
TABLE
t1
;
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1
.
frm
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
sql/table.cc
View file @
15b92915
...
...
@@ -1462,7 +1462,11 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
if
((
uchar
)
field_type
==
(
uchar
)
MYSQL_TYPE_VIRTUAL
)
{
DBUG_ASSERT
(
interval_nr
);
// Expect non-null expression
if
(
!
interval_nr
)
// Expect non-null expression
{
error
=
4
;
goto
err
;
}
/*
The interval_id byte in the .frm file stores the length of the
expression statement for a virtual column.
...
...
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