Skip to content

Commit d78e5ff

Browse files
author
Mats Kindahl
committed
Merging with mysql.5.1-rep+2
2 parents 3f607c4 + 013cc66 commit d78e5ff

File tree

234 files changed

+5898
-1586
lines changed

Some content is hidden

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

234 files changed

+5898
-1586
lines changed

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/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/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/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

mysql-test/extra/rpl_tests/rpl_stm_000001.test

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
-- source include/have_binlog_format_mixed_or_statement.inc
1+
# Requires binlog_format=statement format since query involving
2+
# get_lock() is logged in row format if binlog_format=mixed or row.
3+
-- source include/have_binlog_format_statement.inc
24
-- source include/master-slave.inc
35

6+
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
7+
8+
# Load some data into t1
49
create table t1 (word char(20) not null);
510
load data infile '../../std_data/words.dat' into table t1;
611
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
@@ -10,9 +15,7 @@ select * from t1 limit 10;
1015
#
1116
# Test slave with wrong password
1217
#
13-
save_master_pos;
14-
connection slave;
15-
sync_with_master;
18+
sync_slave_with_master;
1619
stop slave;
1720
connection master;
1821
set password for root@"localhost" = password('foo');
@@ -29,16 +32,12 @@ sleep 2;
2932

3033
create table t3(n int);
3134
insert into t3 values(1),(2);
32-
save_master_pos;
33-
connection slave;
34-
sync_with_master;
35+
sync_slave_with_master;
3536
select * from t3;
3637
select sum(length(word)) from t1;
3738
connection master;
3839
drop table t1,t3;
39-
save_master_pos;
40-
connection slave;
41-
sync_with_master;
40+
sync_slave_with_master;
4241

4342
# Test if the slave SQL thread can be more than 16K behind the slave
4443
# I/O thread (> IO_SIZE)
@@ -77,12 +76,13 @@ unlock tables;
7776
connection master;
7877
create table t2(id int);
7978
insert into t2 values(connection_id());
80-
save_master_pos;
8179

8280
connection master1;
8381
# Avoid generating result
8482
create temporary table t3(n int);
83+
--disable_warnings
8584
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
85+
--enable_warnings
8686

8787
connection master;
8888
send update t1 set n = n + get_lock('crash_lock%20C', 2);
@@ -93,8 +93,11 @@ kill @id;
9393
# We don't drop t3 as this is a temporary table
9494
drop table t2;
9595
connection master;
96+
# The get_lock function causes warning for unsafe statement.
97+
--disable_warnings
9698
--error 1317,2013
9799
reap;
100+
--enable_warnings
98101
connection slave;
99102
# The SQL slave thread should now have stopped because the query was killed on
100103
# the master (so it has a non-zero error code in the binlog).
@@ -117,16 +120,12 @@ insert into mysql.user (Host, User, Password)
117120
select select_priv,user from mysql.user where user = _binary'blafasel2';
118121
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
119122
select select_priv,user from mysql.user where user = _binary'blafasel2';
120-
save_master_pos;
121-
connection slave;
122-
sync_with_master;
123+
sync_slave_with_master;
123124
select n from t1;
124125
select select_priv,user from mysql.user where user = _binary'blafasel2';
125126
connection master1;
126127
drop table t1;
127128
delete from mysql.user where user="blafasel2";
128-
save_master_pos;
129-
connection slave;
130-
sync_with_master;
129+
sync_slave_with_master;
131130

132131
# End of 4.1 tests

mysql-test/include/mtr_warnings.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ INSERT INTO global_suppressions VALUES
175175
("Can't find file: '.\\\\test\\\\\\?{8}.frm'"),
176176
("Slave: Unknown table 't1' Error_code: 1051"),
177177

178+
/*
179+
Transient network failures that cause warnings on reconnect.
180+
BUG#47743 and BUG#47983.
181+
*/
182+
("Slave I/O: Get master SERVER_ID failed with error:.*"),
183+
("Slave I/O: Get master clock failed with error:.*"),
184+
("Slave I/O: Get master COLLATION_SERVER failed with error:.*"),
185+
("Slave I/O: Get master TIME_ZONE failed with error:.*"),
186+
178187
("THE_LAST_SUPPRESSION")||
179188

180189

mysql-test/lib/mtr_cases.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ sub collect_one_suite($)
520520
next if ($test->{'name'} eq 'sys_vars.innodb_thread_concurrency_basic');
521521
# Can't work with InnoPlug. Test framework needs to be re-designed.
522522
next if ($test->{'name'} eq 'main.innodb_bug46000');
523+
# Fails with innodb plugin
524+
next if ($test->{'name'} eq 'main.innodb-autoinc');
525+
# Fails with innodb plugin: r6185 Testcases changes not included
526+
next if ($test->{'name'} eq 'main.innodb_bug44369');
523527
# Copy test options
524528
my $new_test= My::Test->new();
525529
while (my ($key, $value) = each(%$test))

mysql-test/r/archive.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12717,3 +12717,14 @@ COUNT(t1.a)
1271712717
729
1271812718
DROP TABLE t1;
1271912719
SET @@join_buffer_size= @save_join_buffer_size;
12720+
SHOW CREATE TABLE t1;
12721+
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
12722+
SELECT * FROM t1;
12723+
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
12724+
INSERT INTO t1 (col1, col2) VALUES (1, "value");
12725+
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
12726+
REPAIR TABLE t1;
12727+
Table Op Msg_type Msg_text
12728+
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
12729+
test.t1 repair error Corrupt
12730+
DROP TABLE t1;

mysql-test/r/bug47671.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Bug#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
3+
#
4+
# Extract only charset information from 'status' command output using regex
5+
--------------
6+
7+
Server characterset: utf8
8+
Db characterset: utf8
9+
Client characterset: utf8
10+
Conn. characterset: utf8
11+
12+
--------------
13+

0 commit comments

Comments
 (0)