This is a code cleanup.
The implementation of a storage engine (subclasses of handler) is not supposed
to call my_error() directly inside the engine implementation,
but only return error codes, and report errors later at the demand
of the sql layer only (if needed), using handler::print_error().
This fix removes misplaced calls to my_error(),
and provide an implementation of print_error() instead.
Given that the sql layer implementation of create table, ha_create_table(),
does not use print_error() but returns ER_CANT_CREATE_TABLE directly,
the return code for create table statements using the performance schema
has changed to ER_CANT_CREATE_TABLE.
Adjusted the test suite accordingly.
Before this fix, the performance schema tables were defined in UPPERCASE.
This was incompatible with the lowercase_table_names option, and caused
issues with the install / upgrade process, when changing the lower case
table names setting *after* the install or upgrade.
With this fix, all performance schema tables are exposed with lowercase names.
As a result, the name of the performance schema table is always lowercase,
no matter how / if / when the lowercase_table_names setting if changed.
This change is to align the 5.5 performance_schema.THREADS
table definition with the 5.6 performance_schema.THREADS table,
to facilitate the 5.5 -> 5.6 migration later.
In the table performance_schema.THREADS:
- renamed ID to PROCESSLIST_ID, removed not null
- changed NAME from varchar(64) to varchar(128)
to match the columns definitions from 5.6
Adjusted the test cases accordingly.
Note: this fix is for 5.5 only, to null merge into 5.6
Implemented post review comments.
Added --force to the mysql_upgrade command in the test scripts,
so that the test output does not depends on whether other tests involving an
upgrade have been executed or not in the same test suite execution.
The reason for the bug above is unclear but
- Modify pfs_upgrade so that it's result is easier to analyze in case something fails
- Fix several minor weaknesses which could cause that a successing test (either an
already existing or a to be developed one) fails because of imperfect cleanup,
too slow disconnected sessions etc.
should either fix the bug or reduce it's probability or at least
make the analysis of failures easier.
mysql-test/suite/perfschema/include/upgrade_check.inc:
New include file which contains redundant stuff taken from pfs_upgrade.test.
Remove any file which might harm analysis of suspicious results.
mysql-test/suite/perfschema/r/query_cache.result:
Updated results
mysql-test/suite/perfschema/r/selects.result:
Updated results
mysql-test/suite/perfschema/t/bad_option_1.test:
Add the missing remove_file at beginning and end of test.
mysql-test/suite/perfschema/t/bad_option_2.test:
Add the missing remove_file at beginning and end of test.
mysql-test/suite/perfschema/t/global_read_lock.test:
Add a wait routine which ensures that the disconnect is really completed when the test ends.
mysql-test/suite/perfschema/t/pfs_upgrade.test:
- Move redundant actions to include/upgrade_check.inc
- Add preemptive removal of files
mysql-test/suite/perfschema/t/privilege.test:
Add a wait routine which ensures that the disconnect is really completed when the test ends.
mysql-test/suite/perfschema/t/query_cache.test:
Add "flush status" so that counters are reset. (./mtr --repeat=2 perfschema.query_cache failed)
mysql-test/suite/perfschema/t/read_only.test:
Add a wait routine which ensures that the disconnect is really completed when the test ends.
mysql-test/suite/perfschema/t/selects-master.opt:
Needed for running with enabled event-scheduler
mysql-test/suite/perfschema/t/selects.test:
- Correct the sub test for the EVENT scheduler
- Replace "sleep" by wait_routine
- Add premptive cleanups like "DROP ... IF EXISTS ..."