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
db9e41dd
Commit
db9e41dd
authored
Sep 06, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20496 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
parent
18e10e89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
mysql-test/main/type_bit.result
mysql-test/main/type_bit.result
+23
-0
mysql-test/main/type_bit.test
mysql-test/main/type_bit.test
+23
-0
sql/sql_type.h
sql/sql_type.h
+1
-0
No files found.
mysql-test/main/type_bit.result
View file @
db9e41dd
...
...
@@ -878,3 +878,26 @@ DROP TABLE t1;
#
# End of 10.4 tests
#
#
# Start of 10.5 tests
#
#
# MDEV-20496 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
#
CREATE TABLE t1 (b BIT(1));
SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def MIN(CASE WHEN 0 THEN b END) 8 1 0 Y 32928 0 63
MIN(CASE WHEN 0 THEN b END)
NULL
CREATE TABLE t2 AS SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`MIN(CASE WHEN 0 THEN b END)` bigint(1) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
#
# End of 10.5 tests
#
mysql-test/main/type_bit.test
View file @
db9e41dd
...
...
@@ -511,3 +511,26 @@ DROP TABLE t1;
--
echo
#
--
echo
# End of 10.4 tests
--
echo
#
--
echo
#
--
echo
# Start of 10.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-20496 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
--
echo
#
CREATE
TABLE
t1
(
b
BIT
(
1
));
--
disable_ps_protocol
--
enable_metadata
SELECT
MIN
(
CASE
WHEN
0
THEN
b
END
)
FROM
t1
;
--
disable_metadata
--
enable_ps_protocol
CREATE
TABLE
t2
AS
SELECT
MIN
(
CASE
WHEN
0
THEN
b
END
)
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
sql/sql_type.h
View file @
db9e41dd
...
...
@@ -5391,6 +5391,7 @@ class Type_handler_bit: public Type_handler_int_result
virtual
~
Type_handler_bit
()
{}
const
Name
name
()
const
override
{
return
m_name_bit
;
}
enum_field_types
field_type
()
const
override
{
return
MYSQL_TYPE_BIT
;
}
uint
flags
()
const
override
{
return
UNSIGNED_FLAG
;
}
protocol_send_type_t
protocol_send_type
()
const
override
{
return
PROTOCOL_SEND_STRING
;
...
...
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