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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
11c2d3c3
Commit
11c2d3c3
authored
Feb 02, 2016
by
Monty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.0' into 10.1
Conflicts: configure.cmake
parents
52d695fe
5cf293fc
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
23 deletions
+81
-23
configure.cmake
configure.cmake
+0
-1
mysql-test/r/events_bugs.result
mysql-test/r/events_bugs.result
+5
-5
mysql-test/r/partition_pruning.result
mysql-test/r/partition_pruning.result
+18
-0
mysql-test/suite/plugins/r/sql_error_log.result
mysql-test/suite/plugins/r/sql_error_log.result
+10
-0
mysql-test/suite/plugins/t/sql_error_log.test
mysql-test/suite/plugins/t/sql_error_log.test
+18
-0
mysql-test/t/events_bugs.test
mysql-test/t/events_bugs.test
+5
-5
mysql-test/t/partition_pruning.test
mysql-test/t/partition_pruning.test
+19
-0
sql/opt_range.cc
sql/opt_range.cc
+5
-11
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
configure.cmake
View file @
11c2d3c3
...
@@ -1091,4 +1091,3 @@ IF(NOT MSVC)
...
@@ -1091,4 +1091,3 @@ IF(NOT MSVC)
HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE
HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE
)
)
ENDIF
()
ENDIF
()
mysql-test/r/events_bugs.result
View file @
11c2d3c3
...
@@ -91,7 +91,7 @@ create table events_smode_test(ev_name char(10), a date);
...
@@ -91,7 +91,7 @@ create table events_smode_test(ev_name char(10), a date);
"This should never insert something"
"This should never insert something"
create event ee_16407_2 on schedule every 60 second do
create event ee_16407_2 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_2*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_2*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end|
end|
...
@@ -100,7 +100,7 @@ ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1
...
@@ -100,7 +100,7 @@ ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1
"This is ok"
"This is ok"
create event ee_16407_3 on schedule every 60 second do
create event ee_16407_3 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_3*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_3*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
...
@@ -109,7 +109,7 @@ set sql_mode=""|
...
@@ -109,7 +109,7 @@ set sql_mode=""|
"This will insert rows but they will be truncated"
"This will insert rows but they will be truncated"
create event ee_16407_4 on schedule every 60 second do
create event ee_16407_4 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_4*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_4*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
end|
end|
...
@@ -157,13 +157,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
...
@@ -157,13 +157,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
create procedure ee_16407_6_pendant() begin insert into events_test.events_smode_test values('ee_16407_6','2004-02-29'); end|
create procedure ee_16407_6_pendant() begin insert into events_test.events_smode_test values('ee_16407_6','2004-02-29'); end|
create event ee_16407_5 on schedule every 60 second do
create event ee_16407_5 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_5', 60)
/*ee_16407_5*/;
select get_lock('ee_16407_5', 60)
; /*ee_16407_5*/
select release_lock('ee_16407_5');
select release_lock('ee_16407_5');
call events_test.ee_16407_5_pendant();
call events_test.ee_16407_5_pendant();
end|
end|
create event ee_16407_6 on schedule every 60 second do
create event ee_16407_6 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_5', 60)
/*ee_16407_6*/;
select get_lock('ee_16407_5', 60)
; /*ee_16407_6*/
select release_lock('ee_16407_5');
select release_lock('ee_16407_5');
call events_test.ee_16407_6_pendant();
call events_test.ee_16407_6_pendant();
end|
end|
...
...
mysql-test/r/partition_pruning.result
View file @
11c2d3c3
...
@@ -3466,3 +3466,21 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
...
@@ -3466,3 +3466,21 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index
1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index
1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
drop table t1,t2;
#
# MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,...
#
create table t1 (a int, b char(10), c varchar(5), d int)
partition by range columns(a,b,c)
subpartition by key (c,d)
subpartitions 3
( partition p0 values less than (1,'abc','abc'),
partition p1 values less than (2,'abc','abc'),
partition p2 values less than (3,'abc','abc'),
partition p3 values less than (4,'abc','abc')
);
insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3);
select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR
(a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2))));
a b c d
1 a b 1
drop table t1;
mysql-test/suite/plugins/r/sql_error_log.result
View file @
11c2d3c3
...
@@ -35,6 +35,15 @@ SET SQL_MODE = '';
...
@@ -35,6 +35,15 @@ SET SQL_MODE = '';
drop table t1;
drop table t1;
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
TABLE_NAME
TABLE_NAME
CREATE procedure e1()
BEGIN
START TRANSACTION;
INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */;
COMMIT;
END|
CALL e1();
ERROR 42S02: Table 'test.non_exists' doesn't exist
DROP PROCEDURE e1;
uninstall plugin SQL_ERROR_LOG;
uninstall plugin SQL_ERROR_LOG;
Warnings:
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
Warning 1620 Plugin is busy and will be uninstalled on shutdown
...
@@ -45,3 +54,4 @@ TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET
...
@@ -45,3 +54,4 @@ TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET
MYSQL_ERRNO = 1000,
MYSQL_ERRNO = 1000,
MESSAGE_TEXT = 'new message'
MESSAGE_TEXT = 'new message'
TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column 'id' at row 1 : insert into t1 values ('aa')
TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column 'id' at row 1 : insert into t1 values ('aa')
TIME HOSTNAME ERROR 1146: Table 'test.non_exists' doesn't exist : INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */
mysql-test/suite/plugins/t/sql_error_log.test
View file @
11c2d3c3
...
@@ -48,6 +48,24 @@ drop table t1;
...
@@ -48,6 +48,24 @@ drop table t1;
SELECT
TABLE_NAME
FROM
information_schema
.
TABLES
WHERE
TABLE_SCHEMA
=
'not_exists'
AND
TABLE_NAME
=
'not_exists'
;
SELECT
TABLE_NAME
FROM
information_schema
.
TABLES
WHERE
TABLE_SCHEMA
=
'not_exists'
AND
TABLE_NAME
=
'not_exists'
;
#
# MDEV-6421 SQL_ERROR_LOG doesn't log comments in Events
# actually testing SP call is enough for that.
DELIMITER
|
;
CREATE
procedure
e1
()
BEGIN
START
TRANSACTION
;
INSERT
INTO
test
.
non_exists
VALUES
(
0
,
0
,
0
)
/* e1 */
;
COMMIT
;
END
|
DELIMITER
;
|
--
error
ER_NO_SUCH_TABLE
CALL
e1
();
DROP
PROCEDURE
e1
;
uninstall
plugin
SQL_ERROR_LOG
;
uninstall
plugin
SQL_ERROR_LOG
;
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
...
...
mysql-test/t/events_bugs.test
View file @
11c2d3c3
...
@@ -306,7 +306,7 @@ create table events_smode_test(ev_name char(10), a date);
...
@@ -306,7 +306,7 @@ create table events_smode_test(ev_name char(10), a date);
delimiter |;
delimiter |;
create event ee_16407_2 on schedule every 60 second do
create event ee_16407_2 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_2*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_2*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end|
end|
...
@@ -315,7 +315,7 @@ insert into events_test.events_smode_test values ('test','1980-19-02')|
...
@@ -315,7 +315,7 @@ insert into events_test.events_smode_test values ('test','1980-19-02')|
--echo "
This
is
ok
"
--echo "
This
is
ok
"
create event ee_16407_3 on schedule every 60 second do
create event ee_16407_3 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_3*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_3*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29');
...
@@ -324,7 +324,7 @@ set sql_mode=""|
...
@@ -324,7 +324,7 @@ set sql_mode=""|
--echo "
This
will
insert
rows
but
they
will
be
truncated
"
--echo "
This
will
insert
rows
but
they
will
be
truncated
"
create event ee_16407_4 on schedule every 60 second do
create event ee_16407_4 on schedule every 60 second do
begin
begin
select get_lock('ee_16407_2', 60)
/*ee_16407_4*/;
select get_lock('ee_16407_2', 60)
; /*ee_16407_4*/
select release_lock('ee_16407_2');
select release_lock('ee_16407_2');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956');
end|
end|
...
@@ -412,13 +412,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
...
@@ -412,13 +412,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode
create
procedure
ee_16407_6_pendant
()
begin
insert
into
events_test
.
events_smode_test
values
(
'ee_16407_6'
,
'2004-02-29'
);
end
|
create
procedure
ee_16407_6_pendant
()
begin
insert
into
events_test
.
events_smode_test
values
(
'ee_16407_6'
,
'2004-02-29'
);
end
|
create
event
ee_16407_5
on
schedule
every
60
second
do
create
event
ee_16407_5
on
schedule
every
60
second
do
begin
begin
select
get_lock
(
'ee_16407_5'
,
60
)
/*ee_16407_5*/
;
select
get_lock
(
'ee_16407_5'
,
60
)
;
/*ee_16407_5*/
select
release_lock
(
'ee_16407_5'
);
select
release_lock
(
'ee_16407_5'
);
call
events_test
.
ee_16407_5_pendant
();
call
events_test
.
ee_16407_5_pendant
();
end
|
end
|
create
event
ee_16407_6
on
schedule
every
60
second
do
create
event
ee_16407_6
on
schedule
every
60
second
do
begin
begin
select
get_lock
(
'ee_16407_5'
,
60
)
/*ee_16407_6*/
;
select
get_lock
(
'ee_16407_5'
,
60
)
;
/*ee_16407_6*/
select
release_lock
(
'ee_16407_5'
);
select
release_lock
(
'ee_16407_5'
);
call
events_test
.
ee_16407_6_pendant
();
call
events_test
.
ee_16407_6_pendant
();
end
|
end
|
...
...
mysql-test/t/partition_pruning.test
View file @
11c2d3c3
...
@@ -1517,3 +1517,22 @@ and dept_id in (select dept_id from t2 where COMPANY_ID = 1000);
...
@@ -1517,3 +1517,22 @@ and dept_id in (select dept_id from t2 where COMPANY_ID = 1000);
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
# MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,...
--
echo
#
create
table
t1
(
a
int
,
b
char
(
10
),
c
varchar
(
5
),
d
int
)
partition
by
range
columns
(
a
,
b
,
c
)
subpartition
by
key
(
c
,
d
)
subpartitions
3
(
partition
p0
values
less
than
(
1
,
'abc'
,
'abc'
),
partition
p1
values
less
than
(
2
,
'abc'
,
'abc'
),
partition
p2
values
less
than
(
3
,
'abc'
,
'abc'
),
partition
p3
values
less
than
(
4
,
'abc'
,
'abc'
)
);
insert
into
t1
values
(
1
,
'a'
,
'b'
,
1
),(
2
,
'a'
,
'b'
,
2
),(
3
,
'a'
,
'b'
,
3
);
select
*
from
t1
where
(
a
=
1
AND
b
<
'd'
AND
(
c
=
'b'
OR
(
c
=
'c'
AND
d
=
1
))
OR
(
a
=
1
AND
b
>=
'a'
AND
(
c
=
'c'
OR
(
c
=
'd'
AND
d
=
2
))));
drop
table
t1
;
sql/opt_range.cc
View file @
11c2d3c3
...
@@ -4336,15 +4336,14 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
...
@@ -4336,15 +4336,14 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
Field
**
field
=
(
ppar
->
part_fields
)
?
part_info
->
part_field_array
:
Field
**
field
=
(
ppar
->
part_fields
)
?
part_info
->
part_field_array
:
part_info
->
subpart_field_array
;
part_info
->
subpart_field_array
;
bool
in_subpart_fields
=
FALSE
;
bool
in_subpart_fields
=
FALSE
;
uint
max_key_len
=
0
;
uint
total_key_len
=
0
;
uint
cur_key_len
=
0
;
for
(
uint
part
=
0
;
part
<
total_parts
;
part
++
,
key_part
++
)
for
(
uint
part
=
0
;
part
<
total_parts
;
part
++
,
key_part
++
)
{
{
key_part
->
key
=
0
;
key_part
->
key
=
0
;
key_part
->
part
=
part
;
key_part
->
part
=
part
;
key_part
->
length
=
(
uint16
)(
*
field
)
->
key_length
();
key_part
->
length
=
(
uint16
)(
*
field
)
->
key_length
();
key_part
->
store_length
=
(
uint16
)
get_partition_field_store_length
(
*
field
);
key_part
->
store_length
=
(
uint16
)
get_partition_field_store_length
(
*
field
);
cur
_key_len
+=
key_part
->
store_length
;
total
_key_len
+=
key_part
->
store_length
;
DBUG_PRINT
(
"info"
,
(
"part %u length %u store_length %u"
,
part
,
DBUG_PRINT
(
"info"
,
(
"part %u length %u store_length %u"
,
part
,
key_part
->
length
,
key_part
->
store_length
));
key_part
->
length
,
key_part
->
store_length
));
...
@@ -4370,18 +4369,13 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
...
@@ -4370,18 +4369,13 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
{
{
field
=
part_info
->
subpart_field_array
;
field
=
part_info
->
subpart_field_array
;
in_subpart_fields
=
TRUE
;
in_subpart_fields
=
TRUE
;
max_key_len
=
cur_key_len
;
cur_key_len
=
0
;
}
}
}
}
range_par
->
key_parts_end
=
key_part
;
range_par
->
key_parts_end
=
key_part
;
if
(
cur_key_len
>
max_key_len
)
total_key_len
++
;
/* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
max_key_len
=
cur_key_len
;
if
(
!
(
range_par
->
min_key
=
(
uchar
*
)
alloc_root
(
alloc
,
total_key_len
))
||
!
(
range_par
->
max_key
=
(
uchar
*
)
alloc_root
(
alloc
,
total_key_len
)))
max_key_len
++
;
/* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
if
(
!
(
range_par
->
min_key
=
(
uchar
*
)
alloc_root
(
alloc
,
max_key_len
))
||
!
(
range_par
->
max_key
=
(
uchar
*
)
alloc_root
(
alloc
,
max_key_len
)))
{
{
return
true
;
return
true
;
}
}
...
...
sql/sql_yacc.yy
View file @
11c2d3c3
...
@@ -3756,7 +3756,7 @@ sp_proc_stmt_statement:
...
@@ -3756,7 +3756,7 @@ sp_proc_stmt_statement:
if (yychar == YYEMPTY)
if (yychar == YYEMPTY)
i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
else
else
i->m_query.length= lip->get_tok_
end() - sp->m_tmp_query
;
i->m_query.length= lip->get_tok_
start() - sp->m_tmp_query;
;
if (!(i->m_query.str= strmake_root(thd->mem_root,
if (!(i->m_query.str= strmake_root(thd->mem_root,
sp->m_tmp_query,
sp->m_tmp_query,
i->m_query.length)) ||
i->m_query.length)) ||
...
...
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