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
83ea51a2
Commit
83ea51a2
authored
Aug 17, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
parents
92f9be49
a70809c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
6 deletions
+34
-6
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+14
-0
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+4
-4
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+12
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+4
-2
No files found.
mysql-test/r/func_str.result
View file @
83ea51a2
...
@@ -4887,5 +4887,19 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
...
@@ -4887,5 +4887,19 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Warnings:
Note 1003 select octet_length('a') AS `LENGTH('a')`,octet_length('a') AS `LENGTHB('a')`
Note 1003 select octet_length('a') AS `LENGTH('a')`,octet_length('a') AS `LENGTHB('a')`
#
#
# MDEV-13555 Assertion `!item->null_value' failed in Type_handler::Item_send_str
#
CREATE TABLE t1 (c VARCHAR(8));
INSERT INTO t1 VALUES (NULL),('bar');
SELECT LPAD( c, 0, '?' ) FROM t1;
LPAD( c, 0, '?' )
NULL
SELECT RPAD( c, 0, '?' ) FROM t1;
RPAD( c, 0, '?' )
NULL
DROP TABLE t1;
#
# End of 10.3 tests
# End of 10.3 tests
#
#
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
View file @
83ea51a2
...
@@ -2558,17 +2558,17 @@ ENUM_VALUE_LIST NULL
...
@@ -2558,17 +2558,17 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SWITCH
VARIABLE_NAME OPTIMIZER_SWITCH
SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
,split_grouping_derived=on
GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
,split_grouping_derived=on
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
,split_grouping_derived=on
VARIABLE_SCOPE SESSION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Fine-tune the optimizer behavior
VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,default
ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,
split_grouping_derived,
default
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
...
...
mysql-test/t/func_str.test
View file @
83ea51a2
...
@@ -1889,6 +1889,18 @@ DROP TABLE t1;
...
@@ -1889,6 +1889,18 @@ DROP TABLE t1;
SELECT
LENGTHB
(
'a'
),
LENGTHB
(
_utf8
0xC39F
),
LENGTHB
(
123
),
LENGTH
(
null
);
SELECT
LENGTHB
(
'a'
),
LENGTHB
(
_utf8
0xC39F
),
LENGTHB
(
123
),
LENGTH
(
null
);
EXPLAIN
EXTENDED
SELECT
LENGTH
(
'a'
),
LENGTHB
(
'a'
);
EXPLAIN
EXTENDED
SELECT
LENGTH
(
'a'
),
LENGTHB
(
'a'
);
--
echo
#
--
echo
# MDEV-13555 Assertion `!item->null_value' failed in Type_handler::Item_send_str
--
echo
#
CREATE
TABLE
t1
(
c
VARCHAR
(
8
));
INSERT
INTO
t1
VALUES
(
NULL
),(
'bar'
);
SELECT
LPAD
(
c
,
0
,
'?'
)
FROM
t1
;
SELECT
RPAD
(
c
,
0
,
'?'
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
#
--
echo
# End of 10.3 tests
--
echo
# End of 10.3 tests
--
echo
#
--
echo
#
sql/item_strfunc.cc
View file @
83ea51a2
...
@@ -3267,10 +3267,11 @@ String *Item_func_rpad::val_str(String *str)
...
@@ -3267,10 +3267,11 @@ String *Item_func_rpad::val_str(String *str)
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
goto
err
;
goto
err
;
null_value
=
0
;
if
(
count
==
0
)
if
(
count
==
0
)
return
make_empty_result
();
return
make_empty_result
();
null_value
=
0
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
/* Set here so that rest of code sees out-of-bound value as such. */
if
((
ulonglong
)
count
>
INT_MAX32
)
if
((
ulonglong
)
count
>
INT_MAX32
)
...
@@ -3358,10 +3359,11 @@ String *Item_func_lpad::val_str(String *str)
...
@@ -3358,10 +3359,11 @@ String *Item_func_lpad::val_str(String *str)
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
goto
err
;
goto
err
;
null_value
=
0
;
if
(
count
==
0
)
if
(
count
==
0
)
return
make_empty_result
();
return
make_empty_result
();
null_value
=
0
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
/* Set here so that rest of code sees out-of-bound value as such. */
if
((
ulonglong
)
count
>
INT_MAX32
)
if
((
ulonglong
)
count
>
INT_MAX32
)
...
...
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