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
bdefd2ad
Commit
bdefd2ad
authored
Apr 12, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
13460bd2
7fa7a0ca
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
12 deletions
+43
-12
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+11
-0
mysql-test/r/func_in.result
mysql-test/r/func_in.result
+6
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+12
-0
mysql-test/t/func_in.test
mysql-test/t/func_in.test
+6
-0
sql/field.cc
sql/field.cc
+2
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+5
-7
sql/item_sum.cc
sql/item_sum.cc
+1
-5
No files found.
mysql-test/r/func_group.result
View file @
bdefd2ad
...
...
@@ -1746,6 +1746,17 @@ MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
DROP TABLE t1;
#
# Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
#
CREATE TABLE t1(f1 YEAR(4));
INSERT INTO t1 VALUES (0000),(2001);
(SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def MAX(f1) MAX(f1) 13 4 4 Y 32864 0 63
MAX(f1)
2001
DROP TABLE t1;
#
End of 5.1 tests
#
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
...
...
mysql-test/r/func_in.result
View file @
bdefd2ad
...
...
@@ -770,4 +770,10 @@ CASE a WHEN a THEN a END
NULL
DROP TABLE t1;
#
# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
#
SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1)
1
#
End of 5.1 tests
mysql-test/t/func_group.test
View file @
bdefd2ad
...
...
@@ -1127,6 +1127,18 @@ INSERT INTO t1 VALUES (18446668621106209655);
SELECT
MAX
(
LENGTH
(
a
)),
LENGTH
(
MAX
(
a
)),
MIN
(
a
),
MAX
(
a
),
CONCAT
(
MIN
(
a
)),
CONCAT
(
MAX
(
a
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
--
echo
#
CREATE
TABLE
t1
(
f1
YEAR
(
4
));
INSERT
INTO
t1
VALUES
(
0000
),(
2001
);
--
enable_metadata
(
SELECT
MAX
(
f1
)
FROM
t1
)
UNION
(
SELECT
MAX
(
f1
)
FROM
t1
);
--
disable_metadata
DROP
TABLE
t1
;
--
echo
#
--
echo
End
of
5.1
tests
...
...
mysql-test/t/func_in.test
View file @
bdefd2ad
...
...
@@ -554,6 +554,12 @@ SELECT CASE a WHEN a THEN a END FROM t1 GROUP BY a WITH ROLLUP;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
--
echo
#
SELECT
1
IN
(
YEAR
(
FROM_UNIXTIME
(
NULL
))
,
1
);
--
echo
#
--
echo
End
of
5.1
tests
sql/field.cc
View file @
bdefd2ad
...
...
@@ -5382,6 +5382,7 @@ double Field_year::val_real(void)
longlong
Field_year
::
val_int
(
void
)
{
ASSERT_COLUMN_MARKED_FOR_READ
;
DBUG_ASSERT
(
field_length
==
2
||
field_length
==
4
);
int
tmp
=
(
int
)
ptr
[
0
];
if
(
field_length
!=
4
)
tmp
%=
100
;
// Return last 2 char
...
...
@@ -5394,6 +5395,7 @@ longlong Field_year::val_int(void)
String
*
Field_year
::
val_str
(
String
*
val_buffer
,
String
*
val_ptr
__attribute__
((
unused
)))
{
DBUG_ASSERT
(
field_length
<
5
);
val_buffer
->
alloc
(
5
);
val_buffer
->
length
(
field_length
);
char
*
to
=
(
char
*
)
val_buffer
->
ptr
();
...
...
sql/item_cmpfunc.cc
View file @
bdefd2ad
...
...
@@ -4069,13 +4069,11 @@ void Item_func_in::fix_length_and_dec()
uint
j
=
0
;
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
{
if
(
!
args
[
i
]
->
null_value
)
// Skip NULL values
{
array
->
set
(
j
,
args
[
i
]);
j
++
;
}
else
have_null
=
1
;
array
->
set
(
j
,
args
[
i
]);
if
(
!
args
[
i
]
->
null_value
)
// Skip NULL values
j
++
;
else
have_null
=
1
;
}
if
((
array
->
used_count
=
j
))
array
->
sort
();
...
...
sql/item_sum.cc
View file @
bdefd2ad
...
...
@@ -1145,17 +1145,13 @@ Item_sum_hybrid::fix_fields(THD *thd, Item **ref)
switch
(
hybrid_type
=
item
->
result_type
())
{
case
INT_RESULT
:
max_length
=
20
;
break
;
case
DECIMAL_RESULT
:
case
STRING_RESULT
:
max_length
=
item
->
max_length
;
break
;
case
REAL_RESULT
:
max_length
=
float_length
(
decimals
);
break
;
case
STRING_RESULT
:
max_length
=
item
->
max_length
;
break
;
case
ROW_RESULT
:
default:
DBUG_ASSERT
(
0
);
...
...
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