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
6a652231
Commit
6a652231
authored
Sep 27, 2013
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
mariadb-5.5.33a merge
parents
8ad1b5b1
28ec3727
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
336 additions
and
55 deletions
+336
-55
VERSION
VERSION
+1
-1
cmake/jemalloc.cmake
cmake/jemalloc.cmake
+13
-4
debian/dist/Debian/control
debian/dist/Debian/control
+2
-0
debian/dist/Ubuntu/control
debian/dist/Ubuntu/control
+2
-0
man/mysqld_safe.1
man/mysqld_safe.1
+4
-38
mysql-test/lib/My/Test.pm
mysql-test/lib/My/Test.pm
+1
-1
mysql-test/r/bad_frm_crash_5029.result
mysql-test/r/bad_frm_crash_5029.result
+13
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+13
-0
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+143
-0
mysql-test/std_data/mdev5029_1.frm
mysql-test/std_data/mdev5029_1.frm
+0
-0
mysql-test/std_data/mdev5029_2.MAD
mysql-test/std_data/mdev5029_2.MAD
+0
-0
mysql-test/std_data/mdev5029_2.MAI
mysql-test/std_data/mdev5029_2.MAI
+0
-0
mysql-test/std_data/mdev5029_2.frm
mysql-test/std_data/mdev5029_2.frm
+0
-0
mysql-test/t/bad_frm_crash_5029.test
mysql-test/t/bad_frm_crash_5029.test
+20
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+20
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+84
-0
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+1
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+2
-1
sql/sql_select.cc
sql/sql_select.cc
+2
-1
sql/table.cc
sql/table.cc
+12
-6
storage/tokudb/CMakeLists.txt
storage/tokudb/CMakeLists.txt
+2
-1
storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake
storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake
+1
-1
No files found.
VERSION
View file @
6a652231
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=33
MYSQL_VERSION_EXTRA=
MYSQL_VERSION_EXTRA=
a
cmake/jemalloc.cmake
View file @
6a652231
...
...
@@ -11,7 +11,7 @@ MACRO (USE_BUNDLED_JEMALLOC)
SET
(
SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/extra/jemalloc"
)
SET
(
BINARY_DIR
"
${
CMAKE_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/extra/jemalloc/build"
)
SET
(
LIBJEMALLOC
"libjemalloc"
)
SET
(
JEMALLOC_CONFIGURE_OPTS
"CC=
${
CMAKE_C_COMPILER
}
"
"--with-private-namespace=jemalloc_internal_"
"--enable-cc-silence"
)
SET
(
JEMALLOC_CONFIGURE_OPTS
"CC=
${
CMAKE_C_COMPILER
}
${
CMAKE_C_COMPILER_ARG1
}
"
"--with-private-namespace=jemalloc_internal_"
"--enable-cc-silence"
)
IF
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
AND NOT APPLE
)
# see the comment in CMakeLists.txt
LIST
(
APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug
)
ENDIF
()
...
...
@@ -30,14 +30,23 @@ MACRO (USE_BUNDLED_JEMALLOC)
ENDMACRO
()
SET
(
WITH_JEMALLOC
"yes"
CACHE STRING
"Which jemalloc to use (possible values are 'no', 'bundled', 'yes' (same as bundled)"
)
#"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)"
)
MACRO
(
CHECK_JEMALLOC
)
IF
(
WIN32
)
SET
(
WITH_JEMALLOC
"no"
)
ENDIF
()
IF
(
WITH_JEMALLOC STREQUAL
"bundled"
OR WITH_JEMALLOC STREQUAL
"yes"
)
IF
(
WITH_JEMALLOC STREQUAL
"system"
OR WITH_JEMALLOC STREQUAL
"yes"
)
CHECK_LIBRARY_EXISTS
(
jemalloc malloc_stats_print
""
HAVE_JEMALLOC
)
IF
(
HAVE_JEMALLOC
)
SET
(
LIBJEMALLOC jemalloc
)
ELSEIF
(
WITH_JEMALLOC STREQUAL
"system"
)
MESSAGE
(
FATAL_ERROR
"system jemalloc is not found"
)
ELSEIF
(
WITH_JEMALLOC STREQUAL
"yes"
)
SET
(
trybundled 1
)
ENDIF
()
ENDIF
()
IF
(
WITH_JEMALLOC STREQUAL
"bundled"
OR trybundled
)
USE_BUNDLED_JEMALLOC
()
ENDIF
()
ENDMACRO
()
debian/dist/Debian/control
View file @
6a652231
...
...
@@ -11,6 +11,8 @@ Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
Vcs
-
Bzr
:
bzr
://
lp
:
maria
Package
:
mariadb
-
galera
-
server
-
5.5
Conflicts
:
mariadb
-
server
-
5.5
(<<
5.5.33
),
mariadb
-
galera
-
server
-
5.5
(<<
5.5.33
),
mariadb
-
server
-
5.1
,
mariadb
-
server
-
5.2
,
mariadb
-
server
-
5.3
Architecture
:
any
Suggests
:
tinyca
,
mailx
,
mariadb
-
test
Recommends
:
libhtml
-
template
-
perl
...
...
debian/dist/Ubuntu/control
View file @
6a652231
...
...
@@ -11,6 +11,8 @@ Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
Vcs
-
Bzr
:
bzr
://
lp
:
maria
Package
:
mariadb
-
galera
-
server
-
5.5
Conflicts
:
mariadb
-
server
-
5.5
(<<
5.5.33
),
mariadb
-
galera
-
server
-
5.5
(<<
5.5.33
),
mariadb
-
server
-
5.1
,
mariadb
-
server
-
5.2
,
mariadb
-
server
-
5.3
Architecture
:
any
Suggests
:
tinyca
,
mailx
,
mariadb
-
test
Recommends
:
libhtml
-
template
-
perl
...
...
man/mysqld_safe.1
View file @
6a652231
...
...
@@ -83,15 +83,15 @@ Options unknown to
are passed to
\fBmysqld\fR
if they are specified on the command line, but ignored if they are specified in the
[mysqld_safe]
group of an option file\&. See
[mysqld_safe]
or [mariadb_safe]
group
s
of an option file\&. See
Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.
.PP
\fBmysqld_safe\fR
reads all options from the
[mysqld],
[server],
and
[mysqld_safe]
[server],
[mysqld_safe]
, and [mariadb_safe]
sections in option files\&. For example, if you specify a
[mysqld]
section like this,
...
...
@@ -146,40 +146,6 @@ Display a help message and exit\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqld_safe: autoclose option
.\" autoclose option: mysqld_safe
\fB\-\-autoclose\fR
.sp
(NetWare only) On NetWare,
\fBmysqld_safe\fR
provides a screen presence\&. When you unload (shut down) the
\fBmysqld_safe\fR
NLM, the screen does not by default go away\&. Instead, it prompts for user input:
.sp
.if n \{\
.RS 4
.\}
.nf
*<NLM has terminated; Press any key to close the screen>*
.fi
.if n \{\
.RE
.\}
.sp
If you want NetWare to close the screen automatically instead, use the
\fB\-\-autoclose\fR
option to
\fBmysqld_safe\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqld_safe: basedir option
.\" basedir option: mysqld_safe
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
...
...
mysql-test/lib/My/Test.pm
View file @
6a652231
...
...
@@ -100,7 +100,7 @@ sub write_test {
my
$serialized
=
Storable::
freeze
(
$test
);
$serialized
=~
s/([\x0d\x0a\\])/sprintf("\\%02x", ord($1))/
eg
;
print
$sock
$header
,
"
\n
",
$serialized
,
"
\n
"
;
send
$sock
,
$header
.
"
\n
"
.
$serialized
.
"
\n
",
0
;
}
...
...
mysql-test/r/bad_frm_crash_5029.result
0 → 100644
View file @
6a652231
show create table t1;
ERROR 42000: Unknown storage engine 'InnoDB'
call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria");
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
drop table t1;
mysql-test/r/func_group.result
View file @
6a652231
...
...
@@ -2126,6 +2126,19 @@ select z from (select count(*) as z from t1) v group by 1;
z
4
drop table t1;
CREATE TABLE t1 (i1 int, INDEX(i1));
INSERT INTO t1 VALUES (9),(8);
CREATE TABLE t2 (i2 int);
INSERT INTO t2 VALUES (8),(4);
CREATE TABLE t3 (i3 int, INDEX(i3));
INSERT INTO t3 VALUES (9),(8);
SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND ( 0 OR t3.i3 = t2.i2 );
MAX(t3.i3)
8
SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND t3.i3 = t2.i2;
MAX(t3.i3)
8
DROP TABLE t1,t2,t3;
# end of 5.3 tests
#
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
...
...
mysql-test/r/func_time.result
View file @
6a652231
...
...
@@ -2060,6 +2060,56 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types
#
CREATE TABLE t1 (dt2 DATETIME(2), t3 TIME(3), d DATE);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00.12', '00:00:00.567', '2002-01-01');
SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1;
CASE WHEN 0 THEN dt2 ELSE t3 END
0000-00-00 00:00:00.567
CREATE TABLE t2 AS SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1;
SELECT * FROM t2;
CASE WHEN 0 THEN dt2 ELSE t3 END
0000-00-00 00:00:00.567
SHOW COLUMNS FROM t2;
Field Type Null Key Default Extra
CASE WHEN 0 THEN dt2 ELSE t3 END datetime(3) YES NULL
DROP TABLE t2;
SELECT CASE WHEN 1 THEN dt2 ELSE t3 END FROM t1;
CASE WHEN 1 THEN dt2 ELSE t3 END
2001-01-01 00:00:00.120
SELECT CONCAT(CASE WHEN 1 THEN dt2 ELSE t3 END) FROM t1;
CONCAT(CASE WHEN 1 THEN dt2 ELSE t3 END)
2001-01-01 00:00:00.120
SELECT CONCAT(CASE WHEN 0 THEN t3 ELSE dt2 END) FROM t1;
CONCAT(CASE WHEN 0 THEN t3 ELSE dt2 END)
2001-01-01 00:00:00.120
SELECT CONCAT(CASE WHEN 1 THEN d ELSE t3 END) FROM t1;
CONCAT(CASE WHEN 1 THEN d ELSE t3 END)
2002-01-01 00:00:00.000
SELECT CASE WHEN 1 THEN t3 ELSE d END FROM t1;
CASE WHEN 1 THEN t3 ELSE d END
0000-00-00 00:00:00.567
SELECT COALESCE(d, t3) FROM t1;
COALESCE(d, t3)
2002-01-01 00:00:00.000
SELECT CONCAT(COALESCE(d, t3)) FROM t1;
CONCAT(COALESCE(d, t3))
2002-01-01 00:00:00.000
SELECT COALESCE(dt2, t3) FROM t1;
COALESCE(dt2, t3)
2001-01-01 00:00:00.120
SELECT CONCAT(COALESCE(dt2, t3)) FROM t1;
CONCAT(COALESCE(dt2, t3))
2001-01-01 00:00:00.120
SELECT IFNULL(dt2, t3), CONCAT(IFNULL(dt2, t3)) FROM t1;
IFNULL(dt2, t3) CONCAT(IFNULL(dt2, t3))
2001-01-01 00:00:00.120 2001-01-01 00:00:00.120
SELECT IFNULL(d, t3), CONCAT(IFNULL(d, t3)) FROM t1;
IFNULL(d, t3) CONCAT(IFNULL(d, t3))
2002-01-01 00:00:00.000 2002-01-01 00:00:00.000
DROP TABLE t1;
#
# MDEV-4724 Some temporal functions do not preserve microseconds
#
SELECT MAKETIME(10,10,10.231);
...
...
@@ -2204,3 +2254,96 @@ Warning 1292 Truncated incorrect DECIMAL value: 'xxx'
SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00');
CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00')
2001-01-01 11:20:30.12
#
# MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision
#
CREATE TABLE t1 (t0 TIME);
INSERT INTO t1 VALUES ('00:00:00');
SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
t0 + INTERVAL 1.1 SECOND
00:00:01.1
CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
SHOW COLUMNS FROM t2;
Field Type Null Key Default Extra
t0 + INTERVAL 1.1 SECOND time(1) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (t0 DATETIME);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00');
SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
t0 + INTERVAL 1.1 SECOND
2001-01-01 00:00:01.1
CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
SHOW COLUMNS FROM t2;
Field Type Null Key Default Extra
t0 + INTERVAL 1.1 SECOND datetime(1) YES NULL
DROP TABLE t1, t2;
#
# MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')
#
CREATE TABLE t1 AS SELECT
TIMESTAMP('2001-01-01','10:10:10'),
TIMESTAMP('2001-01-01','10:10:10.1'),
TIMESTAMP('2001-01-01','10:10:10.12'),
TIMESTAMP('2001-01-01','10:10:10.123'),
TIMESTAMP('2001-01-01','10:10:10.1234'),
TIMESTAMP('2001-01-01','10:10:10.12345'),
TIMESTAMP('2001-01-01','10:10:10.123456'),
TIMESTAMP('2001-01-01','10:10:10.1234567');
Warnings:
Warning 1292 Truncated incorrect time value: '10:10:10.1234567'
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
TIMESTAMP('2001-01-01','10:10:10') datetime YES NULL
TIMESTAMP('2001-01-01','10:10:10.1') datetime(1) YES NULL
TIMESTAMP('2001-01-01','10:10:10.12') datetime(2) YES NULL
TIMESTAMP('2001-01-01','10:10:10.123') datetime(3) YES NULL
TIMESTAMP('2001-01-01','10:10:10.1234') datetime(4) YES NULL
TIMESTAMP('2001-01-01','10:10:10.12345') datetime(5) YES NULL
TIMESTAMP('2001-01-01','10:10:10.123456') datetime(6) YES NULL
TIMESTAMP('2001-01-01','10:10:10.1234567') datetime(6) YES NULL
SELECT * FROM t1;
TIMESTAMP('2001-01-01','10:10:10') TIMESTAMP('2001-01-01','10:10:10.1') TIMESTAMP('2001-01-01','10:10:10.12') TIMESTAMP('2001-01-01','10:10:10.123') TIMESTAMP('2001-01-01','10:10:10.1234') TIMESTAMP('2001-01-01','10:10:10.12345') TIMESTAMP('2001-01-01','10:10:10.123456') TIMESTAMP('2001-01-01','10:10:10.1234567')
2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456
DROP TABLE t1;
CREATE TABLE t1 AS SELECT
TIMESTAMP('2001-01-01 00:00:00','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.1','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.12','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.123','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10'),
TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10');
Warnings:
Warning 1292 Truncated incorrect datetime value: '2001-01-01 00:00:00.1234567'
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
TIMESTAMP('2001-01-01 00:00:00','10:10:10') datetime YES NULL
TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') datetime(1) YES NULL
TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') datetime(2) YES NULL
TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') datetime(3) YES NULL
TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') datetime(4) YES NULL
TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') datetime(5) YES NULL
TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') datetime(6) YES NULL
TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10') datetime(6) YES NULL
SELECT * FROM t1;
TIMESTAMP('2001-01-01 00:00:00','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10')
2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456
DROP TABLE t1;
CREATE TABLE t1 AS SELECT
TIMESTAMP('00:00:00','10:10:10'),
TIMESTAMP(TIME('00:00:00'),'10:10:10');
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
TIMESTAMP('00:00:00','10:10:10') datetime YES NULL
TIMESTAMP(TIME('00:00:00'),'10:10:10') datetime YES NULL
SELECT * FROM t1;
TIMESTAMP('00:00:00','10:10:10') TIMESTAMP(TIME('00:00:00'),'10:10:10')
NULL NULL
DROP TABLE t1;
#
# MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1)
#
SELECT MAKETIME(0, 0, -0.1);
MAKETIME(0, 0, -0.1)
NULL
mysql-test/std_data/mdev5029_1.frm
0 → 100644
View file @
6a652231
This diff was suppressed by a .gitattributes entry.
mysql-test/std_data/mdev5029_2.MAD
0 → 100644
View file @
6a652231
File added
mysql-test/std_data/mdev5029_2.MAI
0 → 100644
View file @
6a652231
File added
mysql-test/std_data/mdev5029_2.frm
0 → 100644
View file @
6a652231
This diff was suppressed by a .gitattributes entry.
mysql-test/t/bad_frm_crash_5029.test
0 → 100644
View file @
6a652231
#
# MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release
#
# a.k.a. fail to open an frm with indexes:
let
$datadir
=
`select @@datadir`
;
# normal innodb table (but innodb is disabled here)
copy_file
std_data
/
mdev5029_1
.
frm
$datadir
/
test
/
t1
.
frm
;
--
error
ER_UNKNOWN_STORAGE_ENGINE
show
create
table
t1
;
remove_file
$datadir
/
test
/
t1
.
frm
;
# Aria table, incorrect typecode
call
mtr
.
add_suppression
(
"t1.frm is inconsistent: engine typecode 43, engine name Aria"
);
copy_file
std_data
/
mdev5029_2
.
frm
$datadir
/
test
/
t1
.
frm
;
copy_file
std_data
/
mdev5029_2
.
MAI
$datadir
/
test
/
t1
.
MAI
;
copy_file
std_data
/
mdev5029_2
.
MAD
$datadir
/
test
/
t1
.
MAD
;
show
create
table
t1
;
drop
table
t1
;
mysql-test/t/func_group.test
View file @
6a652231
...
...
@@ -1403,6 +1403,26 @@ select z from (select count(*) as z from t1) v;
select
z
from
(
select
count
(
*
)
as
z
from
t1
)
v
group
by
1
;
drop
table
t1
;
#
# Bug mdev-5015: Degenerate OR condition in an aggregated join
#
CREATE
TABLE
t1
(
i1
int
,
INDEX
(
i1
));
INSERT
INTO
t1
VALUES
(
9
),(
8
);
CREATE
TABLE
t2
(
i2
int
);
INSERT
INTO
t2
VALUES
(
8
),(
4
);
CREATE
TABLE
t3
(
i3
int
,
INDEX
(
i3
));
INSERT
INTO
t3
VALUES
(
9
),(
8
);
SELECT
MAX
(
t3
.
i3
)
FROM
t3
,
t2
,
t1
WHERE
t1
.
i1
=
t2
.
i2
AND
(
0
OR
t3
.
i3
=
t2
.
i2
);
SELECT
MAX
(
t3
.
i3
)
FROM
t3
,
t2
,
t1
WHERE
t1
.
i1
=
t2
.
i2
AND
t3
.
i3
=
t2
.
i2
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
# end of 5.3 tests
--
echo
#
...
...
mysql-test/t/func_time.test
View file @
6a652231
...
...
@@ -1287,6 +1287,30 @@ SHOW CREATE TABLE t1;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types
--
echo
#
CREATE
TABLE
t1
(
dt2
DATETIME
(
2
),
t3
TIME
(
3
),
d
DATE
);
INSERT
INTO
t1
VALUES
(
'2001-01-01 00:00:00.12'
,
'00:00:00.567'
,
'2002-01-01'
);
SELECT
CASE
WHEN
0
THEN
dt2
ELSE
t3
END
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
CASE
WHEN
0
THEN
dt2
ELSE
t3
END
FROM
t1
;
SELECT
*
FROM
t2
;
SHOW
COLUMNS
FROM
t2
;
DROP
TABLE
t2
;
SELECT
CASE
WHEN
1
THEN
dt2
ELSE
t3
END
FROM
t1
;
SELECT
CONCAT
(
CASE
WHEN
1
THEN
dt2
ELSE
t3
END
)
FROM
t1
;
SELECT
CONCAT
(
CASE
WHEN
0
THEN
t3
ELSE
dt2
END
)
FROM
t1
;
SELECT
CONCAT
(
CASE
WHEN
1
THEN
d
ELSE
t3
END
)
FROM
t1
;
SELECT
CASE
WHEN
1
THEN
t3
ELSE
d
END
FROM
t1
;
SELECT
COALESCE
(
d
,
t3
)
FROM
t1
;
SELECT
CONCAT
(
COALESCE
(
d
,
t3
))
FROM
t1
;
SELECT
COALESCE
(
dt2
,
t3
)
FROM
t1
;
SELECT
CONCAT
(
COALESCE
(
dt2
,
t3
))
FROM
t1
;
SELECT
IFNULL
(
dt2
,
t3
),
CONCAT
(
IFNULL
(
dt2
,
t3
))
FROM
t1
;
SELECT
IFNULL
(
d
,
t3
),
CONCAT
(
IFNULL
(
d
,
t3
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-4724 Some temporal functions do not preserve microseconds
--
echo
#
...
...
@@ -1351,3 +1375,63 @@ SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL -1.12345 SECOND);
SELECT
DATE_ADD
(
'2001-01-01 00:00:00'
,
INTERVAL
-
1.123456
SECOND
);
SELECT
DATE_ADD
(
'2001-01-01 00:00:00'
,
INTERVAL
'xxx'
SECOND
);
SELECT
CONVERT_TZ
(
'2001-01-01 10:20:30.12'
,
'+00:00'
,
'+01:00'
);
--
echo
#
--
echo
# MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision
--
echo
#
CREATE
TABLE
t1
(
t0
TIME
);
INSERT
INTO
t1
VALUES
(
'00:00:00'
);
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
SHOW
COLUMNS
FROM
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
t0
DATETIME
);
INSERT
INTO
t1
VALUES
(
'2001-01-01 00:00:00'
);
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
SHOW
COLUMNS
FROM
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')
--
echo
#
CREATE
TABLE
t1
AS
SELECT
TIMESTAMP
(
'2001-01-01'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.1'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.12'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.123'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.1234'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.12345'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.123456'
),
TIMESTAMP
(
'2001-01-01'
,
'10:10:10.1234567'
);
SHOW
COLUMNS
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
AS
SELECT
TIMESTAMP
(
'2001-01-01 00:00:00'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.1'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.12'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.123'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.1234'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.12345'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.123456'
,
'10:10:10'
),
TIMESTAMP
(
'2001-01-01 00:00:00.1234567'
,
'10:10:10'
);
SHOW
COLUMNS
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
AS
SELECT
TIMESTAMP
(
'00:00:00'
,
'10:10:10'
),
TIMESTAMP
(
TIME
(
'00:00:00'
),
'10:10:10'
);
SHOW
COLUMNS
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1)
--
echo
#
SELECT
MAKETIME
(
0
,
0
,
-
0.1
);
scripts/mysqld_safe.sh
View file @
6a652231
...
...
@@ -593,7 +593,7 @@ then
SET_USER
=
0
fi
parse_arguments
`
$print_defaults
$defaults
--loose-verbose
mysqld_safe safe_mysqld
`
parse_arguments
`
$print_defaults
$defaults
--loose-verbose
mysqld_safe safe_mysqld
mariadb_safe
`
parse_arguments PICK-ARGS-FROM-ARGV
"
$@
"
...
...
sql/item_timefunc.cc
View file @
6a652231
...
...
@@ -2558,7 +2558,8 @@ void Item_func_add_time::fix_length_and_dec()
arg0_field_type
=
args
[
0
]
->
field_type
();
if
(
arg0_field_type
==
MYSQL_TYPE_DATE
||
arg0_field_type
==
MYSQL_TYPE_DATETIME
||
arg0_field_type
==
MYSQL_TYPE_TIMESTAMP
)
arg0_field_type
==
MYSQL_TYPE_TIMESTAMP
||
is_date
)
{
cached_field_type
=
MYSQL_TYPE_DATETIME
;
decimals
=
max
(
args
[
0
]
->
temporal_precision
(
MYSQL_TYPE_DATETIME
),
...
...
sql/sql_select.cc
View file @
6a652231
...
...
@@ -13874,7 +13874,8 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
{
if
(
!
(
cond
=
internal_remove_eq_conds
(
thd
,
cond
,
cond_value
)))
return
cond
;
}
}
should_fix_fields
=
1
;
}
if
(
should_fix_fields
)
cond
->
update_used_tables
();
...
...
sql/table.cc
View file @
6a652231
...
...
@@ -893,6 +893,9 @@ static bool create_key_infos(uchar *strpos, uint keys, KEY *keyinfo, uint new_fr
DBUG_ASSERT
(
test
(
keyinfo
->
flags
&
HA_USES_COMMENT
)
==
(
keyinfo
->
comment
.
length
>
0
));
}
share
->
keys
=
keys
;
// do it *after* all key_info's are initialized
return
0
;
}
...
...
@@ -1023,12 +1026,12 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
goto
err
;
/* purecov: inspected */
if
(
disk_buff
[
0
]
&
0x80
)
{
share
->
keys
=
keys
=
(
disk_buff
[
1
]
<<
7
)
|
(
disk_buff
[
0
]
&
0x7f
);
keys
=
(
disk_buff
[
1
]
<<
7
)
|
(
disk_buff
[
0
]
&
0x7f
);
share
->
key_parts
=
key_parts
=
uint2korr
(
disk_buff
+
2
);
}
else
{
share
->
keys
=
keys
=
disk_buff
[
0
];
keys
=
disk_buff
[
0
];
share
->
key_parts
=
key_parts
=
disk_buff
[
1
];
}
share
->
keys_for_keyread
.
init
(
0
);
...
...
@@ -1093,7 +1096,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
plugin_data
(
tmp_plugin
,
handlerton
*
)))
{
/* bad file, legacy_db_type did not match the name */
goto
err
;
sql_print_warning
(
"%s.frm is inconsistent: engine typecode %d, engine name %s (%d)"
,
share
->
normalized_path
.
str
,
legacy_db_type
,
plugin_name
(
tmp_plugin
)
->
str
,
ha_legacy_type
(
plugin_data
(
tmp_plugin
,
handlerton
*
)));
}
/*
tmp_plugin is locked with a local lock.
...
...
@@ -1286,7 +1292,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
share
->
comment
.
length
);
}
DBUG_PRINT
(
"info"
,(
"i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d vcol_screen_length: %d"
,
interval_count
,
interval_parts
,
share
->
keys
,
n_length
,
int_length
,
com_length
,
vcol_screen_length
));
DBUG_PRINT
(
"info"
,(
"i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d vcol_screen_length: %d"
,
interval_count
,
interval_parts
,
keys
,
n_length
,
int_length
,
com_length
,
vcol_screen_length
));
if
(
!
(
field_ptr
=
(
Field
**
)
...
...
@@ -1674,7 +1680,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
}
}
for
(
uint
key
=
0
;
key
<
share
->
keys
;
key
++
,
keyinfo
++
)
for
(
uint
key
=
0
;
key
<
keys
;
key
++
,
keyinfo
++
)
{
uint
usable_parts
=
0
;
keyinfo
->
name
=
(
char
*
)
share
->
keynames
.
type_names
[
key
];
...
...
@@ -1948,7 +1954,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
{
reg_field
=
*
share
->
found_next_number_field
;
if
((
int
)
(
share
->
next_number_index
=
(
uint
)
find_ref_key
(
share
->
key_info
,
share
->
keys
,
find_ref_key
(
share
->
key_info
,
keys
,
share
->
default_values
,
reg_field
,
&
share
->
next_number_key_offset
,
&
share
->
next_number_keypart
))
<
0
)
...
...
storage/tokudb/CMakeLists.txt
View file @
6a652231
# ft-index only supports x86-64 and cmake-2.8.9+
IF
(
CMAKE_SYSTEM_PROCESSOR STREQUAL
"x86_64"
AND
NOT CMAKE_VERSION VERSION_LESS
"2.8.9"
)
NOT CMAKE_VERSION VERSION_LESS
"2.8.9"
AND
NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE
)
CHECK_CXX_SOURCE_COMPILES
(
"
struct a {int b; int c; };
...
...
storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake
View file @
6a652231
...
...
@@ -7,7 +7,7 @@ if (APPLE)
list
(
APPEND xz_configure_opts --disable-assembler
)
endif
()
list
(
APPEND xz_configure_opts
CC=
${
CMAKE_C_COMPILER
}
)
list
(
APPEND xz_configure_opts
"CC=
${
CMAKE_C_COMPILER
}
${
CMAKE_C_COMPILER_ARG1
}
"
)
if
(
CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL drd
)
list
(
APPEND xz_configure_opts --enable-debug
)
endif
()
...
...
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