3341 Marc Alff 2012-01-09 [merge]
Merge mysql-trunk --> mysql-trunk-wl5259
modified:
mysql-test/r/myisampack.result
mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
mysql-test/suite/engines/funcs/r/tc_rename_error.result
mysql-test/suite/perfschema/r/misc.result
mysql-test/suite/perfschema/t/misc.test
mysql-test/t/myisampack.test
sql/sql_db.cc
storage/perfschema/pfs.cc
3340 Marc Alff 2012-01-09
Work in progress
modified:
sql/hostname.cc
sql/sql_connect.cc
3339 Marc Alff 2012-01-06 [merge]
Merge mysql-trunk --> mysql-trunk-wl5259
modified:
include/mysql/psi/mysql_socket.h
include/mysql/psi/mysql_table.h
include/mysql/psi/mysql_thread.h
include/mysql/psi/psi.h
include/mysql/psi/psi_abi_v0.h.pp
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
mysql-test/collections/default.experimental
mysql-test/include/show_slave_status.inc
mysql-test/r/distinct.result
mysql-test/r/group_by.result
mysql-test/r/having.result
mysql-test/r/innodb_explain_non_select_all.result
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp_all.result
mysql-test/r/innodb_icp_none.result
mysql-test/r/innodb_mrr_all.result
mysql-test/r/innodb_mrr_cost_all.result
mysql-test/r/join.result
mysql-test/r/join_outer.result
mysql-test/r/join_outer_bka.result
mysql-test/r/join_outer_bka_nixbnl.result
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp_all.result
mysql-test/r/myisam_icp_none.result
mysql-test/r/select_all_bka.result
mysql-test/r/select_all_bka_nixbnl.result
mysql-test/suite/opt_trace/include/general2.inc
mysql-test/suite/opt_trace/r/general2_no_prot.result
mysql-test/suite/opt_trace/r/general2_ps_prot.result
mysql-test/suite/opt_trace/r/temp_table.result
mysql-test/suite/perfschema/r/dml_handler.result
mysql-test/suite/perfschema/r/innodb_table_io.result
mysql-test/suite/perfschema/r/misc.result
mysql-test/suite/perfschema/r/temp_table_io.result
mysql-test/suite/perfschema/t/dml_handler.test
mysql-test/suite/perfschema/t/misc.test
mysql-test/suite/rpl/r/rpl_log_pos.result
mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
mysql-test/suite/rpl/t/rpl_log_pos.test
mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
mysql-test/t/distinct.test
mysql-test/t/group_by.test
mysql-test/t/having.test
mysql-test/t/join.test
mysql-test/t/join_outer.test
mysys/psi_noop.c
sql/field.cc
sql/field.h
sql/field_conv.cc
sql/handler.cc
sql/item_sum.cc
sql/opt_sum.cc
sql/rpl_slave.cc
sql/sql_base.cc
sql/sql_executor.cc
sql/sql_lex.cc
sql/sql_optimizer.cc
sql/sql_parse.cc
sql/sql_planner.cc
sql/sql_select.cc
sql/sql_table.cc
sql/sql_tmp_table.cc
sql/table.cc
sql/table.h
storage/innobase/include/os0sync.ic
storage/innobase/include/sync0rw.ic
storage/innobase/include/sync0sync.ic
storage/myisam/mi_create.c
storage/perfschema/pfs.cc
storage/perfschema/pfs_instr.cc
storage/perfschema/pfs_instr.h
storage/perfschema/pfs_instr_class.cc
storage/perfschema/pfs_server.cc
storage/perfschema/pfs_stat.h
storage/perfschema/table_events_waits.cc
storage/perfschema/unittest/pfs-t.cc
unittest/gunit/bounded_queue-t.cc
unittest/gunit/bounds_checked_array-t.cc
unittest/gunit/cost_estimate-t.cc
unittest/gunit/dbug-t.cc
unittest/gunit/dynarray-t.cc
unittest/gunit/field-t.cc
unittest/gunit/filesort_buffer-t.cc
unittest/gunit/get_diagnostics-t.cc
unittest/gunit/gunit_test_main.cc
unittest/gunit/item-t.cc
unittest/gunit/mdl-t.cc
unittest/gunit/mdl_mytap-t.cc
unittest/gunit/my_regex-t.cc
unittest/gunit/opt_range-t.cc
unittest/gunit/opt_trace-t.cc
unittest/gunit/sql_list-t.cc
unittest/gunit/sql_plist-t.cc
unittest/gunit/stdcxx-t.cc
unittest/gunit/tap_event_listener.cc
unittest/gunit/test_utils.cc
unittest/gunit/thread_utils-t.cc
unittest/gunit/thread_utils.cc
=== modified file 'mysql-test/r/myisampack.result'
--- a/mysql-test/r/myisampack.result 2011-11-28 07:42:18 +0000
+++ b/mysql-test/r/myisampack.result 2012-01-09 07:26:17 +0000
@@ -150,3 +150,10 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
+#
+# BUG#11751736: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM
+# DATABASE DIRECTORY
+#
+CREATE DATABASE db1;
+CREATE TABLE db1.t1(c1 INT) ENGINE=MyISAM;
+DROP DATABASE db1;
=== modified file 'mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result 2010-08-10 11:58:46 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result 2012-01-06 10:28:00 +0000
@@ -54,13 +54,13 @@ USE test;
#
SET @old_log_warnings = @@log_warnings;
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
DROP TABLE t1;
=== modified file 'mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test'
--- a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test 2010-11-17 10:23:22 +0000
+++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test 2012-01-06 10:28:00 +0000
@@ -102,16 +102,24 @@ eval USE $old_db;
--echo # Bug#46265: Can not disable warning about unsafe statements for binary logging
--echo #
+let BINLOG_COUNTER1= `select CONVERT(NOW(),UNSIGNED) as timestmap from dual`;
+
SET @old_log_warnings = @@log_warnings;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
+
SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+# Replacing the result file content here.
+# Instead of writing $BINLOG_COUNTER1 value to result file,
+# writing a fixed string timestamp to it.
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
DROP TABLE t1;
SET GLOBAL log_warnings = @old_log_warnings;
@@ -133,13 +141,14 @@ perl;
use strict;
my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
- my $count = () = grep(/Bug#46265/g,<FILE>);
+ my $binlog_counter= $ENV{'BINLOG_COUNTER1'} or die "BINLOG_COUNTER1 not set";
+ my $count = () = grep(/$binlog_counter/g,<FILE>);
+ # Grep the timestamp value from the error file.
print "Occurrences: $count\n";
close(FILE);
EOF
# bug#50192: diplaying the unsafe warning comes out to the user warning stack
-
-- disable_warnings
DROP TABLE IF EXISTS t1, t2;
-- enable_warnings
=== modified file 'mysql-test/suite/engines/funcs/r/tc_rename_error.result'
--- a/mysql-test/suite/engines/funcs/r/tc_rename_error.result 2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/r/tc_rename_error.result 2012-01-06 11:49:46 +0000
@@ -15,7 +15,7 @@ ERROR 42S01: Table 't1' already exists
RENAME TABLE t3 TO t1;
ERROR 42S01: Table 't1' already exists
RENAME TABLE t3 TO doesnotexist.t1;
-ERROR HY000: Can't find file: './test/t3.frm' (errno: 2)
+ERROR HY000: Can't find file: './test/t3.frm' (errno: 2 - No such file or directory)
SHOW TABLES;
Tables_in_test
t1
=== modified file 'mysql-test/suite/perfschema/r/misc.result'
--- a/mysql-test/suite/perfschema/r/misc.result 2012-01-04 18:29:43 +0000
+++ b/mysql-test/suite/perfschema/r/misc.result 2012-01-06 15:54:45 +0000
@@ -19,6 +19,21 @@ DROP TABLE test.t_after;
SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
WHERE object_schema='test';
object_schema object_name
+CREATE TABLE test.t1(a INT);
+INSERT INTO test.t1 VALUES (1);
+CREATE VIEW test.v1 AS SELECT * FROM test.t1;
+SELECT COUNT(*) FROM test.v1;
+COUNT(*)
+1
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+test t1
+DROP VIEW test.v1;
+DROP TABLE test.t1;
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE THREAD_ID IN
(SELECT THREAD_ID FROM performance_schema.threads)
=== modified file 'mysql-test/suite/perfschema/t/misc.test'
--- a/mysql-test/suite/perfschema/t/misc.test 2012-01-04 18:29:43 +0000
+++ b/mysql-test/suite/perfschema/t/misc.test 2012-01-06 15:54:45 +0000
@@ -39,6 +39,26 @@ SELECT object_schema, object_name FROM p
WHERE object_schema='test';
#
+# Verify table views are ignored by the table io instrumentation.
+#
+
+CREATE TABLE test.t1(a INT);
+INSERT INTO test.t1 VALUES (1);
+CREATE VIEW test.v1 AS SELECT * FROM test.t1;
+SELECT COUNT(*) FROM test.v1;
+
+# Verify that a PFS table share was not created for the view.
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+ WHERE object_schema='test';
+
+DROP VIEW test.v1;
+DROP TABLE test.t1;
+
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+ WHERE object_schema='test';
+
+
+#
# Bug#45496 Performance schema: assertion fails in
# ha_perfschema::rnd_init:223
#
=== modified file 'mysql-test/t/myisampack.test'
--- a/mysql-test/t/myisampack.test 2011-09-16 12:21:05 +0000
+++ b/mysql-test/t/myisampack.test 2012-01-09 07:26:17 +0000
@@ -265,3 +265,15 @@ FLUSH TABLE t1;
--exec $MYISAMCHK -soq $MYSQLD_DATADIR/test/t1
CHECK TABLE t1;
DROP TABLE t1;
+
+--echo #
+--echo # BUG#11751736: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM
+--echo # DATABASE DIRECTORY
+--echo #
+CREATE DATABASE db1;
+CREATE TABLE db1.t1(c1 INT) ENGINE=MyISAM;
+## Added -f to force pack db in any case regardless the size of database
+## being packed
+let $MYSQLD_DATADIR = `SELECT @@datadir`;
+--exec $MYISAMPACK -b -f $MYSQLD_DATADIR/db1/t1
+DROP DATABASE db1;
=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc 2012-01-06 09:52:43 +0000
+++ b/sql/hostname.cc 2012-01-09 09:07:34 +0000
@@ -395,6 +395,27 @@ bool ip_to_hostname(struct sockaddr_stor
err_code= vio_getnameinfo(ip, hostname_buffer, NI_MAXHOST, NULL, 0,
NI_NAMEREQD);
+ DBUG_EXECUTE_IF("getnameinfo_error_noname",
+ {
+ strcpy(hostname_buffer, "<garbage>");
+ err_code= EAI_NONAME;
+ }
+ );
+
+ DBUG_EXECUTE_IF("getnameinfo_error_again",
+ {
+ strcpy(hostname_buffer, "<garbage>");
+ err_code= EAI_AGAIN;
+ }
+ );
+
+ DBUG_EXECUTE_IF("getnameinfo_fake_ipv4",
+ {
+ strcpy(hostname_buffer, "santa.claus.ipv4.example.com");
+ err_code= 0;
+ }
+ );
+
if (err_code)
{
// NOTE: gai_strerror() returns a string ending by a dot.
=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc 2012-01-06 09:52:43 +0000
+++ b/sql/sql_connect.cc 2012-01-09 09:07:34 +0000
@@ -480,8 +480,9 @@ static int check_connection(THD *thd)
struct sockaddr *sa= (sockaddr *) &net->vio->remote;
sa->sa_family= AF_INET;
struct in_addr *ip4= &((struct sockaddr_in *) sa)->sin_addr;
- ip4->s_addr= htonl(0xC0000200); /* 192.0.2.0 */
- strcpy(ip, "santa.claus.ipv4.example.com");
+ ip4->s_addr= htonl(0xC0000204); /* ipv4 192.0.2.4 */
+ strcpy(ip, "192.0.2.4");
+ peer_rc= 0;
}
);
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2011-11-28 07:13:03 +0000
+++ b/sql/sql_db.cc 2012-01-09 07:26:17 +0000
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -45,7 +45,7 @@
#define MAX_DROP_TABLE_Q_LEN 1024
-const char *del_exts[]= {".frm", ".BAK", ".TMD",".opt", NullS};
+const char *del_exts[]= {".frm", ".BAK", ".TMD", ".opt", ".OLD", NullS};
static TYPELIB deletable_extentions=
{array_elements(del_exts)-1,"del_exts", del_exts, NULL};
=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc 2012-01-06 09:03:53 +0000
+++ b/storage/perfschema/pfs.cc 2012-01-06 15:25:14 +0000
@@ -1479,8 +1479,8 @@ static void destroy_cond_v1(PSI_cond* co
static PSI_table_share*
get_table_share_v1(my_bool temporary, TABLE_SHARE *share)
{
- /* Ignore temporary tables. */
- if (temporary)
+ /* Ignore temporary tables and views. */
+ if (temporary || share->is_view)
return NULL;
/* An instrumented thread is required, for LF_PINS. */
PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-wl5259 branch (marc.alff:3339 to 3341) | Marc Alff | 9 Jan |