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
9a3ff078
Commit
9a3ff078
authored
Oct 19, 2015
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8565: COLUMN_CHECK fails on valid data
Check allows zero lengts int/uint now.
parent
151f9673
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
mysql-test/r/dyncol.result
mysql-test/r/dyncol.result
+15
-0
mysql-test/t/dyncol.test
mysql-test/t/dyncol.test
+12
-0
mysys/ma_dyncol.c
mysys/ma_dyncol.c
+4
-2
No files found.
mysql-test/r/dyncol.result
View file @
9a3ff078
...
@@ -1805,5 +1805,20 @@ set impressions = column_add(impressions,
...
@@ -1805,5 +1805,20 @@ set impressions = column_add(impressions,
);
);
drop table t1;
drop table t1;
#
#
# MDEV-8565: COLUMN_CHECK fails on valid data
#
SELECT COLUMN_CHECK(COLUMN_CREATE('a',0,'b','1'));
COLUMN_CHECK(COLUMN_CREATE('a',0,'b','1'))
1
SELECT COLUMN_CHECK(COLUMN_CREATE('a',1,'b','1'));
COLUMN_CHECK(COLUMN_CREATE('a',1,'b','1'))
1
SELECT COLUMN_JSON(COLUMN_CREATE('a',0,'b','1'));
COLUMN_JSON(COLUMN_CREATE('a',0,'b','1'))
{"a":0,"b":"1"}
SELECT COLUMN_JSON(COLUMN_CREATE('a',1,'b','1'));
COLUMN_JSON(COLUMN_CREATE('a',1,'b','1'))
{"a":1,"b":"1"}
#
# end of 10.0 tests
# end of 10.0 tests
#
#
mysql-test/t/dyncol.test
View file @
9a3ff078
...
@@ -871,6 +871,18 @@ set impressions = column_add(impressions,
...
@@ -871,6 +871,18 @@ set impressions = column_add(impressions,
drop
table
t1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-8565: COLUMN_CHECK fails on valid data
--
echo
#
SELECT
COLUMN_CHECK
(
COLUMN_CREATE
(
'a'
,
0
,
'b'
,
'1'
));
SELECT
COLUMN_CHECK
(
COLUMN_CREATE
(
'a'
,
1
,
'b'
,
'1'
));
SELECT
COLUMN_JSON
(
COLUMN_CREATE
(
'a'
,
0
,
'b'
,
'1'
));
SELECT
COLUMN_JSON
(
COLUMN_CREATE
(
'a'
,
1
,
'b'
,
'1'
));
--
echo
#
--
echo
#
--
echo
# end of 10.0 tests
--
echo
# end of 10.0 tests
--
echo
#
--
echo
#
mysys/ma_dyncol.c
View file @
9a3ff078
...
@@ -3723,10 +3723,12 @@ mariadb_dyncol_check(DYNAMIC_COLUMN *str)
...
@@ -3723,10 +3723,12 @@ mariadb_dyncol_check(DYNAMIC_COLUMN *str)
if
(
prev_type
!=
DYN_COL_NULL
)
if
(
prev_type
!=
DYN_COL_NULL
)
{
{
/* It is not first entry */
/* It is not first entry */
if
(
prev_data_offset
>=
data_offset
)
if
(
prev_data_offset
>
data_offset
||
((
prev_type
!=
DYN_COL_INT
&&
prev_type
!=
DYN_COL_UINT
)
&&
prev_data_offset
==
data_offset
))
{
{
DBUG_PRINT
(
"info"
,
(
"Field order: %u Previous data offset: %u"
DBUG_PRINT
(
"info"
,
(
"Field order: %u Previous data offset: %u"
" >
=
Current data offset: %u"
,
" >
(=)
Current data offset: %u"
,
(
uint
)
i
,
(
uint
)
i
,
(
uint
)
prev_data_offset
,
(
uint
)
prev_data_offset
,
(
uint
)
data_offset
));
(
uint
)
data_offset
));
...
...
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