3862 Marc Alff 2010-04-20 [merge]
manual merge, mysql-next-mr-bugfixing --> mysql-6.0-codebase-bugfixing
modified:
mysql-test/suite/perfschema/r/tampered_perfschema_table1.result
mysql-test/suite/perfschema/t/tampered_perfschema_table1.test
mysql-test/t/events_1.test
mysql-test/t/sp-destruct.test
sql/event_db_repository.cc
sql/share/errmsg-utf8.txt
sql/sp.cc
sql/sql_show.cc
sql/table.cc
storage/perfschema/pfs_engine_table.cc
3861 Alfranio Correia 2010-04-19 [merge]
auto-merge mysql-6.0-codebase-bugfixing (local) --> mysql-6.0-codebase-bugfixing
added:
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result
mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test
mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test
mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test
modified:
mysql-test/extra/rpl_tests/rpl_mixing_engines.test
mysql-test/suite/binlog/r/binlog_multi_engine.result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_switch_inside_trans.result
mysql-test/suite/binlog/t/binlog_switch_inside_trans.test
mysql-test/suite/ndb_binlog/r/ndb_binlog_format.result
mysql-test/suite/rpl/r/rpl_concurrency_error.result
mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
mysql-test/suite/rpl/t/rpl_semi_sync.test
mysql-test/suite/rpl_ndb_big/r/rpl_ndb_mixed_engines_transactions.result
mysql-test/suite/rpl_ndb_big/t/rpl_ndb_mixed_engines_transactions.test
sql/log.cc
sql/share/errmsg-utf8.txt
sql/sql_class.cc
sql/sql_lex.cc
sql/sql_lex.h
sql/sys_vars.cc
=== modified file 'mysql-test/suite/perfschema/r/tampered_perfschema_table1.result'
--- a/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result 2010-01-12 01:48:52 +0000
+++ b/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result 2010-04-20 10:03:59 +0000
@@ -1,5 +1,5 @@
call mtr.add_suppression(
-"Column count of mysql.SETUP_INSTRUMENTS is wrong. "
+"Column count of performance_schema.SETUP_INSTRUMENTS is wrong. "
"Expected 4, found 3. The table is probably corrupted");
select * from performance_schema.SETUP_INSTRUMENTS limit 1;
ERROR HY000: Native table 'performance_schema'.'SETUP_INSTRUMENTS' has the wrong structure
=== modified file 'mysql-test/suite/perfschema/t/tampered_perfschema_table1.test'
--- a/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test 2010-01-12 01:48:52 +0000
+++ b/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test 2010-04-20 10:03:59 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 2010, 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
@@ -27,12 +27,8 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-# The message prints 'mysql.SETUP_INSTRUMENTS'
-# instead of 'performance_schema.SETUP_INSTRUMENTS',
-# due to Bug#46792
-
call mtr.add_suppression(
-"Column count of mysql.SETUP_INSTRUMENTS is wrong. "
+"Column count of performance_schema.SETUP_INSTRUMENTS is wrong. "
"Expected 4, found 3. The table is probably corrupted");
--error ER_WRONG_NATIVE_TABLE_STRUCTURE
=== modified file 'mysql-test/t/events_1.test'
--- a/mysql-test/t/events_1.test 2008-02-22 20:28:59 +0000
+++ b/mysql-test/t/events_1.test 2010-04-16 14:24:06 +0000
@@ -302,9 +302,9 @@ CREATE EVENT intact_check ON SCHEDULE EV
--echo expects to see event schema name there
--echo
ALTER TABLE mysql.event ADD dummy INT FIRST;
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SHOW EVENTS;
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SELECT event_name FROM INFORMATION_SCHEMA.events;
--error ER_EVENT_DOES_NOT_EXIST
SHOW CREATE EVENT intact_check;
@@ -341,15 +341,15 @@ INSERT INTO event_like SELECT * FROM mys
--echo
--echo
ALTER TABLE mysql.event DROP comment, DROP starts;
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SHOW EVENTS;
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SHOW CREATE EVENT intact_check;
--error ER_EVENT_DOES_NOT_EXIST
DROP EVENT no_such_event;
---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
--error ER_EVENT_DOES_NOT_EXIST
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
=== modified file 'mysql-test/t/sp-destruct.test'
--- a/mysql-test/t/sp-destruct.test 2010-03-03 09:24:53 +0000
+++ b/mysql-test/t/sp-destruct.test 2010-04-16 14:24:06 +0000
@@ -41,13 +41,13 @@ create trigger t1_ai after insert on t1
# Unsupported tampering with the mysql.proc definition
alter table mysql.proc drop type;
---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
call bug14233();
---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
create view v1 as select bug14233_f();
---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
insert into t1 values (0);
---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
show procedure status;
flush table mysql.proc;
@@ -186,12 +186,12 @@ SHOW PROCEDURE STATUS;
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
CREATE PROCEDURE p2()
SET @foo = 10;
--echo # Procedure loaded from the cache
CALL p1();
---error ER_CANNOT_LOAD_FROM_TABLE
+--error ER_CANNOT_LOAD_FROM_TABLE_V2
SHOW PROCEDURE STATUS;
DROP TABLE mysql.proc;
=== modified file 'sql/event_db_repository.cc'
--- a/sql/event_db_repository.cc 2010-04-09 08:22:10 +0000
+++ b/sql/event_db_repository.cc 2010-04-20 10:03:59 +0000
@@ -221,7 +221,8 @@ mysql_event_fill_row(THD *thd,
Safety: this can only happen if someone started the server
and then altered mysql.event.
*/
- my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED, MYF(0), table->alias,
+ my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2, MYF(0),
+ table->s->db.str, table->s->table_name.str,
(int) ET_FIELD_COUNT, table->s->fields);
DBUG_RETURN(TRUE);
}
@@ -416,7 +417,7 @@ Event_db_repository::index_read_for_db_f
key_info->key_part[0].field != event_table->field[ET_FIELD_DB])
{
/* Corrupted table: no index or index on a wrong column */
- my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event");
+ my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "event");
ret= 1;
goto end;
}
@@ -1025,7 +1026,7 @@ Event_db_repository::load_named_event(TH
if ((ret= find_named_event(dbname, name, table)))
my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str);
else if ((ret= etn->load_from_row(thd, table)))
- my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event");
+ my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "event");
close_thread_tables(thd);
}
=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt 2010-04-19 15:35:00 +0000
+++ b/sql/share/errmsg-utf8.txt 2010-04-20 10:03:59 +0000
@@ -5907,12 +5907,17 @@ ER_EVENT_OPEN_TABLE_FAILED
ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
eng "No datetime expression provided"
ger "Kein DATETIME-Ausdruck angegeben"
-ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
+
+# OBSOLETE, USE ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
+ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED
eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted"
ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt"
-ER_CANNOT_LOAD_FROM_TABLE
+
+# OBSOLETE, USE ER_CANNOT_LOAD_FROM_TABLE_V2
+ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE
eng "Cannot load from mysql.%s. The table is probably corrupted"
ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt"
+
ER_EVENT_CANNOT_DELETE
eng "Failed to delete the event from mysql.event"
ger "Löschen des Events aus mysql.event fehlgeschlagen"
@@ -6671,3 +6676,12 @@ ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SE
ER_BINLOG_UNSAFE_MIXED_STATEMENT
eng "Statements that read from both transactional and non-transactional tables and write to any of them are unsafe."
+
+ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
+ eng "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted"
+ ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt"
+
+ER_CANNOT_LOAD_FROM_TABLE_V2
+ eng "Cannot load from %s.%s. The table is probably corrupted"
+ ger "Kann %s.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt"
+
=== modified file 'sql/sp.cc'
--- a/sql/sp.cc 2010-04-09 08:22:10 +0000
+++ b/sql/sp.cc 2010-04-20 10:03:59 +0000
@@ -381,7 +381,7 @@ void Proc_table_intact::report_error(uin
if (code)
my_message(code, buf, MYF(0));
else
- my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "proc");
+ my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "proc");
if (m_print_once)
{
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2010-04-19 08:28:27 +0000
+++ b/sql/sql_show.cc 2010-04-20 10:03:59 +0000
@@ -5898,7 +5898,7 @@ copy_event_to_schema_table(THD *thd, TAB
if (et.load_from_row(thd, event_table))
{
- my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), event_table->alias);
+ my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "event");
DBUG_RETURN(1);
}
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2010-04-10 09:11:47 +0000
+++ b/sql/table.cc 2010-04-20 10:03:59 +0000
@@ -2971,8 +2971,9 @@ Table_check_intact::check(TABLE *table,
}
else if (MYSQL_VERSION_ID == table->s->mysql_version)
{
- report_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED,
- ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED), table->alias,
+ report_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2,
+ ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2),
+ table->s->db.str, table->s->table_name.str,
table_def->count, table->s->fields);
DBUG_RETURN(TRUE);
}
=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc 2010-04-08 10:50:40 +0000
+++ b/storage/perfschema/pfs_engine_table.cc 2010-04-20 10:03:59 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2008, 2010, 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
@@ -21,8 +21,6 @@
#include "my_global.h"
#include "sql_priv.h"
#include "pfs_engine_table.h"
-#include "sql_base.h"
-#include "lock.h"
#include "table_events_waits.h"
#include "table_setup_consumers.h"
@@ -40,6 +38,9 @@
#include "pfs_column_values.h"
#include "pfs_instr.h"
+#include "sql_base.h" // close_thread_tables
+#include "lock.h" // MYSQL_LOCK_IGNORE_TIMEOUT
+
/**
@addtogroup Performance_schema_engine
@{
@@ -108,7 +109,12 @@ void PFS_check_intact::report_error(uint
my_vsnprintf(buff, sizeof(buff), fmt, args);
va_end(args);
- my_message(code, buff, MYF(0));
+ /*
+ This is an install/upgrade issue:
+ - do not report it in the user connection, there is none in main(),
+ - report it in the server error log.
+ */
+ sql_print_error("%s", buff);
}
/**
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100420100359-flodcsrocnjfogvr.bundle
| Thread |
|---|
| • bzr push into mysql-6.0-codebase-bugfixing branch (marc.alff:3861 to3862) | Marc Alff | 20 Apr |