Skip to content

Commit 7a8ab5f

Browse files
authored andcommitted
Auto Merge from 5.1-rep+2
2 parents 1c50342 + ce9f2d4 commit 7a8ab5f

File tree

282 files changed

+9595
-2083
lines changed

Some content is hidden

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

282 files changed

+9595
-2083
lines changed

.bzr-mysql/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[MYSQL]
22
post_commit_to = "[email protected]"
33
post_push_to = "[email protected]"
4-
tree_name = "mysql-5.1-rep+3"
4+
tree_name = "mysql-5.1-rep+2-delivery1"

.bzrignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ client/rpl_record_old.h
392392
client/rpl_tblmap.h
393393
client/rpl_tblmap.cc
394394
client/rpl_utility.h
395+
client/rpl_utility.cc
395396
client/select_test
396397
client/sql_string.cpp
397398
client/ssl_test
@@ -1142,6 +1143,7 @@ libmysqld/rpl_filter.cc
11421143
libmysqld/rpl_injector.cc
11431144
libmysqld/rpl_record.cc
11441145
libmysqld/rpl_record_old.cc
1146+
libmysqld/rpl_utility.cc
11451147
libmysqld/scheduler.cc
11461148
libmysqld/set_var.cc
11471149
libmysqld/simple-test

Makefile.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ test-bt-fast:
196196
-cd mysql-test ; MTR_BUILD_THREAD=auto \
197197
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
198198

199-
test-bt-fast:
200-
-cd mysql-test ; MTR_BUILD_THREAD=auto \
201-
@PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol --report-features
202-
203199
test-bt-debug:
204200
-cd mysql-test ; MTR_BUILD_THREAD=auto \
205201
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \

client/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ DEFS = -DMYSQL_CLIENT_NO_THREADS \
104104
-DMYSQL_DATADIR="\"$(localstatedir)\""
105105

106106
sql_src=log_event.h mysql_priv.h rpl_constants.h \
107-
rpl_utility.h rpl_tblmap.h rpl_tblmap.cc \
107+
rpl_tblmap.h rpl_tblmap.cc \
108108
log_event.cc my_decimal.h my_decimal.cc \
109109
log_event_old.h log_event_old.cc \
110+
rpl_utility.h rpl_utility.cc \
110111
rpl_record_old.h rpl_record_old.cc
111112
strings_src=decimal.c
112113

client/mysql.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4335,7 +4335,7 @@ com_status(String *buffer __attribute__((unused)),
43354335
Don't remove "limit 1",
43364336
it is protection againts SQL_SELECT_LIMIT=0
43374337
*/
4338-
if (mysql_store_result_for_lazy(&result))
4338+
if (!mysql_store_result_for_lazy(&result))
43394339
{
43404340
MYSQL_ROW cur=mysql_fetch_row(result);
43414341
if (cur)
@@ -4379,7 +4379,7 @@ com_status(String *buffer __attribute__((unused)),
43794379
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
43804380
return 0;
43814381
}
4382-
if (mysql_store_result_for_lazy(&result))
4382+
if (!mysql_store_result_for_lazy(&result))
43834383
{
43844384
MYSQL_ROW cur=mysql_fetch_row(result);
43854385
if (cur)
@@ -4474,9 +4474,7 @@ server_version_string(MYSQL *con)
44744474
*/
44754475

44764476
if (server_version == NULL)
4477-
{
4478-
server_version= strdup(mysql_get_server_info(con));
4479-
}
4477+
server_version= my_strdup(mysql_get_server_info(con), MYF(MY_WME));
44804478
}
44814479

44824480
return server_version ? server_version : "";

client/mysqlbinlog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2139,4 +2139,4 @@ int main(int argc, char** argv)
21392139
#include "my_decimal.cc"
21402140
#include "log_event.cc"
21412141
#include "log_event_old.cc"
2142-
2142+
#include "rpl_utility.cc"

client/mysqltest.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6827,10 +6827,8 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
68276827
MYSQL_STMT *stmt;
68286828
DYNAMIC_STRING ds_prepare_warnings;
68296829
DYNAMIC_STRING ds_execute_warnings;
6830-
ulonglong affected_rows;
68316830
DBUG_ENTER("run_query_stmt");
68326831
DBUG_PRINT("query", ("'%-.60s'", query));
6833-
LINT_INIT(affected_rows);
68346832

68356833
/*
68366834
Init a new stmt if it's not already one created for this connection
@@ -6966,8 +6964,7 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
69666964
warnings here
69676965
*/
69686966
{
6969-
ulonglong affected_rows;
6970-
LINT_INIT(affected_rows);
6967+
ulonglong UNINIT_VAR(affected_rows);
69716968

69726969
if (!disable_info)
69736970
affected_rows= mysql_affected_rows(mysql);

config/ac-macros/misc.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,15 @@ dnl ---------------------------------------------------------------------------
601601

602602
dnl MYSQL_NEEDS_MYSYS_NEW
603603
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
604-
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_use_mysys_new,
604+
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
605605
[
606606
AC_LANG_PUSH(C++)
607607
AC_TRY_LINK([], [
608608
class A { public: int b; }; A *a=new A; a->b=10; delete a;
609-
], mysql_use_mysys_new=no, mysql_use_mysys_new=yes)
609+
], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
610610
AC_LANG_POP(C++)
611611
])
612-
if test "$mysql_use_mysys_new" = "yes"
612+
if test "$mysql_cv_use_mysys_new" = "yes"
613613
then
614614
AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
615615
fi

configure.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ AC_CANONICAL_SYSTEM
1010
#
1111
# When changing major version number please also check switch statement
1212
# in mysqlbinlog::check_master_version().
13-
AM_INIT_AUTOMAKE(mysql, 5.1.42)
13+
AM_INIT_AUTOMAKE(mysql, 5.1.43)
1414
AM_CONFIG_HEADER([include/config.h:config.h.in])
1515

16+
# Request support for automake silent-rules if available.
17+
# Default to verbose output. One can use the configure-time
18+
# option --enable-silent-rules or make V=0 to activate
19+
# silent rules.
20+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
21+
1622
PROTOCOL_VERSION=10
1723
DOT_FRM_VERSION=6
1824
# See the libtool docs for information on how to do shared lib versions.

extra/comp_err.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static ha_checksum checksum_format_specifier(const char* msg)
660660
case 'u':
661661
case 'x':
662662
case 's':
663-
chksum= my_checksum(chksum, start, (uint) (p - start));
663+
chksum= my_checksum(chksum, start, (uint) (p + 1 - start));
664664
start= 0; /* Not in format specifier anymore */
665665
break;
666666

@@ -1030,20 +1030,22 @@ static char *parse_text_line(char *pos)
10301030
{
10311031
int i, nr;
10321032
char *row= pos;
1033+
size_t len;
10331034
DBUG_ENTER("parse_text_line");
10341035

1036+
len= strlen (pos);
10351037
while (*pos)
10361038
{
10371039
if (*pos == '\\')
10381040
{
10391041
switch (*++pos) {
10401042
case '\\':
10411043
case '"':
1042-
VOID(strmov(pos - 1, pos));
1044+
VOID(memmove (pos - 1, pos, len - (row - pos)));
10431045
break;
10441046
case 'n':
10451047
pos[-1]= '\n';
1046-
VOID(strmov(pos, pos + 1));
1048+
VOID(memmove (pos, pos + 1, len - (row - pos)));
10471049
break;
10481050
default:
10491051
if (*pos >= '0' && *pos < '8')
@@ -1053,10 +1055,10 @@ static char *parse_text_line(char *pos)
10531055
nr= nr * 8 + (*(pos++) - '0');
10541056
pos -= i;
10551057
pos[-1]= nr;
1056-
VOID(strmov(pos, pos + i));
1058+
VOID(memmove (pos, pos + i, len - (row - pos)));
10571059
}
10581060
else if (*pos)
1059-
VOID(strmov(pos - 1, pos)); /* Remove '\' */
1061+
VOID(memmove (pos - 1, pos, len - (row - pos))); /* Remove '\' */
10601062
}
10611063
}
10621064
else

include/mysql.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -557,16 +557,6 @@ unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
557557
char *to,const char *from,
558558
unsigned long length);
559559
void STDCALL mysql_debug(const char *debug);
560-
char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
561-
char *to,
562-
unsigned long to_length,
563-
const char *from,
564-
unsigned long from_length,
565-
void *param,
566-
char *
567-
(*extend_buffer)
568-
(void *, char *to,
569-
unsigned long *length));
570560
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
571561
unsigned int STDCALL mysql_thread_safe(void);
572562
my_bool STDCALL mysql_embedded(void);

include/mysql.h.pp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -518,16 +518,6 @@
518518
char *to,const char *from,
519519
unsigned long length);
520520
void mysql_debug(const char *debug);
521-
char * mysql_odbc_escape_string(MYSQL *mysql,
522-
char *to,
523-
unsigned long to_length,
524-
const char *from,
525-
unsigned long from_length,
526-
void *param,
527-
char *
528-
(*extend_buffer)
529-
(void *, char *to,
530-
unsigned long *length));
531521
void myodbc_remove_escape(MYSQL *mysql,char *name);
532522
unsigned int mysql_thread_safe(void);
533523
my_bool mysql_embedded(void);

include/violite.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ struct st_vio
224224
#endif /* HAVE_SMEM */
225225
#ifdef _WIN32
226226
OVERLAPPED pipe_overlapped;
227-
DWORD read_timeout_millis;
228-
DWORD write_timeout_millis;
227+
DWORD read_timeout_ms;
228+
DWORD write_timeout_ms;
229229
#endif
230230
};
231231
#endif /* vio_violite_h_ */

libmysql/libmysql.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,20 +1629,6 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
16291629
return (uint) escape_string_for_mysql(mysql->charset, to, 0, from, length);
16301630
}
16311631

1632-
1633-
char * STDCALL
1634-
mysql_odbc_escape_string(MYSQL *mysql __attribute__((unused)),
1635-
char *to __attribute__((unused)),
1636-
ulong to_length __attribute__((unused)),
1637-
const char *from __attribute__((unused)),
1638-
ulong from_length __attribute__((unused)),
1639-
void *param __attribute__((unused)),
1640-
char * (*extend_buffer)(void *, char *, ulong *)
1641-
__attribute__((unused)))
1642-
{
1643-
return NULL;
1644-
}
1645-
16461632
void STDCALL
16471633
myodbc_remove_escape(MYSQL *mysql,char *name)
16481634
{

libmysql/libmysql.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ EXPORTS
7878
mysql_next_result
7979
mysql_num_fields
8080
mysql_num_rows
81-
mysql_odbc_escape_string
8281
mysql_options
8382
mysql_stmt_param_count
8483
mysql_stmt_param_metadata

libmysqld/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
5555
item_geofunc.cc item_subselect.cc item_row.cc\
5656
item_xmlfunc.cc \
5757
key.cc lock.cc log.cc sql_state.c \
58-
log_event.cc rpl_record.cc \
58+
log_event.cc rpl_record.cc rpl_utility.cc \
5959
log_event_old.cc rpl_record_old.cc \
6060
protocol.cc net_serv.cc opt_range.cc \
6161
opt_sum.cc procedure.cc records.cc sql_acl.cc \

libmysqld/libmysqld.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ EXPORTS
5050
mysql_next_result
5151
mysql_num_fields
5252
mysql_num_rows
53-
mysql_odbc_escape_string
5453
mysql_options
5554
mysql_ping
5655
mysql_query

mysql-test/collections/default.experimental

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
1313
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
1414

1515
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
16-
main.innodb-autoinc* # Bug#47809 2009-10-04 joro innodb-autoinc.test fails with valgrind errors with the innodb plugin
1716
main.plugin_load @solaris # Bug#42144
1817

1918
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
2019

21-
rpl.rpl_cross_version* # Bug #43913 2009-10-26 joro rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
22-
rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31
20+
rpl.rpl_cross_version* # Bug#48340 2009-12-01 Daogang rpl_cross_version: Found warnings/errors in server log file!
21+
rpl.rpl_get_master_version_and_clock* # Bug #49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
2322
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
24-
rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
2523
rpl.rpl_trigger* # Bug#47810 2009-10-04 joro rpl.rpl_trigger.test fails with valgrind errors with the innodb plugin
2624

2725
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Helper file to perform one insert of a value into a table with
2+
# different types on master and slave. The file will insert the
3+
# result into the type_conversions table *on the slave* to get a
4+
# summary of failing and succeeding tests.
5+
6+
# Input:
7+
# $source_type Type on the master
8+
# $target_type Type on the slave
9+
# $source_value Value on the master (inserted into the table)
10+
# $target_value Value on the slave (expected value in the table
11+
# on the slave)
12+
# $can_convert True if conversion shall work, false if it
13+
# shall generate an error
14+
15+
16+
connection master;
17+
disable_warnings;
18+
DROP TABLE IF EXISTS t1;
19+
enable_warnings;
20+
eval CREATE TABLE t1 (a $source_type);
21+
sync_slave_with_master;
22+
eval ALTER TABLE t1 MODIFY a $target_type;
23+
24+
connection master;
25+
eval INSERT INTO t1 VALUES($source_value);
26+
if ($can_convert) {
27+
sync_slave_with_master;
28+
eval SELECT a = $target_value into @compare FROM t1;
29+
eval INSERT INTO type_conversions SET
30+
Source = "$source_type",
31+
Target = "$target_type",
32+
Flags = @@slave_type_conversions,
33+
On_Master = $source_value,
34+
Expected = $target_value,
35+
Compare = @compare;
36+
UPDATE type_conversions
37+
SET On_Slave = (SELECT a FROM t1)
38+
WHERE TestNo = LAST_INSERT_ID();
39+
}
40+
if (!$can_convert) {
41+
connection slave;
42+
wait_for_slave_to_stop;
43+
let $error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
44+
eval INSERT INTO type_conversions SET
45+
Source = "$source_type",
46+
Target = "$target_type",
47+
Flags = @@slave_type_conversions,
48+
On_Master = $source_value,
49+
Error = "$error";
50+
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
51+
START SLAVE;
52+
}

mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ sync_slave_with_master;
3636
STOP SLAVE;
3737
RESET SLAVE;
3838

39+
SET @saved_slave_type_conversions = @@slave_type_conversions;
40+
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
41+
3942
eval CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
4043
d FLOAT DEFAULT '2.00',
4144
e CHAR(4) DEFAULT 'TEST')
@@ -62,6 +65,8 @@ SELECT * FROM t1 ORDER BY a;
6265
sync_slave_with_master;
6366
SELECT * FROM t1 ORDER BY a;
6467

68+
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
69+
6570
--echo *** Drop t1 ***
6671
connection master;
6772
DROP TABLE t1;
@@ -509,7 +514,7 @@ sync_slave_with_master;
509514
--echo *** Create t11 on slave ***
510515
STOP SLAVE;
511516
RESET SLAVE;
512-
eval CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
517+
eval CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
513518
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
514519

515520
--echo *** Create t11 on Master ***

0 commit comments

Comments
 (0)