Skip to content

Commit 29f54b4

Browse files
author
Alexander Nozdrin
committed
Auto-merge from mysql-trunk.
2 parents fd14e3d + f23b176 commit 29f54b4

File tree

10 files changed

+71
-41
lines changed

10 files changed

+71
-41
lines changed

libmysql/client_settings.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ extern char * mysql_unix_port;
2727
CLIENT_TRANSACTIONS | \
2828
CLIENT_PROTOCOL_41 | \
2929
CLIENT_SECURE_CONNECTION | \
30-
CLIENT_MULTI_RESULTS | \
31-
CLIENT_PS_MULTI_RESULTS)
30+
CLIENT_MULTI_RESULTS)
3231

3332
sig_handler my_pipe_sig_handler(int sig);
3433
void read_user_name(char *name);

mysql-test/r/not_partition.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ joined DATE NOT NULL
5252
)
5353
PARTITION BY KEY(joined)
5454
PARTITIONS 6;
55-
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
55+
Got one of the listed errors
5656
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
57-
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
57+
Got one of the listed errors
5858
drop table t1;
5959
ERROR 42S02: Unknown table 't1'
6060
CREATE TABLE t1 (
@@ -71,7 +71,7 @@ PARTITION p2 VALUES LESS THAN (1980),
7171
PARTITION p3 VALUES LESS THAN (1990),
7272
PARTITION p4 VALUES LESS THAN MAXVALUE
7373
);
74-
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
74+
Got one of the listed errors
7575
drop table t1;
7676
ERROR 42S02: Unknown table 't1'
7777
CREATE TABLE t1 (id INT, purchased DATE)
@@ -82,7 +82,7 @@ PARTITION p0 VALUES LESS THAN (1990),
8282
PARTITION p1 VALUES LESS THAN (2000),
8383
PARTITION p2 VALUES LESS THAN MAXVALUE
8484
);
85-
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
85+
Got one of the listed errors
8686
drop table t1;
8787
ERROR 42S02: Unknown table 't1'
8888
create table t1 (a varchar(10) charset latin1 collate latin1_bin);

mysql-test/t/not_partition.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ALTER TABLE t1 ENGINE Memory;
3131
ALTER TABLE t1 ADD (new INT);
3232
DROP TABLE t1;
3333

34-
--error ER_FEATURE_DISABLED
34+
--error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT
3535
CREATE TABLE t1 (
3636
firstname VARCHAR(25) NOT NULL,
3737
lastname VARCHAR(25) NOT NULL,
@@ -42,13 +42,13 @@ CREATE TABLE t1 (
4242
PARTITION BY KEY(joined)
4343
PARTITIONS 6;
4444

45-
--error ER_FEATURE_DISABLED
45+
--error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT
4646
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
4747

4848
--error ER_BAD_TABLE_ERROR
4949
drop table t1;
5050

51-
--error ER_FEATURE_DISABLED
51+
--error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT
5252
CREATE TABLE t1 (
5353
firstname VARCHAR(25) NOT NULL,
5454
lastname VARCHAR(25) NOT NULL,
@@ -66,7 +66,7 @@ PARTITION BY RANGE( YEAR(joined) ) (
6666
--error ER_BAD_TABLE_ERROR
6767
drop table t1;
6868

69-
--error ER_FEATURE_DISABLED
69+
--error ER_FEATURE_DISABLED,ER_OPTION_PREVENTS_STATEMENT
7070
CREATE TABLE t1 (id INT, purchased DATE)
7171
PARTITION BY RANGE( YEAR(purchased) )
7272
SUBPARTITION BY HASH( TO_DAYS(purchased) )

scripts/make_win_bin_dist

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ if [ -d storage/innodb_plugin ]; then
290290
cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.dll \
291291
$DESTDIR/lib/plugin/
292292
fi
293+
if [ -d plugin/semisync ]; then
294+
cp plugin/semisync/$TARGET/semisync_master.dll \
295+
plugin/semisync/$TARGET/semisync_slave.dll \
296+
$DESTDIR/lib/plugin/
297+
fi
293298

294299
if [ x"$TARGET" != x"release" ] ; then
295300
cp libmysql/$TARGET/libmysql.pdb \
@@ -302,6 +307,11 @@ if [ x"$TARGET" != x"release" ] ; then
302307
cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.pdb \
303308
$DESTDIR/lib/plugin/
304309
fi
310+
if [ -d plugin/semisync ]; then
311+
cp plugin/semisync/$TARGET/semisync_master.pdb \
312+
plugin/semisync/$TARGET/semisync_slave.pdb \
313+
$DESTDIR/lib/plugin/
314+
fi
305315
fi
306316

307317

@@ -328,6 +338,15 @@ if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \
328338
storage/innodb_plugin/debug/ha_innodb_plugin.pdb \
329339
$DESTDIR/lib/plugin/debug/
330340
fi
341+
if [ -d plugin/semisync ]; then
342+
cp plugin/semisync/debug/semisync_master.dll \
343+
plugin/semisync/debug/semisync_master.lib \
344+
plugin/semisync/debug/semisync_master.pdb \
345+
plugin/semisync/debug/semisync_slave.dll \
346+
plugin/semisync/debug/semisync_slave.lib \
347+
plugin/semisync/debug/semisync_slave.pdb \
348+
$DESTDIR/lib/plugin/debug/
349+
fi
331350
fi
332351

333352
# ----------------------------------------------------------------------

storage/archive/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
7777
ha_archive_la_LIBADD = probes_sh_mysql.o
7878
ha_archive_la_DEPENDENCIES = probes_sh_mysql.o dtrace_shared_files dtrace_providers
7979

80-
CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers dtrace_shared_files
80+
CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers dtrace_shared_files dtrace_sources
8181
DTRACEFILES = libarchive_a-ha_archive.o
8282
DTRACESHAREDFILES = .libs/ha_archive_la-ha_archive.o
83+
# Hack: We "depend" on ".libs/" but have no rule for it,
84+
# but it is created as a byproduct of the ".lo"
85+
DTRACESHAREDDEPEND = ha_archive_la-ha_archive.lo
8386
DTRACEPROVIDER = probes_mysql.d
8487

8588
dtrace_files:
@@ -93,7 +96,7 @@ probes_mysql.d:
9396
$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
9497
echo timestamp > dtrace_sources
9598

96-
probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDFILES)
99+
probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPEND)
97100
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@
98101

99102
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)

storage/ibmdb2i/db2i_charsetSupport.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ int32 initCharsetSupport()
164164
}
165165

166166
VOID(pthread_mutex_init(&textDescMapHashMutex,MY_MUTEX_INIT_FAST));
167-
hash_init(&textDescMapHash, &my_charset_bin, 10, offsetof(TextDescMap, hashKey), sizeof(TextDescMap::hashKey), 0, 0, HASH_UNIQUE);
167+
my_hash_init(&textDescMapHash, &my_charset_bin, 10, offsetof(TextDescMap, hashKey), sizeof(TextDescMap::hashKey), 0, 0, HASH_UNIQUE);
168168

169169
VOID(pthread_mutex_init(&iconvMapHashMutex,MY_MUTEX_INIT_FAST));
170-
hash_init(&iconvMapHash, &my_charset_bin, 10, offsetof(IconvMap, hashKey), sizeof(IconvMap::hashKey), 0, 0, HASH_UNIQUE);
170+
my_hash_init(&iconvMapHash, &my_charset_bin, 10, offsetof(IconvMap, hashKey), sizeof(IconvMap::hashKey), 0, 0, HASH_UNIQUE);
171171

172172
init_alloc_root(&textDescMapMemroot, 2048, 0);
173173
init_alloc_root(&iconvMapMemroot, 256, 0);
@@ -191,9 +191,9 @@ void doneCharsetSupport()
191191
free_root(&iconvMapMemroot, 0);
192192

193193
pthread_mutex_destroy(&textDescMapHashMutex);
194-
hash_free(&textDescMapHash);
194+
my_hash_free(&textDescMapHash);
195195
pthread_mutex_destroy(&iconvMapHashMutex);
196-
hash_free(&iconvMapHash);
196+
my_hash_free(&iconvMapHash);
197197
free_aligned(QlgCvtTextDescToDesc_sym);
198198
}
199199

@@ -415,7 +415,7 @@ static int32 convertTextDesc(const int32 inType, const int32 outType, const char
415415
memcpy(hashKey.inDesc, inDescOverride, len);
416416
memset(hashKey.inDesc+len, 0, sizeof(hashKey.inDesc) - len);
417417

418-
if (!(mapping=(TextDescMap *) hash_search(&textDescMapHash,
418+
if (!(mapping=(TextDescMap *) my_hash_search(&textDescMapHash,
419419
(const uchar*)&hashKey,
420420
sizeof(hashKey))))
421421
{
@@ -748,7 +748,7 @@ int32 getConversion(enum_conversionDirection direction, const CHARSET_INFO* cs,
748748

749749
/* Look for the conversion in the cache and add it if it is not there. */
750750
IconvMap *mapping;
751-
if (!(mapping= (IconvMap *) hash_search(&iconvMapHash,
751+
if (!(mapping= (IconvMap *) my_hash_search(&iconvMapHash,
752752
(const uchar*)&hashKey,
753753
sizeof(hashKey))))
754754
{

storage/ibmdb2i/db2i_constraints.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
102102
Foreign_key* fk = (Foreign_key*)curKey;
103103

104104
char db2LibName[MAX_DB2_SCHEMANAME_LENGTH+1];
105-
if (fk->name)
105+
if (fk->name.str)
106106
{
107107
char db2FKName[MAX_DB2_FILENAME_LENGTH+1];
108108
appendHere.append(STRING_WITH_LEN("CONSTRAINT "));
@@ -120,7 +120,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
120120

121121
appendHere.append('.');
122122

123-
convertMySQLNameToDB2Name(fk->name, db2FKName, sizeof(db2FKName));
123+
convertMySQLNameToDB2Name(fk->name.str, db2FKName, sizeof(db2FKName));
124124
appendHere.append(db2FKName);
125125
}
126126

@@ -139,7 +139,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
139139
}
140140
firstTime = false;
141141

142-
convertMySQLNameToDB2Name(curColumn->field_name, colName, sizeof(colName));
142+
convertMySQLNameToDB2Name(curColumn->field_name.str, colName, sizeof(colName));
143143
appendHere.append(colName);
144144

145145
// DB2 requires that the sort sequence on the child table match the parent table's
@@ -148,7 +148,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
148148
Field** field = fields;
149149
do
150150
{
151-
if (strcmp((*field)->field_name, curColumn->field_name) == 0)
151+
if (strcmp((*field)->field_name, curColumn->field_name.str) == 0)
152152
{
153153
int rc = updateAssociatedSortSequence((*field)->charset(),
154154
fileSortSequenceType,
@@ -199,7 +199,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
199199
}
200200
firstTime = false;
201201

202-
convertMySQLNameToDB2Name(curRef->field_name, colName, sizeof(colName));
202+
convertMySQLNameToDB2Name(curRef->field_name.str, colName, sizeof(colName));
203203
appendHere.append(colName);
204204
}
205205

storage/ibmdb2i/ha_ibmdb2i.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ static int ibmdb2i_init_func(void *p)
284284
was_ILE_inited = false;
285285
ibmdb2i_hton= (handlerton *)p;
286286
VOID(pthread_mutex_init(&ibmdb2i_mutex,MY_MUTEX_INIT_FAST));
287-
(void) hash_init(&ibmdb2i_open_tables,table_alias_charset,32,0,0,
288-
(hash_get_key) ibmdb2i_get_key,0,0);
287+
(void) my_hash_init(&ibmdb2i_open_tables,table_alias_charset,32,0,0,
288+
(my_hash_get_key) ibmdb2i_get_key,0,0);
289289

290290
ibmdb2i_hton->state= SHOW_OPTION_YES;
291291
ibmdb2i_hton->create= ibmdb2i_create_handler;
@@ -340,7 +340,7 @@ static int ibmdb2i_done_func(void *p)
340340

341341
doneCharsetSupport();
342342

343-
hash_free(&ibmdb2i_open_tables);
343+
my_hash_free(&ibmdb2i_open_tables);
344344
pthread_mutex_destroy(&ibmdb2i_mutex);
345345

346346
DBUG_RETURN(0);
@@ -356,7 +356,7 @@ IBMDB2I_SHARE *ha_ibmdb2i::get_share(const char *table_name, TABLE *table)
356356
pthread_mutex_lock(&ibmdb2i_mutex);
357357
length=(uint) strlen(table_name);
358358

359-
if (!(share=(IBMDB2I_SHARE*) hash_search(&ibmdb2i_open_tables,
359+
if (!(share=(IBMDB2I_SHARE*) my_hash_search(&ibmdb2i_open_tables,
360360
(uchar*)table_name,
361361
length)))
362362
{
@@ -387,7 +387,7 @@ IBMDB2I_SHARE *ha_ibmdb2i::get_share(const char *table_name, TABLE *table)
387387
if (rc)
388388
{
389389
delete share->db2Table;
390-
hash_delete(&ibmdb2i_open_tables, (uchar*) share);
390+
my_hash_delete(&ibmdb2i_open_tables, (uchar*) share);
391391
thr_lock_delete(&share->lock);
392392
my_errno = rc;
393393
goto error;
@@ -420,7 +420,7 @@ int ha_ibmdb2i::free_share(IBMDB2I_SHARE *share)
420420
delete share->db2Table;
421421
db2Table = NULL;
422422

423-
hash_delete(&ibmdb2i_open_tables, (uchar*) share);
423+
my_hash_delete(&ibmdb2i_open_tables, (uchar*) share);
424424
thr_lock_delete(&share->lock);
425425
pthread_mutex_destroy(&share->mutex);
426426
my_free(share, MYF(0));

support-files/mysql.spec.sh

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
%{?_with_cluster:%define CLUSTER_BUILD 1}
4444
%{!?_with_cluster:%define CLUSTER_BUILD 0}
4545

46+
# ----------------------------------------------------------------------
47+
# support optional "tcmalloc" stuff (experimental)
48+
# ----------------------------------------------------------------------
49+
%{?malloc_lib_target:%define WITH_TCMALLOC 1}
50+
%{!?malloc_lib_target:%define WITH_TCMALLOC 0}
51+
4652
%if %{STATIC_BUILD}
4753
%define release 0
4854
%else
@@ -448,7 +454,7 @@ $MBD/libtool --mode=execute install -m 755 \
448454
$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/sql/mysqld \
449455
$RBR%{_sbindir}/mysqld-debug
450456

451-
%if %{?malloc_lib_target:1}%{!?malloc_lib_target:0}
457+
%if %{WITH_TCMALLOC}
452458
# Even though this is a shared library, put it under /usr/lib/mysql, so it
453459
# doesn't conflict with possible shared lib by the same name in /usr/lib. See
454460
# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used.
@@ -709,12 +715,10 @@ fi
709715
%attr(755, root, root) %{_bindir}/resolveip
710716

711717
%attr(755, root, root) %{_libdir}/mysql/plugin/ha_example.so*
712-
%if %{WITHOUT_INNODB_PLUGIN}
713-
%else
714-
%attr(755, root, root) %{_libdir}/mysql/plugin/ha_innodb_plugin.so*
715-
%endif
718+
%attr(755, root, root) %{_libdir}/mysql/plugin/libsemisync_master.so*
719+
%attr(755, root, root) %{_libdir}/mysql/plugin/libsemisync_slave.so*
716720

717-
%if %{?malloc_lib_target:1}%{!?malloc_lib_target:0}
721+
%if %{WITH_TCMALLOC}
718722
%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
719723
%endif
720724

@@ -833,6 +837,7 @@ fi
833837
%{_libdir}/mysql/libmysqlclient.la
834838
%{_libdir}/mysql/libmysqlclient_r.a
835839
%{_libdir}/mysql/libmysqlclient_r.la
840+
%{_libdir}/mysql/libmysqlservices.a
836841
%{_libdir}/mysql/libmystrings.a
837842
%{_libdir}/mysql/libmysys.a
838843
%if %{CLUSTER_BUILD}
@@ -844,11 +849,10 @@ fi
844849
%{_libdir}/mysql/libz.la
845850
%{_libdir}/mysql/plugin/ha_example.a
846851
%{_libdir}/mysql/plugin/ha_example.la
847-
%if %{WITHOUT_INNODB_PLUGIN}
848-
%else
849-
%{_libdir}/mysql/plugin/ha_innodb_plugin.a
850-
%{_libdir}/mysql/plugin/ha_innodb_plugin.la
851-
%endif
852+
%{_libdir}/mysql/plugin/libsemisync_master.a
853+
%{_libdir}/mysql/plugin/libsemisync_master.la
854+
%{_libdir}/mysql/plugin/libsemisync_slave.a
855+
%{_libdir}/mysql/plugin/libsemisync_slave.la
852856

853857
%files shared
854858
%defattr(-, root, root, 0755)
@@ -878,6 +882,11 @@ fi
878882
# itself - note that they must be ordered by date (important when
879883
# merging BK trees)
880884
%changelog
885+
* Mon Nov 16 2009 Joerg Bruehe <[email protected]>
886+
887+
- Fix some problems with the directives around "tcmalloc" (experimental),
888+
remove erroneous traces of the InnoDB plugin (that is 5.1 only).
889+
881890
* Fri Oct 02 2009 Alexander Nozdrin <[email protected]>
882891

883892
- "mysqlmanager" got removed from version 5.4, all references deleted.

tests/mysql_client_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19154,7 +19154,7 @@ static struct my_tests_st my_tests[]= {
1915419154
{ "test_wl4166_2", test_wl4166_2 },
1915519155
{ "test_wl4166_3", test_wl4166_3 },
1915619156
{ "test_wl4166_4", test_wl4166_4 },
19157-
{ "test_wl4435", test_wl4435 },
19157+
/* { "test_wl4435", test_wl4435 }, */
1915819158
{ "test_wl4435_2", test_wl4435_2 },
1915919159
{ "test_bug38486", test_bug38486 },
1916019160
{ "test_bug33831", test_bug33831 },

0 commit comments

Comments
 (0)