Skip to content

Commit 72fa815

Browse files
author
Konstantin Osipov
committed
Merge trunk-runtime -> next-mr-bugfixing.
2 parents 3b47190 + 2abe7b9 commit 72fa815

102 files changed

Lines changed: 4256 additions & 2155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD/FINISH.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ configure="./configure $base_configs $extra_configs"
66
commands="\
77
$make -k maintainer-clean || true
88
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
9+
/bin/rm -rf CMakeCache.txt CMakeFiles/
910
1011
path=`dirname $0`
1112
. \"$path/autorun.sh\""

BUILD/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
EXTRA_DIST = FINISH.sh \
2121
SETUP.sh \
2222
autorun.sh \
23-
choose_configure.sh \
23+
cmake_configure.sh \
2424
build_mccge.sh \
2525
check-cpu \
2626
cleanup \

BUILD/autorun.sh

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ done
2121
IFS="$save_ifs"
2222

2323
rm -rf configure
24-
aclocal || die "Can't execute aclocal"
25-
autoheader || die "Can't execute autoheader"
26-
# --force means overwrite ltmain.sh script if it already exists
27-
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
28-
29-
# --add-missing instructs automake to install missing auxiliary files
30-
# and --force to overwrite them if they already exist
31-
automake --add-missing --force --copy || die "Can't execute automake"
32-
autoconf || die "Can't execute autoconf"
33-
# Do not use autotools generated configure directly. Instead, use a script
34-
# that will either call CMake or original configure shell script at build
35-
# time (CMake is preferred if installed).
36-
mv configure configure.am
37-
cp BUILD/choose_configure.sh configure
38-
chmod a+x configure
24+
25+
# Ensure that cmake and perl are available. Required for cmake based builds.
26+
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
27+
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
28+
29+
# Whether to use the autotools configuration script or cmake.
30+
if test "$HAVE_CMAKE" = "no"
31+
then
32+
aclocal || die "Can't execute aclocal"
33+
autoheader || die "Can't execute autoheader"
34+
# --force means overwrite ltmain.sh script if it already exists
35+
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
36+
# --add-missing instructs automake to install missing auxiliary files
37+
# and --force to overwrite them if they already exist
38+
automake --add-missing --force --copy || die "Can't execute automake"
39+
autoconf || die "Can't execute autoconf"
40+
else
41+
path=`dirname $0`
42+
cp $path/cmake_configure.sh $path/../configure
43+
chmod +x $path/../configure
44+
fi

include/atomic/solaris.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@
2020

2121
#define MY_ATOMIC_MODE "solaris-atomic"
2222

23+
#if defined(__GNUC__)
24+
#define atomic_typeof(T,V) __typeof__(V)
25+
#else
26+
#define atomic_typeof(T,V) T
27+
#endif
28+
2329
#define uintptr_t void *
2430
#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
2531

2632
#define make_atomic_cas_body(S) \
27-
uint ## S ## _t sav; \
33+
atomic_typeof(uint ## S ## _t, *cmp) sav; \
2834
sav = atomic_cas_ ## S( \
2935
(volatile uint ## S ## _t *)a, \
3036
(uint ## S ## _t)*cmp, \

include/thr_lock.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,11 @@ typedef struct st_thr_lock_info
8989
{
9090
pthread_t thread;
9191
my_thread_id thread_id;
92-
ulong n_cursors;
9392
} THR_LOCK_INFO;
9493

95-
/*
96-
Lock owner identifier. Globally identifies the lock owner within the
97-
thread and among all the threads. The address of an instance of this
98-
structure is used as id.
99-
*/
100-
101-
typedef struct st_thr_lock_owner
102-
{
103-
THR_LOCK_INFO *info;
104-
} THR_LOCK_OWNER;
105-
10694

10795
typedef struct st_thr_lock_data {
108-
THR_LOCK_OWNER *owner;
96+
THR_LOCK_INFO *owner;
10997
struct st_thr_lock_data *next,**prev;
11098
struct st_thr_lock *lock;
11199
mysql_cond_t *cond;
@@ -141,19 +129,18 @@ extern LIST *thr_lock_thread_list;
141129
extern mysql_mutex_t THR_LOCK_lock;
142130

143131
my_bool init_thr_lock(void); /* Must be called once/thread */
144-
#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg)
145132
void thr_lock_info_init(THR_LOCK_INFO *info);
146133
void thr_lock_init(THR_LOCK *lock);
147134
void thr_lock_delete(THR_LOCK *lock);
148135
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data,
149136
void *status_param);
150137
enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data,
151-
THR_LOCK_OWNER *owner,
138+
THR_LOCK_INFO *owner,
152139
enum thr_lock_type lock_type,
153140
ulong lock_wait_timeout);
154141
void thr_unlock(THR_LOCK_DATA *data);
155142
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
156-
uint count, THR_LOCK_OWNER *owner,
143+
uint count, THR_LOCK_INFO *owner,
157144
ulong lock_wait_timeout);
158145
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
159146
void

mysql-test/include/handler.inc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,3 +1757,35 @@ disconnect con51355;
17571757
--echo # Connection default
17581758
connection default;
17591759

1760+
1761+
--echo #
1762+
--echo # Bug#54401 assert in Diagnostics_area::set_eof_status , HANDLER
1763+
--echo #
1764+
1765+
--disable_warnings
1766+
DROP TABLE IF EXISTS t1, t2;
1767+
DROP FUNCTION IF EXISTS f1;
1768+
--enable_warnings
1769+
1770+
delimiter |;
1771+
CREATE FUNCTION f1() RETURNS INTEGER
1772+
BEGIN
1773+
SELECT 1 FROM t2 INTO @a;
1774+
RETURN 1;
1775+
END|
1776+
delimiter ;|
1777+
1778+
# Get f1() parsed and cached
1779+
--error ER_NO_SUCH_TABLE
1780+
SELECT f1();
1781+
1782+
CREATE TABLE t1(a INT);
1783+
INSERT INTO t1 VALUES (1);
1784+
HANDLER t1 OPEN;
1785+
# This used to cause the assert
1786+
--error ER_NO_SUCH_TABLE
1787+
HANDLER t1 READ FIRST WHERE f1() = 1;
1788+
HANDLER t1 CLOSE;
1789+
1790+
DROP FUNCTION f1;
1791+
DROP TABLE t1;

mysql-test/lib/v1/mysql-test-run.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3113,7 +3113,6 @@ ($$)
31133113
mtr_add_arg($args, "--bootstrap");
31143114
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
31153115
mtr_add_arg($args, "--datadir=%s", $data_dir);
3116-
mtr_add_arg($args, "--loose-skip-innodb");
31173116
mtr_add_arg($args, "--loose-skip-ndbcluster");
31183117
mtr_add_arg($args, "--tmpdir=.");
31193118
mtr_add_arg($args, "--core-file");

mysql-test/r/alter_table.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,3 +1370,16 @@ CREATE TABLE t1 (id int);
13701370
INSERT INTO t1 VALUES (1), (2);
13711371
ALTER TABLE t1 ADD COLUMN (f1 INT), ADD COLUMN (f2 INT), ADD KEY f2k(f2);
13721372
DROP TABLE t1;
1373+
#
1374+
# Test for bug #53820 "ALTER a MEDIUMINT column table causes full
1375+
# table copy".
1376+
#
1377+
DROP TABLE IF EXISTS t1;
1378+
CREATE TABLE t1 (a INT, b MEDIUMINT);
1379+
INSERT INTO t1 VALUES (1, 1), (2, 2);
1380+
# The below ALTER should not copy table and so no rows should
1381+
# be shown as affected.
1382+
ALTER TABLE t1 CHANGE a id INT;
1383+
affected rows: 0
1384+
info: Records: 0 Duplicates: 0 Warnings: 0
1385+
DROP TABLE t1;

mysql-test/r/handler_innodb.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,3 +1710,23 @@ ERROR 42S02: Table 'test.t1' doesn't exist
17101710
HANDLER t1 CLOSE;
17111711
# Connection con51355
17121712
# Connection default
1713+
#
1714+
# Bug#54401 assert in Diagnostics_area::set_eof_status , HANDLER
1715+
#
1716+
DROP TABLE IF EXISTS t1, t2;
1717+
DROP FUNCTION IF EXISTS f1;
1718+
CREATE FUNCTION f1() RETURNS INTEGER
1719+
BEGIN
1720+
SELECT 1 FROM t2 INTO @a;
1721+
RETURN 1;
1722+
END|
1723+
SELECT f1();
1724+
ERROR 42S02: Table 'test.t2' doesn't exist
1725+
CREATE TABLE t1(a INT);
1726+
INSERT INTO t1 VALUES (1);
1727+
HANDLER t1 OPEN;
1728+
HANDLER t1 READ FIRST WHERE f1() = 1;
1729+
ERROR 42S02: Table 'test.t2' doesn't exist
1730+
HANDLER t1 CLOSE;
1731+
DROP FUNCTION f1;
1732+
DROP TABLE t1;

0 commit comments

Comments
 (0)