1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MySQL-5.5.36 merge

(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
This commit is contained in:
Sergei Golubchik
2014-02-17 11:00:51 +01:00
1315 changed files with 4149 additions and 1509 deletions

View File

@ -328,8 +328,15 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(INSTALL_SYSCONFDIR)
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
ENDIF()
OPTION(TMPDIR
"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF)
IF(TMPDIR)
SET(DEFAULT_TMPDIR "${TMPDIR}")
# Quote it, to make it a const char string.
SET(DEFAULT_TMPDIR "\"${TMPDIR}\"")
ELSE()
# Do not quote it, to refer to the P_tmpdir macro in <stdio.h>.
SET(DEFAULT_TMPDIR "P_tmpdir")
ENDIF()
# Run platform tests
@ -407,6 +414,7 @@ IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(internal)
ENDIF()
ADD_SUBDIRECTORY(packaging/rpm-uln)
ADD_SUBDIRECTORY(packaging/rpm-oel)
ENDIF()
IF(UNIX)

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -857,7 +857,7 @@ static int process_options(int argc, char *argv[], char *operation)
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
#endif
buff[sizeof(buff) - 1]= 0;
my_delete(opt_basedir, MYF(0));
my_free(opt_basedir);
opt_basedir= my_strdup(buff, MYF(MY_FAE));
}
}

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
Copyright (c) 2001, 2011, Oracle and/or its affiliates.
Copyright (c) 2010, 2011, Monty Program Ab.
This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,4 @@
# Copyright (c) 2009 Sun Microsystems, Inc.
# Use is subject to license terms.
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -619,7 +619,7 @@
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
#cmakedefine PLUGINDIR "@PLUGINDIR@"
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@"
#cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"

View File

@ -1,4 +1,4 @@
# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates
Copyright (c) 2005, 2013, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates
Copyright (c) 2005, 2013, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2002, 2012, Oracle and/or its affiliates.
Copyright (c) 2002, 2013, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1514,11 +1514,4 @@ static inline double rint(double x)
#endif /* EMBEDDED_LIBRARY */
/*
Define default tmpdir if not already set.
*/
#if !defined(DEFAULT_TMPDIR)
#define DEFAULT_TMPDIR P_tmpdir
#endif
#endif /* my_global_h */

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc,
2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -96,7 +96,7 @@ int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *)
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime);
const struct timespec *abstime);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_destroy(pthread_cond_t *cond);

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates
Copyright (C) 2009, 2011, Monty Program Ab
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates
Copyright (C) 2009, 2013, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -995,7 +995,7 @@ static inline int inline_mysql_cond_wait(
static inline int inline_mysql_cond_timedwait(
mysql_cond_t *that,
mysql_mutex_t *mutex,
struct timespec *abstime
const struct timespec *abstime
#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX)
, const char *src_file, uint src_line
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates.
/* Copyright (c) 2011, 2014, Oracle and/or its affiliates.
Copyright (c) 2011, 2012, Monty Program Ab
This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013"
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2014"
/*
This define specifies copyright notice which is displayed by every MySQL

View File

@ -1,4 +1,5 @@
# Copyright (c) 2006, 2012, Oracle and/or its affiliates.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates.
# Copyright (c) 2009, 2013, SkySQL Ab.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000-2004 MySQL AB
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates
Copyright (c) 2009, 2012, Monty Program Ab
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates
Copyright (c) 2009, 2013, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -561,7 +561,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
opt_mysql_tmpdir=getenv("TMP");
#endif
if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0])
opt_mysql_tmpdir=(char*) DEFAULT_TMPDIR; /* purecov: inspected */
opt_mysql_tmpdir= const_cast<char*>(DEFAULT_TMPDIR); /* purecov: inspected*/
init_ssl();
umask(((~my_umask) & 0666));

View File

@ -1,4 +1,4 @@
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -5,3 +5,6 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
# Run innodb compression tests
perl mysql-test-run.pl --force --debug-server --comment=innodb_compression --vardir=var-innodb-zip --big-test --testcase-timeout=60 --parallel=auto --experimental=collections/default.experimental --suite=innodb_zip

View File

@ -14,3 +14,12 @@ SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
ALTER TABLE t1 ADD KEY(a);
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
DROP TABLE IF EXISTS t1;
--echo #
--echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
--echo # OUT-OF-ORDER RESULTS
--echo #
CREATE TABLE t1 SELECT ('a a') as n;
INSERT INTO t1 VALUES('a b');
SELECT * FROM t1 ORDER BY LOWER(n) ASC;
SELECT * FROM t1 ORDER BY LOWER(n) DESC;
DROP TABLE t1;

View File

@ -1,4 +1,5 @@
-- Copyright (c) 2008, 2011, Oracle and/or its affiliates
-- Copyright (c) 2008, 2013, Oracle and/or its affiliates
-- Copyright (c) 2009, 2013, SkySQL Ab
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -55,6 +56,16 @@ BEGIN
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
ORDER BY columns_in_mysql;
-- Dump all events, there should be none
SELECT * FROM INFORMATION_SCHEMA.EVENTS;
-- Dump all triggers except mtr internals, there should be none
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS
WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert');
-- Dump all created procedures, there should be none
SELECT * FROM INFORMATION_SCHEMA.ROUTINES;
SHOW STATUS LIKE 'slave_open_temp_tables';
-- Checksum system tables to make sure they have been properly
-- restored after test
checksum table
@ -81,7 +92,5 @@ BEGIN
select * from information_schema.session_variables
where variable_name = 'debug_sync';
show status like 'slave_open_temp_tables';
END||

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates
/* Copyright (c) 2008, 2012, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,5 @@
# -*- cperl -*-
# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc.
# Use is subject to license terms.
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -173,6 +173,7 @@ my @DEFAULT_SUITES= qw(
handler-
heap-
innodb-
innodb_zip-
maria-
optimizer_unfixed_bugs-
oqgraph-

View File

@ -671,6 +671,21 @@ FF9D EFBE9D
D800DF84 F0908E84
DBC0DC00 F4808080
DROP TABLE IF EXISTS t1;
#
# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
# OUT-OF-ORDER RESULTS
#
CREATE TABLE t1 SELECT ('a a') as n;
INSERT INTO t1 VALUES('a b');
SELECT * FROM t1 ORDER BY LOWER(n) ASC;
n
a a
a b
SELECT * FROM t1 ORDER BY LOWER(n) DESC;
n
a b
a a
DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf16_bin

View File

@ -670,6 +670,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4))
00010384 F0908E84
00100000 F4808080
DROP TABLE IF EXISTS t1;
#
# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
# OUT-OF-ORDER RESULTS
#
CREATE TABLE t1 SELECT ('a a') as n;
INSERT INTO t1 VALUES('a b');
SELECT * FROM t1 ORDER BY LOWER(n) ASC;
n
a a
a b
SELECT * FROM t1 ORDER BY LOWER(n) DESC;
n
a b
a a
DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf32_bin

View File

@ -1046,6 +1046,21 @@ EFBE9D EFBE9D
F0908E84 F0908E84
F4808080 F4808080
DROP TABLE IF EXISTS t1;
#
# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
# OUT-OF-ORDER RESULTS
#
CREATE TABLE t1 SELECT ('a a') as n;
INSERT INTO t1 VALUES('a b');
SELECT * FROM t1 ORDER BY LOWER(n) ASC;
n
a a
a b
SELECT * FROM t1 ORDER BY LOWER(n) DESC;
n
a b
a a
DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf8mb4_bin

View File

@ -999,4 +999,44 @@ c
11112222
33334444
DROP TABLE t1;
#
# Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
# Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK
#
SET @tmp_table_size_save= @@tmp_table_size;
SET @@tmp_table_size= 1024;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
INSERT INTO t1 SELECT a+8 FROM t1;
INSERT INTO t1 SELECT a+16 FROM t1;
INSERT INTO t1 SELECT a+32 FROM t1;
INSERT INTO t1 SELECT a+64 FROM t1;
INSERT INTO t1 VALUE(NULL);
SELECT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
128
SELECT COUNT(DISTINCT (a+0)) FROM t1;
COUNT(DISTINCT (a+0))
128
DROP TABLE t1;
create table tb(
id int auto_increment primary key,
v varchar(32))
engine=myisam charset=gbk;
insert into tb(v) values("aaa");
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
update tb set v=concat(v, id);
select count(distinct case when id<=64 then id end) from tb;
count(distinct case when id<=64 then id end)
64
select count(distinct case when id<=63 then id end) from tb;
count(distinct case when id<=63 then id end)
63
drop table tb;
SET @@tmp_table_size= @tmp_table_size_save;
End of 5.5 tests

View File

@ -135,3 +135,4 @@ SELECT * FROM t2;
a
ROLLBACK WORK TO SAVEPOINT A;
DROP TABLE t1, t2;
DROP EVENT e1;

View File

@ -1574,6 +1574,27 @@ SELECT 1 FROM g1 WHERE a >= ANY
1
DROP TABLE g1;
#
# Bug#16451878 GEOMETRY QUERY CRASHES SERVER
#
# should not crash
SELECT ASTEXT(0x0100000000030000000100000000000010);
ASTEXT(0x0100000000030000000100000000000010)
NULL
#should not crash
SELECT ENVELOPE(0x0100000000030000000100000000000010);
ENVELOPE(0x0100000000030000000100000000000010)
NULL
#should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
NULL
#should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
NULL
#
# MDEV-3819 missing constraints for spatial column types
#
create table t1 (pt point);

View File

@ -0,0 +1,39 @@
#
# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
# OPERATION IF IT IS DONE IN-PLACE
#
SET GLOBAL innodb_change_buffering_debug = 1;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
c INT,
INDEX(b))
ENGINE=InnoDB;
INSERT INTO t1 VALUES(0,'x',1);
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
b
x
x
x
BEGIN;
DELETE FROM t1 WHERE a=1;
INSERT INTO t1 VALUES(1,'X',1);
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
SELECT b FROM t1 LIMIT 3;
ERROR HY000: Lost connection to MySQL server during query
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;

View File

@ -0,0 +1 @@
--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err

View File

@ -0,0 +1,70 @@
--echo #
--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
--echo # OPERATION IF IT IS DONE IN-PLACE
--echo #
--source include/have_innodb.inc
# innodb_change_buffering_debug option is debug only
--source include/have_debug.inc
# Embedded server does not support crashing
--source include/not_embedded.inc
# DBUG_SUICIDE() hangs under valgrind
--source include/not_valgrind.inc
# The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when
# change buffering is possible, so that the change buffer will be used
# whenever possible.
SET GLOBAL innodb_change_buffering_debug = 1;
let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
c INT,
INDEX(b))
ENGINE=InnoDB;
# Create enough rows for the table, so that the change buffer will be
# used for modifying the secondary index page. There must be multiple
# index pages, because changes to the root page are never buffered.
INSERT INTO t1 VALUES(0,'x',1);
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
connect (con1,localhost,root,,);
connection con1;
BEGIN;
DELETE FROM t1 WHERE a=1;
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
INSERT INTO t1 VALUES(1,'X',1);
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
# This should force a change buffer merge
SELECT b FROM t1 LIMIT 3;
let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
--source include/search_pattern_in_file.inc
# Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
CHECK TABLE t1;
# Cleanup
DROP TABLE t1;

View File

@ -149,6 +149,7 @@ wait/io/file/mysys/charset
wait/io/file/sql/casetest
wait/io/file/sql/dbopt
wait/io/file/sql/ERRMSG
wait/io/file/sql/file_parser
wait/io/file/sql/FRM
wait/io/file/sql/pid
wait/io/file/sql/query_log

View File

@ -750,4 +750,42 @@ INSERT INTO t1 VALUES (1111, 2222), (3333, 4444);
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
DROP TABLE t1;
--echo #
--echo # Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
--echo # Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK
--echo #
SET @tmp_table_size_save= @@tmp_table_size;
SET @@tmp_table_size= 1024;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
INSERT INTO t1 SELECT a+8 FROM t1;
INSERT INTO t1 SELECT a+16 FROM t1;
INSERT INTO t1 SELECT a+32 FROM t1;
INSERT INTO t1 SELECT a+64 FROM t1;
INSERT INTO t1 VALUE(NULL);
SELECT COUNT(DISTINCT a) FROM t1;
SELECT COUNT(DISTINCT (a+0)) FROM t1;
DROP TABLE t1;
create table tb(
id int auto_increment primary key,
v varchar(32))
engine=myisam charset=gbk;
insert into tb(v) values("aaa");
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
insert into tb(v) (select v from tb);
update tb set v=concat(v, id);
select count(distinct case when id<=64 then id end) from tb;
select count(distinct case when id<=63 then id end) from tb;
drop table tb;
SET @@tmp_table_size= @tmp_table_size_save;
--echo End of 5.5 tests

View File

@ -146,3 +146,4 @@ SELECT * FROM t2;
ROLLBACK WORK TO SAVEPOINT A;
DROP TABLE t1, t2;
DROP EVENT e1;

View File

@ -1433,6 +1433,24 @@ SELECT 1 FROM g1 WHERE a >= ANY
DROP TABLE g1;
--echo #
--echo # Bug#16451878 GEOMETRY QUERY CRASHES SERVER
--echo #
--echo # should not crash
SELECT ASTEXT(0x0100000000030000000100000000000010);
--echo #should not crash
SELECT ENVELOPE(0x0100000000030000000100000000000010);
--echo #should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
--echo #should not crash
SELECT
GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
--echo #
--echo # MDEV-3819 missing constraints for spatial column types
--echo #

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,4 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000-2002, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2001, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -43,7 +43,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist)
pathlist=getenv("TMP");
#endif
if (!pathlist || !pathlist[0])
pathlist=(char*) DEFAULT_TMPDIR;
pathlist= DEFAULT_TMPDIR;
}
do
{

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -111,7 +111,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
sizeof(prefix_buff)-7),"XXXXXX") -
prefix_buff);
if (!dir && ! (dir =getenv("TMPDIR")))
dir=DEFAULT_TMPDIR;
dir= DEFAULT_TMPDIR;
if (strlen(dir)+ pfx_len > FN_REFLEN-2)
{
errno=my_errno= ENAMETOOLONG;

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2003, 2004 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2002, 2003, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Copyright (C) 2000 MySQL AB
Copyright (c) 2012, Monty Program Ab
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates
Copyright (c) 2012, 2014, SkySQL Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2002 MySQL AB
/* Copyright (c) 2002, 2006 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2005, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2003 MySQL AB
/* Copyright (c) 2003, 2004 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 1985-2011 Monty Program Ab
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates
Copyright (c) 1985, 2011, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000-2003 MySQL AB
/* Copyright (c) 2000-2003, 2006 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2003 MySQL AB
/* Copyright (c) 2003, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2000, 2010, Oracle and/or its affiliates
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates
Copyright (c) 2009, 2014, SkySQL Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2006, 2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2001, 2006 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2001, 2003, 2005-2007 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -289,7 +289,7 @@ int pthread_cond_signal(pthread_cond_t *cond)
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime)
const struct timespec *abstime)
{
if (have_native_conditions)
{

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2006 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2002 MySQL AB
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,5 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
Copyright (c) 2012, Monty Program Ab
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates
Copyright (c) 2012, 2014, SkySQL Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -2,7 +2,7 @@
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" Disabled="yes" />
<Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
<Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved." />
<Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved." />
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
</Dialog>

View File

@ -2,7 +2,7 @@
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -0,0 +1,36 @@
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF(UNIX)
SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(SPECFILENAME "mysql.spec")
IF("${VERSION}" MATCHES "-ndb-")
STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec")
ENDIF()
# Left in current directory, to be taken during build
CONFIGURE_FILE(mysql.spec.in ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY)
FOREACH(fedfile my.cnf my_config.h mysql_config.sh
mysqld.service mysql-systemd-start mysql.conf
filter-requires.sh filter-provides.sh
mysql-embedded-check.c mysql.init)
CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY)
ENDFOREACH()
ENDIF()

Some files were not shown because too many files have changed in this diff Show More