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
21a17536
Commit
21a17536
authored
Mar 25, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
5.3 merge
parents
434bbc34
63d09188
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
108 additions
and
8 deletions
+108
-8
mysql-test/r/ctype_binary.result
mysql-test/r/ctype_binary.result
+1
-1
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+1
-1
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+1
-1
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+1
-1
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+1
-1
mysql-test/r/func_compress.result
mysql-test/r/func_compress.result
+20
-0
mysql-test/r/subselect_mat.result
mysql-test/r/subselect_mat.result
+14
-0
mysql-test/r/subselect_sj_mat.result
mysql-test/r/subselect_sj_mat.result
+14
-0
mysql-test/t/func_compress.test
mysql-test/t/func_compress.test
+21
-0
mysql-test/t/subselect_sj_mat.test
mysql-test/t/subselect_sj_mat.test
+18
-0
sql/item_strfunc.h
sql/item_strfunc.h
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+14
-1
No files found.
mysql-test/r/ctype_binary.result
View file @
21a17536
...
@@ -740,7 +740,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
...
@@ -740,7 +740,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` varbinary(10)
NOT NULL DEFAULT ''
`c1` varbinary(10)
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 as select concat(connection_id()) as c1;
create table t1 as select concat(connection_id()) as c1;
...
...
mysql-test/r/ctype_cp1251.result
View file @
21a17536
...
@@ -1132,7 +1132,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
...
@@ -1132,7 +1132,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET cp1251
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 as select concat(connection_id()) as c1;
create table t1 as select concat(connection_id()) as c1;
...
...
mysql-test/r/ctype_latin1.result
View file @
21a17536
...
@@ -1212,7 +1212,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
...
@@ -1212,7 +1212,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` varchar(10)
NOT NULL DEFAULT ''
`c1` varchar(10)
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 as select concat(connection_id()) as c1;
create table t1 as select concat(connection_id()) as c1;
...
...
mysql-test/r/ctype_ucs.result
View file @
21a17536
...
@@ -2121,7 +2121,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
...
@@ -2121,7 +2121,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET ucs2
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 as select concat(connection_id()) as c1;
create table t1 as select concat(connection_id()) as c1;
...
...
mysql-test/r/ctype_utf8.result
View file @
21a17536
...
@@ -2951,7 +2951,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
...
@@ -2951,7 +2951,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET utf8
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 as select concat(connection_id()) as c1;
create table t1 as select concat(connection_id()) as c1;
...
...
mysql-test/r/func_compress.result
View file @
21a17536
...
@@ -127,3 +127,23 @@ NULL 825307441
...
@@ -127,3 +127,23 @@ NULL 825307441
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
DROP TABLE t1;
DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
#
# Start of 5.3 tests
#
#
# MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
#
CREATE TABLE t1 (pk INT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(2);
SELECT UNCOMPRESSED_LENGTH(pk) FROM t1;
UNCOMPRESSED_LENGTH(pk)
NULL
NULL
Warnings:
Warning 1259 ZLIB: Input data corrupted
Warning 1259 ZLIB: Input data corrupted
SELECT * FROM t1 ORDER BY HEX(UNCOMPRESSED_LENGTH(pk));
DROP TABLE t1;
#
# End of 5.3 tests
#
mysql-test/r/subselect_mat.result
View file @
21a17536
...
@@ -2055,6 +2055,20 @@ EXECUTE stmt;
...
@@ -2055,6 +2055,20 @@ EXECUTE stmt;
a
a
DROP TABLE t1, t2;
DROP TABLE t1, t2;
DROP VIEW v2;
DROP VIEW v2;
#
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
#
SET @tmp_mdev5811= @@big_tables;
SET big_tables = ON;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
a a
DROP TABLE t1,t2;
SET big_tables=@tmp_mdev5811;
# End of 5.3 tests
# End of 5.3 tests
#
#
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
...
...
mysql-test/r/subselect_sj_mat.result
View file @
21a17536
...
@@ -2095,6 +2095,20 @@ EXECUTE stmt;
...
@@ -2095,6 +2095,20 @@ EXECUTE stmt;
a
a
DROP TABLE t1, t2;
DROP TABLE t1, t2;
DROP VIEW v2;
DROP VIEW v2;
#
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
#
SET @tmp_mdev5811= @@big_tables;
SET big_tables = ON;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
a a
DROP TABLE t1,t2;
SET big_tables=@tmp_mdev5811;
# End of 5.3 tests
# End of 5.3 tests
#
#
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
...
...
mysql-test/t/func_compress.test
View file @
21a17536
...
@@ -115,3 +115,24 @@ DROP TABLE t1;
...
@@ -115,3 +115,24 @@ DROP TABLE t1;
set
@@
global
.
max_allowed_packet
=
default
;
set
@@
global
.
max_allowed_packet
=
default
;
--
enable_result_log
--
enable_result_log
--
enable_query_log
--
enable_query_log
--
echo
#
--
echo
# Start of 5.3 tests
--
echo
#
--
echo
#
--
echo
# MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
--
echo
#
CREATE
TABLE
t1
(
pk
INT
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
SELECT
UNCOMPRESSED_LENGTH
(
pk
)
FROM
t1
;
# ORDER is not strict, so disable results
--
disable_result_log
SELECT
*
FROM
t1
ORDER
BY
HEX
(
UNCOMPRESSED_LENGTH
(
pk
));
--
enable_result_log
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.3 tests
--
echo
#
mysql-test/t/subselect_sj_mat.test
View file @
21a17536
...
@@ -1745,6 +1745,24 @@ EXECUTE stmt;
...
@@ -1745,6 +1745,24 @@ EXECUTE stmt;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
DROP
VIEW
v2
;
DROP
VIEW
v2
;
--
echo
#
--
echo
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
--
echo
#
SET
@
tmp_mdev5811
=
@@
big_tables
;
SET
big_tables
=
ON
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
CREATE
TABLE
t2
(
b
INT
);
INSERT
INTO
t2
VALUES
(
3
),(
4
);
SELECT
*
FROM
t1
AS
t1_1
,
t1
AS
t1_2
WHERE
(
t1_1
.
a
,
t1_2
.
a
)
IN
(
SELECT
MAX
(
b
),
MIN
(
b
)
FROM
t2
);
DROP
TABLE
t1
,
t2
;
SET
big_tables
=@
tmp_mdev5811
;
--
echo
# End of 5.3 tests
--
echo
# End of 5.3 tests
...
...
sql/item_strfunc.h
View file @
21a17536
...
@@ -943,7 +943,7 @@ class Item_func_uncompressed_length : public Item_int_func
...
@@ -943,7 +943,7 @@ class Item_func_uncompressed_length : public Item_int_func
public:
public:
Item_func_uncompressed_length
(
Item
*
a
)
:
Item_int_func
(
a
){}
Item_func_uncompressed_length
(
Item
*
a
)
:
Item_int_func
(
a
){}
const
char
*
func_name
()
const
{
return
"uncompressed_length"
;}
const
char
*
func_name
()
const
{
return
"uncompressed_length"
;}
void
fix_length_and_dec
()
{
max_length
=
10
;
}
void
fix_length_and_dec
()
{
max_length
=
10
;
maybe_null
=
true
;
}
longlong
val_int
();
longlong
val_int
();
};
};
...
...
sql/opt_range.cc
View file @
21a17536
...
@@ -13636,7 +13636,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min()
...
@@ -13636,7 +13636,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min()
}
}
else
if
(
result
==
HA_ERR_KEY_NOT_FOUND
||
result
==
HA_ERR_END_OF_FILE
)
else
if
(
result
==
HA_ERR_KEY_NOT_FOUND
||
result
==
HA_ERR_END_OF_FILE
)
result
=
0
;
/* There is a result in any case. */
result
=
0
;
/* There is a result in any case. */
my_afree
(
tmp_key_buf
f
);
my_afree
(
key_bu
f
);
}
}
}
}
...
...
sql/sql_select.cc
View file @
21a17536
...
@@ -15469,7 +15469,20 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
...
@@ -15469,7 +15469,20 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
keyinfo
->
key_length
=
0
;
// Will compute the sum of the parts below.
keyinfo
->
key_length
=
0
;
// Will compute the sum of the parts below.
keyinfo
->
name
=
(
char
*
)
"distinct_key"
;
keyinfo
->
name
=
(
char
*
)
"distinct_key"
;
keyinfo
->
algorithm
=
HA_KEY_ALG_UNDEF
;
keyinfo
->
algorithm
=
HA_KEY_ALG_UNDEF
;
keyinfo
->
rec_per_key
=
0
;
/*
Needed by non-merged semi-joins: SJ-Materialized table must have a valid
rec_per_key array, because it participates in join optimization. Since
the table has no data, the only statistics we can provide is "unknown",
i.e. zero values.
(For table record count, we calculate and set JOIN_TAB::found_records,
see get_delayed_table_estimates()).
*/
size_t
rpk_size
=
keyinfo
->
key_parts
*
sizeof
(
keyinfo
->
rec_per_key
[
0
]);
if
(
!
(
keyinfo
->
rec_per_key
=
(
ulong
*
)
alloc_root
(
&
table
->
mem_root
,
rpk_size
)))
goto
err
;
bzero
(
keyinfo
->
rec_per_key
,
rpk_size
);
/*
/*
Create an extra field to hold NULL bits so that unique indexes on
Create an extra field to hold NULL bits so that unique indexes on
...
...
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