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
dfd35b86
Commit
dfd35b86
authored
Jul 15, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
68e36030
ed806b1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+17
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+16
-0
sql/sql_show.cc
sql/sql_show.cc
+4
-1
No files found.
mysql-test/r/information_schema.result
View file @
dfd35b86
...
...
@@ -1691,6 +1691,23 @@ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
COLUMN_DEFAULT TABLE_NAME
NULL variables
DROP TABLE variables;
#
# Bug #53814: NUMERIC_PRECISION for unsigned bigint field is 19,
# should be 20
#
CREATE TABLE ubig (a BIGINT, b BIGINT UNSIGNED);
SELECT TABLE_NAME, COLUMN_NAME, NUMERIC_PRECISION
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='ubig';
TABLE_NAME COLUMN_NAME NUMERIC_PRECISION
ubig a 19
ubig b 20
INSERT INTO ubig VALUES (0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT length(CAST(b AS CHAR)) FROM ubig;
length(CAST(b AS CHAR))
20
DROP TABLE ubig;
End of 5.1 tests.
#
# Additional test for WL#3726 "DDL locking for all metadata objects"
...
...
mysql-test/t/information_schema.test
View file @
dfd35b86
...
...
@@ -1426,6 +1426,22 @@ FROM INFORMATION_SCHEMA.COLUMNS
WHERE
INFORMATION_SCHEMA
.
COLUMNS
.
TABLE_NAME
=
'variables'
;
DROP
TABLE
variables
;
--
echo
#
--
echo
# Bug #53814: NUMERIC_PRECISION for unsigned bigint field is 19,
--
echo
# should be 20
--
echo
#
CREATE
TABLE
ubig
(
a
BIGINT
,
b
BIGINT
UNSIGNED
);
SELECT
TABLE_NAME
,
COLUMN_NAME
,
NUMERIC_PRECISION
FROM
INFORMATION_SCHEMA
.
COLUMNS
WHERE
TABLE_NAME
=
'ubig'
;
INSERT
INTO
ubig
VALUES
(
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
);
SELECT
length
(
CAST
(
b
AS
CHAR
))
FROM
ubig
;
DROP
TABLE
ubig
;
--
echo
End
of
5.1
tests
.
--
echo
#
...
...
sql/sql_show.cc
View file @
dfd35b86
...
...
@@ -4022,10 +4022,13 @@ void store_column_type(TABLE *table, Field *field, CHARSET_INFO *cs,
case
MYSQL_TYPE_TINY
:
case
MYSQL_TYPE_SHORT
:
case
MYSQL_TYPE_LONG
:
case
MYSQL_TYPE_LONGLONG
:
case
MYSQL_TYPE_INT24
:
field_length
=
field
->
max_display_length
()
-
1
;
break
;
case
MYSQL_TYPE_LONGLONG
:
field_length
=
field
->
max_display_length
()
-
((
field
->
flags
&
UNSIGNED_FLAG
)
?
0
:
1
);
break
;
case
MYSQL_TYPE_BIT
:
field_length
=
field
->
max_display_length
();
decimals
=
-
1
;
// return NULL
...
...
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