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
1abd877e
Commit
1abd877e
authored
Jun 22, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8049 name_const() is not consistent about its signess
parent
bcc2100f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
mysql-test/main/func_misc.result
mysql-test/main/func_misc.result
+20
-0
mysql-test/main/func_misc.test
mysql-test/main/func_misc.test
+15
-0
sql/item.cc
sql/item.cc
+1
-0
No files found.
mysql-test/main/func_misc.result
View file @
1abd877e
...
@@ -1562,3 +1562,23 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
...
@@ -1562,3 +1562,23 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def INET_ATON("255.255.255.255.255.255.255.255") 8 21 20 Y 32928 0 63
def INET_ATON("255.255.255.255.255.255.255.255") 8 21 20 Y 32928 0 63
INET_ATON("255.255.255.255.255.255.255.255")
INET_ATON("255.255.255.255.255.255.255.255")
18446744073709551615
18446744073709551615
#
# MDEV-8049 name_const() is not consistent about its signess
#
SELECT 18446744073709551615 AS c1, name_const('a',18446744073709551615) AS c2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def c1 8 20 20 N 32929 0 63
def c2 8 20 20 Y 32928 0 63
c1 c2
18446744073709551615 18446744073709551615
CREATE TABLE t1 AS SELECT 18446744073709551615 AS c1, name_const('a',18446744073709551615) AS c2;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) unsigned NOT NULL,
`c2` bigint(20) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
c1 c2
18446744073709551615 18446744073709551615
DROP TABLE t1;
mysql-test/main/func_misc.test
View file @
1abd877e
...
@@ -1203,3 +1203,18 @@ SELECT INET_ATON("255.255.255.255.255.255.255.255");
...
@@ -1203,3 +1203,18 @@ SELECT INET_ATON("255.255.255.255.255.255.255.255");
--
enable_ps_protocol
--
enable_ps_protocol
--
disable_metadata
--
disable_metadata
--
echo
#
--
echo
# MDEV-8049 name_const() is not consistent about its signess
--
echo
#
--
enable_metadata
--
disable_ps_protocol
SELECT
18446744073709551615
AS
c1
,
name_const
(
'a'
,
18446744073709551615
)
AS
c2
;
--
enable_ps_protocol
--
disable_metadata
CREATE
TABLE
t1
AS
SELECT
18446744073709551615
AS
c1
,
name_const
(
'a'
,
18446744073709551615
)
AS
c2
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
sql/item.cc
View file @
1abd877e
...
@@ -2267,6 +2267,7 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
...
@@ -2267,6 +2267,7 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
collation
.
set
(
value_item
->
collation
.
collation
,
DERIVATION_IMPLICIT
);
collation
.
set
(
value_item
->
collation
.
collation
,
DERIVATION_IMPLICIT
);
max_length
=
value_item
->
max_length
;
max_length
=
value_item
->
max_length
;
decimals
=
value_item
->
decimals
;
decimals
=
value_item
->
decimals
;
unsigned_flag
=
value_item
->
unsigned_flag
;
fixed
=
1
;
fixed
=
1
;
return
FALSE
;
return
FALSE
;
}
}
...
...
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