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
60ca0e34
Commit
60ca0e34
authored
Feb 08, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into host.loc:/home/uchum/work/5.0-opt
parents
bd0a8e6c
213b4dcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
mysql-test/r/type_set.result
mysql-test/r/type_set.result
+8
-0
mysql-test/t/type_set.test
mysql-test/t/type_set.test
+20
-0
sql/field.cc
sql/field.cc
+3
-3
No files found.
mysql-test/r/type_set.result
View file @
60ca0e34
...
...
@@ -85,3 +85,11 @@ t1 CREATE TABLE `t1` (
`f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1(c set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64'));
INSERT INTO t1 VALUES(7);
INSERT INTO t1 VALUES(9223372036854775808);
SELECT * FROM t1;
c
1,2,3
64
DROP TABLE t1;
mysql-test/t/type_set.test
View file @
60ca0e34
...
...
@@ -56,3 +56,23 @@ set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17',
'50'
,
'51'
,
'52'
,
'53'
,
'54'
,
'55'
,
'56'
,
'57'
,
'58'
,
'59'
,
'60'
,
'61'
,
'62'
,
'63'
,
'64'
,
'1'
));
show
create
table
t1
;
drop
table
t1
;
#
# Bug#15409: Columns with SET datatype with 64-element sets
# may not be updated with integers
#
let
$i
=
64
;
let
$s
=
'$i'
;
dec
$i
;
while
(
$i
)
{
let
$s
=
'$i'
,
$s
;
dec
$i
;
}
--
eval
CREATE
TABLE
t1
(
c
set
(
$s
))
INSERT
INTO
t1
VALUES
(
7
);
INSERT
INTO
t1
VALUES
(
9223372036854775808
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
# echo End of 5.0 tests
sql/field.cc
View file @
60ca0e34
...
...
@@ -7871,10 +7871,10 @@ int Field_set::store(const char *from,uint length,CHARSET_INFO *cs)
int
Field_set
::
store
(
longlong
nr
,
bool
unsigned_val
)
{
int
error
=
0
;
if
((
ulonglong
)
nr
>
(
ulonglong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
)
)
ulonglong
max_nr
=
set_bits
(
ulonglong
,
typelib
->
count
);
if
((
ulonglong
)
nr
>
max_nr
)
{
nr
&=
(
longlong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
);
nr
&=
max_nr
;
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
error
=
1
;
}
...
...
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