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
cb9b47d8
Commit
cb9b47d8
authored
Dec 21, 2010
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1-bugteam->5.5-bugteam merge
parents
bcd47f41
c4b29069
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
14 deletions
+52
-14
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+12
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+20
-0
sql/item.cc
sql/item.cc
+4
-0
sql/item_sum.cc
sql/item_sum.cc
+11
-9
sql/item_sum.h
sql/item_sum.h
+5
-5
No files found.
mysql-test/r/func_group.result
View file @
cb9b47d8
...
@@ -1724,6 +1724,18 @@ m
...
@@ -1724,6 +1724,18 @@ m
1
1
DROP TABLE t1;
DROP TABLE t1;
#
#
# Bug#58030 crash in Item_func_geometry_from_text::val_str
#
SELECT MAX(TIMESTAMP(RAND(0)));
SELECT MIN(TIMESTAMP(RAND(0)));
#
# Bug#58177 crash and valgrind warnings in decimal and protocol sending functions...
#
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
#
End of 5.1 tests
End of 5.1 tests
#
#
# Bug#55648: Server crash on MIN/MAX on maximum time value
# Bug#55648: Server crash on MIN/MAX on maximum time value
...
...
mysql-test/t/func_group.test
View file @
cb9b47d8
...
@@ -1096,6 +1096,26 @@ SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1
...
@@ -1096,6 +1096,26 @@ SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#58030 crash in Item_func_geometry_from_text::val_str
--
echo
#
--
disable_result_log
SELECT
MAX
(
TIMESTAMP
(
RAND
(
0
)));
SELECT
MIN
(
TIMESTAMP
(
RAND
(
0
)));
--
echo
#
--
echo
# Bug#58177 crash and valgrind warnings in decimal and protocol sending functions...
--
echo
#
SELECT
MIN
(
GET_LOCK
(
'aaaaaaaaaaaaaaaaa'
,
0
)
/
'0b1111111111111111111111111111111111111111111111111111111111111111111111111'
^
(
RAND
()));
SELECT
MIN
(
GET_LOCK
(
'aaaaaaaaaaaaaaaaa'
,
0
)
/
'0b1111111111111111111111111111111111111111111111111111111111111111111111111'
^
(
RAND
()));
SELECT
MIN
(
GET_LOCK
(
'aaaaaaaaaaaaaaaaa'
,
0
)
/
'0b1111111111111111111111111111111111111111111111111111111111111111111111111'
^
(
RAND
()));
SELECT
MIN
(
GET_LOCK
(
'aaaaaaaaaaaaaaaaa'
,
0
)
/
'0b1111111111111111111111111111111111111111111111111111111111111111111111111'
^
(
RAND
()));
--
enable_result_log
--
echo
#
--
echo
#
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
...
...
sql/item.cc
View file @
cb9b47d8
...
@@ -5839,6 +5839,10 @@ bool Item::send(Protocol *protocol, String *buffer)
...
@@ -5839,6 +5839,10 @@ bool Item::send(Protocol *protocol, String *buffer)
String
*
res
;
String
*
res
;
if
((
res
=
val_str
(
buffer
)))
if
((
res
=
val_str
(
buffer
)))
result
=
protocol
->
store
(
res
->
ptr
(),
res
->
length
(),
res
->
charset
());
result
=
protocol
->
store
(
res
->
ptr
(),
res
->
length
(),
res
->
charset
());
else
{
DBUG_ASSERT
(
null_value
);
}
break
;
break
;
}
}
case
MYSQL_TYPE_TINY
:
case
MYSQL_TYPE_TINY
:
...
...
sql/item_sum.cc
View file @
cb9b47d8
...
@@ -1196,8 +1196,10 @@ void Item_sum_hybrid::setup_hybrid(Item *item, Item *value_arg)
...
@@ -1196,8 +1196,10 @@ void Item_sum_hybrid::setup_hybrid(Item *item, Item *value_arg)
value
=
Item_cache
::
get_cache
(
item
);
value
=
Item_cache
::
get_cache
(
item
);
value
->
setup
(
item
);
value
->
setup
(
item
);
value
->
store
(
value_arg
);
value
->
store
(
value_arg
);
arg_cache
=
Item_cache
::
get_cache
(
item
);
arg_cache
->
setup
(
item
);
cmp
=
new
Arg_comparator
();
cmp
=
new
Arg_comparator
();
cmp
->
set_cmp_func
(
this
,
args
,
(
Item
**
)
&
value
,
FALSE
);
cmp
->
set_cmp_func
(
this
,
(
Item
**
)
&
arg_cache
,
(
Item
**
)
&
value
,
FALSE
);
collation
.
set
(
item
->
collation
);
collation
.
set
(
item
->
collation
);
}
}
...
@@ -1966,11 +1968,11 @@ Item *Item_sum_min::copy_or_same(THD* thd)
...
@@ -1966,11 +1968,11 @@ Item *Item_sum_min::copy_or_same(THD* thd)
bool
Item_sum_min
::
add
()
bool
Item_sum_min
::
add
()
{
{
/* args[0] < value */
/* args[0] < value */
int
res
=
cmp
->
compar
e
();
arg_cache
->
cache_valu
e
();
if
(
!
arg
s
[
0
]
->
null_value
&&
if
(
!
arg
_cache
->
null_value
&&
(
null_value
||
res
<
0
))
(
null_value
||
cmp
->
compare
()
<
0
))
{
{
value
->
store
(
arg
s
[
0
]
);
value
->
store
(
arg
_cache
);
value
->
cache_value
();
value
->
cache_value
();
null_value
=
0
;
null_value
=
0
;
}
}
...
@@ -1989,11 +1991,11 @@ Item *Item_sum_max::copy_or_same(THD* thd)
...
@@ -1989,11 +1991,11 @@ Item *Item_sum_max::copy_or_same(THD* thd)
bool
Item_sum_max
::
add
()
bool
Item_sum_max
::
add
()
{
{
/* args[0] > value */
/* args[0] > value */
int
res
=
cmp
->
compar
e
();
arg_cache
->
cache_valu
e
();
if
(
!
arg
s
[
0
]
->
null_value
&&
if
(
!
arg
_cache
->
null_value
&&
(
null_value
||
res
>
0
))
(
null_value
||
cmp
->
compare
()
>
0
))
{
{
value
->
store
(
arg
s
[
0
]
);
value
->
store
(
arg
_cache
);
value
->
cache_value
();
value
->
cache_value
();
null_value
=
0
;
null_value
=
0
;
}
}
...
...
sql/item_sum.h
View file @
cb9b47d8
...
@@ -994,7 +994,7 @@ class Item_cache;
...
@@ -994,7 +994,7 @@ class Item_cache;
class
Item_sum_hybrid
:
public
Item_sum
class
Item_sum_hybrid
:
public
Item_sum
{
{
protected:
protected:
Item_cache
*
value
;
Item_cache
*
value
,
*
arg_cache
;
Arg_comparator
*
cmp
;
Arg_comparator
*
cmp
;
Item_result
hybrid_type
;
Item_result
hybrid_type
;
enum_field_types
hybrid_field_type
;
enum_field_types
hybrid_field_type
;
...
@@ -1003,14 +1003,14 @@ class Item_sum_hybrid :public Item_sum
...
@@ -1003,14 +1003,14 @@ class Item_sum_hybrid :public Item_sum
public:
public:
Item_sum_hybrid
(
Item
*
item_par
,
int
sign
)
Item_sum_hybrid
(
Item
*
item_par
,
int
sign
)
:
Item_sum
(
item_par
),
value
(
0
),
cmp
(
0
),
:
Item_sum
(
item_par
),
value
(
0
),
arg_cache
(
0
),
cmp
(
0
),
hybrid_type
(
INT_RESULT
),
hybrid_field_type
(
MYSQL_TYPE_LONGLONG
),
hybrid_type
(
INT_RESULT
),
hybrid_field_type
(
MYSQL_TYPE_LONGLONG
),
cmp_sign
(
sign
),
was_values
(
TRUE
)
cmp_sign
(
sign
),
was_values
(
TRUE
)
{
collation
.
set
(
&
my_charset_bin
);
}
{
collation
.
set
(
&
my_charset_bin
);
}
Item_sum_hybrid
(
THD
*
thd
,
Item_sum_hybrid
*
item
)
Item_sum_hybrid
(
THD
*
thd
,
Item_sum_hybrid
*
item
)
:
Item_sum
(
thd
,
item
),
value
(
item
->
value
),
hybrid_type
(
item
->
hybrid_type
),
:
Item_sum
(
thd
,
item
),
value
(
item
->
value
),
arg_cache
(
0
),
hybrid_
field_type
(
item
->
hybrid_field_type
),
cmp_sign
(
item
->
cmp_sign
),
hybrid_
type
(
item
->
hybrid_type
),
hybrid_field_type
(
item
->
hybrid_field_type
),
was_values
(
item
->
was_values
)
cmp_sign
(
item
->
cmp_sign
),
was_values
(
item
->
was_values
)
{
}
{
}
bool
fix_fields
(
THD
*
,
Item
**
);
bool
fix_fields
(
THD
*
,
Item
**
);
void
setup_hybrid
(
Item
*
item
,
Item
*
value_arg
);
void
setup_hybrid
(
Item
*
item
,
Item
*
value_arg
);
...
...
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