Commit graph

3959 commits

Author SHA1 Message Date
Michael Widenius
2534521f9a Fixed some merge issues:
- temporary tables now works
- mysql-system_tables updated to not use temporary tables
- PASSWORD() function fixed
- Support for STATS_AUTO_RECALC, STATS_PERSISTENT and STATS_SAMPLE_PAGES table options
2013-06-18 02:01:34 +03:00
unknown
0b7f8ed973 Debugging output fixed to make finding executing commands easy.
Error processing in mysql_create_table() fixed.
2013-06-17 13:34:54 +03:00
Sergei Golubchik
8bc6aed491 plugin_hton helper 2013-06-15 19:09:47 +02:00
Sergei Golubchik
68a6705ed1 MDEV-4441 DROP DATABASE with a newly created ARCHIVE table does not work
1. DROP DATABASE should use ha_discover_table_names(), not look at .frm files.
2. filename_to_tablename() also encodes temp file names #sql- -> #mysql50##sql
3. no special treatment for #sql- files, no TABLE_LIST::internal_tmp_table
4. discover also table file names, that start from #
2013-06-15 19:09:31 +02:00
Michael Widenius
5f1f2fc0e4 Applied all changes from Igor and Sanja 2013-06-15 18:32:08 +03:00
Tor Didriksen
45f739bd9d Bug#14834378 ADDRESSSANITIZER BUG IN FILENAME_TO_TABLENAME
Backport to 5.5


sql/sql_table.cc:
  gcc asan crashes in filename_to_tablename() on this: memcmp("-@", "#sql", 4)
  during loading of the innobase plugin
2013-06-14 16:38:27 +02:00
Tor Didriksen
82d9c8e8d9 Bug#14834378 ADDRESSSANITIZER BUG IN FILENAME_TO_TABLENAME
Backport to 5.5
2013-06-14 16:38:27 +02:00
Sivert Sorumgard
c8fc3db1b0 Bug #14227431: CHARACTER SET MISMATCH WHEN ALTERING FOREIGN KEYS
CAN LEAD TO MISSING TABLES

Overview
--------
If the FOREIGN_KEY_CHECKS system variable is set to 0, it is
possible to break a foreign key constraint by changing the type
or character set of the foreign key column, or by dropping the
foreign key index (without carrying out corresponding changes on
another table in the relationship).

If we subsequently set FOREIGN_KEY_CHECKS to 1 and execute ALTER
TABLE involving the COPY algorithm on such a table, the following
happens:

1) If ALTER TABLE does not contain a RENAME clause, the attempt 
   to install the new version of the table instead of the old one
   will fail due to the fact that the inconsistency will be 
   detected. An attempt to revert the partially executed alter 
   table operation by restoring the old table definition will 
   fail as well due to FOREIGN_KEY_CHECKS == 1. As a result, the 
   table being altered will be lost.
2) If ALTER TABLE contains the RENAME clause, the inconsistency 
   will not be detected (most probably due to other bugs). But if
   an attempt to install the new version of the table fails (for 
   example, due to a failure when updating triggers associated 
   with the table), reverting the partially executed alter table 
   by restoring the old table definition will fail too. So the 
   table being altered might be lost as well.


Suggested fix
-------------
The suggested fix is to temporarily unset the option bit
representing FOREIGN_KEY_CHECKS when the old table definition is
restored while reverting the partially executed operation.
2013-06-12 09:35:33 +02:00
Sivert Sorumgard
e7d8f19bc1 Bug #14227431: CHARACTER SET MISMATCH WHEN ALTERING FOREIGN KEYS
CAN LEAD TO MISSING TABLES

Overview
--------
If the FOREIGN_KEY_CHECKS system variable is set to 0, it is
possible to break a foreign key constraint by changing the type
or character set of the foreign key column, or by dropping the
foreign key index (without carrying out corresponding changes on
another table in the relationship).

If we subsequently set FOREIGN_KEY_CHECKS to 1 and execute ALTER
TABLE involving the COPY algorithm on such a table, the following
happens:

1) If ALTER TABLE does not contain a RENAME clause, the attempt 
   to install the new version of the table instead of the old one
   will fail due to the fact that the inconsistency will be 
   detected. An attempt to revert the partially executed alter 
   table operation by restoring the old table definition will 
   fail as well due to FOREIGN_KEY_CHECKS == 1. As a result, the 
   table being altered will be lost.
2) If ALTER TABLE contains the RENAME clause, the inconsistency 
   will not be detected (most probably due to other bugs). But if
   an attempt to install the new version of the table fails (for 
   example, due to a failure when updating triggers associated 
   with the table), reverting the partially executed alter table 
   by restoring the old table definition will fail too. So the 
   table being altered might be lost as well.


Suggested fix
-------------
The suggested fix is to temporarily unset the option bit
representing FOREIGN_KEY_CHECKS when the old table definition is
restored while reverting the partially executed operation.
2013-06-12 09:35:33 +02:00
Sergei Golubchik
6625fad8ca MDEV-4564 ALTER on a temporary table generates an audit event 2013-06-07 10:02:50 +02:00
Sergei Golubchik
72ba95873a 10.0-base merge
(without InnoDB - all InnoDB changes were ignored)
2013-06-06 21:32:29 +02:00
Sergei Golubchik
4749d40c63 5.5 merge 2013-06-06 17:51:28 +02:00
Michael Widenius
3143ad589a Push a lot of small fixes to get larger parts to compile 2013-05-21 22:00:08 +03:00
Sergei Golubchik
b381cf843c mysql-5.5.31 merge 2013-05-07 13:05:09 +02:00
Sergei Golubchik
337c1b3ee8 fix plugin locking/unlocking when assisted discovery fails 2013-04-19 20:35:37 +02:00
Sergei Golubchik
45912599ca 10.0 merge 2013-04-19 20:35:04 +02:00
Sergei Golubchik
b9b3d5330a MDEV-260 auditing table accesses 2013-04-19 12:50:16 +02:00
Sergei Golubchik
f398ced7f0 don't compare table names to detect temporary tables
(also fixes a bug with unaccounted table names like #sql-123,
see drop and alter_table tests)
2013-04-16 18:25:36 +02:00
Sergei Golubchik
1035a16a73 remove a sleep from the test 2013-04-16 17:14:26 +02:00
Sergei Golubchik
821db3801d remove numerous #ifdef HAVE_PSI_TABLE_INTERFACE
simplify ha_table_share_psi()
2013-04-15 18:47:47 +02:00
Sergei Golubchik
a9035be5b7 10.0-base merge 2013-04-15 15:09:22 +02:00
Alexey Botchkov
d8dccde6df MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
Syntax modified to allow statements:
               ALTER TABLE ADD/DROP COLUMN
               ALTER TABLE ADD/DROP INDEX
               ALTER TABLE ADD/DROP FOREIGN KEY
               ALTER TABLE ADD/DROP PARTITION
               ALTER TABLE CHANGE COLUMN
               ALTER TABLE MODIFY COLUMN
               DROP INDEX
         to have IF (NOT) EXISTS options.
         Appropriate implementations added to mysql_alter_table().
      
      per-file comments:
        mysql-test/r/alter_table.result
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              test result updated.
        mysql-test/r/fulltext.result
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
        mysql-test/r/partition.result
              test result updated.
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
        mysql-test/t/alter_table.test
              tests added.
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
        mysql-test/t/fulltext.test
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              tests added.
        mysql-test/t/partition.test
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              tests added.
        sql/field.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              create_if_not_exists field added.
        sql/field.h
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              create_if_not_exists field added.
        sql/partition_info.h
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              has_unique_name made public.
        sql/sp_head.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
        sql/sql_class.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              create_if_not_exists inited.
        sql/sql_class.h
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              create_if_not_exists inited.
        sql/sql_lex.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              check_exists inited.
        sql/sql_lex.h
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              check_exists inited.
        sql/sql_parse.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
        check_exists inited.
        sql/sql_table.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              handle_if_exists_options() added.
              it's called in mysql_alter_table().
        sql/sql_trigger.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              check_exists instead of drop_if_exists.
        sql/sql_view.cc
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              check_exists instead of drop_if_exists.
        sql/sql_yacc.yy
      MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
              sintax modified.
2013-04-13 11:59:16 +05:00
Sergei Golubchik
5f293dd694 MDEV-4022 table attributes with sysvar as a default value 2013-04-09 23:27:24 +02:00
Sergei Golubchik
3ad01d00f2 error messages: name the storage engine explicitly,
instead of "used storage engine" and similar changes.
2013-04-09 23:27:07 +02:00
Sergei Golubchik
ffbd15eb32 post-review comments and other minor edits 2013-04-09 16:20:59 +02:00
Sergei Golubchik
050d7d6d75 optimize discovery for cases when the storage engine is known in advance 2013-04-09 16:20:48 +02:00
Sergei Golubchik
32ee15d851 Assisted discovery 2013-04-09 16:19:14 +02:00
Sergei Golubchik
db7809e817 dead code, remove unused argument 2013-04-09 16:19:05 +02:00
Sergei Golubchik
a53200d4e7 remove HA_CREATE_INFO::frm_only - it's internal server flag,
not part of the SE API, and, again, mutually exclusive with
C_ORDINARY_CREATE and C_CREATE_SELECT.
2013-04-09 16:19:01 +02:00
Sergei Golubchik
0c4cf3c7e5 small cleanup 2013-04-09 16:18:56 +02:00
Sergei Golubchik
e71cda83c6 cleanup: merge two mutually dependent function arguments into one,
eliminating reduncancy and a possibility of setting them to a pair of
invalid values.
2013-04-09 16:18:44 +02:00
Sergei Golubchik
336da6e270 cleanup 2013-04-09 16:18:37 +02:00
Sergei Golubchik
2d788ff5ca test_sql_discovery storage engine
use it to test main test cases with need_full_discover_for_existence > 0
2013-04-09 16:07:35 +02:00
Sergei Golubchik
4853c7192d discovery using sql CREATE TABLE statement 2013-04-09 16:07:17 +02:00
Sergei Golubchik
e06cb31719 CREATE TABLE and frm-less discovering engines.
Now CREATE TABLE does not write the frm file on disk,
if the engine can discover it
2013-04-09 15:57:09 +02:00
Sergei Golubchik
b3e70c4ae7 split mysql_create_frm() in create_frm_image() and writefrm() 2013-04-09 15:56:59 +02:00
Sergei Golubchik
cdc01e29d3 remove dd_frm_type(), dd_frm_storage_engine(), dd_check_storage_engine_flag()
from everywhere - now RENAME, SHOW FULL TABLES, and TRUNCATE work with discovery.
improve error messages in truncate
2013-04-09 15:50:30 +02:00
Sergei Golubchik
07b2523918 rename a handler method to more precisely reflect what kind of a hack it does 2013-04-09 15:49:13 +02:00
Sergei Golubchik
a489ae89b9 fix mysql_rm_table_no_locks() not to use dd_frm_type, because the frm file
may not exist (the table exists only in the engine).
2013-04-09 15:47:25 +02:00
Sergei Golubchik
e5a323e107 single table discovery: handlerton::discover_table() method.
fixes for need_full_discover_for_existence mode
2013-04-09 15:45:31 +02:00
Sergei Golubchik
6a839ff40d handlerton::discover_table_existence() method 2013-04-09 15:35:57 +02:00
Sergei Golubchik
b0a5dd73fa * remove ha_check_if_table_exists() and get_table_share_with_discover().
* rename check_if_table_exists() -> table_exists() and remove unneeded arguments
2013-04-09 15:35:15 +02:00
Sergei Golubchik
87a9d60ec6 revert
"
  revision-id: sanja@askmonty.org-20110511110948-4kdevwzomvk56y1w
  committer: sanja@askmonty.org
  branch nick: work-maria-5.1-CREATE-merge
  timestamp: Wed 2011-05-11 14:09:48 +0300
    Bugfix: New table creation/renaming block added if old encoded table present
"
the old behavior was less inconsistent than the new one.
In the new one the error message was sometimes different (under LOCK TABLES e.g.),
and there were race conditions (if this CREATE happened when a concurrent ALTER
has renamed the old table away but haven't put the new table in place)

The old one was like "(when using old table names) for DML #mysql50# prefix
is optional, for DDL it's required".
2013-04-09 15:35:07 +02:00
Sergei Golubchik
163882665e * don't use 1-8 numbers for open_table_error codes, use an enum.
* print "table doesn't exist in engine" when a table doesn't exist in the engine,
  instead of "file not found" (if no file was involved)
* print a complete filename that cannot be found ('t1.MYI', not 't1')
* it's not an error for a DROP if a table doesn't exist in the engine (or some table
  files cannot be found) - if the DROP succeeded regardless
2013-04-09 15:34:17 +02:00
Sergei Golubchik
5ad68a0d2f don't use I_S constants for open_table_def and get_table_share,
have a specially defined enum with clearly named values
2013-04-09 15:34:09 +02:00
Sergei Golubchik
09ece94fac remove handlerton::find_files (new implementation is coming),
and handlerton::table_exists_in_engine (new implementation is coming),
and handlerton::license (redundant)
2013-04-07 15:57:38 +02:00
Sergei Golubchik
028ce66c9e simplify test case 2013-04-07 15:36:37 +02:00
Alexander Barkov
73d39bba95 Merge from the latest mariadb-10.0.
added:
  include/mysql/service_kill_statement.h
  libmysql/libmysql_rpm_version.in
  libmysql/rpm_support.cc
  libservices/kill_statement_service.c
  mysql-test/include/ctype_heap.inc
  mysql-test/include/ctype_strtoll10.inc
  mysql-test/r/change_user_notembedded.result
  mysql-test/r/create_delayed.result
  mysql-test/r/ctype_utf16le.result
  mysql-test/r/failed_auth_3909.result
  mysql-test/r/gis2.result
  mysql-test/r/grant_lowercase.result
  mysql-test/r/group_by_innodb.result
  mysql-test/r/information_schema2.result
  mysql-test/suite/innodb/r/innodb_bug14704286.result
  mysql-test/suite/innodb/t/innodb_bug14704286.test
  mysql-test/suite/plugins/r/audit_null_debug.result
  mysql-test/suite/plugins/r/cassandra.result
  mysql-test/suite/plugins/r/cassandra_qcache.result
  mysql-test/suite/plugins/t/audit_null_debug.test
  mysql-test/suite/plugins/t/cassandra.opt
  mysql-test/suite/plugins/t/cassandra.test
  mysql-test/suite/plugins/t/cassandra_qcache.opt
  mysql-test/suite/plugins/t/cassandra_qcache.test
  mysql-test/suite/rpl/r/rpl_password_boundaries.result
  mysql-test/suite/rpl/t/rpl_password_boundaries.test
  mysql-test/suite/sys_vars/r/innodb_locking_fake_changes_basic.result
  mysql-test/suite/sys_vars/r/innodb_max_bitmap_file_size_basic.result
  mysql-test/suite/sys_vars/t/innodb_locking_fake_changes_basic.test
  mysql-test/suite/sys_vars/t/innodb_max_bitmap_file_size_basic.test
  mysql-test/t/change_user_notembedded.test
  mysql-test/t/create_delayed.test
  mysql-test/t/ctype_utf16le.test
  mysql-test/t/failed_auth_3909.test
  mysql-test/t/gis2.test
  mysql-test/t/grant_lowercase.opt
  mysql-test/t/grant_lowercase.test
  mysql-test/t/group_by_innodb.test
  mysql-test/t/information_schema2.test
  packaging/rpm-uln/
  packaging/rpm-uln/CMakeLists.txt
  packaging/rpm-uln/README-ULN
  packaging/rpm-uln/README.mysql-docs
  packaging/rpm-uln/filter-requires-mysql.sh
  packaging/rpm-uln/generate-tarball.sh
  packaging/rpm-uln/my.cnf
  packaging/rpm-uln/my_config.h
  packaging/rpm-uln/mysql-5.5-errno.patch
  packaging/rpm-uln/mysql-5.5-fix-tests.patch
  packaging/rpm-uln/mysql-5.5-libdir.patch
  packaging/rpm-uln/mysql-5.5-mtr1.patch
  packaging/rpm-uln/mysql-5.5-stack-guard.patch
  packaging/rpm-uln/mysql-5.5-testing.patch
  packaging/rpm-uln/mysql-chain-certs.patch
  packaging/rpm-uln/mysql-embedded-check.c
  packaging/rpm-uln/mysql-expired-certs.patch
  packaging/rpm-uln/mysql-install-test.patch
  packaging/rpm-uln/mysql-strmov.patch
  packaging/rpm-uln/mysql.init
  packaging/rpm-uln/mysql.spec.sh
  packaging/rpm-uln/scriptstub.c
  scripts/mysql_performance_tables.sql
  storage/cassandra/
  storage/cassandra/CMakeLists.txt
  storage/cassandra/cassandra.cnf
  storage/cassandra/cassandra_se.cc
  storage/cassandra/cassandra_se.h
  storage/cassandra/gen-cpp/
  storage/cassandra/gen-cpp/Cassandra.cpp
  storage/cassandra/gen-cpp/Cassandra.h
  storage/cassandra/gen-cpp/Cassandra_server.skeleton.cpp
  storage/cassandra/gen-cpp/cassandra_constants.cpp
  storage/cassandra/gen-cpp/cassandra_constants.h
  storage/cassandra/gen-cpp/cassandra_types.cpp
  storage/cassandra/gen-cpp/cassandra_types.h
  storage/cassandra/ha_cassandra.cc
  storage/cassandra/ha_cassandra.h
  storage/innobase/mysql-test/storage_engine/alter_tablespace.rdiff
renamed:
  mysql-test/include/mysqlbinlog_row_engine.inc => mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
  mysql-test/r/mysqlbinlog-cp932.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog-cp932.result
  mysql-test/r/mysqlbinlog2.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
  mysql-test/r/mysqlbinlog_base64.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog_base64.result
  mysql-test/r/mysqlbinlog_row.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
  mysql-test/r/mysqlbinlog_row_innodb.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
  mysql-test/r/mysqlbinlog_row_myisam.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
  mysql-test/r/mysqlbinlog_row_trans.result => mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
  mysql-test/suite/innodb/t/innodb-autoinc-master.opt => mysql-test/suite/innodb/t/innodb-autoinc.opt
  mysql-test/t/mysqlbinlog-cp932-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt
  mysql-test/t/mysqlbinlog-cp932.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932.test
  mysql-test/t/mysqlbinlog2-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog2-master.opt
  mysql-test/t/mysqlbinlog2.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
  mysql-test/t/mysqlbinlog_base64.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog_base64.test
  mysql-test/t/mysqlbinlog_row-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row-master.opt
  mysql-test/t/mysqlbinlog_row.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
  mysql-test/t/mysqlbinlog_row_innodb-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb-master.opt
  mysql-test/t/mysqlbinlog_row_innodb.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test
  mysql-test/t/mysqlbinlog_row_myisam-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam-master.opt
  mysql-test/t/mysqlbinlog_row_myisam.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test
  mysql-test/t/mysqlbinlog_row_trans-master.opt => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans-master.opt
  mysql-test/t/mysqlbinlog_row_trans.test => mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test
  mysql-test/t/plugin_load_option-master.opt => mysql-test/t/plugin_load_option.opt
modified:
  BUILD/FINISH.sh
  BUILD/SETUP.sh
  CMakeLists.txt
  TODO
  VERSION
  client/completion_hash.cc
  client/mysql.cc
  client/mysql_upgrade.c
  client/mysqlbinlog.cc
  client/mysqlcheck.c
  client/mysqldump.c
  client/mysqltest.cc
  cmake/build_configurations/mysql_release.cmake
  cmake/character_sets.cmake
  cmake/configure.pl
  cmake/cpack_rpm.cmake
  cmake/create_initial_db.cmake.in
  cmake/info_macros.cmake.in
  cmake/install_layout.cmake
  cmake/mysql_version.cmake
  cmake/package_name.cmake
  cmake/plugin.cmake
  debian/dist/Debian/mariadb-server-10.0.files
  debian/dist/Debian/rules
  debian/dist/Ubuntu/mariadb-server-10.0.files
  debian/dist/Ubuntu/rules
  debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch
  extra/comp_err.c
  extra/replace.c
  extra/resolve_stack_dump.c
  include/hash.h
  include/heap.h
  include/m_ctype.h
  include/ma_dyncol.h
  include/my_dir.h
  include/my_global.h
  include/my_pthread.h
  include/my_sys.h
  include/my_tree.h
  include/myisamchk.h
  include/mysql.h.pp
  include/mysql/plugin.h
  include/mysql/plugin_audit.h.pp
  include/mysql/plugin_auth.h.pp
  include/mysql/plugin_ftparser.h.pp
  include/mysql/service_thd_wait.h
  include/mysql/services.h
  include/mysql_com.h
  include/service_versions.h
  include/violite.h
  libmysql/CMakeLists.txt
  libmysql/libmysql.c
  libmysqld/CMakeLists.txt
  libmysqld/emb_qcache.cc
  libmysqld/lib_sql.cc
  libservices/CMakeLists.txt
  mysql-test/extra/binlog_tests/binlog.test
  mysql-test/include/have_dbi_dbd-mysql.inc
  mysql-test/include/plugin.defs
  mysql-test/include/rpl_start_server.inc
  mysql-test/lib/v1/mysql-test-run.pl
  mysql-test/mysql-test-run.pl
  mysql-test/r/alias.result
  mysql-test/r/contributors.result
  mysql-test/r/create.result
  mysql-test/r/ctype_ucs.result
  mysql-test/r/ctype_utf16.result
  mysql-test/r/ctype_utf32.result
  mysql-test/r/ctype_utf8.result
  mysql-test/r/datetime_456.result
  mysql-test/r/derived_view.result
  mysql-test/r/distinct.result
  mysql-test/r/dyncol.result
  mysql-test/r/func_encrypt_ucs2.result
  mysql-test/r/func_gconcat.result
  mysql-test/r/func_misc.result
  mysql-test/r/func_time.result
  mysql-test/r/group_by.result
  mysql-test/r/group_min_max.result
  mysql-test/r/handlersocket.result
  mysql-test/r/loaddata.result
  mysql-test/r/mysql.result
  mysql-test/r/mysqltest.result
  mysql-test/r/plugin.result
  mysql-test/r/plugin_auth.result
  mysql-test/r/show_check.result
  mysql-test/r/show_explain.result
  mysql-test/r/sp.result
  mysql-test/r/sp_notembedded.result
  mysql-test/r/stat_tables_par.result
  mysql-test/r/stat_tables_par_innodb.result
  mysql-test/r/subselect.result
  mysql-test/r/subselect3.result
  mysql-test/r/subselect3_jcl6.result
  mysql-test/r/subselect4.result
  mysql-test/r/subselect_innodb.result
  mysql-test/r/subselect_mat_cost.result
  mysql-test/r/subselect_no_mat.result
  mysql-test/r/subselect_no_opts.result
  mysql-test/r/subselect_no_scache.result
  mysql-test/r/subselect_sj.result
  mysql-test/r/subselect_sj_jcl6.result
  mysql-test/r/sum_distinct-big.result
  mysql-test/r/type_year.result
  mysql-test/r/user_var.result
  mysql-test/r/view.result
  mysql-test/suite.pm
  mysql-test/suite/binlog/r/binlog_database.result
  mysql-test/suite/binlog/r/binlog_row_annotate.result
  mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
  mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result
  mysql-test/suite/engines/funcs/r/tc_rename_error.result
  mysql-test/suite/engines/iuds/r/insert_time.result
  mysql-test/suite/funcs_1/datadict/processlist_priv.inc
  mysql-test/suite/funcs_1/datadict/processlist_val.inc
  mysql-test/suite/funcs_1/r/innodb_func_view.result
  mysql-test/suite/funcs_1/r/is_columns_is.result
  mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
  mysql-test/suite/funcs_1/r/memory_func_view.result
  mysql-test/suite/funcs_1/r/myisam_func_view.result
  mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
  mysql-test/suite/funcs_1/r/processlist_priv_ps.result
  mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
  mysql-test/suite/funcs_1/r/processlist_val_ps.result
  mysql-test/suite/innodb/r/binlog_consistent.result
  mysql-test/suite/innodb/r/innodb-autoinc.result
  mysql-test/suite/innodb/r/innodb-zip.result
  mysql-test/suite/innodb/r/innodb.result
  mysql-test/suite/innodb/r/innodb_bug53591.result
  mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
  mysql-test/suite/innodb/t/innodb-autoinc.test
  mysql-test/suite/innodb/t/innodb-zip.test
  mysql-test/suite/innodb/t/innodb.test
  mysql-test/suite/innodb/t/innodb_bug53591.test
  mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
  mysql-test/suite/maria/truncate.result
  mysql-test/suite/maria/truncate.test
  mysql-test/suite/multi_source/multisource.result
  mysql-test/suite/multi_source/multisource.test
  mysql-test/suite/perfschema/include/upgrade_check.inc
  mysql-test/suite/perfschema/r/digest_table_full.result
  mysql-test/suite/perfschema/r/func_file_io.result
  mysql-test/suite/perfschema/r/func_mutex.result
  mysql-test/suite/perfschema/r/pfs_upgrade.result
  mysql-test/suite/perfschema/r/statement_digest.result
  mysql-test/suite/perfschema/r/statement_digest_consumers.result
  mysql-test/suite/perfschema/r/statement_digest_long_query.result
  mysql-test/suite/perfschema/t/func_file_io.test
  mysql-test/suite/perfschema/t/func_mutex.test
  mysql-test/suite/plugins/suite.pm
  mysql-test/suite/rpl/r/rpl_semi_sync.result
  mysql-test/suite/rpl/t/rpl_semi_sync.test
  mysql-test/suite/sphinx/sphinx.result
  mysql-test/suite/storage_engine/misc.result
  mysql-test/suite/sys_vars/r/character_set_client_basic.result
  mysql-test/suite/sys_vars/r/character_set_connection_basic.result
  mysql-test/suite/sys_vars/r/character_set_database_basic.result
  mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
  mysql-test/suite/sys_vars/r/character_set_results_basic.result
  mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
  mysql-test/suite/sys_vars/r/innodb_changed_pages_limit_basic.result
  mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result
  mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
  mysql-test/suite/sys_vars/t/innodb_changed_pages_limit_basic.test
  mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test
  mysql-test/suite/vcol/r/vcol_misc.result
  mysql-test/suite/vcol/t/vcol_misc.test
  mysql-test/t/alias.test
  mysql-test/t/ctype_ucs.test
  mysql-test/t/ctype_utf16.test
  mysql-test/t/ctype_utf32.test
  mysql-test/t/ctype_utf8.test
  mysql-test/t/derived_view.test
  mysql-test/t/distinct.test
  mysql-test/t/dyncol.test
  mysql-test/t/file_contents.test
  mysql-test/t/func_gconcat.test
  mysql-test/t/func_misc.test
  mysql-test/t/group_by.test
  mysql-test/t/group_min_max.test
  mysql-test/t/loaddata.test
  mysql-test/t/mysql.test
  mysql-test/t/plugin.test
  mysql-test/t/plugin_auth.test
  mysql-test/t/show_check.test
  mysql-test/t/show_explain.test
  mysql-test/t/sp.test
  mysql-test/t/sp_notembedded.test
  mysql-test/t/stat_tables_par.test
  mysql-test/t/subselect4.test
  mysql-test/t/subselect_innodb.test
  mysql-test/t/subselect_sj.test
  mysql-test/t/sum_distinct-big.test
  mysql-test/t/user_var.test
  mysql-test/t/view.test
  mysql-test/valgrind.supp
  mysys/array.c
  mysys/charset-def.c
  mysys/default.c
  mysys/hash.c
  mysys/ma_dyncol.c
  mysys/mf_tempdir.c
  mysys/my_alloc.c
  mysys/my_chmod.c
  mysys/my_chsize.c
  mysys/my_copy.c
  mysys/my_create.c
  mysys/my_delete.c
  mysys/my_error.c
  mysys/my_fopen.c
  mysys/my_fstream.c
  mysys/my_getwd.c
  mysys/my_lib.c
  mysys/my_lock.c
  mysys/my_malloc.c
  mysys/my_open.c
  mysys/my_pread.c
  mysys/my_read.c
  mysys/my_redel.c
  mysys/my_rename.c
  mysys/my_seek.c
  mysys/my_sync.c
  mysys/my_thr_init.c
  mysys/my_write.c
  mysys/mysys_priv.h
  mysys/safemalloc.c
  mysys/string.c
  mysys/tree.c
  mysys/waiting_threads.c
  plugin/feedback/utils.cc
  scripts/CMakeLists.txt
  scripts/mysql_install_db.pl.in
  scripts/mysql_install_db.sh
  scripts/mysql_system_tables.sql
  scripts/mysql_system_tables_fix.sql
  scripts/mysqlaccess.sh
  scripts/mysqld_multi.sh
  scripts/mysqld_safe.sh
  sql-common/client.c
  sql-common/client_plugin.c
  sql/CMakeLists.txt
  sql/debug_sync.cc
  sql/event_data_objects.cc
  sql/event_db_repository.cc
  sql/event_scheduler.cc
  sql/events.cc
  sql/field.cc
  sql/field.h
  sql/filesort.cc
  sql/filesort_utils.cc
  sql/ha_ndbcluster.cc
  sql/ha_ndbcluster_binlog.cc
  sql/ha_partition.cc
  sql/ha_partition.h
  sql/handler.cc
  sql/handler.h
  sql/hostname.cc
  sql/item.cc
  sql/item.h
  sql/item_cmpfunc.cc
  sql/item_cmpfunc.h
  sql/item_create.cc
  sql/item_create.h
  sql/item_func.cc
  sql/item_func.h
  sql/item_geofunc.cc
  sql/item_geofunc.h
  sql/item_row.cc
  sql/item_strfunc.cc
  sql/item_strfunc.h
  sql/item_subselect.cc
  sql/item_sum.cc
  sql/item_sum.h
  sql/item_timefunc.cc
  sql/item_timefunc.h
  sql/item_xmlfunc.cc
  sql/item_xmlfunc.h
  sql/lex.h
  sql/log.cc
  sql/log_event.cc
  sql/log_event.h
  sql/log_event_old.cc
  sql/mdl.cc
  sql/mysqld.cc
  sql/mysqld.h
  sql/net_serv.cc
  sql/opt_range.cc
  sql/opt_range_mrr.cc
  sql/opt_subselect.cc
  sql/protocol.cc
  sql/records.cc
  sql/rpl_filter.cc
  sql/rpl_handler.cc
  sql/rpl_handler.h
  sql/rpl_mi.cc
  sql/rpl_mi.h
  sql/rpl_rli.cc
  sql/rpl_tblmap.cc
  sql/rpl_utility.cc
  sql/scheduler.cc
  sql/set_var.cc
  sql/set_var.h
  sql/slave.cc
  sql/sp.cc
  sql/sp_head.cc
  sql/sp_pcontext.cc
  sql/sp_rcontext.cc
  sql/sp_rcontext.h
  sql/sql_acl.cc
  sql/sql_analyse.h
  sql/sql_array.h
  sql/sql_audit.cc
  sql/sql_audit.h
  sql/sql_base.cc
  sql/sql_base.h
  sql/sql_cache.cc
  sql/sql_class.cc
  sql/sql_class.h
  sql/sql_connect.cc
  sql/sql_const.h
  sql/sql_db.cc
  sql/sql_delete.cc
  sql/sql_error.cc
  sql/sql_error.h
  sql/sql_handler.cc
  sql/sql_help.cc
  sql/sql_insert.cc
  sql/sql_join_cache.cc
  sql/sql_lex.cc
  sql/sql_lex.h
  sql/sql_list.h
  sql/sql_load.cc
  sql/sql_parse.cc
  sql/sql_plugin.cc
  sql/sql_plugin_services.h
  sql/sql_prepare.cc
  sql/sql_priv.h
  sql/sql_profile.cc
  sql/sql_profile.h
  sql/sql_reload.cc
  sql/sql_repl.cc
  sql/sql_repl.h
  sql/sql_select.cc
  sql/sql_servers.cc
  sql/sql_show.cc
  sql/sql_signal.cc
  sql/sql_statistics.cc
  sql/sql_string.cc
  sql/sql_string.h
  sql/sql_table.cc
  sql/sql_test.cc
  sql/sql_time.cc
  sql/sql_trigger.cc
  sql/sql_truncate.cc
  sql/sql_udf.cc
  sql/sql_union.cc
  sql/sql_update.cc
  sql/sql_yacc.yy
  sql/sys_vars.cc
  sql/sys_vars.h
  sql/table.cc
  sql/table.h
  sql/thr_malloc.cc
  sql/thr_malloc.h
  sql/tztime.cc
  sql/uniques.cc
  sql/unireg.cc
  storage/archive/ha_archive.cc
  storage/archive/ha_archive.h
  storage/csv/ha_tina.cc
  storage/federated/ha_federated.cc
  storage/federated/ha_federated.h
  storage/federatedx/federatedx_io_mysql.cc
  storage/federatedx/ha_federatedx.cc
  storage/federatedx/ha_federatedx.h
  storage/heap/ha_heap.cc
  storage/heap/heapdef.h
  storage/heap/hp_block.c
  storage/heap/hp_create.c
  storage/heap/hp_open.c
  storage/heap/hp_write.c
  storage/innobase/btr/btr0btr.cc
  storage/innobase/btr/btr0cur.cc
  storage/innobase/buf/buf0buf.cc
  storage/innobase/buf/buf0lru.cc
  storage/innobase/dict/dict0dict.cc
  storage/innobase/fil/fil0fil.cc
  storage/innobase/fts/fts0fts.cc
  storage/innobase/handler/ha_innodb.cc
  storage/innobase/handler/ha_innodb.h
  storage/innobase/handler/handler0alter.cc
  storage/innobase/ibuf/ibuf0ibuf.cc
  storage/innobase/include/btr0cur.h
  storage/innobase/include/dict0mem.h
  storage/innobase/include/fil0fil.h
  storage/innobase/include/lock0lock.h
  storage/innobase/include/page0zip.h
  storage/innobase/include/row0undo.h
  storage/innobase/include/row0upd.ic
  storage/innobase/lock/lock0lock.cc
  storage/innobase/log/log0recv.cc
  storage/innobase/mysql-test/storage_engine/tbl_opt_row_format.rdiff
  storage/innobase/os/os0file.cc
  storage/innobase/page/page0cur.cc
  storage/innobase/page/page0page.cc
  storage/innobase/page/page0zip.cc
  storage/innobase/row/row0mysql.cc
  storage/innobase/row/row0sel.cc
  storage/innobase/row/row0umod.cc
  storage/innobase/row/row0undo.cc
  storage/maria/ha_maria.cc
  storage/maria/ma_bitmap.c
  storage/maria/ma_blockrec.c
  storage/maria/ma_check.c
  storage/maria/ma_ft_boolean_search.c
  storage/maria/ma_ft_nlq_search.c
  storage/maria/ma_ft_parser.c
  storage/maria/ma_loghandler.c
  storage/maria/ma_open.c
  storage/maria/ma_sort.c
  storage/maria/ma_write.c
  storage/maria/maria_pack.c
  storage/maria/unittest/sequence_storage.c
  storage/myisam/ft_boolean_search.c
  storage/myisam/ft_nlq_search.c
  storage/myisam/ft_parser.c
  storage/myisam/ft_stopwords.c
  storage/myisam/mi_check.c
  storage/myisam/mi_open.c
  storage/myisam/mi_write.c
  storage/myisam/myisamchk.c
  storage/myisam/myisamlog.c
  storage/myisam/myisampack.c
  storage/myisam/sort.c
  storage/myisammrg/ha_myisammrg.cc
  storage/myisammrg/mysql-test/storage_engine/vcol.rdiff
  storage/perfschema/pfs.cc
  storage/perfschema/pfs_check.cc
  storage/perfschema/pfs_instr.cc
  storage/perfschema/pfs_server.cc
  storage/sphinx/ha_sphinx.cc
  storage/xtradb/btr/btr0cur.c
  storage/xtradb/btr/btr0pcur.c
  storage/xtradb/buf/buf0lru.c
  storage/xtradb/buf/buf0rea.c
  storage/xtradb/fsp/fsp0fsp.c
  storage/xtradb/handler/ha_innodb.cc
  storage/xtradb/handler/ha_innodb.h
  storage/xtradb/handler/i_s.cc
  storage/xtradb/ibuf/ibuf0ibuf.c
  storage/xtradb/include/btr0btr.h
  storage/xtradb/include/btr0cur.h
  storage/xtradb/include/log0online.h
  storage/xtradb/include/srv0srv.h
  storage/xtradb/include/univ.i
  storage/xtradb/include/ut0ut.h
  storage/xtradb/include/ut0ut.ic
  storage/xtradb/lock/lock0lock.c
  storage/xtradb/log/log0log.c
  storage/xtradb/log/log0online.c
  storage/xtradb/os/os0file.c
  storage/xtradb/row/row0ins.c
  storage/xtradb/row/row0mysql.c
  storage/xtradb/row/row0upd.c
  storage/xtradb/srv/srv0srv.c
  storage/xtradb/srv/srv0start.c
  strings/ctype-latin1.c
  strings/ctype-ucs2.c
  strings/my_vsnprintf.c
  support-files/compiler_warnings.supp
  support-files/mysql.spec.sh
  tests/mysql_client_test.c
  vio/viosocket.c
  win/create_def_file.js
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
  mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test
  mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test
pending merges:
  Sergei Golubchik 2013-03-28 MDEV-4207 Invalid code in fts_savepoint_rele...
    Alexander Barkov 2013-03-28 Fixing test failure in the previous comm...
    Alexander Barkov 2013-03-28 Merging utf16le from MySQL-5.6
    Vladislav Vaintroub 2013-02-19 MDEV-156 Threadpool - add thd_wait_be...
    Michael Widenius 2013-02-15 [merge] Automatic merge
    Elena Stepanova 2013-02-08 Fix for MDEV-4149, backport from 10.0:
    timour@askmonty.org 2013-02-07 MDEV-537 Make multi-column non-top le...
    Sergei Golubchik 2013-02-05 set THR_THD key and current_thd=NULL as ...
    sanja@askmonty.org 2013-02-04 [merge] merge
    sanja@askmonty.org 2013-02-04 MDEV-3873: post-merge fix.
    Sergei Golubchik 2013-02-04 missing cast added
    Sergey Petrunya 2013-02-04 Skip cassandra_qcache.test if there is no...
    Sergey Petrunya 2013-02-04 [merge] Merge fix for MDEV-3997.
    Sergey Petrunya 2013-02-04 MDEV-3997: Querying a Cassandra table on ...
    Sergey Petrunya 2013-02-04 Fix mysql-test/suite/plugins/suite.pm to ...
    sanja@askmonty.org 2013-02-04 [merge] merge
    sanja@askmonty.org 2013-02-04 MDEV-4091: Dynamic columns C functions...
    knielsen@knielse... 2013-01-31 MDEV-4121: binlog.binlog_row_binlog s...
    Sergei Golubchik 2013-02-02 remove "invisible sysvars" oxymoron
    Sergei Golubchik 2013-01-31 fix for a valgrind builds.
    Sergei Golubchik 2013-01-31 avoid mtr errors for --plugin-add=EXAMPL...
    Sergei Golubchik 2013-01-31 skip cassandra.test unless cassandra is ...
    Sergei Golubchik 2013-01-31 [merge] 10.0-base merge
    Sergei Golubchik 2013-01-30 don't disable the cassandra engine by de...
    knielsen@knielse... 2013-01-30 MDEV-3984: Double free of Master_info...
    Sergei Golubchik 2013-01-29 move cassandra-related code from cmake/c...
    Sergei Golubchik 2013-01-29 buildbot fixes for storage/cassandra/CMa...
    Sergei Golubchik 2013-01-29 [merge] 5.5 merge
    Sergei Golubchik 2013-01-29 more changes for fedora18
    Sergei Golubchik 2013-01-29 fix 'compat' rpm for fedora18
    Vladislav Vaintroub 2013-01-28 fix embedded build with for cmake 2.6...
    timour@askmonty.org 2013-01-28 Fix for MDEV-3948, and backport of th...
    Sergei Golubchik 2013-01-28 [merge] 5.3 merge
    Sergei Golubchik 2013-01-28 [merge] 5.2 merge
    Sergei Golubchik 2013-01-28 compilation error with -Wuninitialized -...
    Sergei Golubchik 2013-01-25 [merge] 5.1 merge
    Sergei Golubchik 2013-01-25 MDEV-729 lp:998028 - Server crashes on n...
    Sergei Golubchik 2013-01-25 MDEV-759 lp:998340 - Valgrind complains ...
    Sergei Golubchik 2013-01-26 MDEV-3875 Wrong result (missing row) on ...
    sanja@askmonty.org 2013-01-25 The problem was that expression with f...
    sanja@askmonty.org 2013-01-28 MDEV-4091: Dynamic columns C functions...
    Vladislav Vaintroub 2013-01-26 [merge] Merge MDEV-3842, MDEV-3923, M...
    Vladislav Vaintroub 2013-01-25 fix embedded
    Vladislav Vaintroub 2013-01-25 Fix embedded build
    Vladislav Vaintroub 2013-01-25 MDEV-3842,  MDEV-3923 :
    Vladislav Vaintroub 2013-01-25 MDEV-3971  : problems installing Mari...
    Michael Widenius 2013-01-26 [merge] Automatic merge
    Michael Widenius 2013-01-25 Fixed MDEV-3890: Server crash inserting ...
    Sergei Golubchik 2013-01-25 [merge] 5.3 merge
    Sergei Golubchik 2013-01-25 [merge] 5.2 merge
    Sergei Golubchik 2013-01-25 MDEV-4040 Replace deprecated SET OPTION ...
    Sergei Golubchik 2013-01-25 MDEV-3909 remote user enumeration
    Sergei Golubchik 2013-01-25 report "using password: YES/NO" correctl...
    Sergei Golubchik 2013-01-25 MDEV-3915 COM_CHANGE_USER allows fast pa...
    Igor Babaev 2013-01-23 [merge] Merge 5.3->5.5
    Igor Babaev 2013-01-21 [merge] Merge 5.2->5.3
    Igor Babaev 2013-01-21 [merge] Merge 5.1->5.2
    Igor Babaev 2013-01-21 [merge] Merge.
    Igor Babaev 2013-01-21 Fixed bug mdev-4063 (bug #56927).
    Sergei Golubchik 2013-01-21 MDEV-4029 SELECT on information_schema u...
    Igor Babaev 2013-01-19 Corrected the test case for bug mdev-3938.
    Igor Babaev 2013-01-16 Corrected the fix for bug mdev-3938.
    Igor Babaev 2013-01-15 Fixed bug mdev-3938.
    sanja@montyprogr... 2013-01-16 MDEV-4056 fix.
    timour@askmonty.org 2013-01-17 MDEV-3900 Optimizer difference betwee...
    sanja@montyprogr... 2013-01-17 backport of:
    sanja@montyprogr... 2013-01-16 MDEV-3988 fix.
    Igor Babaev 2013-01-11 Fixed bug mdev-4025.
    Vladislav Vaintroub 2013-01-11 MDEV-4020 : Make sure strmov symbol i...
    Sergei Golubchik 2013-01-23 remove one particularly stupid test 
    Sergei Golubchik 2013-01-21 MDEV-4069 thd_wait_end does not called i...
    sanja@montyprogr... 2013-01-22 Fixed typo in the function name.
    sanja@montyprogr... 2013-01-21 MDEV-3873: fixed functions absend in ...
    Sergei Golubchik 2013-01-20 fix a strict aliasing warning - remove a...
    Sergei Golubchik 2013-01-20 MDEV-3952 Incompatible change in MariaDB...
    Sergei Golubchik 2013-01-20 MDEV-3934 Assertion `((keypart_map+1) & ...
    Sergei Golubchik 2013-01-20 MDEV-4029 SELECT on information_schema u...
    Sergei Golubchik 2013-01-19 MDEV-3832 MariaDB conflicts with package...
    Sergei Golubchik 2013-01-18 MDEV-633 lp:1024058 - mysqld XA crash in...
    Sergei Golubchik 2013-01-18 simplify THD::binlog_setup_trx_data() usage
    Sergei Golubchik 2013-01-18 MDEV-3908 crash in multi-table delete an...
    Sergei Golubchik 2013-01-18 MDEV-4065 thd_kill_statement service
    Vladislav Vaintroub 2013-01-18 Fix Windows installers' bootstrapper ...
    Michael Widenius 2013-01-17 Don't reset maybe_null in update_used_ta...
    Michael Widenius 2013-01-17 Fixed compiler warning
    Sergei Golubchik 2013-01-16 [merge] xtradb merge. Percona-Server-5.5...
    Sergei Golubchik 2013-01-15 Percona-Server-5.5.28-rel29.3
    Sergei Golubchik 2013-01-15 Test case and a different fix for MySQL ...
    Sergei Golubchik 2013-01-15 small cleanups
    Sergei Golubchik 2013-01-15 backport a test case for a 5.5 bug fix f...
    Sergei Golubchik 2013-01-15 [merge] mysql-5.5.29 merge
    Dmitry Lenev 2012-12-10 Bug #15954896 "SP, MULTI-TABLE DELETE AND LO...
    mysql-builder@or... 2012-12-07 
    Harin Vadodaria 2012-12-06 Bug#15912213: BUFFER OVERFLOW IN ACL_GET()
    Gleb Shchepa 2012-12-05 Bug #15948123: SERVER WORKS INCORRECT WITH L...
    Gleb Shchepa 2012-12-05 Bug #15948123: SERVER WORKS INCORRECT WITH L...
    Joerg Bruehe 2012-11-08 Building RPMs for ULN:
    Joerg Bruehe 2012-11-08 Placement change:
    Tor Didriksen 2012-11-01 [merge] merge 5.1 => 5.5
    Venkata Sidagam 2012-10-31 BUG#13556441: CHECK AND REPAIR TABLE SHOU...
    Ashish Agarwal 2012-10-31 [merge] BUG#14485479: Merge into mysql-5.5...
    Ashish Agarwal 2012-10-31 BUG#14485479: INSTALL AUDIT PLUGIN HANGS I...
    Anirudh Mangipudi 2012-10-30 [merge] BUG#11754894: MYISAMCHK ERROR H...
    Anirudh Mangipudi 2012-10-30 [merge] BUG#11754894: MYISAMCHK ERROR H...
    Anirudh Mangipudi 2012-10-30 BUG#11754894: MYISAMCHK ERROR HAS INCOR...
    Shivji Kumar Jha 2012-10-30 [merge] BUG#14659685: main.mysqlbinlog_r...
    mysql-builder@or... 2012-10-29 
    mysql-builder@or... 2012-10-29 [merge] 
    mysql-builder@or... 2012-10-29 
    Alexander Nozdrin 2012-10-29 [merge] Merge from 5.1.
    Tor Didriksen 2012-10-24 Bug#14737559 BZR JOIN PLUGIN TREES INTO INT...
    Tor Didriksen 2012-10-23 [merge] local merge
    Tor Didriksen 2012-10-23 Use MESSAGE(STATUS ...) as we don't want an...
    Marko Mäkelä 2012-10-22 [merge] Merge mysql-5.1 to mysql-5.5.
    Nuno Carvalho 2012-10-21 [merge] BUG#14629727: USER_VAR_EVENT IS MIS...
    Nuno Carvalho 2012-10-21 [merge] BUG#14629727: USER_VAR_EVENT IS MIS...
    Nuno Carvalho 2012-10-21 [merge] BUG#14629727: USER_VAR_EVENT IS MIS...
    Nuno Carvalho 2012-10-12 [merge] BUG#14629727: USER_VAR_EVENT IS MIS...
    Joerg Bruehe 2012-10-19 Fix formatting in 'INFO_BIN' on Windows - ba...
    Joerg Bruehe 2012-10-19 [merge] Upmerge a backport - empty
    Annamalai Gurusami 2012-10-19 Bug #14226171  EXCESSIVE ROW LOCKING W...
    Neeraj Bisht 2012-10-18 [merge] Bug#13726751 - 8 BYTE MEMORY LEAK IN...
    Marko Mäkelä 2012-10-18 [merge] Merge mysql-5.1 to mysql-5.5.
    Krunal Bauskar 2012-10-17 [merge] merge from mysql-5.1 -> mysql-5.5
    Krunal Bauskar 2012-10-17 removing .... will re-add using merge. for...
    Tatjana Azundris... 2012-10-17 [merge] NULL merge
    mysql-builder@or... 2012-10-17 [merge] 
    mysql-builder@or... 2012-08-27 
    mysql-builder@or... 2012-08-22 
    mysql-builder@or... 2012-08-22 
    mysql-builder@or... 2012-08-09 
    mysql-builder@or... 2012-08-09 
    mysql-builder@or... 2012-08-08 
    mysql-builder@or... 2012-07-25 
    mysql-builder@or... 2012-07-24 
    mysql-builder@or... 2012-07-23 
    mysql-builder@or... 2012-07-23 
    mysql-builder@or... 2012-07-20 
    mysql-builder@or... 2012-07-19 
    mysql-builder@or... 2012-07-19 
    mysql-builder@or... 2012-07-18 
    mysql-builder@or... 2012-07-17 
    mysql-builder@or... 2012-06-28 
    mysql-builder@or... 2012-06-22 
    mysql-builder@or... 2012-06-21 
    mysql-builder@or... 2012-06-20 
    mysql-builder@or... 2012-06-20 
    mysql-builder@or... 2012-06-19 
    mysql-builder@or... 2012-06-11 
    mysql-builder@or... 2012-06-08 
    mysql-builder@or... 2012-06-04 
    mysql-builder@or... 2012-04-28 
    mysql-builder@or... 2012-02-16 
    mysql-builder@or... 2011-06-28 
    mysql-builder@or... 2011-06-09 
    mysql-builder@or... 2011-04-18 
    mysql-builder@or... 2011-03-18 
    mysql-builder@or... 2011-03-11 
    mysql-builder@or... 2011-03-05 
    mysql-builder@or... 2011-03-04 
    mysql-builder@or... 2011-03-02 
    mysql-builder@or... 2011-03-02 
    mysql-builder@or... 2011-03-02 
    mysql-builder@or... 2011-03-01 
    mysql-builder@or... 2011-02-22 
    mysql-builder@or... 2011-02-22 
    mysql-builder@or... 2011-02-14 
    mysql-builder@or... 2011-02-09 [merge] 
    mysql-builder@or... 2011-02-09 
    mysql-builder@or... 2011-02-09 
    mysql-builder@or... 2011-02-08 
    mysql-builder@or... 2011-02-08 
    mysql-builder@or... 2011-02-09 
    mysql-builder@or... 2011-02-05 
    mysql-builder@or... 2010-12-29 
    mysql-builder@or... 2010-12-29 
    mysql-builder@or... 2010-12-28 
    mysql-builder@or... 2010-12-27 
    mysql-builder@or... 2010-09-06 
    mysql-builder@or... 2010-08-09 
    mysql-builder@or... 2010-06-23 
    mysql-builder@or... 2010-06-09 
    mysql-builder@or... 2010-06-08 
    mysql-builder@or... 2012-02-16 
    mysql-builder@or... 2012-01-31 
    mysql-builder@or... 2012-01-26 
    mysql-builder@or... 2011-09-08 
    mysql-builder@or... 2011-09-08 
    mysql-builder@or... 2011-09-28 
    mysql-builder@or... 2011-09-01 
    mysql-builder@or... 2011-08-30 
    mysql-builder@or... 2011-08-26 
    mysql-builder@or... 2011-08-24 
    mysql-builder@or... 2011-08-18 
    mysql-builder@or... 2011-07-22 
    mysql-builder@or... 2011-05-20 
    mysql-builder@or... 2011-03-22 
    mysql-builder@or... 2011-01-21 
    mysql-builder@or... 2011-01-20 
    mysql-builder@or... 2011-01-19 
    mysql-builder@or... 2011-01-19 
    mysql-builder@or... 2011-01-19 
    mysql-builder@or... 2011-01-13 
    mysql-builder@or... 2011-01-13 
    mysql-builder@or... 2011-01-07 [merge] 
    mysql-builder@or... 2011-01-06 
    mysql-builder@or... 2011-01-06 
    mysql-builder@or... 2010-11-30 
    mysql-builder@or... 2010-11-25 
    mysql-builder@or... 2010-11-25 
    mysql-builder@or... 2010-11-25 
    mysql-builder@or... 2010-11-25 
    mysql-builder@or... 2012-08-28 
    mysql-builder@or... 2012-07-25 
    mysql-builder@or... 2012-03-19 
    mysql-builder@or... 2011-12-21 
    mysql-builder@or... 2011-09-21 [merge] 
    mysql-builder@or... 2011-08-19 [merge] 
    mysql-builder@or... 2011-08-18 
    mysql-builder@or... 2011-08-15 
    mysql-builder@or... 2011-07-28 
    mysql-builder@or... 2011-07-26 
    mysql-builder@or... 2011-07-26 
    mysql-builder@or... 2011-06-20 
    mysql-builder@or... 2011-06-14 
    mysql-builder@or... 2011-06-11 
    mysql-builder@or... 2011-06-10 
    mysql-builder@or... 2011-06-10 
    mysql-builder@or... 2011-06-10 
    mysql-builder@or... 2011-06-09 
    mysql-builder@or... 2011-06-06 
    mysql-builder@or... 2011-06-03 
    mysql-builder@or... 2011-06-02 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-06-01 
    mysql-builder@or... 2011-05-30 
    mysql-builder@or... 2011-05-30 
    mysql-builder@or... 2011-05-30 
    mysql-builder@or... 2011-05-30 
    mysql-builder@or... 2011-05-30 
    mysql-builder@or... 2011-05-26 
    mysql-builder@or... 2011-05-26 
    mysql-builder@or... 2011-05-26 
    mysql-builder@or... 2011-05-26 
    mysql-builder@or... 2011-05-26 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2011-05-25 
    mysql-builder@or... 2012-10-17 
    mysql-builder@or... 2012-10-16 
    mysql-builder@or... 2012-09-21 
    mysql-builder@or... 2011-11-17 
    mysql-builder@or... 2011-09-28 
    mysql-builder@or... 2011-09-28 
    mysql-builder@or... 2011-09-21 [merge] 
    mysql-builder@or... 2011-09-08 
    mysql-builder@or... 2011-09-07 
    mysql-builder@or... 2011-09-07 
    mysql-builder@or... 2011-09-07 [merge] 
    mysql-builder@or... 2011-09-02 
    mysql-builder@or... 2011-09-01 
    mysql-builder@or... 2011-09-01 
    mysql-builder@or... 2011-05-20 
    mysql-builder@or... 2011-04-28 
    mysql-builder@or... 2011-04-28 
    mysql-builder@or... 2011-02-04 
    mysql-builder@or... 2010-11-29 
    mysql-builder@or... 2010-11-27 
    mysql-builder@or... 2010-11-23 
    mysql-builder@or... 2010-11-18 
    mysql-builder@or... 2010-11-18 
    mysql-builder@or... 2010-11-18 
    mysql-builder@or... 2010-11-18 
    mysql-builder@or... 2010-10-29 
    mysql-builder@or... 2010-10-29 
    mysql-builder@or... 2010-10-16 
    mysql-builder@or... 2010-10-16 
    mysql-builder@or... 2010-10-16 
    mysql-builder@or... 2010-10-15 
    mysql-builder@or... 2010-10-15 
    mysql-builder@or... 2010-10-15 
    mysql-builder@or... 2010-10-15 
    mysql-builder@or... 2010-10-14 
    mysql-builder@or... 2010-10-14 
    mysql-builder@or... 2010-10-13 
    mysql-builder@or... 2010-10-12 
    mysql-builder@or... 2010-10-12 
    mysql-builder@or... 2010-10-12 
    Yasufumi Kinoshita 2012-10-17 [merge] Bug #13702112 : WAIT_FOR_READ ...
    Tatjana Azundris... 2012-10-17 [merge] Bug#11764559: UMASK IS IGNORE...
    Neeraj Bisht 2012-10-16 [merge] Bug#11745891 - LAST_INSERT(ID) DOES ...
    mysql-builder@or... 2012-10-16 
    Marko Mäkelä 2012-10-16 [merge] Merge mysql-5.1 to mysql-5.5.
    Krunal Bauskar 2012-10-15 removed warning message as they have chang...
    Krunal Bauskar 2012-10-15 bug#14704286
    Marc Alff 2012-10-12 [merge] Merge mysql-5.1 --> mysql-5.5
    Vasil Dimov 2012-10-10 [merge] Null merge mysql-5.1 -> mysql-5.5 (th...
    Vasil Dimov 2012-10-09 [merge] Merge mysql-5.1 -> mysql-5.5
    Harin Vadodaria 2012-10-09 Bug #14211140: CRASH WHEN GRANTING OR REV...
    Annamalai Gurusami 2012-10-09 Fixing a compilation issue. 
    Praveenkumar Hul... 2012-10-08 Bug#11756600 - SLAVE THREAD CAN CRASH...
    Annamalai Gurusami 2012-10-08 Bug #14036214 MYSQLD CRASHES WHEN EXEC...
    Marko Mäkelä 2012-10-08 [merge] Merge mysql-5.1 to mysql-5.5.
    Jon Olav Hauglid 2012-10-04 Bug#14640599 MEMORY LEAK WHEN EXECUTING ...
    Tor Didriksen 2012-10-03 Bug#13713525 CREATE_INITIAL_DB.CMAKE IS FAI...
    Jon Olav Hauglid 2012-10-03 Bug#14495351: CRASH IN HA_PARTITION::HAN...
    Mattias Jonsson 2012-09-10 Bug#14495351: CRASH IN HA_PARTITION::HAND...
    Serge Kozlov 2012-10-02 BUG#12604949. Increased timeout for switchin...
    Tor Didriksen 2012-10-01 [merge] merge 5.1 => 5.5
    Joerg Bruehe 2012-10-01 [merge] Empty upmerge of 5.1.66 into 5.5
    hery.ramilison@o... 2012-10-01 Merge from mysql-5.5.28-release
    Annamalai Gurusami 2012-09-28 [merge] Merge from mysql-5.1 to mysql-...
    mysql-builder@or... 2012-09-27 
    Akhila Maddukuri 2012-09-27 Description:
    mysql-builder@or... 2012-09-26 [merge] 
    Akhila Maddukuri 2012-09-26 [merge] Description:
    Tor Didriksen 2012-09-25 [merge] merge 5.1 => 5.5
    mysql-builder@or... 2012-09-25 [merge] 
    mysql-builder@or... 2012-09-25 [merge] 
    Jon Olav Hauglid 2012-09-25 [merge] Merge from mysql-5.1 to mysql-5.5
    Raghav Kapoor 2012-09-25 [merge] BUG#13864642: DROP/CREATE USER BEHA...
    Rohit Kalhans 2012-09-23 [merge] bug#14548159: upmerge from mysql-5....
    Rohit Kalhans 2012-09-22 [merge] upmerge to bug#14548159
    Nirbhay Choubey 2012-09-21 [merge] Merge of fix for Bug#14645196 fro...
    Joerg Bruehe 2012-09-21 [merge] Merge changes for ULN RPMs into main...
    Joerg Bruehe 2012-09-18 Spec file for ULN RPMs:
    Joerg Bruehe 2012-07-26 Spec file: Declare conflicts with the ULN RPMs.
    Joerg Bruehe 2012-07-26 ULN spec file: Some comment or message text ...
    Joerg Bruehe 2012-07-26 Spec file: transfer the 'runselftest' macro ...
    Joerg Bruehe 2012-07-26 Spec file for ULN RPMs:
    Joerg Bruehe 2012-07-26 Spec file polishing: Handle 'MySQL-*' and 'm...
    Joerg Bruehe 2012-07-25 [merge] Merge 5.5.27 into the tree for ULN R...
    Joerg Bruehe 2012-06-14 Copyright text in the spec file for ULN RPMs.
    Joerg Bruehe 2012-06-12 One file still missing for ULN RPMs.
    Joerg Bruehe 2012-06-12 Still work on getting the "SPECIFIC-ULN/" fi...
    Joerg Bruehe 2012-06-11 Protect traditional RPMs that "SPECIFIC-ULN/...
    Joerg Bruehe 2012-06-11 cmake syntax error: missed ${...}
    Joerg Bruehe 2012-06-11 Files in "SPECIFIC-ULN" need to be mentioned...
    Joerg Bruehe 2012-06-11 Adape "SPECIFIC-ULN/mysql-5.5-libdir.patch" ...
    Joerg Bruehe 2012-06-11 More changes to supporting the build of RPMs...
    Joerg Bruehe 2012-06-08 First version of supporting the build of RPM...
    Inaam Rana 2012-09-20 Bug#14594600 ASSERT FROM DROP TABLE CONCURRENT...
    mysql-builder@or... 2012-09-20 
    Marko Mäkelä 2012-09-20 [merge] Null merge mysql-5.1 to mysql-5.5.
    Marko Mäkelä 2012-09-20 Do not try innodb_change_buffering_debug=2.
    Marko Mäkelä 2012-09-19 [merge] Merge mysql-5.1 to mysql-5.5.
    Tor Didriksen 2012-09-18 Bug#14542543 FIX BUG #12694872 IN 5.5
    Marko Mäkelä 2012-09-17 [merge] Null merge mysql-5.1 to mysql-5.5.
    Marko Mäkelä 2012-09-17 [merge] Merge mysql-5.5 to working copy.
    Harin Vadodaria 2012-09-17 [merge] Bug#11753779: MAX_CONNECT_ERRORS ...
    Marko Mäkelä 2012-09-17 [merge] Merge mysql-5.1 to mysql-5.5.
    Sujatha Sivakumar 2012-09-17 [merge] merge from 5.1 to 5.5
    mysql-builder@or... 2012-09-12 [merge] 
    Tor Didriksen 2012-09-12 [merge] merge 5.1 => 5.5
    Georgi Kodinov 2012-09-11 [merge] merge
    Jon Olav Hauglid 2012-09-11 WL#6454: Deprecate SHOW AUTHORS and SHOW...
    Georgi Kodinov 2012-08-27 Bug #13548161: MYSQLD_SAFE IMPROVEMENTS FO...
    Georgi Kodinov 2012-08-24 Bug #14181049: MYSQL_INSTALL_DB.PL CREATES...
    Andrei Elkin 2012-09-10 [merge] merge bug14597605 to 5.5.
    Marc Alff 2012-09-07 [merge] Local merge
    Marc Alff 2012-09-07 [merge] local merge
    Akhil Mohan 2012-09-07 [merge] Empty version change upmerge
    Marc Alff 2012-09-07 Bug#14072995 - PERFSCHEMA.FUNC_FILE_IO FAILS WI...
    Marc Alff 2012-09-07 Bug#14100113 - PERFSCHEMA.FUNC_MUTEX FAILS WITH...
    Tor Didriksen 2012-09-07 Bug#14593123 CONFIGURE.PL WITH CMAKE2.8 BRE...
    Tor Didriksen 2012-09-05 [merge] merge 5.1 => 5.5
    Annamalai Gurusami 2012-09-04 Bug #14500557 CRASH WHEN USING LONG IN...
    Annamalai Gurusami 2012-09-03 [merge] Merge from mysql-5.1 to mysql-...
    Annamalai Gurusami 2012-09-01 [merge] Merge from mysql-5.1 to mysql-...
    mysql-builder@or... 2012-08-31 [merge] 
    Marko Mäkelä 2012-08-30 [merge] Merge mysql-5.1 to mysql-5.5.
    Jorgen Loland 2012-08-30 [merge] Null-merge from 5.1
    mysql-builder@or... 2012-08-29 
    Tor Didriksen 2012-08-28 [merge] merge 5.5.28-release => 5.5
    mysql-builder@or... 2012-08-27 
    Aditya A 2012-08-27 Bug#14145950 AUTO_INCREMENT ON DOUBLE WILL FAIL ...
    hery.ramilison@o... 2012-08-24 Raise version number after cloning 5....
    Sergei Golubchik 2013-01-15 update debian patch to apply
    Sergei Golubchik 2013-01-15 [merge] 5.3 merge
    Sergei Golubchik 2013-01-10 [merge] 5.2->5.3 merge
    Sergei Golubchik 2013-01-10 [merge] 5.1 merge
    Sergei Golubchik 2013-01-09 [merge] mysql-5.1.67 merge
    Joerg Bruehe 2012-12-07 Last-minute fix to 5.1.67,
    akhil.mohan@orac... 2012-11-29 applying patch for BUG15912213
    Tor Didriksen 2012-11-01 Bug#14840488 VALGRIND ERRORS IN MYSQL_CLIEN...
    Anirudh Mangipudi 2012-10-30 BUG#11754894: MYISAMCHK ERROR HAS INCOR...
    Shivji Kumar Jha 2012-10-30 BUG#14659685 - main.mysqlbinlog_row_myis...
    mysql-builder@or... 2012-10-29 
    Alexander Nozdrin 2012-10-29 Fix sp_notembedded.test.
    Marko Mäkelä 2012-10-22 Backport from 5.6: Bug#14769820 ASSERT FLEN ...
    Nuno Carvalho 2012-10-21 BUG#14629727: USER_VAR_EVENT IS MISSING RAN...
    Nuno Carvalho 2012-10-21 [merge] BUG#14629727: USER_VAR_EVENT IS MIS...
    Nuno Carvalho 2012-10-12 BUG#14629727: USER_VAR_EVENT IS MISSING RAN...
    Joerg Bruehe 2012-10-19 [merge] Automerge into main 5.1
    Joerg Bruehe 2012-09-11 Backport this change from MySQL 5.5 to 5.1:
    Neeraj Bisht 2012-10-18 Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE...
    Marko Mäkelä 2012-10-18 Bug#14758405: ALTER TABLE: ADDING SERIAL NUL...
    Krunal Bauskar 2012-10-17 bug#14765606: ensure select is active befo...
    Tatjana Azundris... 2012-10-17 [merge] Bug#11764559: UMASK IS IGNORE...
    Tatjana Azundris... 2012-10-17 Bug#11764559: UMASK IS IGNORED BY ERR...
    Yasufumi Kinoshita 2012-10-17 Bug #13702112 : WAIT_FOR_READ IS STUCK...
    Neeraj Bisht 2012-10-16 Bug#11745891 - LAST_INSERT(ID) DOES NOT SUPP...
    Marko Mäkelä 2012-10-16 Bug#14729221 IN-PLACE ALTER TABLE REPORTS ''...
    Krunal Bauskar 2012-10-15 bug#14704286
    Marc Alff 2012-10-12 Bug#14629232 SECURITY VULNERABILITY WITH SHOW P...
    Vasil Dimov 2012-10-10 Fix compilation error in debug mode:
    Vasil Dimov 2012-10-09 Port the test for Bug#14708715 from 5.1/innod...
    Vasil Dimov 2012-10-09 Update the ChangeLog with the fix of Bug#1470...
    Vasil Dimov 2012-10-09 Fix Bug#14708715 CREATE TABLE MEMORY LEAK ON ...
    Marko Mäkelä 2012-10-08 Bug#14731482 UPDATE OR DELETE CORRUPTS A REC...
    Tor Didriksen 2012-10-01 Bug#14683676 ENDLESS MEMORY CONSUMPTION IN ...
    Joerg Bruehe 2012-10-01 [merge] Merge 5.1.66 into main 5.1
    Annamalai Gurusami 2012-09-28 Bug #13249921 ASSERT !BPAGE->FILE_PAGE...
    mysql-builder@or... 2012-09-26 
    Akhila Maddukuri 2012-09-26 Description:
    Tor Didriksen 2012-09-25 Backport
    mysql-builder@or... 2012-09-25 
    mysql-builder@or... 2012-09-25 
    Jon Olav Hauglid 2012-09-25 Bug#14621627 THREAD CACHE IS UNFAIR
    Raghav Kapoor 2012-09-25 BUG#13864642: DROP/CREATE USER BEHAVING ODDLY 
    Rohit Kalhans 2012-09-23 BUG#14548159: Followup patch to fix some is...
    Rohit Kalhans 2012-09-22 BUG#14548159: NUMEROUS CASES OF INCORRECT I...
    Nirbhay Choubey 2012-09-21 Bug#14645196 MYSQL CLIENT'S USE COMMAND F...
    mysql-builder@or... 2012-09-20 
    Marko Mäkelä 2012-09-19 Bug#14636528 INNODB CHANGE BUFFERING IS NOT ...
    Marko Mäkelä 2012-09-17 [merge] Merge mysql-5.1 to working copy.
    Harin Vadodaria 2012-09-17 Bug#11753779: MAX_CONNECT_ERRORS WORKS ON...
    Marko Mäkelä 2012-09-17 Bug#12701488 ASSERT PAGE_ZIP_VALIDATE, UNIV_...
    Sujatha Sivakumar 2012-09-17 Bug#11750014:ASSERTION TRX_DATA->EMPTY(...
    mysql-builder@or... 2012-09-12 
    Tor Didriksen 2012-09-12 Backport Bug#13724099
    Andrei Elkin 2012-09-10 [merge] merge bug14597605 to the main repo.
    Andrei Elkin 2012-09-10 Bug#14597605 Issue with Null-value user on s...
    akhil.mohan@orac... 2012-09-07 Raise version number after cloning 5....
    Sergei Golubchik 2012-12-04 proactive s/strmov/strnmov/ in sql_acl.c...
    Vladislav Vaintroub 2012-12-21 [merge] merge
    Vladislav Vaintroub 2012-12-21 Support VS2012. Exclude compiler-defi...
    Vladislav Vaintroub 2012-12-21 [merge] merge
    Vladislav Vaintroub 2012-12-06 MDEV-3918: myisamchk  bogus error for...
    Sergei Golubchik 2012-12-11 one-byte overflow with old passwords
    Vladislav Vaintroub 2012-11-26 Fix broken feedback plugin after MDEV...
    Vladislav Vaintroub 2012-11-23 MDEV-712  -  LP:1024239 - Mysqlclient...
    Vladislav Vaintroub 2012-11-22 [merge] merge 5.1
    Vladislav Vaintroub 2012-11-22 Feedback plugin now recognizes  Windo...
    Sergei Golubchik 2013-01-08 MDEV-3942 FROM_DAYS(<timestamp column>) ...
    sanja@askmonty.org 2012-12-28 MDEV-3873 & MDEV-3876 & MDEV-3912 : Wr...
    timour@askmonty.org 2012-12-19 MDEV-3928: Assertion `example' failed...
    sanja@montyprogr... 2012-12-05 MDEV-3914 fix.
    Sergei Golubchik 2012-11-23 bump the version to 5.3.11
    Igor Babaev 2012-11-22 [merge] Merge
    Igor Babaev 2012-11-21 Fixed LP bug #1002146 (bug mdev-645).
    Sergei Golubchik 2013-01-15 remove thd_mark_as_hard_kill()
    timour@askmonty.org 2013-01-15 Fix for bug MDEV-3992, second attempt
    timour@askmonty.org 2013-01-14 Fix for bug MDEV-3992
    Michael Widenius 2013-01-11 Buildbot fixes and cleanups:
    Michael Widenius 2013-01-11 Fixed crashing bug in GROUP_CONCAT with ...
    Michael Widenius 2013-01-11 Fixed problem with failing mysql_upgrade...
    Michael Widenius 2013-01-11 Fixed MDEV-4013: Password length in repl...
    Michael Widenius 2013-01-11 Fixed some race conditons and bugs relat...
    Michael Widenius 2013-01-10 Fix for MDEV-4009: main.delayed sporadic...
    Sergei Golubchik 2013-01-09 MDEV-3846 REFRESH_CHECKPOINT and REFRESH...
    Sergei Golubchik 2013-01-09 MDEV-3985 crash: uninstall soname 'a'
    Sergei Golubchik 2013-01-08 MDEV-3883 Show global status not in order
    Sergei Golubchik 2013-01-08 MDEV-3987 uninitialized read in Item_con...
    Sergei Golubchik 2013-01-07 non-functional cleanup, clarifying CONVE...
    Sergei Golubchik 2013-01-28 my_alloca() when it's mapped to malloc()...
    Sergei Golubchik 2013-01-24 fix ha_cassandra to compile
    Sergei Golubchik 2013-01-24 workaround for incorrectly (?) generated...
    Sergei Golubchik 2013-01-24 race conditions in show_explain.test
    Sergei Golubchik 2013-01-23 main.partition_myisam crashes in embedded.
    Sergei Golubchik 2013-01-23 fix the failing federated.federated_inno...
    Sergei Golubchik 2013-01-23 32-bit fix: first cast the value to a si...
    Sergei Golubchik 2013-01-23 test suite fixes
    Sergei Golubchik 2013-01-23 cleanup:
    Sergei Golubchik 2013-01-23 cleanup:
    Sergei Golubchik 2013-01-23 cleanup: remove unused init_dynamic_arra...
    Sergei Golubchik 2013-01-23 cleanup: use MYF() for mysys flags
    Michael Widenius 2013-01-23 MDEV-4011 Added per thread memory counti...
    Jani Tolonen 2013-01-23 MDEV-3931 Cassandra SE packaging
    knielsen@knielse... 2013-01-21 Fix uninitialised variable in binlog ...
    knielsen@knielse... 2013-01-16 Fix missing #include
    Elena Stepanova 2013-01-16 [merge] MDEV-3990: engine tests went out ...
    Elena Stepanova 2013-01-13 MDEV-3990: engine tests went out of sync ...
    sanja@askmonty.org 2013-01-14 Compiler warning fixed.
    Igor Babaev 2013-01-13 [merge] Merged the fix for bug mdev-4019.
    Igor Babaev 2013-01-13 Fixed bug mdev-4019.
    sanja@askmonty.org 2013-01-11 Windows compiler warnings fix.
    sanja@askmonty.org 2013-01-11 Fix windows compiler warnings.
    sanja@askmonty.org 2013-01-10 fixed crossplatform double values repr...
    Sergey Petrunya 2013-01-10 MDEV-3982: show_explain.test fails, times...
    sanja@askmonty.org 2013-01-10 32 bit systems warnings fixed.
    sanja@askmonty.org 2013-01-10 append_identifier() declaration fixed.
    sanja@askmonty.org 2013-01-10 fix cassandra SE test to be working in...
    sanja@askmonty.org 2013-01-10 Make cassandra not built by default
    sanja@askmonty.org 2013-01-10 [merge] Cassandra SE merge
    sanja@askmonty.org 2013-01-10 Make cassandra module and do not load ...
    sanja@askmonty.org 2013-01-09 fixed feature counter.
    sanja@askmonty.org 2013-01-09 The library interface fixed.
    sanja@askmonty.org 2013-01-09 MDEV-4005 fix.
    Sergey Petrunya 2012-12-24 Post-merge fixes:
    sanja@askmonty.org 2012-12-23 [merge] pre-merge
    sanja@askmonty.org 2012-12-23 Post-post review fixes.
    sanja@askmonty.org 2012-12-23 backport to 5.5 dyncol changes and nam...
    Sergey Petrunya 2012-12-20 Cassandra Storage Engine: Address review ...
    Sergey Petrunya 2012-12-20 Cassandra Storage Engine: Address review ...
    Sergey Petrunya 2012-12-20 Cassandra Storage Engine: 
    sanja@montyprogr... 2012-09-30 Check of deleting whole dynamic columns.
    sanja@montyprogr... 2012-09-29 Fix of MDEV-565: Server crashes in ha...
    Sergey Petrunya 2012-09-28 Include cassandra storage engine in tarballs
    Sergey Petrunya 2012-09-28 Fix compile: expect Thrift where it is at...
    Sergey Petrunya 2012-09-28 Fix compile warnings
    sanja@montyprogr... 2012-09-28 Ending spaces removed.
    sanja@montyprogr... 2012-09-28 MDEV-506 Cassandra dynamic columns ac...
    sanja@montyprogr... 2012-09-28 MDEV-377 Name support for dynamic col...
    Sergey Petrunya 2012-09-27 Cassandra SE: lazy connections
    Sergey Petrunya 2012-09-27 Cassandra SE
    Sergey Petrunya 2012-09-26 - Update testcases
    Sergey Petrunya 2012-09-26 Cassandra SE:
    Sergey Petrunya 2012-09-26 Cassandra SE: Add capability to retry fai...
    Sergey Petrunya 2012-09-25 Cassandra SE: more datatypes support
    Sergey Petrunya 2012-09-24 Cassandra SE: varint datatype support: 
    Sergey Petrunya 2012-09-24 Cassandra SE
    Sergey Petrunya 2012-09-22 Cassandra SE: make consistency settings u...
    Sergey Petrunya 2012-09-20 Cassandra SE:
    Sergey Petrunya 2012-09-16 Cassandra SE: 
    Sergey Petrunya 2012-09-14 MDEV-530: Cassandra SE: Locking is incorrect
    Sergey Petrunya 2012-09-14 Cassandra SE
    Sergey Petrunya 2012-09-14 Cassandra SE
    Sergey Petrunya 2012-09-12 Cassandra SE: small optimization: StringC...
    Sergey Petrunya 2012-09-12 Update test results after last cset
    Sergey Petrunya 2012-09-10 Cassandra SE: add support for reading cou...
    Sergey Petrunya 2012-09-10 Cassandra SE
    Sergey Petrunya 2012-09-07 Cassandra SE: added support for boolean t...
    Sergey Petrunya 2012-08-31 MDEV-498: Cassandra: Inserting a timestam...
    Sergey Petrunya 2012-08-31 Cassandra SE
    Sergey Petrunya 2012-08-29 Cassandra SE: fix batched insert to flush...
    Sergey Petrunya 2012-08-29 Fix for the previous cset: Field::store_T...
    Sergey Petrunya 2012-08-29 Cassandra SE: Timestamp data type support.
    Sergey Petrunya 2012-08-29 Cassandra SE
    Sergey Petrunya 2012-08-29 Cassandra storage engine: add @@rnd_batch...
    Sergey Petrunya 2012-08-28 MDEV-494, part #1: phantom row for big fu...
    Sergey Petrunya 2012-08-28 MDEV-480: TRUNCATE TABLE on a Cassandra t...
    Sergey Petrunya 2012-08-27 Cassandra storage engine: BKA support
    Sergey Petrunya 2012-08-26 Cassandra storage engine: bulk INSERT sup...
    Sergey Petrunya 2012-08-23 - Enable mapping of CHAR(n)
    Sergey Petrunya 2012-08-23 # MDEV-476: Cassandra: Server crashes in ...
    Sergey Petrunya 2012-08-21 Make ha_cassandra work with filesort().
    Sergey Petrunya 2012-08-20 Read records in batches when doing full t...
    Sergey Petrunya 2012-08-19 position() and rnd_pos() implementations.
    Sergey Petrunya 2012-08-19 MDEV-431: Cassandra storage engine
    Sergey Petrunya 2012-08-19 MDEV-431: Cassandra storage engine
    Sergey Petrunya 2012-08-18 MDEV-431: Cassandra storage engine
    Sergey Petrunya 2012-08-18 MDEV-431: Cassandra storage engine
    Sergey Petrunya 2012-08-18 MDEV-431: Cassandra storage engine
    Sergey Petrunya 2012-08-17 Initial commit for Cassandra storage engine.
2013-03-29 11:33:42 +04:00
Sergei Golubchik
993ea79f2d 5.5 merge 2013-03-27 23:41:02 +01:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Annamalai Gurusami
b6bd199850 Bug #16051728 SERVER CRASHES IN ADD_IDENTIFIER ON CONCURRENT ALTER TABLE AND
SHOW ENGINE INNOD

Problem:

The purpose of explain_filename() is to provide useful additional
information regarding the partitions given the filename.  This function
was returning an error when it was not able to parse the given filename.
For example, within InnoDB, temporary files are created with #sql-
prefix.  But this function was not able to parse it correctly.

Solution:

It is not an error, if explain_filename() could not parse the given
filename.  If there is no partition information to explain, then silently
return from the function.

rb#1940 approved by mattiasj
2013-03-21 11:40:43 +05:30
Annamalai Gurusami
63dc91d7da Bug #16051728 SERVER CRASHES IN ADD_IDENTIFIER ON CONCURRENT ALTER TABLE AND
SHOW ENGINE INNOD

Problem:

The purpose of explain_filename() is to provide useful additional
information regarding the partitions given the filename.  This function
was returning an error when it was not able to parse the given filename.
For example, within InnoDB, temporary files are created with #sql-
prefix.  But this function was not able to parse it correctly.

Solution:

It is not an error, if explain_filename() could not parse the given
filename.  If there is no partition information to explain, then silently
return from the function.

rb#1940 approved by mattiasj
2013-03-21 11:40:43 +05:30
Michael Widenius
ab1c228836 Fix for assert found by mysql-test-run
sql/sql_table.cc:
  Don't call allow_access_to_protected_table() if we haven't protected table against usage.
  Table is mainly protected against usage when one disables keys with alter table.
2013-03-05 20:15:36 +02:00
Michael Widenius
e2a72fefb4 Fixed issue with LOCK TABLE + ALTER TABLE ENABLE KEYS + SHOW commands.
sql/sql_table.cc:
  Remove version protection from share when repair has been done.
  Without this one can't run SHOW commands on the table if it was locked until it's unlocked.
sql/table.h:
  Allow one to remove version protection with allow_access_to_protected_table()
2013-03-05 00:53:18 +02:00
Michael Widenius
4cace76d4d Automatic merge 2013-03-01 18:09:06 +02:00
Michael Widenius
8ed283d882 Fixed bug MPDEV-628 / LP:989055 - Querying myisam table metadata may corrupt the table.
The issue was that there was that SHOW commands could open the table in the store engine, even in cases
where it should not be allowed to do that (ie, the storage engines meta data for that table was under big changes).

The cases where this should not be allowed are:
- ALTER TABLE DISABLE KEYS
- ALTER TABLE ENABLE KEYS
- REPAIR TABLE
- OPTIMIZE TABLE
- DROP TABLE

This patch adds a new mode, protected_against_usage(). If this is used then the SHOW command will wait until the table
is accessable. This is implemented by re-using the already exising 'version' flag for TABLE_SHARE.
It also added functions to be used to change TABLE_SHARE->version instead of changing it directly.
	


mysql-test/r/myisam-metadata.result:
  Added test case
mysql-test/t/myisam-metadata.test:
  Added test case
sql/mysqld.cc:
  Start from refresh_version 2 as 0 and 1 are reserved.
sql/sql_admin.cc:
  Added MYSQL_OPEN_FOR_REPAIR
  Updated call to wait_while_table_is_used()
sql/sql_base.cc:
  Updated call to wait_while_table_is_used()
  - Allow one to specify how the table should be removed (for all commands except show or for all commands).
  - Don't allow one to reopen the table if one has called share->protect_against_usage()
sql/sql_base.h:
  Added TDC_RT_REMOVE_NOT_OWN_AND_MARK_NOT_USABLE, which is used to mark that no one can reopen this table, except with MYSQL_OPEN_FOR_REPAIR .
  - Added MYSQL_OPEN_FOR_REPAIR
  - Updated prototype for wait_while_table_is_used()
sql/sql_table.cc:
  Updated call to wait_while_table_is_used()
  Use MYSQL_OPEN_FOR_REPAIR for open tables that where repaired.
sql/sql_truncate.cc:
  Updated call to wait_while_table_is_used()
sql/table.cc:
  Use set_refresh_version()
sql/table.h:
  Added functions to be used to change TABLE_SHARE->version instead of changing it directly
2013-03-01 18:01:44 +02:00
Sergei Golubchik
213f1c76a0 5.3->5.5 merge 2013-02-28 22:47:29 +01:00
Sergei Golubchik
c4341d5095 5.2 -> 5.3 2013-02-28 21:48:47 +01:00
Sergei Golubchik
5dec570d7c 5.1 -> 5.2 merge 2013-02-28 19:00:58 +01:00
Sergei Golubchik
8161c6772d merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
Sergei Golubchik
08ba257846 mysql-5.1 merge
mysys/errors.c:
  revert upstream's fix. use a much simpler one
mysys/my_write.c:
  revert upstream's fix. use a simpler one
sql/item_xmlfunc.cc:
  useless, but ok
sql/mysqld.cc:
  simplify upstream's fix
storage/heap/hp_delete.c:
  remove upstream's fix.
  we'll use a much less expensive approach.
2013-02-28 09:58:39 +01:00
Olivier Bertrand
f83588a0f9 Implementing pre_create option test and setting of default values.
Currently, only TABLE_TYPE is tested, and if wrong or unspecified,
is replaced by the default value DOS.

- Test on type was moved from create to pre_create
- pre_create is now called unconditionally and must return true
  on error and false otherwise.
- Warnings are produced if the table type was changed.
- The errors have specific error messages (instead of being warnings
  with an error message telling that a table must have columns)

Modified:
ha_connect.cc
ha_connect.h
handler.h
sql_table.cc
2013-02-15 01:33:23 +01:00
Mattias Jonsson
e96182824d Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN
DOWNGRADED FROM 5.6.11 TO 5.6.10

Problem was new syntax not accepted by previous version.

Fixed by adding version comment of /*!50531 around the
new syntax.

Like this in the .frm file:
'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3'
and also changing the output from SHOW CREATE TABLE to:
CREATE TABLE t1 (a INT)
/*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 ()
PARTITIONS 3 */

It will always add the ALGORITHM into the .frm for KEY [sub]partitioned
tables, but for SHOW CREATE TABLE it will only add it in case it is the non
default ALGORITHM = 1.

Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which
will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail!
If one downgrades an fixed version to the same major version (5.5 or 5.6) the
bug 14521864 will be visible again, but unless the .frm is updated, it will
work again when upgrading again.

Also fixed so that the .frm does not get updated version
if a single partition check passes.
2013-02-14 17:03:49 +01:00
Mattias Jonsson
89681f6dc6 Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN
DOWNGRADED FROM 5.6.11 TO 5.6.10

Problem was new syntax not accepted by previous version.

Fixed by adding version comment of /*!50531 around the
new syntax.

Like this in the .frm file:
'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3'
and also changing the output from SHOW CREATE TABLE to:
CREATE TABLE t1 (a INT)
/*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 ()
PARTITIONS 3 */

It will always add the ALGORITHM into the .frm for KEY [sub]partitioned
tables, but for SHOW CREATE TABLE it will only add it in case it is the non
default ALGORITHM = 1.

Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which
will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail!
If one downgrades an fixed version to the same major version (5.5 or 5.6) the
bug 14521864 will be visible again, but unless the .frm is updated, it will
work again when upgrading again.

Also fixed so that the .frm does not get updated version
if a single partition check passes.
2013-02-14 17:03:49 +01:00
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Michael Widenius
a260b15554 MDEV-4011 Added per thread memory counting and usage
Base code and idea from a patch from by plinux at Taobao.

The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC.
Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc().
There are plenty of new asserts to ensure that for a debug server the counting is correct.

Information_schema.processlist gets two new columns: MEMORY_USED and EXAMINED_ROWS.
- The later is there mainly to show how query is progressing.

The following changes in interfaces was needed to get this to work:
- init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root()
- my_init_dynamic_array()  has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- Added flag for hash_init() so that one can mark hash table to be thread specific.
- Added flags to init_tree() so that one can mark tree to be thread specific.
- Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
- Added flag to Warning_info::Warning_info() if the structure should be fully initialized.
- String elements can now be marked as thread specific.
- Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
- Changed type of myf from int to ulong, as this is always a set of bit flags.

Other things:
- Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
- We now also show EXAMINED_ROWS in SHOW PROCESSLIST
- Added new variable 'memory_used'
- Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
- Removed calls to the obsoleted function init_dynamic_array()
- Use set_current_thd() instead of my_pthread_setspecific_ptr(THR_THD,...)


client/completion_hash.cc:
  Updated call to init_alloc_root()
client/mysql.cc:
  Updated call to init_alloc_root()
client/mysqlbinlog.cc:
  init_dynamic_array() -> my_init_dynamic_array()
  Updated call to init_alloc_root()
client/mysqlcheck.c:
  Updated call to my_init_dynamic_array()
client/mysqldump.c:
  Updated call to init_alloc_root()
client/mysqltest.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Fixed compiler warnings
extra/comp_err.c:
  Updated call to my_init_dynamic_array()
extra/resolve_stack_dump.c:
  Updated call to my_init_dynamic_array()
include/hash.h:
  Added HASH_THREAD_SPECIFIC
include/heap.h:
  Added flag is internal temporary table.
include/my_dir.h:
  Safety fix: Ensure that MY_DONT_SORT and MY_WANT_STAT don't interfer with other mysys flags
include/my_global.h:
  Changed type of myf from int to ulong, as this is always a set of bit flags.
include/my_sys.h:
  Added MY_THREAD_SPECIFIC and MY_THREAD_MOVE
  Added malloc_flags to DYNAMIC_ARRAY
  Added extra mysys flag argument to my_init_dynamic_array()
  Removed deprecated functions init_dynamic_array() and my_init_dynamic_array.._ci
  Updated paramaters for init_alloc_root()
include/my_tree.h:
  Added my_flags to allow one to use MY_THREAD_SPECIFIC with hash tables.
  Removed with_delete. One should now instead use MY_TREE_WITH_DELETE_FLAG
  Updated parameters to init_tree()
include/myisamchk.h:
  Added malloc_flags to allow one to use MY_THREAD_SPECIFIC for checks.
include/mysql.h:
  Added MYSQL_THREAD_SPECIFIC_MALLOC
  Used 'unused1' to mark memory as thread specific.
include/mysql.h.pp:
  Updated file
include/mysql_com.h:
  Used 'unused1' to mark memory as thread specific.
  Updated parameters for my_net_init()
libmysql/libmysql.c:
  Updated call to init_alloc_root() to mark memory thread specific.
libmysqld/emb_qcache.cc:
  Updated call to init_alloc_root()
libmysqld/lib_sql.cc:
  Updated call to init_alloc_root()
mysql-test/r/create.result:
  Updated results
mysql-test/r/user_var.result:
  Updated results
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
  Updated results
mysql-test/t/show_explain.test:
  Fixed usage of debug variable so that one can run test with --debug
mysql-test/t/user_var.test:
  Added test of memory_usage variable.
mysys/array.c:
  Added extra my_flags option to init_dynamic_array() and init_dynamic_array2() so that one can mark memory with MY_THREAD_SPECIFIC
  All allocated memory is marked with the given my_flags.
  Removed obsolete function init_dynamic_array()
mysys/default.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
mysys/hash.c:
  Updated call to my_init_dynamic_array_ci().
  Allocated memory is marked with MY_THREAD_SPECIFIC if HASH_THREAD_SPECIFIC is used.
mysys/ma_dyncol.c:
  init_dynamic_array() -> my_init_dynamic_array()
  Added #if to get rid of compiler warnings
mysys/mf_tempdir.c:
  Updated call to my_init_dynamic_array()
mysys/my_alloc.c:
  Added extra parameter to init_alloc_root() so that one can mark memory with MY_THREAD_SPECIFIC
  Extend MEM_ROOT with a flag if memory is thread specific.
  This is stored in block_size, to keep the size of the MEM_ROOT object identical as before.
  Allocated memory is marked with MY_THREAD_SPECIFIC if used with init_alloc_root()
mysys/my_chmod.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_chsize.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_copy.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_create.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_delete.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_error.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fopen.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fstream.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_getwd.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_lib.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Updated DBUG_PRINT because of change of myf type
mysys/my_lock.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_malloc.c:
  Store at start of each allocated memory block the size of the block and if the block is thread specific.
  Call malloc_size_cb_func, if set, with the memory allocated/freed.
  Updated DBUG_PRINT because of change of myf type
mysys/my_open.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_pread.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_read.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_redel.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_rename.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_seek.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_sync.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_thr_init.c:
  Ensure that one can call my_thread_dbug_id() even if thread is not properly initialized.
mysys/my_write.c:
  Updated DBUG_PRINT because of change of myf type
mysys/mysys_priv.h:
  Updated parameters to sf_malloc and sf_realloc()
mysys/safemalloc.c:
  Added checking that for memory marked with MY_THREAD_SPECIFIC that it's the same thread that is allocation and freeing the memory.
  Added sf_malloc_dbug_id() to allow MariaDB to specify which THD is handling the memory.
  Added my_flags arguments to sf_malloc() and sf_realloc() to be able to mark memory with MY_THREAD_SPECIFIC.
  Added sf_report_leaked_memory() to get list of memory not freed by a thread.
mysys/tree.c:
  Added flags to init_tree() so that one can mark tree to be thread specific.
  Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
  Updated call to init_alloc_root()
  All allocated memory is marked with the given malloc flags
mysys/waiting_threads.c:
  Updated call to my_init_dynamic_array()
sql-common/client.c:
  Updated call to init_alloc_root() and my_net_init() to mark memory thread specific.
  Updated call to my_init_dynamic_array().
  Added MYSQL_THREAD_SPECIFIC_MALLOC so that client can mark memory as MY_THREAD_SPECIFIC.
sql-common/client_plugin.c:
  Updated call to init_alloc_root()
sql/debug_sync.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/event_scheduler.cc:
  Removed calls to net_end() as this is now done in ~THD()
  Call set_current_thd() to ensure that memory is assigned to right thread.
sql/events.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/filesort.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/filesort_utils.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/ha_ndbcluster.cc:
  Updated call to init_alloc_root()
  Updated call to my_net_init()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_ndbcluster_binlog.cc:
  Updated call to my_net_init()
  Updated call to init_sql_alloc()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_partition.cc:
  Updated call to init_alloc_root()
sql/handler.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added missing call to my_dir_end()
sql/item_func.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_subselect.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_sum.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/log.cc:
  More DBUG
  Updated call to init_alloc_root()
sql/mdl.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/mysqld.cc:
  Added total_memory_used
  Updated call to init_alloc_root()
  Move mysql_cond_broadcast() before my_thread_end()
  Added mariadb_dbug_id() to count memory per THD instead of per thread.
  Added my_malloc_size_cb_func() callback function for my_malloc() to count memory.
  Move initialization of mysqld_server_started and mysqld_server_initialized earlier.
  Updated call to my_init_dynamic_array().
  Updated call to my_net_init().
  Call my_pthread_setspecific_ptr(THR_THD,...) to ensure that memory is assigned to right thread.
  Added status variable 'memory_used'.
  Updated call to init_alloc_root()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/mysqld.h:
  Added set_current_thd()
sql/net_serv.cc:
  Added new parameter to my_net_init() so that one can mark memory with MY_THREAD_SPECIFIC.
  Store in net->thread_specific_malloc if memory is thread specific.
  Mark memory to be thread specific if requested.
sql/opt_range.cc:
  Updated call to my_init_dynamic_array()
  Updated call to init_sql_alloc()
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/opt_subselect.cc:
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/protocol.cc:
  Fixed compiler warning
sql/records.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/rpl_filter.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_handler.cc:
  Updated call to my_init_dynamic_array2()
sql/rpl_handler.h:
  Updated call to init_sql_alloc()
sql/rpl_mi.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_tblmap.cc:
  Updated call to init_alloc_root()
sql/rpl_utility.cc:
  Updated call to my_init_dynamic_array()
sql/slave.cc:
  Initialize things properly before calling functions that allocate memory.
  Removed calls to net_end() as this is now done in ~THD()
sql/sp_head.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  Added parameter to warning_info() that it should be fully initialized.
sql/sp_pcontext.cc:
  Updated call to my_init_dynamic_array()
sql/sql_acl.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_admin.cc:
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_analyse.h:
  Updated call to init_tree() to mark memory thread specific.
sql/sql_array.h:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_audit.cc:
  Updated call to my_init_dynamic_array()
sql/sql_base.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_cache.cc:
  Updated comment
sql/sql_class.cc:
  Added parameter to warning_info() that not initialize it until THD is fully created.
  Updated call to init_sql_alloc()
  Mark THD::user_vars has to be thread specific.
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by THD is assigned to the THD.
  More DBUG
  Always acll net_end() in ~THD()
  Assert that all memory signed to this THD is really deleted at ~THD.
  Fixed set_status_var_init() to not reset memory_used.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_class.h:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added malloc_size to THD to record allocated memory per THD.
sql/sql_delete.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_error.cc:
  Added 'initialize' parameter to Warning_info() to say if should allocate memory for it's structures.
  This is used by THD::THD() to not allocate memory until THD is ready.
  Added Warning_info::free_memory()
sql/sql_error.h:
  Updated Warning_info() class.
sql/sql_handler.cc:
  Updated call to init_alloc_root() to mark memory thread specific.
sql/sql_insert.cc:
  More DBUG
sql/sql_join_cache.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_lex.cc:
  Updated call to my_init_dynamic_array()
sql/sql_lex.h:
  Updated call to my_init_dynamic_array()
sql/sql_load.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_parse.cc:
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
  Ensure that examined_row_count() is reset before query.
  Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Don't restore thd->status_var.memory_used when restoring thd->status_var
sql/sql_plugin.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Don't allocate THD on the stack, as this causes problems with valgrind when doing thd memory counting.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_prepare.cc:
  Added parameter to warning_info() that it should be fully initialized.
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/sql_reload.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_select.cc:
  Updated call to my_init_dynamic_array() and init_sql_alloc() to mark memory thread specific.
  Added MY_THREAD_SPECIFIC to allocated memory.
  More DBUG
sql/sql_servers.cc:
  Updated call to init_sql_alloc() to mark memory some memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_show.cc:
  Updated call to my_init_dynamic_array()
  Mark my_dir() memory thread specific.
  Use my_pthread_setspecific_ptr(THR_THD,...) to mark that allocated memory should be allocated to calling thread.
  More DBUG.
  Added malloc_size and examined_row_count to SHOW PROCESSLIST.
  Added MY_THREAD_SPECIFIC to allocated memory.
  Updated call to init_sql_alloc()
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_statistics.cc:
  Fixed compiler warning
sql/sql_string.cc:
  String elements can now be marked as thread specific.
sql/sql_string.h:
  String elements can now be marked as thread specific.
sql/sql_table.cc:
  Updated call to init_sql_alloc() and my_malloc() to mark memory thread specific
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Fixed compiler warning
sql/sql_test.cc:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_trigger.cc:
  Updated call to init_sql_alloc()
sql/sql_udf.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_update.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/table.cc:
  Updated call to init_sql_alloc().
  Mark memory used by temporary tables, that are not for slave threads, as MY_THREAD_SPECIFIC
  Updated call to init_sql_alloc()
sql/thr_malloc.cc:
  Added my_flags argument to init_sql_alloc() to be able to mark memory as MY_THREAD_SPECIFIC.
sql/thr_malloc.h:
  Updated prototype for init_sql_alloc()
sql/tztime.cc:
  Updated call to init_sql_alloc()
  Updated call to init_alloc_root() to mark memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/uniques.cc:
  Updated calls to init_tree(), my_init_dynamic_array() and my_malloc() to mark memory thread specific.
sql/unireg.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/csv/ha_tina.cc:
  Updated call to init_alloc_root()
storage/federated/ha_federated.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by fedarated is registered for the system, not for the thread.
storage/federatedx/federatedx_io_mysql.cc:
  Updated call to my_init_dynamic_array()
storage/federatedx/ha_federatedx.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
storage/heap/ha_heap.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/heap/heapdef.h:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_block.c:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_create.c:
  - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
  - Use MY_TREE_WITH_DELETE instead of removed option 'with_delete'.
storage/heap/hp_open.c:
  Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
storage/heap/hp_write.c:
  Added new parameter to hp_get_new_block()
storage/maria/ma_bitmap.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_blockrec.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_check.c:
  Updated call to init_alloc_root()
storage/maria/ma_ft_boolean_search.c:
  Updated calls to init_tree() and init_alloc_root()
storage/maria/ma_ft_nlq_search.c:
  Updated call to init_tree()
storage/maria/ma_ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/maria/ma_loghandler.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_open.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_sort.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_write.c:
  Updated calls to my_init_dynamic_array() and init_tree()
storage/maria/maria_pack.c:
  Updated call to init_tree()
storage/maria/unittest/sequence_storage.c:
  Updated call to my_init_dynamic_array()
storage/myisam/ft_boolean_search.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_nlq_search.c:
  Updated call to init_tree()
storage/myisam/ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_stopwords.c:
  Updated call to init_tree()
storage/myisam/mi_check.c:
  Updated call to init_alloc_root()
storage/myisam/mi_write.c:
  Updated call to my_init_dynamic_array()
  Updated call to init_tree()
storage/myisam/myisamlog.c:
  Updated call to init_tree()
storage/myisam/myisampack.c:
  Updated call to init_tree()
storage/myisam/sort.c:
  Updated call to my_init_dynamic_array()
storage/myisammrg/ha_myisammrg.cc:
  Updated call to init_sql_alloc()
storage/perfschema/pfs_check.cc:
  Rest current_thd
storage/perfschema/pfs_instr.cc:
  Removed DBUG_ENTER/DBUG_VOID_RETURN as at this point my_thread_var is not allocated anymore, which can cause problems.
support-files/compiler_warnings.supp:
  Disable compiler warning from offsetof macro.
2013-01-23 16:16:14 +01:00
Alexander Barkov
37465ea2fe Adding an Olivier's changeset:
pre_create function and one is now able to create table
without giving the column specifications for tables of types:
DBF, ODBC, MYSQL, CSV, and WMI (on Windows)

modified:
  sql/handler.h
  sql/sql_table.cc
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/odbconn.cpp
  storage/connect/plgcnx.h
  storage/connect/tabfmt.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabwmi.cpp
2013-01-22 18:14:34 +04:00
Igor Babaev
1ef07d0845 Merge 10.0-base -> 10.0.
Also fixed a bug in sql_update.cc: the code of mysql_update() lacked
a call of set_statistics_for_table().
2013-01-10 22:33:23 -08:00
Igor Babaev
f853333e09 Merge 5.5-mwl248 -> 10.0-base 2013-01-08 19:34:33 -08:00
Igor Babaev
7d9df8075e Merge 5.5 -> mwl248 2013-01-08 15:04:14 -08:00
Mattias Jonsson
544f413df9 merge 2012-12-27 02:43:20 +01:00
Mattias Jonsson
11b5693839 merge 2012-12-27 02:43:20 +01:00
Mattias Jonsson
6b7182d9a3 Bug#14589559 Post push fix for valgrind warnings. 2012-12-27 02:27:00 +01:00
Mattias Jonsson
a8b6224036 Bug#14589559 Post push fix for valgrind warnings. 2012-12-27 02:27:00 +01:00
Igor Babaev
88b59efef6 Merge mdev539->10.0-base. 2012-12-20 15:38:29 -08:00
Igor Babaev
ca2cdaad86 The patch for the task mdev-539.
The patch lifts the limitation of the current implementation
of ALTER TABLE that does not allow to build unique/primary
indexes by sort for MyISAM and Aria engines.
2012-12-20 10:58:40 -08:00
unknown
701419b02f Merge MariaDB 10.0-base to MariaDB 10.0 2012-12-18 15:01:58 +01:00
Igor Babaev
1b62f0f58c Merge maria-5.5-mwl248 -> 10.0-base. 2012-12-16 21:33:17 -08:00
Igor Babaev
7760efad74 Merge mariadb-5.5 -> 10.0-base. 2012-12-16 16:49:19 -08:00
Sergei Golubchik
4923d19b7c small code cleanup taken from MySQL 5.6 2012-12-16 21:45:45 +01:00
Igor Babaev
a06224bd15 Addressed all remaining issues from the review of the patch
that introduced engine independent persistent statistics.
In particular:
- added an enumeration type for possible values of the system
  variable use_stat_tables
- renamed KEY::real_rec_per_key to KEY::actual_rec_per_key
- optimized the collection of statistical data for any primary
  key defined only on one column.
2012-12-13 23:05:12 -08:00
Igor Babaev
2447bc4c81 Addressed the following issue from the review of the patch for
engine-independent statistics.
When the primary key was dropped or changed statistics on secondary
indexes for the prefixes that included components of the primary 
key was not removed from the table mysql.index_stats.

Also fixed: in the some cases when a column was changed statistics
on the indexes that included this column was not removed from the
table mysql.index_stats.

Also disabled the test mdev-504 for --ps-protocol.
2012-12-08 15:38:15 -08:00
Michael Widenius
2dbce3d089 Fixed the CREATE TABLE IF EXIST generates warnings instead of errors
mysql-test/r/create.result:
  Updated test results
mysql-test/t/create.test:
  Updated test
sql/sql_base.cc:
  Use push_internal_handler/pop_internal_handler to avoid errors & warnings instead of clear_error
  Give a warnings instead of an error for CREATE TABLE IF EXISTS
sql/sql_parse.cc:
  Check if we failed because of table exists (can only happen from create)
sql/sql_table.cc:
  Check if we failed because of table exists (can only happen from create)
2012-12-17 22:34:56 +02:00
Michael Widenius
a334e87d65 Remember original table row pack type for ALTER TABLE if table is not copied. 2012-12-16 20:51:48 +02:00
Igor Babaev
f8bfb65b13 Merge 5.5->mwl248 2012-12-04 19:04:25 -08:00
Mattias Jonsson
4148bec151 merge mysql-5.1 -> mysql-5.5 2012-12-01 09:17:56 +01:00
Mattias Jonsson
b0f2505258 merge mysql-5.1 -> mysql-5.5 2012-12-01 09:17:56 +01:00
Mattias Jonsson
b6249e510b merge of bug#14589559 into mysql-5.1 2012-12-01 09:07:03 +01:00
Mattias Jonsson
f5bd8340a8 merge of bug#14589559 into mysql-5.1 2012-12-01 09:07:03 +01:00
Mattias Jonsson
17076f8cd3 bug#14589559: ASSERTION `FILE_ENTRY_BUF[2] == 0' FAILED
IN DEACTIVATE_DDL_LOG_ENTRY

Update of comments according to reviewers request.
2012-11-30 16:17:38 +01:00
Mattias Jonsson
fbe1315bd9 bug#14589559: ASSERTION `FILE_ENTRY_BUF[2] == 0' FAILED
IN DEACTIVATE_DDL_LOG_ENTRY

Update of comments according to reviewers request.
2012-11-30 16:17:38 +01:00
Sergei Golubchik
a48a91d90f 5.3->5.5 merge 2012-11-22 10:19:31 +01:00
unknown
ecf04668a2 Merge MariaDB 5.2->5.3 2012-11-20 13:57:49 +01:00
Igor Babaev
094f4cf778 Fixed bug mdev-3845.
If triggers are used for an insert/update/delete statement than the values of
all virtual columns must be computed as any of them may be used by the triggers.
2012-11-09 23:51:51 -08:00
Aditya A
b6d3362948 Bug#11751825 - OPTIMIZE PARTITION RECREATES FULL TABLE INSTEAD JUST PARTITION
PROBLEM 
-------

optimize on partiton will recreate the whole table 
instead of just partition.

ANALYSIS
--------

At present innodb doesn't support optimize option ,so we do a rebuild of the 
whole table and then call analyze() on the table.Presently for any optimize()
option (on table or partition) we display the following info to the user 

"Table does not support optimize, doing recreate + analyze instead".

FIX
---

It was decided for GA versions(5.1 and 5.5) whenever the user tries to 
optimize a partition(s) we will will display the following info the user

"Table does not support optimize on partitions.
All partitions will be rebuilt and analyzed."

Earlier partitions were not analyzed.Now all partitions  will be analyzed.  

If the user wants to optimize the whole table ,we will display the
previous info to the user. i.e

"Table does not support optimize, doing recreate + analyze instead"

For 5.6+ versions we will raise a new bug to support optimize() options
in innodb.
2012-11-06 18:35:03 +05:30
Aditya A
cdf5f4538d Bug#11751825 - OPTIMIZE PARTITION RECREATES FULL TABLE INSTEAD JUST PARTITION
PROBLEM 
-------

optimize on partiton will recreate the whole table 
instead of just partition.

ANALYSIS
--------

At present innodb doesn't support optimize option ,so we do a rebuild of the 
whole table and then call analyze() on the table.Presently for any optimize()
option (on table or partition) we display the following info to the user 

"Table does not support optimize, doing recreate + analyze instead".

FIX
---

It was decided for GA versions(5.1 and 5.5) whenever the user tries to 
optimize a partition(s) we will will display the following info the user

"Table does not support optimize on partitions.
All partitions will be rebuilt and analyzed."

Earlier partitions were not analyzed.Now all partitions  will be analyzed.  

If the user wants to optimize the whole table ,we will display the
previous info to the user. i.e

"Table does not support optimize, doing recreate + analyze instead"

For 5.6+ versions we will raise a new bug to support optimize() options
in innodb.
2012-11-06 18:35:03 +05:30
Igor Babaev
8d612adf70 Merge 5.5 -> 5.5-mwl248. 2012-11-02 20:38:05 -07:00
Sergei Golubchik
e1f681c99b 10.0-base -> 10.0-monty 2012-10-19 20:38:59 +02:00
unknown
69a7b04add Merge mdev-452 with the latest 10.0-base. 2012-10-18 15:57:12 +03:00
Mattias Jonsson
b3973b64cc Manual merge of bug#14589559 from mysql-5.1 to 5.5 2012-10-18 12:27:02 +02:00
Mattias Jonsson
134c8cb791 Manual merge of bug#14589559 from mysql-5.1 to 5.5 2012-10-18 12:27:02 +02:00
Mattias Jonsson
5f4dc7531f Bug#14589559: ASSERTION `FILE_ENTRY_BUF[2] == 0'
FAILED IN DEACTIVATE_DDL_LOG_ENTRY

deallocate_ddl_log_entry() can be called without having
locked LOCK_gdl. It uses a global buffer for reading and
writing entries in the ddl_log, and since it is not protected
by any mutex, two concurrent threads can overwrite the
content in the global buffer, so it can be different from
what was read.
Thread a reads from entry 1 into global
buffer, thread b reads from entry 2 into global buffer,
thread a writes from global buffer into entry 1
-> entry 1 is not the content of entry 2.

This is especially bad for replace entries, which uses
two phases, and does not deactivate the whole entry
after the first phase, but increases the phase instead.

Fixed by using thread local storage (stack) instead of global
storage (global buffer).

Also added buffer and size arguments to
read/write_ddl_log_file_entry.

Also only read/write first bytes in entries in
deactivate_ddl_log_entry.

Also fixed the scenario where it will try to recover from a server
compiled with a different value of IO_SIZE (very uncommon!)

updated patch with set_ddl_log_entry_from_buf
and removed read_ddl_log_entry.

Manually tested, no test case included.
2012-10-18 11:59:47 +02:00
Mattias Jonsson
60f5f31468 Bug#14589559: ASSERTION `FILE_ENTRY_BUF[2] == 0'
FAILED IN DEACTIVATE_DDL_LOG_ENTRY

deallocate_ddl_log_entry() can be called without having
locked LOCK_gdl. It uses a global buffer for reading and
writing entries in the ddl_log, and since it is not protected
by any mutex, two concurrent threads can overwrite the
content in the global buffer, so it can be different from
what was read.
Thread a reads from entry 1 into global
buffer, thread b reads from entry 2 into global buffer,
thread a writes from global buffer into entry 1
-> entry 1 is not the content of entry 2.

This is especially bad for replace entries, which uses
two phases, and does not deactivate the whole entry
after the first phase, but increases the phase instead.

Fixed by using thread local storage (stack) instead of global
storage (global buffer).

Also added buffer and size arguments to
read/write_ddl_log_file_entry.

Also only read/write first bytes in entries in
deactivate_ddl_log_entry.

Also fixed the scenario where it will try to recover from a server
compiled with a different value of IO_SIZE (very uncommon!)

updated patch with set_ddl_log_entry_from_buf
and removed read_ddl_log_entry.

Manually tested, no test case included.
2012-10-18 11:59:47 +02:00
unknown
bc4a456758 MDEV-452 Add full support for auto-initialized/updated timestamp and datetime
Generalized support for auto-updated and/or auto-initialized timestamp
and datetime columns. This patch is a reimplementation of MySQL's
"WL#5874: CURRENT_TIMESTAMP as DEFAULT for DATETIME columns". In order to
ease future merges, this implementation reused few function and variable
names from MySQL's patch, however the implementation is quite different.

TODO:
The only unresolved problem in this patch is the semantics of LOAD DATA for
TIMESTAMP and DATETIME columns in the cases when there are missing or NULL
columns. I couldn't fully comprehend the logic behind MySQL's behavior and
its relationship with their own documentation, so I left the results to be
more consistent with all other LOAD cases.

The problematic test cases can be seen by running the test file function_defaults,
and observing the test case differences. Those were left on purpose for discussion.
2012-10-17 15:43:56 +03:00
Sergei Golubchik
474fe6d9d9 fixes for test failures
and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
2012-09-27 20:09:46 +02:00
Michael Widenius
3e83c4e8f9 Automatic merge 2012-09-22 15:30:24 +03:00
Rohit Kalhans
5530c5e38d BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER
QUOTING IN REPLICATION 

Problem: Misquoting or unquoted identifiers may lead to
incorrect statements to be logged to the binary log.

Fix: we use specialized functions to append quoted identifiers in
the statements generated by the server.
2012-09-22 17:50:51 +05:30
Rohit Kalhans
5f003eca00 BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER
QUOTING IN REPLICATION 

Problem: Misquoting or unquoted identifiers may lead to
incorrect statements to be logged to the binary log.

Fix: we use specialized functions to append quoted identifiers in
the statements generated by the server.
2012-09-22 17:50:51 +05:30
Michael Widenius
ae5bc05988 Fix for MDEV-533: Confusing error code when doing auto-increment insert for out-of-range values
create table t1 (a smallint primary key auto_increment);
insert into t1 values(32767);
insert into t1 values(NULL);
ERROR 1062 (23000): Duplicate entry '32767' for key 'PRIMARY

Now on always gets error HA_ERR_AUTOINC_RANGE=167 "Out of range value for column", independent of
store engine, SQL Mode or number of inserted rows. This is an unique error that is easier to test for in replication.

Another bug fix is that we now get an error when trying to insert a too big auto-generated value, even in non-strict mode.
Before one get insted the max column value inserted.
This patch also fixes some issues with inserting negative numbers in an auto-increment column.
Fixed the ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
Added SQLSTATE errors for handler errors

Smaller bug fixes:
* Added warnings for duplicate key errors when using INSERT IGNORE
* Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
* Allow one to see how cmake is called by using --just-print --just-configure


BUILD/FINISH.sh:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
cmake/configure.pl:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
include/CMakeLists.txt:
  Added handler_state.h
include/handler_state.h:
  SQLSTATE for handler error messages.
  Required for HA_ERR_AUTOINC_ERANGE, but solves also some other cases.
mysql-test/extra/binlog_tests/binlog.test:
  Fixed old wrong behaviour
  Added more tests
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  Reset binary log to only print what's necessary in show_binlog_events
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Update to new error codes
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  Ignore warnings as this depends on how the test is run
mysql-test/include/strict_autoinc.inc:
  On now gets an error on overflow
mysql-test/r/auto_increment.result:
  Update results after fixing error message
mysql-test/r/auto_increment_ranges_innodb.result:
  Test new behaviour
mysql-test/r/auto_increment_ranges_myisam.result:
  Test new behaviour
mysql-test/r/commit_1innodb.result:
  Added warnings for duplicate key error
mysql-test/r/create.result:
  Added warnings for duplicate key error
mysql-test/r/insert.result:
  Added warnings for duplicate key error
mysql-test/r/insert_select.result:
  Added warnings for duplicate key error
mysql-test/r/insert_update.result:
  Added warnings for duplicate key error
mysql-test/r/mix2_myisam.result:
  Added warnings for duplicate key error
mysql-test/r/myisam_mrr.result:
  Added warnings for duplicate key error
mysql-test/r/null_key.result:
  Added warnings for duplicate key error
mysql-test/r/replace.result:
  Update to new error codes
mysql-test/r/strict_autoinc_1myisam.result:
  Update to new error codes
mysql-test/r/strict_autoinc_2innodb.result:
  Update to new error codes
mysql-test/r/strict_autoinc_3heap.result:
  Update to new error codes
mysql-test/r/trigger.result:
  Added warnings for duplicate key error
mysql-test/r/xtradb_mrr.result:
  Added warnings for duplicate key error
mysql-test/suite/binlog/r/binlog_innodb_row.result:
  Updated result
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated result
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Updated result
mysql-test/suite/innodb/r/innodb-autoinc.result:
  Update to new error codes
mysql-test/suite/innodb/r/innodb-lock.result:
  Updated results
mysql-test/suite/innodb/r/innodb.result:
  Updated results
mysql-test/suite/innodb/r/innodb_bug56947.result:
  Updated results
mysql-test/suite/innodb/r/innodb_mysql.result:
  Updated results
mysql-test/suite/innodb/t/innodb-autoinc.test:
  Update to new error codes
mysql-test/suite/maria/maria3.result:
  Updated result
mysql-test/suite/maria/mrr.result:
  Updated result
mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result:
  Updated result
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  Update to new error codes
mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff:
  Updated results
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Updated results
mysql-test/t/auto_increment.test:
  Update to new error codes
mysql-test/t/auto_increment_ranges.inc:
  Test new behaviour
mysql-test/t/auto_increment_ranges_innodb.test:
  Test new behaviour
mysql-test/t/auto_increment_ranges_myisam.test:
  Test new behaviour
mysql-test/t/replace.test:
  Update to new error codes
mysys/my_getopt.c:
  Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
sql/handler.cc:
  Ignore negative values for signed auto-increment columns
  Always give an error if we get an overflow for an auto-increment-column (instead of inserting the max value)
  Ensure that the row number is correct for the out-of-range-value error message.
  
  
  ******
  Fixed wrong printing of column namn for "Out of range value" errors
  Fixed that INSERT_ID is correctly replicated also for out-of-range autoincrement values
  Fixed that print_keydup_error() can also be used to generate warnings
  ******
  Return HA_ERR_AUTOINC_ERANGE (167) instead of ER_WARN_DATA_OUT_OF_RANGE for auto-increment overflow
sql/handler.h:
  Allow INSERT IGNORE to continue also after out-of-range inserts.
  Fixed that print_keydup_error() can also be used to generate warnings
sql/log_event.cc:
  Added DBUG_PRINT
  Fixed the ER_AUTOINC_READ_FAILED, ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
  This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
sql/sql_insert.cc:
  Add warnings for duplicate key errors when using INSERT IGNORE
sql/sql_state.c:
  Added handler errors
sql/sql_table.cc:
  Update call to print_keydup_error()
storage/innobase/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
storage/xtradb/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
2012-09-18 15:14:19 +03:00
Michael Widenius
32e4c7e138 Added THD::utime_after_query to avoid calling current_utime() twice for every end-of-query
Increment long_query_count also if thd->variables.log_slow_rate_limit is used
Added new state "Writing to binlog"


sql/sql_class.h:
  Added THD::utime_after_query to avoid calling current_utime() twice for every end-of-query
sql/sql_parse.cc:
  Increment long_query_count also if thd->variables.log_slow_rate_limit is used
  Removed extra calls to thd_proc_info(thd, "logging slow query") and thd->current_utime();
sql/sql_table.cc:
  Added new state "Writing to binlog"
2012-09-13 21:11:47 +03:00
Rohit Kalhans
4802faad3f upmerge to bug#14548159 2012-09-22 18:07:04 +05:30
Rohit Kalhans
1e5a759aff upmerge to bug#14548159 2012-09-22 18:07:04 +05:30
Igor Babaev
bc644de9a9 Merge MDEV-415 -> 10.0-base. 2012-09-01 19:41:38 -07:00
Igor Babaev
a6b88f1431 MDEV-415: Back-port of the WL task #1393 from the mysql-5.6 code line.
The task adds a more efficient handling of the queries with 
ORDER BY order LIMIT n, such that n is small enough and
no indexes are used for order.
2012-09-01 14:21:59 -07:00
Igor Babaev
98f239a849 Merge 5.5->5.5-mwl248. 2012-08-29 18:50:38 -07:00
unknown
ced3907c02 Merge from 5.3 2012-08-24 15:29:01 +02:00
unknown
fc666a0df6 merge from 5.2 2012-08-24 14:02:32 +02:00
unknown
96703a63da Merge from 5.1. 2012-08-24 12:32:46 +02:00
unknown
cdeabcfd43 MDEV-382: Incorrect quoting
Various places in the server replication code was incorrectly quoting
strings, which could lead to incorrect SQL on the slave/mysqlbinlog.
2012-08-24 10:06:16 +02:00
Michael Widenius
a1bc393630 Fixed MDEV-366: Assertion `share->reopen == 1' failed in maria_extra on DROP TABLE which is locked twice
mysql-test/suite/maria/lock.result:
  Added test case
mysql-test/suite/maria/lock.test:
  Added test case
sql/sql_table.cc:
  One can't call HA_EXTRA_FORCE_REOPEN on something that may be opened twice.
  It's safe to remove the call in this case as we will call HA_EXTRA_PREPARE_FOR_DROP for the table anyway.
  (One nice side effect is that drop is a bit faster as we are not flushing the cache to disk before the drop anymore)
2012-08-15 14:37:55 +03:00
Michael Widenius
fbe5ac4e24 Fixed MDEV-365 "Got assertion when doing alter table on a partition"
mysql-test/r/partition.result:
  Added test case
mysql-test/t/partition.test:
  Added test case
sql/sql_partition.cc:
  Do mysql_trans_prepare_alter_copy_data() after all original tables are locked.
  (We don't want to disable transactions for the original tables, that still may be in the cache)
sql/sql_table.cc:
  Fixed two wrong DBUG_ENTER
2012-08-15 13:33:37 +03:00
Michael Widenius
9c1cc61caf automatic merge 2012-08-15 12:07:21 +03:00
Igor Babaev
822e5da0d0 Merge 5.5->5.5-mwl248 2012-08-14 12:42:14 -07:00
Michael Widenius
c0f04fa31c Automatic merge 2012-08-13 23:45:16 +03:00
Michael Widenius
cee888acb3 Fixed compiler warnings (A few of these was bugs)
client/mysqldump.c:
  Slave needs to be initialized with 0
dbug/dbug.c:
  Removed not existing function
plugin/semisync/semisync_master.cc:
  Fixed compiler warning
sql/opt_range.cc:
  thd needs to be set early as it's used in some error conditions.
sql/sql_table.cc:
  Changed to use uchar* to make array indexing portable
storage/innobase/handler/ha_innodb.cc:
  Removed not used variable
storage/maria/ma_delete.c:
  Fixed compiler warning
storage/maria/ma_write.c:
  Fixed compiler warning
2012-08-13 22:23:28 +03:00
Sergei Golubchik
ecc03af931 MDEV-364 Server crashes in add_identifier on concurrent ALTER TABLE and SHOW ENGINE INNODB STATUS
fix add_identifier() to distinguish between temporary tables (#sql- prefix) and temporary partitions (#TMP# suffix).
change add_identifier() to use the same name variant constants as sql_partition.cc does.
2012-08-13 11:14:43 +02:00
Sergei Golubchik
16c763098a compiler warnings 2012-08-10 13:48:31 +02:00
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Alexey Botchkov
9705ad5e33 MDEV-340 Save replication comments for DROP TABLE.
mysql_rm_table_no_locks() function was modified.
      When we construct log record for the DROP TABLE, now we
      look if there's a comment before the first table name and
      add it to the record if so.
  
per-file comments:
  sql/sql_table.cc
  MDEV-340 Save replication comments for DROP TABLE.
        comment_length() function implemented to find comments in the query,
        call it in mysql_rm_table_no_locks() and use the result to form log record.
  mysql-test/suite/binlog/r/binlog_drop_if_exists.result
  MDEV-340 Save replication comments for DROP TABLE.
        test result updated.
  mysql-test/suite/binlog/t/binlog_drop_if_exists.test
  MDEV-340 Save replication comments for DROP TABLE.
        test case added.
2012-07-31 16:21:53 +05:00
Igor Babaev
47fae7f08f Added procedures to delete records by keys from statistical tables.
Now when a table is dropped the statistics on the table is removed 
from the statistical tables. If the table is altered in such a way
that a column is dropped or the type of the column is changed then
statistics on the column is removed from the table column_stat.
It also triggers removal of the statistics on the indexes who use
this column as its component.

Added procedures that changes the names of the tables or columns
in the statistical tables for. 
These procedures are used when tables/columns are renamed.

Also partly re-factored the code that introduced the persistent
statistical tables.

Added test cases into statistics.test to cover the new code.
2012-07-10 16:34:39 -07:00
Jon Olav Hauglid
a47e778a61 Bug#12623923 Server can crash after failure to create
primary key with innodb tables

The bug was triggered if a single ALTER TABLE statement both
added and dropped indexes and ALTER TABLE failed during drop
(e.g. because the index was needed in a foreign key constraint).
In such cases, the server index information would get out of
sync with InnoDB - the added index would be present inside
InnoDB, but not in the server. This could then lead to InnoDB
error messages and/or server crashes.

The root cause is that new indexes are added before old indexes
are dropped. This means that if ALTER TABLE fails while dropping
indexes, index changes will be reverted in the server but not
inside InnoDB.

This patch fixes the problem by dropping any added indexes
if drop fails (for ALTER TABLE statements that both adds
and drops indexes). 

However, this won't work if we added a primary key as this
key might not be possible to drop inside InnoDB. Therefore,
we resort to the copy algorithm if a primary key is added
by an ALTER TABLE statement that also drops an index.

In 5.6 this bug is more properly fixed by the handler interface
changes done in the scope of WL#5534 "Online ALTER".
2012-07-10 16:13:02 +02:00
Jon Olav Hauglid
96bb813a45 Bug#12623923 Server can crash after failure to create
primary key with innodb tables

The bug was triggered if a single ALTER TABLE statement both
added and dropped indexes and ALTER TABLE failed during drop
(e.g. because the index was needed in a foreign key constraint).
In such cases, the server index information would get out of
sync with InnoDB - the added index would be present inside
InnoDB, but not in the server. This could then lead to InnoDB
error messages and/or server crashes.

The root cause is that new indexes are added before old indexes
are dropped. This means that if ALTER TABLE fails while dropping
indexes, index changes will be reverted in the server but not
inside InnoDB.

This patch fixes the problem by dropping any added indexes
if drop fails (for ALTER TABLE statements that both adds
and drops indexes). 

However, this won't work if we added a primary key as this
key might not be possible to drop inside InnoDB. Therefore,
we resort to the copy algorithm if a primary key is added
by an ALTER TABLE statement that also drops an index.

In 5.6 this bug is more properly fixed by the handler interface
changes done in the scope of WL#5534 "Online ALTER".
2012-07-10 16:13:02 +02:00
Sergei Golubchik
bf5df8ccbf merge 2012-06-16 09:03:07 +02:00
Michael Widenius
acba7d2f9f Fixed MDEV-306 / LP:1007967 - Assertion `table->file->stats.records > 0 || error' failed join_read_const_table on concurrent SELECT and DROP/ADD INDEX
sql/sql_table.cc:
  Added comment
storage/maria/ma_close.c:
  Don't store history if it's visible to all.
  This fixed the MDEV-306 bug
storage/maria/ma_delete_table.c:
  Removed old comment
  Delete history state for deleted tables
storage/maria/ma_info.c:
  More DBUG_PRINT
storage/maria/ma_open.c:
  More DBUG_PRINT
2012-06-15 12:52:58 +03:00
Sergei Golubchik
0522307ed1 mysql-5.5 merge 2012-06-14 20:05:31 +02:00
Jon Olav Hauglid
1c0388a5be Bug#13982017: ALTER TABLE RENAME ENDS UP WITH ERROR 1050 (42S01)
Fixed by backport of:
    ------------------------------------------------------------
    revno: 3402.50.156
    committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
    branch nick: mysql-trunk-test
    timestamp: Wed 2012-02-08 14:10:23 +0100
    message:
      Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA
      
      This assert could be triggered if an InnoDB table was being moved
      to a different database using ALTER TABLE ... RENAME, while this
      database concurrently was being dropped by DROP DATABASE.
      
      The reason for the problem was that no metadata lock was taken
      on the target database by ALTER TABLE ... RENAME.
      DROP DATABASE was therefore not blocked and could remove
      the database while ALTER TABLE ... RENAME was executing. This
      could cause the assert in InnoDB to be triggered.
      
      This patch fixes the problem by taking a IX metadata lock on
      the target database before ALTER TABLE ... RENAME starts
      moving a table to a different database.
      
      Note that this problem did not occur with RENAME TABLE which
      already takes the correct metadata locks.
      
      Also note that this patch slightly changes the behavior of
      ALTER TABLE ... RENAME. Before, the statement would abort and
      return an error if a lock on the target table name could not
      be taken immediately. With this patch, ALTER TABLE ... RENAME
      will instead block and wait until the lock can be taken 
      (or until we get a lock timeout). This also means that it is
      possible to get ER_LOCK_DEADLOCK errors in this situation
      since we allow ALTER TABLE ... RENAME to wait and not just
      abort immediately.
2012-06-01 09:31:24 +02:00
Jon Olav Hauglid
040a1fddbb Bug#13982017: ALTER TABLE RENAME ENDS UP WITH ERROR 1050 (42S01)
Fixed by backport of:
    ------------------------------------------------------------
    revno: 3402.50.156
    committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
    branch nick: mysql-trunk-test
    timestamp: Wed 2012-02-08 14:10:23 +0100
    message:
      Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA
      
      This assert could be triggered if an InnoDB table was being moved
      to a different database using ALTER TABLE ... RENAME, while this
      database concurrently was being dropped by DROP DATABASE.
      
      The reason for the problem was that no metadata lock was taken
      on the target database by ALTER TABLE ... RENAME.
      DROP DATABASE was therefore not blocked and could remove
      the database while ALTER TABLE ... RENAME was executing. This
      could cause the assert in InnoDB to be triggered.
      
      This patch fixes the problem by taking a IX metadata lock on
      the target database before ALTER TABLE ... RENAME starts
      moving a table to a different database.
      
      Note that this problem did not occur with RENAME TABLE which
      already takes the correct metadata locks.
      
      Also note that this patch slightly changes the behavior of
      ALTER TABLE ... RENAME. Before, the statement would abort and
      return an error if a lock on the target table name could not
      be taken immediately. With this patch, ALTER TABLE ... RENAME
      will instead block and wait until the lock can be taken 
      (or until we get a lock timeout). This also means that it is
      possible to get ER_LOCK_DEADLOCK errors in this situation
      since we allow ALTER TABLE ... RENAME to wait and not just
      abort immediately.
2012-06-01 09:31:24 +02:00
Sergei Golubchik
431e042b5d c 2012-05-21 15:30:25 +02:00
Michael Widenius
b1485a4780 More fixes for LOCK TABLE and REPAIR/FLUSH
Changed HA_EXTRA_NORMAL to HA_EXTRA_NOT_USED (more clean)

mysql-test/suite/maria/lock.result:
  More extensive tests of LOCK TABLE with FLUSH and REPAIR
mysql-test/suite/maria/lock.test:
  More extensive tests of LOCK TABLE with FLUSH and REPAIR
sql/sql_admin.cc:
  Fix that REPAIR TABLE ... USE_FRM works with LOCK TABLES
sql/sql_base.cc:
  Ensure that transactions are closed in ARIA when doing flush
  HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED
  Don't call extra many times for a table in close_all_tables_for_name()
  Added test if table_list->table as this can happen in error situations
sql/sql_partition.cc:
  HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED
sql/sql_reload.cc:
  Fixed comment
sql/sql_table.cc:
  HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED
sql/sql_trigger.cc:
  HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED
sql/sql_truncate.cc:
  HA_EXTRA_FORCE_REOPEN -> HA_EXTRA_PREPARE_FOR_DROP for truncate, as this speeds up truncate by not having to flush the cache to disk.
2012-05-17 01:47:28 +03:00
Michael Widenius
6d8e329c9a Fixed bug LP:973039 - Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK
- 5.5 was missing calls to ha_extra(HA_PREPARE_FOR_DROP | HA_PREPARE_FOR_RENAME);  Lost in merge 5.3 -> 5.5


sql/sql_admin.cc:
  Updated arguments for close_all_tables_for_name
sql/sql_base.h:
  Updated arguments for close_all_tables_for_name
sql/sql_partition.cc:
  Updated arguments for close_all_tables_for_name
sql/sql_table.cc:
  Updated arguments for close_all_tables_for_name
  Removed test of kill, as we have already called 'ha_extra(HA_PREPARE_FOR_DROP)' and the table may be inconsistent.
sql/sql_trigger.cc:
  Updated arguments for close_all_tables_for_name
sql/sql_truncate.cc:
  For truncate that is done with drop + recreate, signal that the table will be dropped.
2012-05-16 18:44:17 +03:00
Sergei Golubchik
5f68269abe MDEV-217 - Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init on OPTIMIZE two tables when replaced by recreate
call thd_progress_end() in the copy_data_between_tables(), to match its
thd_progress_init().
2012-04-18 20:48:14 +02:00
Annamalai Gurusami
fe04006941 Bug #12902967 CREATING SELF REFERENCING FK ON SAME INDEX
UNHANDLED, CONFUSING ERROR

The main confusion with the error message is that "it 
implies that your data dictionary may now be out of 
sync".  This patch will remove the unwanted and the 
misleading error message by not doing an unnecessary 
operation in the error handling code.  

rb://980 approved by: Dmitry Lenev
2012-04-17 16:54:02 +05:30
Annamalai Gurusami
6fc42540f8 Bug #12902967 CREATING SELF REFERENCING FK ON SAME INDEX
UNHANDLED, CONFUSING ERROR

The main confusion with the error message is that "it 
implies that your data dictionary may now be out of 
sync".  This patch will remove the unwanted and the 
misleading error message by not doing an unnecessary 
operation in the error handling code.  

rb://980 approved by: Dmitry Lenev
2012-04-17 16:54:02 +05:30
Vladislav Vaintroub
742ccf7a47 MDEV-221 : Fix potential memory access past the end of input string in filename_to_tablename() 2012-04-15 01:19:39 +02:00
unknown
99b18a036c Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
TABLES IN INCORRECT ENGINE

PROBLEM:
  CREATE/ALTER TABLE currently can move system tables like
mysql.db, user, host etc, to engines other than MyISAM. This is not
completely supported as of now, by mysqld. When some of system tables
like plugin, servers, event, func, *_priv, time_zone* are moved
to innodb, mysqld restart crashes. Currently system tables
can be moved to BLACKHOLE also!!!.

ANALYSIS:
  The problem is that there is no check before creating or moving
a system table to some particular engine.

  System tables are suppose to be residing in MyISAM. We can think
of restricting system tables to exist only in MyISAM. But, there could
be future needs of these system tables to be part of other engines
by design. For eg, NDB cluster expects some tables to be on innodb
or ndb engine. This calls for a solution, by which system
tables can be supported by any desired engine, with minimal effort.

FIX:
  The solution provides a handlerton interface using which,
mysqld server can query particular storage engine handlerton for
system tables that it supports. This way each storage engine
layer can define their own system database and system tables.

  The check_engine() function uses the new handlerton function
ha_check_if_supported_system_table() to check if db.tablename
provided in the DDL is supported by the SE.

Note: This fix has modified a test in help.test, which was moving
mysql.help_* to innodb. The primary intention of the test was not
to move them between engines.
2012-04-11 15:53:17 +05:30
gopal.shankar@oracle.com
796fad1424 Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
TABLES IN INCORRECT ENGINE

PROBLEM:
  CREATE/ALTER TABLE currently can move system tables like
mysql.db, user, host etc, to engines other than MyISAM. This is not
completely supported as of now, by mysqld. When some of system tables
like plugin, servers, event, func, *_priv, time_zone* are moved
to innodb, mysqld restart crashes. Currently system tables
can be moved to BLACKHOLE also!!!.

ANALYSIS:
  The problem is that there is no check before creating or moving
a system table to some particular engine.

  System tables are suppose to be residing in MyISAM. We can think
of restricting system tables to exist only in MyISAM. But, there could
be future needs of these system tables to be part of other engines
by design. For eg, NDB cluster expects some tables to be on innodb
or ndb engine. This calls for a solution, by which system
tables can be supported by any desired engine, with minimal effort.

FIX:
  The solution provides a handlerton interface using which,
mysqld server can query particular storage engine handlerton for
system tables that it supports. This way each storage engine
layer can define their own system database and system tables.

  The check_engine() function uses the new handlerton function
ha_check_if_supported_system_table() to check if db.tablename
provided in the DDL is supported by the SE.

Note: This fix has modified a test in help.test, which was moving
mysql.help_* to innodb. The primary intention of the test was not
to move them between engines.
2012-04-11 15:53:17 +05:30
Sergei Golubchik
20e706689d mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
  a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
  my_vsnprintf() is ok here, in 5.5
2012-03-28 01:04:46 +02:00
unknown
335de5db18 Merge mariadb 5.3->mariadb 5.5 2012-03-24 18:21:22 +01:00
Michael Widenius
c36bdf1c88 Speedup:
- Don't call update_virtual_fields() if table->vfield is not set
- Don't prealloc memory for in open_tables() as this is very seldom used.


sql/records.cc:
  Don't call update_virtual_fields() if table->vfield is not set
sql/sql_base.cc:
  Don't prealloc memory for in open_tables() as this is very seldom used.
  Don't call update_virtual_fields() if table->vfield is not set
sql/sql_delete.cc:
  Don't call update_virtual_fields() if table->vfield is not set
sql/sql_handler.cc:
  Don't call update_virtual_fields() if table->vfield is not set
sql/sql_join_cache.cc:
  Don't call update_virtual_fields() if table->vfield is not set
  Move some frequent values to local variables
sql/sql_table.cc:
  Don't call update_virtual_fields() if table->vfield is not set
sql/sql_update.cc:
  Don't call update_virtual_fields() if table->vfield is not set
sql/table.cc:
  Assert if update_virtual_fields is called with wrong parameters
2012-03-23 18:22:39 +02:00
Michael Widenius
15c5a2686f Merge with MariaDB 5.2 2012-02-21 01:58:50 +02:00
Michael Widenius
038b739c98 Merge with MariaDB 5.1 and MySQL 5.1.61 2012-02-20 17:49:21 +02:00
Michael Widenius
ae07ec6cbf Merge with MYSQL 5.1.61
Fixed README with link to source
Merged InnoDB change to XtraDB

README:
  Added information of where to find MariaDB code
storage/archive/ha_archive.cc:
  Removed memset() of rows, a MariaDB checksum's doesn't touch not used data.
2012-02-20 16:23:18 +02:00
MySQL Build Team
7a35cb9150 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
MySQL Build Team
5734bae576 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
Rohit Kalhans
31c990ca57 BUG#11758263 50440: MARK UNORDERED UPDATE WITH AUTOINC UNSAFE
Problem: Statements that write to tables with auto_increment columns
         based on the selection from another table, may lead to master
         and slave going out of sync, as the order in which the rows
         are retrieved from the table may differ on master and slave.
            
Solution: We mark writing to a table with auto_increment table
          based on the rows selected from another table as unsafe. This
          will cause the execution of such statements to throw a warning
          and forces the statement to be logged in ROW if the logging
          format is mixed. 
            
Changes:
       1. All the statements that writes to a table with auto_increment 
          column(s) based on the rows fetched from another table, will now
          be unsafe.
       2. CREATE TABLE with SELECT will now be unsafe.

sql/share/errmsg-utf8.txt:
  Added new warning messages.
sql/sql_base.cc:
  -Created function to check statements that write to 
   tables with auto_increment column and has select.
  -Marked all the statements that write to a table
   with auto_increment column based on rows fetched
   from other table(s) as unsafe.
sql/sql_table.cc:
  mark CREATE TABLE[with auto_increment column] as unsafe.
2012-02-09 23:28:33 +05:30
Rohit Kalhans
4f7e4c9d1b BUG#11758263 50440: MARK UNORDERED UPDATE WITH AUTOINC UNSAFE
Problem: Statements that write to tables with auto_increment columns
         based on the selection from another table, may lead to master
         and slave going out of sync, as the order in which the rows
         are retrieved from the table may differ on master and slave.
            
Solution: We mark writing to a table with auto_increment table
          based on the rows selected from another table as unsafe. This
          will cause the execution of such statements to throw a warning
          and forces the statement to be logged in ROW if the logging
          format is mixed. 
            
Changes:
       1. All the statements that writes to a table with auto_increment 
          column(s) based on the rows fetched from another table, will now
          be unsafe.
       2. CREATE TABLE with SELECT will now be unsafe.
2012-02-09 23:28:33 +05:30
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Mattias Jonsson
52076824c9 merge 2011-12-14 14:41:40 +01:00
Mattias Jonsson
336c57f9ce merge 2011-12-14 14:41:40 +01:00
Mattias Jonsson
beedf6b261 Bug#12361113: CRASH WHEN "LOAD INDEX INTO CACHE" WITH TOO
SMALL KEY CACHE

The server crashed on division by zero because the key cache was not
initialized and the block length was 0 which was used in a division.

The fix was to not allow CACHE INDEX if the key cache was not initiallized.
Thus never try LOAD INDEX INTO CACHE for an uninitialized key cache.

Also added some windows files/directories to .bzrignore.
2011-12-12 14:07:02 +01:00
Mattias Jonsson
ba8c33f5ec Bug#12361113: CRASH WHEN "LOAD INDEX INTO CACHE" WITH TOO
SMALL KEY CACHE

The server crashed on division by zero because the key cache was not
initialized and the block length was 0 which was used in a division.

The fix was to not allow CACHE INDEX if the key cache was not initiallized.
Thus never try LOAD INDEX INTO CACHE for an uninitialized key cache.

Also added some windows files/directories to .bzrignore.
2011-12-12 14:07:02 +01:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Michael Widenius
efcfb195e3 Merge with 5.1 2011-11-30 22:57:18 +02:00
Michael Widenius
47575bd0e0 Fixed compiler warnings
dbug/tests.c:
  Added __attribute__((unused)) to get rid of compiler warning
server-tools/instance-manager/guardian.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/filesort.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/slave.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_load.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_table.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_blockrec.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_check.c:
  Added missing cast
storage/maria/ma_loghandler.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_recovery.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/pbxt/src/cache_xt.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/xtradb/fil/fil0fil.c:
  Removed not used variable
storage/xtradb/handler/ha_innodb.cc:
  Use unused variable
vio/viosocket.c:
  Remove usage of not used variable
vio/viosslfactories.c:
  Added cast
2011-11-30 00:34:05 +02:00
Michael Widenius
6920457142 Merge with MariaDB 5.1 2011-11-24 18:48:58 +02:00
Michael Widenius
7b368e3810 Merge with MySQL 5.1.60 2011-11-23 19:32:14 +02:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Sneha Modi
7ee2962f19 Bug#11748731:SOME 'BIG' TESTS FAILING ON 6.0
A patch for alter_table-big.test has been committed earlier.
This is a patch for create-big.test:
The test used to time-out after 900 seconds. 
It relied on debug sleeps that are no longer present in the 
code. Since the sleeps are long gone, fixing the problem didn't 
involve just updating the result file or using macro 
"show_binlog_events2.inc" instead of "show binlog events" 
statement. The test needed to be rewritten using debug sync 
points, and result then needed to be updated.
So, the sleeps have been replaced by debug_sync points and the test execution time has 
been reduced significantly.
2011-11-21 17:07:08 +05:30
Sneha Modi
2dd10f632b Bug#11748731:SOME 'BIG' TESTS FAILING ON 6.0
A patch for alter_table-big.test has been committed earlier.
This is a patch for create-big.test:
The test used to time-out after 900 seconds. 
It relied on debug sleeps that are no longer present in the 
code. Since the sleeps are long gone, fixing the problem didn't 
involve just updating the result file or using macro 
"show_binlog_events2.inc" instead of "show binlog events" 
statement. The test needed to be rewritten using debug sync 
points, and result then needed to be updated.
So, the sleeps have been replaced by debug_sync points and the test execution time has 
been reduced significantly.
2011-11-21 17:07:08 +05:30
Alexey Botchkov
7c7269d372 merging. 2011-11-12 19:56:29 +04:00
Sneha Modi
e13d4c95d3 BUG#11748731 - 37248: SOME 'BIG' TESTS FAILING ON 6.0 :
A change has been made in the sql/sql_table.cc file to include debug_sync.
2011-11-11 14:53:50 +05:30
Sneha Modi
7ca801fedf BUG#11748731 - 37248: SOME 'BIG' TESTS FAILING ON 6.0 :
A change has been made in the sql/sql_table.cc file to include debug_sync.
2011-11-11 14:53:50 +05:30
Sergei Golubchik
6edd76785c merge 2011-11-03 23:39:53 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Tor Didriksen
0e2af2cdd3 Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.
Also fixed possibly uninitialized use of need_copy_table_res.
2011-11-01 07:50:54 +01:00
Tor Didriksen
d5b8ce6a2d Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.
Also fixed possibly uninitialized use of need_copy_table_res.
2011-11-01 07:50:54 +01:00
Sergei Golubchik
90b43902b0 compilation warnings on Windows 2011-11-02 12:55:46 +01:00
Sergei Golubchik
42b8235788 cleanups 2011-10-19 22:50:45 +02:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Michael Widenius
22e793639a Added new options to KILL. New syntax is KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name]
- If USER is given, all threads for that user is signaled
- If SOFT is used then the KILL will not be sent to the handler. This can be used to not interrupt critical things in the handler like 'REPAIR'.

Internally added more kill signals. This gives us more information of why a query/connection was killed.
- KILL_SERVER is used when server is going down. In this case the users gets ER_SHUTDOWN as the reason connection was killed.
- Changed signals to number in correct order, which makes it easier to test how the signal should affect the code.
- New error message ER_CONNECTION_KILLED if connection was killed by 'KILL CONNECTION'. Before we got error ER_SHUTDOWN.

Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server


include/mysql.h.pp:
  Updated file
include/mysql_com.h:
  Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
mysql-test/r/kill.result:
  Added test of KILL USER
mysql-test/suite/rpl/r/rpl_stm_000001.result:
  Updated error code
mysql-test/suite/rpl/t/rpl_stm_000001.test:
  Updated error codes
mysql-test/t/flush_read_lock_kill.test:
  Updated error codes
mysql-test/t/kill.test:
  Added test of KILL USER
plugin/handler_socket/handlersocket/database.cpp:
  Removed THD:: from KILL
sql/debug_sync.cc:
  Removed THD:: from KILL
sql/event_scheduler.cc:
  Removed THD:: from KILL
sql/filesort.cc:
  Removed THD:: from KILL
sql/ha_ndbcluster_binlog.cc:
  Removed THD:: from KILL
sql/handler.cc:
  Removed THD:: from KILL
  Simplify code.
sql/lex.h:
  Added new keywords HARD | SOFT
sql/log.cc:
  Removed THD:: from KILL
  Added testing of new error ER_CONNECTION_KILLED
sql/log_event.cc:
  Removed THD:: from KILL
  Added testing of new error ER_CONNECTION_KILLED
sql/mysql_priv.h:
  Added new prototypes
sql/mysqld.cc:
  Removed THD:: from KILL
  Use KILL_SERVER_HARD signal on shutdown.
sql/scheduler.cc:
  Removed THD:: from KILL
  Simplify test if connection should be killed
sql/share/errmsg.txt:
  New error message ER_CONNECTION_KILLED
sql/slave.cc:
  Removed THD:: from KILL
sql/sp_head.cc:
  Removed THD:: from KILL
sql/sql_base.cc:
  Removed THD:: from KILL
sql/sql_cache.cc:
  Removed THD:: from KILL
sql/sql_class.cc:
  Removed THD:: from KILL
  Added killed_errno()
  Only signal kill to storage engine if HARD bit is set.
sql/sql_class.h:
  Move KILL options out from THD to make them easier to use in sql_yacc.yy
sql/sql_connect.cc:
  Removed THD:: from KILL
sql/sql_delete.cc:
  Removed THD:: from KILL
sql/sql_error.cc:
  Removed THD:: from KILL
sql/sql_insert.cc:
  Removed THD:: from KILL
  Simplifed testing if thread is killed.
sql/sql_lex.h:
  Added kill options to st_lex
sql/sql_load.cc:
  Removed THD:: from KILL
sql/sql_parse.cc:
  Added kill options to st_lex
  Simplifed and optimzed testing of thd->killed at end of query
  Added support for KILL USER
  Extended sql_kill() to allow use of more kill signals.
sql/sql_repl.cc:
  Removed THD:: from KILL
sql/sql_show.cc:
  Removed THD:: from KILL
  Simplied testing if query/connection was killed
sql/sql_table.cc:
  Removed THD:: from KILL
sql/sql_update.cc:
  Removed THD:: from KILL
sql/sql_yacc.yy:
  Added support for new KILL syntax: KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name]
storage/archive/ha_archive.cc:
  Simplify compilation
storage/maria/ha_maria.cc:
  Removed THD:: from KILL
2011-09-23 01:13:38 +03:00
Sergei Golubchik
aac3a1eac9 fix misplaced and non-working if() in the grammar
few small post-merge fixes
2011-07-12 17:41:13 +02:00
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
b6e6097c95 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Sergei Golubchik
b4a0b2c2f8 post-merge fixes.
most tests pass.
5.3 merge is next
2011-07-02 22:12:12 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Michael Widenius
3c78bfe7f1 Added progress reporting for alter table, LOAD DATA INFILE and for aria tables: check table, repair table, analyze table.
- The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function)
- Added Progress field last to 'show processlist'
- Stage, Max_stage and Progress field added to information_schema.progresslist
- The 'mysql' client by defaults enables progress reports when the output is a tty.
- Added progress_report_time time variable to configure how often progress reports is sent to client
Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement.


client/client_priv.h:
  Added OPT_REPORT_PROGRESS
client/mysql.cc:
  Added option --progress-reports (on by default if not batch mode)
  Progress reports is written to stdout for long running commands
include/Makefile.am:
  Added mysql/service_progress_report.h
include/myisamchk.h:
  Added variables to be able to do progress reporting in Aria and later in MyISAM
include/mysql.h:
  Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK
include/mysql.h.pp:
  Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK
include/mysql/plugin.h:
  Added functions for reporting progress.
include/mysql/plugin_auth.h.pp:
  Added functions for reporting progress.
include/mysql_com.h:
  Added CLIENT_PROGRESS mysql_real_connect() flag.
include/sql_common.h:
  Added callback function for reporting progress
mysql-test/r/old-mode.result:
  Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode.
mysql-test/suite/funcs_1/datadict/datadict_priv.inc:
  Added new column
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
  Test all new PROCESSLIST columns
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_priv_ps.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_val_ps.result:
  Updated results
mysql-test/suite/pbxt/r/pbxt_locking.result:
  Updated results
mysql-test/suite/pbxt/r/skip_name_resolve.result:
  Updated results
mysql-test/t/old-mode.test:
  Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode.
plugin/handler_socket/handlersocket/Makefile.am:
  Added -lmysqlservices
scripts/mytop.sh:
  Made 'State' field width dynamic.
  Added 'Progress' to process list display.
sql-common/client.c:
  Added handling of progress messages.
  Removed check_license() function.
sql/mysql_priv.h:
  Added opt_progress_report_time
sql/mysqld.cc:
  Added progress_report_time time variable to configure how often progress reports is sent to client
sql/protocol.cc:
  Added net_send_progress_packet()
sql/protocol.h:
  New prototypes
sql/set_var.cc:
  Added variables progress_report_time and in_transaction
sql/sql_acl.cc:
  Safety fix: Made client_capabilities ulonglong
sql/sql_class.cc:
  Added interface functions for progress reporting
sql/sql_class.h:
  Added varibles in THD for progress reporting.
  Added CF_REPORT_PROGRESS
sql/sql_load.cc:
  Added progress reporting for LOAD DATA INFILE
sql/sql_parse.cc:
  Added CF_REPORT_PROGRESS for top level commands for which it's safe to send progress reports to client
sql/sql_show.cc:
  Added Progress field last to 'show processlist'
  Stage, Max_stage and Progress field added to information_schema.progresslist
sql/sql_table.cc:
  Added progress reporting for ALTER TABLE
  Added THD as argument to copy_data_between_tables()
storage/maria/ha_maria.cc:
  Added progress reporting for check table, repair table, analyze table
  Fixed a bug in start_bulk_insert() that caused alter table to always run with all keys enabled.
storage/maria/ma_check.c:
  Added progress reporting
  Remember old state before starting repair. This removes some warnings from optimize_table if create-with-sort fails.
storage/maria/ma_check_standalone.h:
  Added dummy reporting function for standalone Aria programs.
storage/maria/ma_sort.c:
  Added progress reporting
storage/maria/maria_chk.c:
  Updated version
storage/maria/maria_def.h:
  Added new prototypes
tests/mysql_client_test.c:
  Added test case for progress reporting
2011-07-01 15:08:30 +03:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
44135d4725 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Kent Boortz
e5ce023f57 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Michael Widenius
ba9a890f0c New status variables: Rows_tmp_read, Handler_tmp_update and Handler_tmp_write
Split status variable Rows_read to Rows_read and Rows_tmp_read so that one can see how much real data is read.
Same was done with with Handler_update and Handler_write.
Fixed bug in MEMORY tables where some variables was counted twice.
Added new internal handler call 'ha_close()' to have one place to gather statistics.
Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table()


mysql-test/r/status.result:
  Updated test results and added new tests
mysql-test/r/status_user.result:
  Udated test results
mysql-test/t/status.test:
  Added new test for temporary table status variables
sql/ha_partition.cc:
  Changed to call ha_close() instead of close()
sql/handler.cc:
  Added internal_tmp_table variable for easy checking of temporary tables.
  Added new internal handler call 'ha_close()' to have one place to gather statistics.
  Gather statistics for internal temporary tables.
sql/handler.h:
  Added handler variables internal_tmp_table, rows_tmp_read.
  Split function update_index_statistics() to two.
  Added ha_update_tmp_row() for faster tmp table handling with more statistics.
sql/item_sum.cc:
  ha_write_row() -> ha_write_tmp_row()
sql/multi_range_read.cc:
  close() -> ha_close()
sql/mysqld.cc:
  New status variables: Rows_tmp_read, Handler_tmp_update and Handler_tmp_write
sql/opt_range.cc:
  close() -> ha_close()
sql/sql_base.cc:
  close() -> ha_close()
sql/sql_class.cc:
  Added handling of rows_tmp_read
sql/sql_class.h:
  Added new satistics variables.
  rows_read++  ->  update_rows_read() to be able to correctly count reads to internal temp tables.
  Added handler::ha_update_tmp_row()
sql/sql_connect.cc:
  Added comment
sql/sql_expression_cache.cc:
  ha_write_row() -> ha_write_tmp_row()
sql/sql_select.cc:
  close() -> ha_close()
  ha_update_row() -> ha_update_tmp_row()
sql/sql_show.cc:
  ha_write_row() -> ha_write_tmp_row()
sql/sql_table.cc:
  Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table()
sql/sql_union.cc:
  ha_write_row() -> ha_write_tmp_row()
sql/sql_update.cc:
  ha_write_row() -> ha_write_tmp_row()
sql/table.cc:
  close() -> ha_close()
storage/heap/ha_heap.cc:
  Removed double counting of statistic variables.
  close -> ha_close() to get tmp table statistics.
storage/maria/ha_maria.cc:
  close -> ha_close() to get tmp table statistics.
2011-06-27 19:07:24 +03:00
Alexey Botchkov
b826c88841 gis-related tests fixes.
merging.
2011-06-20 00:21:41 +05:00
Dmitry Lenev
600647c7d8 Fix for bug #11759990 - "52354: 'CREATE TABLE .. LIKE ... '
STATEMENTS FAIL".

Attempt to execute CREATE TABLE LIKE statement on a MyISAM
table with INDEX or DATA DIRECTORY options specified as a
source resulted in "MyISAM table '...' is in use..." error.
According to our documentation such a statement should create
a copy of source table with DATA/INDEX DIRECTORY options
omitted.

The problem was that new implementation of CREATE TABLE LIKE
statement in 5.5 tried to copy value of INDEX and DATA DIRECTORY
parameters from the source table. Since in description of source
table this parameters also included name of this table, attempt
to create target table with these parameter led to file name
conflict and error.

This fix addresses the problem by preserving documented and
backward-compatible behavior. I.e. by ensuring that contents
of DATA/INDEX DIRECTORY clauses for the source table is
ignored when target table is created.

mysql-test/r/symlink.result:
  Added test for bug #11759990 - "52354: 'CREATE TABLE ..
  LIKE ... ' STATEMENTS FAIL".
mysql-test/t/symlink.test:
  Added test for bug #11759990 - "52354: 'CREATE TABLE ..
  LIKE ... ' STATEMENTS FAIL".
sql/sql_table.cc:
  Changed CREATE TABLE LIKE implementation to ignore contents
  of DATA/INDEX DIRECTORY clauses for source table when target
  table is created. This is documented and backward-compatible
  behavior.
2011-06-09 16:54:12 +04:00
Dmitry Lenev
edfd31a06a Fix for bug #12652385 - "61493: REORDERING COLUMNS
TO POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
 
ALTER TABLE MODIFY/CHANGE ... FIRST did nothing except renaming
columns if new version of the table had exactly the same 
structure as the old one (i.e. as result of such statement, names 
of columns changed their order as specified but data in columns 
didn't). The same thing happened for ALTER TABLE DROP COLUMN/ADD 
COLUMN statements which were supposed to produce new version of
table with exactly the same structure as the old version of table.
I.e. in the latter case the result was the same as if old column 
was renamed instead of being dropped and new column with default
as value being created.
 
Both these problems were caused by the fact that ALTER TABLE
implementation incorrectly interpreted both these situations as 
simple renaming of columns and assumed that in-place ALTER TABLE
algorithm could have been used for them.
 
This patch fixes this problem by ensuring that in cases when some
column is moved to the first position or some column is dropped
the default ALTER TABLE algorithm involving table copying is 
always used. This is achieved by detecting such situations in
mysql_prepare_alter_table() and setting Alter_info::change_level
to ALTER_TABLE_DATA_CHANGED for them.

mysql-test/r/alter_table.result:
  Added test for bug #12652385 - "61493: REORDERING COLUMNS TO
  POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
mysql-test/t/alter_table.test:
  Added test for bug #12652385 - "61493: REORDERING COLUMNS TO
  POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
sql/sql_table.cc:
  Changed mysql_prepare_alter_table() to detect situations in 
  which we some column moved to the first position or some column 
  is dropped and ensure that such ALTER TABLE statements won't
  be carried out using in-place algorithm. The latter could have 
  happened before this patch if new version of table had the same 
  structure as the old one (except the column names).
2011-06-17 02:02:52 +04:00
Dmitry Lenev
291cb58ae5 Fix for bug #12652385 - "61493: REORDERING COLUMNS
TO POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
 
ALTER TABLE MODIFY/CHANGE ... FIRST did nothing except renaming
columns if new version of the table had exactly the same 
structure as the old one (i.e. as result of such statement, names 
of columns changed their order as specified but data in columns 
didn't). The same thing happened for ALTER TABLE DROP COLUMN/ADD 
COLUMN statements which were supposed to produce new version of
table with exactly the same structure as the old version of table.
I.e. in the latter case the result was the same as if old column 
was renamed instead of being dropped and new column with default
as value being created.
 
Both these problems were caused by the fact that ALTER TABLE
implementation incorrectly interpreted both these situations as 
simple renaming of columns and assumed that in-place ALTER TABLE
algorithm could have been used for them.
 
This patch fixes this problem by ensuring that in cases when some
column is moved to the first position or some column is dropped
the default ALTER TABLE algorithm involving table copying is 
always used. This is achieved by detecting such situations in
mysql_prepare_alter_table() and setting Alter_info::change_level
to ALTER_TABLE_DATA_CHANGED for them.
2011-06-17 02:02:52 +04:00
Igor Babaev
f03a3ee54f Merged the code of mwl 106 into the latest 5.3 with mwl 90 pushed.
Resolved all conflicts and failures.
2011-06-04 19:56:06 -07:00
Jon Olav Hauglid
9b076952ec Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING
SECONDARY INDEX IN INNODB

The patches for Bug#11751388 and Bug#11784056 enabled concurrent
reads while creating secondary indexes in InnoDB. However, they
introduced a regression. This regression occured if ALTER TABLE
failed after the index had been added, for example during the
lock upgrade needed to update .FRM. If this happened, InnoDB
and the server got out of sync with regards to which indexes
actually existed. Therefore the patch for Bug#11815600 again
disabled concurrent reads.

This patch re-enables concurrent reads. The original regression
is fixed by splitting the ADD INDEX operation into two parts.
First the new index is created but not made active. This is
done while concurrent reads are allowed. The second part of
the operation makes the index active (or reverts the change).
This is done after lock upgrade, which prevents the original
regression.

In order to implement this change, the patch changes the storage
API for in-place index creation. handler::add_index() is split
into two functions, handler_add_index() and
handler::final_add_index(). The former for creating indexes without
making them visible and the latter for commiting (i.e. making
visible) new indexes or reverting the changes.

Large parts of this patch were written by Marko Mäkelä.

Test case added to innodb_mysql_lock.test.
2011-06-01 10:06:55 +02:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Guilhem Bichot
3ceec2f19c Merge from 5.1. 2011-05-21 10:21:08 +02:00
Igor Babaev
89cf840cd9 Merge 2011-05-20 12:47:39 -07:00
Michael Widenius
3631146442 Original idea from Zardosht Kasheff to add HA_CLUSTERED_INDEX
- Added a lot of code comments
- Updated get_best_ror_intersec() to prefer index scan on not clustered keys before clustered keys.
- Use HA_CLUSTERED_INDEX to define if one should use HA_MRR_INDEX_ONLY
- For test of using index or filesort to resolve ORDER BY, use HA_CLUSTERED_INDEX flag instead of primary_key_is_clustered()
- Use HA_TABLE_SCAN_ON_INDEX instead of primary_key_is_clustered() to decide if ALTER TABLE ... ORDER BY will have any effect.

sql/ha_partition.h:
  Added comment with warning for code unsafe to use with multiple storage engines at the same time
sql/handler.h:
  Added HA_CLUSTERED_INDEX.
  Documented primary_key_is_clustered()
sql/opt_range.cc:
  Added code comments
  Updated get_best_ror_intersec() to ignore clustered keys.
  Optimized away cpk_scan_used and one instance of current_thd (Simpler code)
  Use HA_CLUSTERED_INDEX to define if one should use HA_MRR_INDEX_ONLY
sql/sql_select.cc:
  Changed comment to #ifdef
  For test of using index or filesort to resolve ORDER BY, use HA_CLUSTERED_INDEX flag instead of primary_key_is_clustered()
  (Change is smaller than what it looks beause of indentation change)
sql/sql_table.cc:
  Use HA_TABLE_SCAN_ON_INDEX instead of primary_key_is_clustered() to decide if ALTER TABLE ... ORDER BY will have any effect.
storage/innobase/handler/ha_innodb.h:
  Added support for HA_CLUSTERED_INDEX
storage/innodb_plugin/handler/ha_innodb.cc:
  Added support for HA_CLUSTERED_INDEX
storage/xtradb/handler/ha_innodb.cc:
  Added support for HA_CLUSTERED_INDEX
2011-05-18 19:26:30 +03:00
Igor Babaev
704f97035f Merged the code of MWL#106 into 5.3
Resolved all conflicts, bad merges and fixed a few minor bugs in the code.
Commented out the queries from multi_update, view, subselect_sj, func_str,
derived_view, view_grant that failed either with crashes in ps-protocol or
with wrong results.
The failures are clear indications of some bugs in the code and these bugs
are to be fixed.
2011-05-16 22:39:43 -07:00
Guilhem Bichot
12c42b980a Fix for BUG#11755168 '46895: test "outfile_loaddata" fails (reproducible)'.
In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
So 'ha_rows' was used as 'long'.
On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
So the printf-like code was reading only the first 4 bytes.
Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
so the first four bytes yield 0. So the warning message had "row 0" instead of
"row 1" in test outfile_loaddata.test:
-Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0

All error-messaging functions which internally invoke some printf-life function
are potential candidate for such mistakes.
One apparently easy way to catch such mistakes is to use
ATTRIBUTE_FORMAT (from my_attribute.h).
But this works only when call site has both:
a) the format as a string literal
b) the types of arguments.
So:
  func(ER(ER_BLAH), 10);
will silently not be checked, because ER(ER_BLAH) is not known at
compile time (it is known at run-time, and depends on the chosen
language).
And
  func("%s", a va_list argument);
has the same problem, as the *real* type of arguments is not
known at this site at compile time (it's known in some caller).
Moreover,
  func(ER(ER_BLAH));
though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
compile (gcc says "error: format not a string literal and no format
arguments").

Consequences:
1) ATTRIBUTE_FORMAT is here added only to functions which in practice
take "string literal" formats: "my_error_reporter" and "print_admin_msg".
2) it cannot be added to the other functions: my_error(),
push_warning_printf(), Table_check_intact::report_error(),
general_log_print().

To do a one-time check of functions listed in (2), the following
"static code analysis" has been done:
1) replace
  my_error(ER_xxx, arguments for substitution in format)
with the equivalent
  my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
format),
so that we have ER(ER_xxx) and the arguments *in the same call site*
2) add ATTRIBUTE_FORMAT to push_warning_printf(),
Table_check_intact::report_error(), general_log_print()
3) replace ER(xxx) with the hard-coded English text found in
errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
"Unknown error"), so that a call site has the format as string literal
4) this way, ATTRIBUTE_FORMAT can effectively do its job
5) compile, fix errors detected by ATTRIBUTE_FORMAT
6) revert steps 1-2-3.
The present patch has no compiler error when submitted again to the
static code analysis above.
It cannot catch all problems though: see Field::set_warning(), in
which a call to push_warning_printf() has a variable error
(thus, not replacable by a string literal); I checked set_warning() calls
by hand though.

See also WL 5883 for one proposal to avoid such bugs from appearing
again in the future.

The issues fixed in the patch are:
a) mismatch in types (like 'int' passed to '%ld')
b) more arguments passed than specified in the format.
This patch resolves mismatches by changing the type/number of arguments,
not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
per the following old rule: errmsg.txt must be as stable as possible; no insertions
or deletions of messages, no changes of type or number of printf-like format specifiers,
are allowed, as long as the change impacts a message already released in a GA version.
If this rule is not followed:
- Connectors, which use error message numbers, will be confused (by insertions/deletions
of messages)
- using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
could produce wrong messages or crash; such usage can easily happen if
installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
When fixing b), I have verified that the superfluous arguments were not used in the format
in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
Had they been used, then passing them today, even if the message doesn't use them
anymore, would have been necessary, as explained above.

include/my_getopt.h:
  this function pointer is used only with "string literal" formats, so we can add
  ATTRIBUTE_FORMAT.
mysql-test/collections/default.experimental:
  test should pass now
sql/derror.cc:
  by having a format as string literal, ATTRIBUTE_FORMAT check becomes effective.
sql/events.cc:
  Change justified by the following excerpt from sql/share/errmsg.txt:
  ER_EVENT_SAME_NAME
          eng "Same old and new event name"
  ER_EVENT_SET_VAR_ERROR
          eng "Error during starting/stopping of the scheduler. Error code %u"
sql/field.cc:
  ER_TOO_BIG_SCALE 42000 S1009
          eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
  ER_TOO_BIG_PRECISION 42000 S1009
          eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
  ER_TOO_BIG_DISPLAYWIDTH 42000 S1009
          eng "Display width out of range for column '%-.192s' (max = %lu)"
sql/ha_ndbcluster.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
  (sizeof() returns size_t)
sql/ha_ndbcluster_binlog.cc:
  Too many arguments for:
  ER_GET_ERRMSG  
          eng "Got error %d '%-.100s' from %s"
  Patch by Jonas Oreland.
sql/ha_partition.cc:
  print_admin_msg() is used only with a literal as format, so ATTRIBUTE_FORMAT
  works.
sql/handler.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
  (sizeof() returns size_t)
sql/item_create.cc:
  ER_TOO_BIG_SCALE 42000 S1009
          eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
  ER_TOO_BIG_PRECISION 42000 S1009
          eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
  'c_len' and 'c_dec' are char*, passed as %d !! We don't know their value
  (as strtoul() failed), but they are likely big, so we use INT_MAX.
  'len' is ulong.
sql/item_func.cc:
  ER_WARN_DATA_OUT_OF_RANGE 22003 
          eng "Out of range value for column '%s' at row %ld"
  ER_CANT_FIND_UDF  
          eng "Can't load function '%-.192s'"
sql/item_strfunc.cc:
  ER_TOO_BIG_FOR_UNCOMPRESS  
          eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)"
  max_allowed_packet is ulong.
sql/mysql_priv.h:
  sql_print_message_func is a function _pointer_.
sql/sp_head.cc:
  ER_SP_RECURSION_LIMIT
          eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s"
  max_sp_recursion_depth is ulong
sql/sql_acl.cc:
  ER_PASSWORD_NO_MATCH 42000 
          eng "Can't find any matching row in the user table"
  ER_CANT_CREATE_USER_WITH_GRANT 42000
          eng "You are not allowed to create a user with GRANT"
sql/sql_base.cc:
  ER_NOT_KEYFILE  
          eng "Incorrect key file for table '%-.200s'; try to repair it"
  ER_TOO_MANY_TABLES  
          eng "Too many tables; MySQL can only use %d tables in a join"
  MAX_TABLES is size_t.
sql/sql_binlog.cc:
  ER_UNKNOWN_ERROR  
          eng "Unknown error"
sql/sql_class.cc:
  ER_TRUNCATED_WRONG_VALUE_FOR_FIELD  
          eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
  WARN_DATA_TRUNCATED 01000 
          eng "Data truncated for column '%s' at row %ld"
sql/sql_connect.cc:
  ER_HANDSHAKE_ERROR 08S01 
          eng "Bad handshake"
  ER_BAD_HOST_ERROR 08S01 
          eng "Can't get hostname for your address"
sql/sql_insert.cc:
  ER_WRONG_VALUE_COUNT_ON_ROW 21S01 
          eng "Column count doesn't match value count at row %ld"
sql/sql_parse.cc:
  ER_WARN_HOSTNAME_WONT_WORK  
          eng "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work"
  ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
  	eng "Too high level of nesting for select"
  ER_UNKNOWN_ERROR  
          eng "Unknown error"
sql/sql_partition.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_plugin.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_prepare.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
  ER_UNKNOWN_STMT_HANDLER  
          eng "Unknown prepared statement handler (%.*s) given to %s"
  length value (for '%.*s') must be 'int', per the doc of printf()
  and the code of my_vsnprintf().
sql/sql_show.cc:
  ER_OUTOFMEMORY HY001 S1001
          eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_table.cc:
  ER_TOO_BIG_FIELDLENGTH 42000 S1009
          eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead"
sql/table.cc:
  ER_NOT_FORM_FILE  
          eng "Incorrect information in file: '%-.200s'"
  ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
          eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error."
  table->s->mysql_version is ulong.
sql/unireg.cc:
  ER_TOO_LONG_TABLE_COMMENT
    eng "Comment for table '%-.64s' is too long (max = %lu)"
  ER_TOO_LONG_FIELD_COMMENT
    eng "Comment for field '%-.64s' is too long (max = %lu)"
  ER_TOO_BIG_ROWSIZE 42000 
          eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs"
2011-05-16 22:04:01 +02:00
Guilhem Bichot
25221cccd2 Fix for BUG#11755168 '46895: test "outfile_loaddata" fails (reproducible)'.
In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
So 'ha_rows' was used as 'long'.
On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
So the printf-like code was reading only the first 4 bytes.
Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
so the first four bytes yield 0. So the warning message had "row 0" instead of
"row 1" in test outfile_loaddata.test:
-Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0

All error-messaging functions which internally invoke some printf-life function
are potential candidate for such mistakes.
One apparently easy way to catch such mistakes is to use
ATTRIBUTE_FORMAT (from my_attribute.h).
But this works only when call site has both:
a) the format as a string literal
b) the types of arguments.
So:
  func(ER(ER_BLAH), 10);
will silently not be checked, because ER(ER_BLAH) is not known at
compile time (it is known at run-time, and depends on the chosen
language).
And
  func("%s", a va_list argument);
has the same problem, as the *real* type of arguments is not
known at this site at compile time (it's known in some caller).
Moreover,
  func(ER(ER_BLAH));
though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
compile (gcc says "error: format not a string literal and no format
arguments").

Consequences:
1) ATTRIBUTE_FORMAT is here added only to functions which in practice
take "string literal" formats: "my_error_reporter" and "print_admin_msg".
2) it cannot be added to the other functions: my_error(),
push_warning_printf(), Table_check_intact::report_error(),
general_log_print().

To do a one-time check of functions listed in (2), the following
"static code analysis" has been done:
1) replace
  my_error(ER_xxx, arguments for substitution in format)
with the equivalent
  my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
format),
so that we have ER(ER_xxx) and the arguments *in the same call site*
2) add ATTRIBUTE_FORMAT to push_warning_printf(),
Table_check_intact::report_error(), general_log_print()
3) replace ER(xxx) with the hard-coded English text found in
errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
"Unknown error"), so that a call site has the format as string literal
4) this way, ATTRIBUTE_FORMAT can effectively do its job
5) compile, fix errors detected by ATTRIBUTE_FORMAT
6) revert steps 1-2-3.
The present patch has no compiler error when submitted again to the
static code analysis above.
It cannot catch all problems though: see Field::set_warning(), in
which a call to push_warning_printf() has a variable error
(thus, not replacable by a string literal); I checked set_warning() calls
by hand though.

See also WL 5883 for one proposal to avoid such bugs from appearing
again in the future.

The issues fixed in the patch are:
a) mismatch in types (like 'int' passed to '%ld')
b) more arguments passed than specified in the format.
This patch resolves mismatches by changing the type/number of arguments,
not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
per the following old rule: errmsg.txt must be as stable as possible; no insertions
or deletions of messages, no changes of type or number of printf-like format specifiers,
are allowed, as long as the change impacts a message already released in a GA version.
If this rule is not followed:
- Connectors, which use error message numbers, will be confused (by insertions/deletions
of messages)
- using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
could produce wrong messages or crash; such usage can easily happen if
installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
When fixing b), I have verified that the superfluous arguments were not used in the format
in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
Had they been used, then passing them today, even if the message doesn't use them
anymore, would have been necessary, as explained above.
2011-05-16 22:04:01 +02:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Dmitry Lenev
2b992304b4 Merged fix for bug #12652385 - "61493: REORDERING COLUMNS
TO POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED" into
mysql-5.5 tree.
2011-06-17 02:50:07 +04:00
Kent Boortz
0f03af653c Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Dmitry Lenev
95f1b6762b Fix for bug #11759990 - "52354: 'CREATE TABLE .. LIKE ... '
STATEMENTS FAIL".

Attempt to execute CREATE TABLE LIKE statement on a MyISAM
table with INDEX or DATA DIRECTORY options specified as a
source resulted in "MyISAM table '...' is in use..." error.
According to our documentation such a statement should create
a copy of source table with DATA/INDEX DIRECTORY options
omitted.

The problem was that new implementation of CREATE TABLE LIKE
statement in 5.5 tried to copy value of INDEX and DATA DIRECTORY
parameters from the source table. Since in description of source
table this parameters also included name of this table, attempt
to create target table with these parameter led to file name
conflict and error.

This fix addresses the problem by preserving documented and
backward-compatible behavior. I.e. by ensuring that contents
of DATA/INDEX DIRECTORY clauses for the source table is
ignored when target table is created.
2011-06-09 16:54:12 +04:00
Dmitry Lenev
c1f520607c Merged fix for bug #12652385 - "61493: REORDERING COLUMNS
TO POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED" into
mysql-5.5 tree.
2011-06-17 02:50:07 +04:00
Jon Olav Hauglid
f21fd6e40f Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING
SECONDARY INDEX IN INNODB

The patches for Bug#11751388 and Bug#11784056 enabled concurrent
reads while creating secondary indexes in InnoDB. However, they
introduced a regression. This regression occured if ALTER TABLE
failed after the index had been added, for example during the
lock upgrade needed to update .FRM. If this happened, InnoDB
and the server got out of sync with regards to which indexes
actually existed. Therefore the patch for Bug#11815600 again
disabled concurrent reads.

This patch re-enables concurrent reads. The original regression
is fixed by splitting the ADD INDEX operation into two parts.
First the new index is created but not made active. This is
done while concurrent reads are allowed. The second part of
the operation makes the index active (or reverts the change).
This is done after lock upgrade, which prevents the original
regression.

In order to implement this change, the patch changes the storage
API for in-place index creation. handler::add_index() is split
into two functions, handler_add_index() and
handler::final_add_index(). The former for creating indexes without
making them visible and the latter for commiting (i.e. making
visible) new indexes or reverting the changes.

Large parts of this patch were written by Marko Mäkelä.

Test case added to innodb_mysql_lock.test.
2011-06-01 10:06:55 +02:00
Guilhem Bichot
12f651ac9d Merge from 5.1. 2011-05-21 10:21:08 +02:00
Michael Widenius
f458e198c0 Merge with 5.2 2011-05-16 14:05:45 +03:00
Vladislav Vaintroub
1779c2adbf merge 2011-05-12 16:31:54 +02:00
Vladislav Vaintroub
1c95254523 Fix check_table_file_presence:
On Windows, do not attempt access() for special device names like
CON, PRN etc. access() would return 0, this does not mean that fiile
with this name exists.
2011-05-12 15:31:11 +02:00
unknown
520927a7df Bugfix: New table creation/renaming block added if old encoded table present.
mysql-test/r/create.result:
  test of renaming
mysql-test/r/upgrade.result:
  Now such behaviour prohibited to avoid problems.
mysql-test/t/create.test:
  test of renaming
mysql-test/t/upgrade.test:
  Now such behaviour prohibited to avoid problems.
sql/mysql_priv.h:
  Function to test table name presence added.
sql/sql_rename.cc:
  Rename fixed.
sql/sql_table.cc:
  Function to test table name presence added.
  Create fixed.
2011-05-11 14:09:48 +03:00
Sergei Golubchik
e343a2c134 small enhancement of the create table options feature:
no unnecessary casting from void*, more type safety.
typos fixed.
2011-05-10 18:19:11 +02:00
Michael Widenius
2721e912ba Added ALTER ONLINE TABLE, which will give an error if the change can't be done 'instantly' (without a table copy)
mysql-test/r/alter_table_online.result:
  Test new feature
mysql-test/t/alter_table_online.test:
  Test new feature
sql/handler.cc:
  Added comment
sql/lex.h:
  Added ONLINE keyword
sql/mysql_priv.h:
  Added option to alter table to require online operation
sql/share/errmsg.txt:
  Added error message if ONLINE can't be done
sql/sql_lex.h:
  Added online option
sql/sql_parse.cc:
  Added online option to mysql_alter_table()
sql/sql_table.cc:
  Added test that gives error if table can't be done instantly when requsted to be online.
  Fixed wrong test if table includes a VARCHAR
  Fixed wrong (but unlikely) handling of error conditions in ALTER table
sql/sql_yacc.yy:
  Added ALTER ONLINE TABLE syntax
storage/maria/ha_maria.cc:
  Fixed bug where 'start_bulk_insert' used too small buffer if used with unknown number of rows
2011-04-28 19:56:10 +03:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Dmitry Lenev
c7337ef4d9 Bug#11938039 "RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
CLAUSE FAILS OR ABORTS SERVER".
 
Attempt to re-execute prepared ALTER TABLE statement which 
involves .FRM-only changes and also have RENAME clause led
to unwarranted 'Table doesn't exist' error in production
builds and assertion failure for debug builds.
 
This problem stemmed from the fact that for such ALTER TABLE
mysql_alter_table() code changed table list element for table 
to be altered when it tried to re-open table under new name. 
Since this change was not reverted back before next 
re-execution, it made this statement re-execution unsafe.
 
This fix addresses this problem by avoiding changing table list
element from the main table list in such a situation. Instead 
temporary TABLE_LIST object is used.

mysql-test/r/alter_table.result:
  Added test case for bug#11938039 "RE-EXECUTION OF FRM-ONLY
  ALTER TABLE WITH RENAME CLAUSE FAILS OR ABORTS SERVER".
mysql-test/t/alter_table.test:
  Added test case for bug#11938039 "RE-EXECUTION OF FRM-ONLY
  ALTER TABLE WITH RENAME CLAUSE FAILS OR ABORTS SERVER".
sql/sql_table.cc:
  Changed mysql_alter_table() not to modify table list element
  for the table being altered while re-opening table after
  .FRM-only changes. Doing this made .FRM-only ALTER TABLE 
  which also had RENAME clause unsafe for re-execution.
2011-04-13 10:16:40 +04:00
Dmitry Lenev
be65ee15fb Bug#11938039 "RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
CLAUSE FAILS OR ABORTS SERVER".
 
Attempt to re-execute prepared ALTER TABLE statement which 
involves .FRM-only changes and also have RENAME clause led
to unwarranted 'Table doesn't exist' error in production
builds and assertion failure for debug builds.
 
This problem stemmed from the fact that for such ALTER TABLE
mysql_alter_table() code changed table list element for table 
to be altered when it tried to re-open table under new name. 
Since this change was not reverted back before next 
re-execution, it made this statement re-execution unsafe.
 
This fix addresses this problem by avoiding changing table list
element from the main table list in such a situation. Instead 
temporary TABLE_LIST object is used.
2011-04-13 10:16:40 +04:00
Magnus Blåudd
8f8d051d67 Merge 2011-03-25 15:03:44 +01:00
Magnus Blåudd
ab33d3ef2b Merge 2011-03-25 15:03:44 +01:00
Michael Widenius
139a2b64bf Merge with 5.2 2011-03-09 15:47:59 +02:00
Jon Olav Hauglid
bafe24035d Bug #11764779 (former 57649)
FLUSH TABLES under FLUSH TABLES <list> WITH READ LOCK leads 
to assert failure.

This assert was triggered if a statement tried up upgrade a metadata
lock with an active FLUSH TABLE <list> WITH READ LOCK. The assert 
checks that the connection already holds a global intention exclusive
metadata lock. However, FLUSH TABLE <list> WITH READ LOCK does not
acquire this lock in order to be compatible with FLUSH TABLES WITH
READ LOCK. Therefore any metadata lock upgrade caused the assert to
be triggered.

This patch fixes the problem by preventing metadata lock upgrade
if the connection has an active FLUSH TABLE <list> WITH READ LOCK.
ER_TABLE_NOT_LOCKED_FOR_WRITE will instead be reported to the client.

Test case added to flush.test.
2011-03-07 10:08:10 +01:00
Jon Olav Hauglid
c2dc4b022a Bug #11764779 (former 57649)
FLUSH TABLES under FLUSH TABLES <list> WITH READ LOCK leads 
to assert failure.

This assert was triggered if a statement tried up upgrade a metadata
lock with an active FLUSH TABLE <list> WITH READ LOCK. The assert 
checks that the connection already holds a global intention exclusive
metadata lock. However, FLUSH TABLE <list> WITH READ LOCK does not
acquire this lock in order to be compatible with FLUSH TABLES WITH
READ LOCK. Therefore any metadata lock upgrade caused the assert to
be triggered.

This patch fixes the problem by preventing metadata lock upgrade
if the connection has an active FLUSH TABLE <list> WITH READ LOCK.
ER_TABLE_NOT_LOCKED_FOR_WRITE will instead be reported to the client.

Test case added to flush.test.
2011-03-07 10:08:10 +01:00
Magnus Blåudd
0be575b7c8 Bug#60111 storage type for table not saved in .frm
- Add new "format section" in extra data segment with additional table and
   column properties. This was originally introduced in 5.1.20 based MySQL Cluster
 - Remove hardcoded STORAGE DISK for table and instead
   output the real storage format used. Keep both TABLESPACE
   and STORAGE inside same version guard.
 - Implement default version of handler::get_tablespace_name() since tablespace
   is now available in share and it's unnecessary for each handler  to implement.
   (the function could actually be removed totally now).
 - Add test for combinations of TABLESPACE  and STORAGE with CREATE TABLE
   and ALTER TABLE
 - Add test to show that 5.5 now can read a .frm file created by MySQL Cluster
   7.0.22. Although it does not yet show the column level attributes, they are read.
2011-03-04 09:41:29 +01:00
Magnus Blåudd
6c85d65357 Bug#60111 storage type for table not saved in .frm
- Add new "format section" in extra data segment with additional table and
   column properties. This was originally introduced in 5.1.20 based MySQL Cluster
 - Remove hardcoded STORAGE DISK for table and instead
   output the real storage format used. Keep both TABLESPACE
   and STORAGE inside same version guard.
 - Implement default version of handler::get_tablespace_name() since tablespace
   is now available in share and it's unnecessary for each handler  to implement.
   (the function could actually be removed totally now).
 - Add test for combinations of TABLESPACE  and STORAGE with CREATE TABLE
   and ALTER TABLE
 - Add test to show that 5.5 now can read a .frm file created by MySQL Cluster
   7.0.22. Although it does not yet show the column level attributes, they are read.
2011-03-04 09:41:29 +01:00
Sergei Golubchik
a8a757c6bb wl#173 - temporal types with sub-second resolution
and collateral changes.

* introduce my_hrtime_t, my_timediff_t, and conversion macros
* inroduce TIME_RESULT, but it can only be returned from Item::cmp_type(),
  never from Item::result_type()
* pack_time/unpack_time function for "packed" representation of
  MYSQL_TIME in a longlong that can be compared
* ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
* numbers aren't quoted in EXPLAIN EXTENDED
* new column I_S.COLUMNS.DATETIME_PRECISION
* date/time values are compares to anything as date/time, not as strings or numbers.
* old timestamp(X) is no longer supported
* MYSQL_TIME to string conversion functions take precision as an argument
* unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
* Field_timestamp_hires, Field_datetime_hires, Field_time_hires
* Field_temporal
* Lazy_string class to pass a value (string, number, time) polymorphically down the stack
* make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
* removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
* introduced Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
* in many cases date/time types are treated like other types, not as special cases
* greatly simplified Arg_comparator (regarding date/time/year code)
* SEC_TO_TIME is real function, not integer.
* microsecond precision in NOW, CURTIME, etc
* Item_temporal. All items derived from it only provide get_date, but no val* methods
* replication of NOW(6)
* Protocol::store(time) now takes the precision as an argument
* @@TIMESTAMP is a double

client/mysqlbinlog.cc:
  remove unneded casts
include/my_sys.h:
  introduce my_hrtime_t, my_timediff_t, and conversion macros
include/my_time.h:
  pack_time/unpack_time, etc.
  convenience functions to work with MYSQL_TIME::second_part
libmysql/libmysql.c:
  str_to_time() is gone. str_to_datetime() does it now.
  my_TIME_to_str() takes the precision as an argument
mysql-test/include/ps_conv.inc:
  time is not equal to datetime anymore
mysql-test/r/distinct.result:
  a test for an old MySQL bug
mysql-test/r/explain.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_default.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_sapdb.result:
  when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/func_test.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_time.result:
  ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
mysql-test/r/having.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/information_schema.result:
  new column I_S.COLUMNS.DATETIME_PRECISION
mysql-test/r/join_outer.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/metadata.result:
  TIMESTAMP no longer has zerofill flag
mysql-test/r/range.result:
  invalid datetime is not compared with as a string
mysql-test/r/select.result:
  NO_ZERO_IN_DATE, etc only affect storage - according to the manual
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/subselect.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/sysdate_is_now.result:
  when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/type_blob.result:
  TIMESTAMP(N) is not deprecated
mysql-test/r/type_timestamp.result:
  old TIMESTAMP(X) semantics is not supported anymore
mysql-test/r/union.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/varbinary.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/t/distinct.test:
  test for an old MySQL bug
mysql-test/t/func_time.test:
  +- INTERVAL now works with TIME values
mysql-test/t/select.test:
  typo
mysql-test/t/subselect.test:
  only one error per statement, please
mysql-test/t/system_mysql_db_fix40123.test:
  old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50030.test:
  old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50117.test:
  old timestamp(X) is no longer supported
mysql-test/t/type_blob.test:
  old timestamp(X) is no longer supported
mysql-test/t/type_timestamp.test:
  old timestamp(X) is no longer supported
mysys/my_getsystime.c:
  functions to get the time with microsecond precision
mysys/my_init.c:
  move the my_getsystime.c initialization code to my_getsystime.c
mysys/my_static.c:
  no need to make these variables extern
mysys/my_static.h:
  no need to make these variables extern
scripts/mysql_system_tables.sql:
  old timestamp(X) is no longer supported
scripts/mysql_system_tables_fix.sql:
  old timestamp(X) is no longer supported
scripts/mysqlhotcopy.sh:
  old timestamp(X) is no longer supported
sql-common/my_time.c:
  * call str_to_time from str_to_datetime, as appropriate
  * date/time to string conversions take precision as an argument
  * number_to_time()
  * TIME_to_double()
  * pack_time() and unpack_time()
sql/event_data_objects.cc:
  cast is not needed
  my_datetime_to_str() takes precision as an argument
sql/event_db_repository.cc:
  avoid dangerous downcast (because the pointer is
  not always Field_timestamp, see events_1.test)
sql/event_queue.cc:
  avoid silly double-work for cond_wait
  (having an endpoint of wait, subtract the current time to get the timeout,
  and use set_timespec() macro to fill in struct timespec, by adding the current
  time to the timeout)
sql/field.cc:
  * remove virtual Field::get_time(), everyone should use only Field::get_date()
  * remove lots of #ifdef WORDS_BIGENDIAN
  * unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
  * Field_timestamp_hires, Field_datetime_hires, Field_time_hires
  * Field_temporal
  * make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
sql/field.h:
  * remove virtual Field::get_time(), everyone should use only Field::get_date()
  * remove lots of #ifdef WORDS_BIGENDIAN
  * unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
  * Field_timestamp_hires, Field_datetime_hires, Field_time_hires
  * Field_temporal
  * make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
  * removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
sql/filesort.cc:
  TIME_RESULT, cmp_time()
sql/item.cc:
  * numbers aren't quoted in EXPLAIN EXTENDED
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  * virtual Item::get_time() is gone
  * Item_param::field_type() is set correctly
  * Item_datetime, for a datetime constant
  * time to anything is compared as a time
  * Item_cache::print() prints the value is available
  * bug fixed in Item_cache_int::val_str()
sql/item.h:
  * Item::print_value(), to be used from Item_xxx::print() when needed
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  * virtual Item::get_time() is gone
  * Item_datetime, for a datetime constant
  * better default for cast_to_int_type()
  * Item_cache objects now *always* have the field_type() set
sql/item_cmpfunc.cc:
  * get_year_value, get_time_value are gone. get_datetime_value does it all
  * get_value_a_func, get_value_b_func are gone
  * can_compare_as_dates() is gone too, TIME_RESULT is used instead
  * cmp_type() instead or result_type() when doing a comparison
  * compare_datetime and compate_e_datetime in the comparator_matrix, is_nulls_eq is gone
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
sql/item_cmpfunc.h:
  greatly simplified Arg_comparator
sql/item_create.cc:
  * fix a bug in error messages in CAST
sql/item_func.cc:
  Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  mention all possibitiles in switch over Item_result values, or use default:
sql/item_row.h:
  overwrite the default cmp_type() for Item_row,
  as no MYSQL_TYPE_xxx value corresponds to ROW_RESULT
sql/item_timefunc.cc:
  rewrite make_datetime to support precision argument
  SEC_TO_TIME is real function, not integer.
  many functions that returned temporal values had duplicate code in val_* methods,
  some of them did not have get_date() which resulted in unnecessary date->str->date conversions. 
  Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
  many fixes to set decimals (datetime precision) correctly.
sql/item_timefunc.h:
  SEC_TO_TIME is real function, not integer.
  many functions that returned temporal values had duplicate code in val_* methods,
  some of them did not have get_date() which resulted in unnecessary date->str->date conversions. 
  Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
  many fixes to set decimals (datetime precision) correctly.
sql/log_event.cc:
  replication of NOW(6)
sql/log_event.h:
  replication of NOW(6)
sql/mysql_priv.h:
  Lazy_string class to pass a value (string, number, time) polymorphically down the stack.
  make_truncated_value_warning() that uses it.
sql/mysqld.cc:
  datetime in Arg_comparator::comparator_matrix
sql/opt_range.cc:
  cleanup: don't disable warnings before calling save_in_field_no_warnings()
sql/protocol.cc:
  Protocol::store(time) now takes the precision as an argument
sql/protocol.h:
  Protocol::store(time) now takes the precision as an argument
sql/rpl_rli.cc:
  small cleanup
sql/set_var.cc:
  SET TIMESTAMP=double
sql/set_var.h:
  @@TIMESTAMP is a double
sql/share/errmsg.txt:
  precision and scale are unsigned
sql/slave.cc:
  replication of NOW(6)
sql/sp_head.cc:
  cleanup
sql/sql_class.cc:
  support for NOW(6)
sql/sql_class.h:
  support for NOW(6)
sql/sql_insert.cc:
  support for NOW(6)
sql/sql_select.cc:
  use item->cmp_type().
  move a comment where it belongs
sql/sql_show.cc:
  new column I_S.COLUMNS.DATETIME_PRECISION
sql/sql_yacc.yy:
  TIME(X), DATETIME(X), cast, NOW(X), CURTIME(X), etc
sql/time.cc:
  fix date_add_interval() to support MYSQL_TIMESTAMP_TIME argument
storage/myisam/ha_myisam.cc:
  TIMESTAMP no longer carries ZEROFIELD flag, still we keep MYI file compatible.
strings/my_vsnprintf.c:
  warnings
tests/mysql_client_test.c:
  old timestamp(X) does not work anymore
  datetime is no longer equal to time
2011-03-01 13:24:36 +01:00
Michael Widenius
3358cdd504 Merge with 5.1 to get in changes from MySQL 5.1.55 2011-02-28 19:39:30 +02:00
Michael Widenius
869f5d0e81 Merge with alias as String 2011-02-28 13:16:17 +02:00
Michael Widenius
ff3da0f963 Change TABLE->alias to String for less memory reallocation
Changed some String.ptr() -> String.c_ptr() for String that are not guaranteed to end with \0
Removed some c_ptr() usage from parameters to functions that takes ptr & length
Use preallocate buffers to avoid calling malloc() for most operations. 


sql/event_db_repository.cc:
  alias is now a String
sql/event_scheduler.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
sql/events.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr -> ptr() as function takes ptr & length
sql/field.cc:
  alias is now a String
sql/field.h:
  alias is now a String
sql/ha_partition.cc:
  alias is now a String
sql/handler.cc:
  alias is now a String
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/item.cc:
  Store error parameter in separarte buffer to ensure correct error message
sql/item_func.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to not have to make string \0 terminated
sql/lock.cc:
  alias is now a String
sql/log.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/log_event.cc:
  c_ptr_quick() -> ptr() as we only want to get the pointer to String buffer
sql/opt_range.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/opt_table_elimination.cc:
  alias is now a String
sql/set_var.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr() -> ptr() as function takes ptr & length
  Simplify some code.
sql/sp.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/sp_rcontext.cc:
  alias is now a String
sql/sql_base.cc:
  alias is now a String.
  Here we win a realloc() for most alias usage.
sql/sql_class.cc:
  Use size descriptor for printf() to avoid accessing bytes outside of buffer
sql/sql_insert.cc:
  Change allocation of TABLE as it's now contains a String
  _ptr() -> ptr() as function takes ptr & length
sql/sql_load.cc:
  Use preallocate buffers to avoid calling malloc() for most operations.
sql/sql_parse.cc:
  Use c_ptr_safe() to ensure string is \0 terminated.
sql/sql_plugin.cc:
  c_ptr_quick() -> ptr() as function takes ptr & length
sql/sql_select.cc:
  alias is now a String
sql/sql_show.cc:
  alias is now a String
sql/sql_string.h:
  Added move() function to change who owns the string (owner does the free)
sql/sql_table.cc:
  alias is now a String
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
sql/sql_test.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  alias is now a String
sql/sql_trigger.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  Use field->init() to setup pointers to alias.
sql/sql_update.cc:
  alias is now a String
sql/sql_view.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/sql_yacc.yy:
  r() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/table.cc:
  alias is now a String
sql/table.h:
  alias is now a String
storage/federatedx/ha_federatedx.cc:
  Remove extra 1 byte alloc that is automaticly done by strmake()
  Ensure that error message ends with \0
storage/maria/ha_maria.cc:
  alias is now a String
storage/myisam/ha_myisam.cc:
  alias is now a String
2011-02-28 12:48:50 +02:00
Magne Mahre
27166fc64f Bug#11767480 - SPATIAL INDEXES ON NON-SPATIAL COLUMNS CAUSE CRASHES.
This is a backport of the patch for MySQL Bug#50574.
      
Adding a SPATIAL INDEX on non-geometrical columns caused a
segmentation fault when the table was subsequently 
inserted into.
            
A test was added in mysql_prepare_create_table to explicitly
check whether non-geometrical columns are used in a
spatial index, and throw an error if so.
      
For MySQL 5.5 and later, a new and more meaningful error 
message was introduced.  For 5.1, we (re-)use an existing
error code.
2011-02-24 12:23:38 +01:00
Magne Mahre
a6ea6dc217 Bug#11767480 - SPATIAL INDEXES ON NON-SPATIAL COLUMNS CAUSE CRASHES.
This is a backport of the patch for MySQL Bug#50574.
      
Adding a SPATIAL INDEX on non-geometrical columns caused a
segmentation fault when the table was subsequently 
inserted into.
            
A test was added in mysql_prepare_create_table to explicitly
check whether non-geometrical columns are used in a
spatial index, and throw an error if so.
      
For MySQL 5.5 and later, a new and more meaningful error 
message was introduced.  For 5.1, we (re-)use an existing
error code.
2011-02-24 12:23:38 +01:00
Michael Widenius
58bb0769bd Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
2011-02-20 18:51:43 +02:00
Jon Olav Hauglid
e99f2b1c4e Bug #42230 during add index, cannot do queries on storage engines
that implement add_index

The problem was that ALTER TABLE blocked reads on an InnoDB table
while adding a secondary index, even if this was not needed. It is
only needed for the final step where the .frm file is updated.

The reason queries were blocked, was that ALTER TABLE upgraded the
metadata lock from MDL_SHARED_NO_WRITE (which blocks writes) to
MDL_EXCLUSIVE (which blocks all accesses) before index creation.

The way the server handles index creation, is that storage engines
publish their capabilities to the server and the server determines
which of the following three ways this can be handled: 1) build a
new version of the table; 2) change the existing table but with
exclusive metadata lock; 3) change the existing table but without
metadata lock upgrade.

For InnoDB and secondary index creation, option 3) should have been
selected. However this failed for two reasons. First, InnoDB did
not publish this capability properly.

Second, the ALTER TABLE code failed to made proper use of the
information supplied by the storage engine. A variable
need_lock_for_indexes was set accordingly, but was not later used.
This patch fixes this problem by only doing metadata lock upgrade
before index creation/deletion if this variable has been set.

This patch also changes some of the related terminology used 
in the code. Specifically the use of "fast" and "online" with
respect to ALTER TABLE. "Fast" was used to indicate that an
ALTER TABLE operation could be done without involving a
temporary table. "Fast" has been renamed "in-place" to more
accurately describe the behavior.

"Online" meant that the operation could be done without taking
a table lock. However, in the current implementation writes
are always prohibited during ALTER TABLE and an exclusive
metadata lock is held while updating the .frm, so ALTER TABLE
is not completely online. This patch replaces "online" with 
"in-place", with additional comments indicating if concurrent
reads are allowed during index creation/deletion or not.

An important part of this update of terminology is renaming
of the handler flags used by handlers to indicate if index
creation/deletion can be done in-place and if concurrent reads
are allowed. For example, the HA_ONLINE_ADD_INDEX_NO_WRITES
flag has been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE,
while HA_ONLINE_ADD_INDEX is now HA_INPLACE_ADD_INDEX_NO_WRITE.
Note that this is a rename to clarify current behavior, the
flag values have not changed and no flags have been removed or
added.

Test case added to innodb_mysql_sync.test.
2011-01-26 14:23:29 +01:00
Jon Olav Hauglid
5e03579061 Bug #42230 during add index, cannot do queries on storage engines
that implement add_index

The problem was that ALTER TABLE blocked reads on an InnoDB table
while adding a secondary index, even if this was not needed. It is
only needed for the final step where the .frm file is updated.

The reason queries were blocked, was that ALTER TABLE upgraded the
metadata lock from MDL_SHARED_NO_WRITE (which blocks writes) to
MDL_EXCLUSIVE (which blocks all accesses) before index creation.

The way the server handles index creation, is that storage engines
publish their capabilities to the server and the server determines
which of the following three ways this can be handled: 1) build a
new version of the table; 2) change the existing table but with
exclusive metadata lock; 3) change the existing table but without
metadata lock upgrade.

For InnoDB and secondary index creation, option 3) should have been
selected. However this failed for two reasons. First, InnoDB did
not publish this capability properly.

Second, the ALTER TABLE code failed to made proper use of the
information supplied by the storage engine. A variable
need_lock_for_indexes was set accordingly, but was not later used.
This patch fixes this problem by only doing metadata lock upgrade
before index creation/deletion if this variable has been set.

This patch also changes some of the related terminology used 
in the code. Specifically the use of "fast" and "online" with
respect to ALTER TABLE. "Fast" was used to indicate that an
ALTER TABLE operation could be done without involving a
temporary table. "Fast" has been renamed "in-place" to more
accurately describe the behavior.

"Online" meant that the operation could be done without taking
a table lock. However, in the current implementation writes
are always prohibited during ALTER TABLE and an exclusive
metadata lock is held while updating the .frm, so ALTER TABLE
is not completely online. This patch replaces "online" with 
"in-place", with additional comments indicating if concurrent
reads are allowed during index creation/deletion or not.

An important part of this update of terminology is renaming
of the handler flags used by handlers to indicate if index
creation/deletion can be done in-place and if concurrent reads
are allowed. For example, the HA_ONLINE_ADD_INDEX_NO_WRITES
flag has been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE,
while HA_ONLINE_ADD_INDEX is now HA_INPLACE_ADD_INDEX_NO_WRITE.
Note that this is a rename to clarify current behavior, the
flag values have not changed and no flags have been removed or
added.

Test case added to innodb_mysql_sync.test.
2011-01-26 14:23:29 +01:00
Michael Widenius
050c004f5e Merge with 5.1
Fixes to get Aria handler tests to work.
Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
2011-01-11 15:36:41 +02:00
Michael Widenius
215043b7c2 Merge with 5.1 2011-01-05 16:03:58 +02:00
Michael Widenius
ab32ce9aa7 ALTER TABLE IGNORE didn't ignore duplicates for unique add index for InnoDB 2011-01-05 15:09:06 +02:00
Michael Widenius
e63b5546c5 Implementation of MWL#172: Add support for prepared statements to HANDLER READ
It includes speed optimizations for HANDLER READ by caching as much as possible in HANDLER OPEN
Other things:
- Added mysqld option --disable-thr-alarm to be able to benchmark things without thr_alarm
- Changed 'Locked' state to 'System lock' and 'Table lock' (these where used in the code but never shown to end user)
- Better error message if mysql_install_db.sh fails
- Moved handler function prototypes to sql_handler.h
- Remove not anymore used 'thd->locked' member


include/thr_alarm.h:
  Added my_disable_thr_alarm
include/thr_lock.h:
  Add new member to THR_LOCK_DATA to remember original lock type state. This is needed as thr_unlock() resets type to TL_UNLOCK.
mysql-test/include/check_no_concurrent_insert.inc:
  Locked -> Table lock
mysql-test/include/handler.inc:
  Locked -> Table lock
mysql-test/r/handler_innodb.result:
  Updated results for new tests
mysql-test/r/handler_myisam.result:
  Updated results for new tests
mysql-test/r/sp-threads.result:
  Locked -> Table lock
mysql-test/suite/binlog/t/binlog_stm_row.test:
  Locked -> Table lock
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Locked -> Table lock
mysql-test/suite/pbxt/t/lock_multi.test:
  Locked -> Table lock
mysql-test/suite/sys_vars/r/concurrent_insert_func.result:
  Locked -> Table lock
mysql-test/suite/sys_vars/t/concurrent_insert_func.test:
  Locked -> Table lock
mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test:
  Locked -> Table lock
mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test:
  Locked -> Table lock
mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test:
  Locked -> Table lock
mysql-test/t/insert_notembedded.test:
  Locked -> Table lock
mysql-test/t/lock_multi.test:
  Locked -> Table lock
mysql-test/t/merge-big.test:
  Locked -> Table lock
mysql-test/t/multi_update.test:
  Locked -> Table lock
mysql-test/t/query_cache_28249.test:
  Locked -> Table lock
mysql-test/t/sp_notembedded.test:
  Locked -> Table lock
mysql-test/t/sp_sync.test:
  Locked -> Table lock
mysql-test/t/status.test:
  Locked -> Table lock
mysql-test/t/trigger_notembedded.test:
  Locked -> Table lock
mysys/thr_alarm.c:
  Added option to disable thr_alarm
mysys/thr_lock.c:
  Detect loops
scripts/mysql_install_db.sh:
  Give better error message if something goes wrong
sql/Makefile.am:
  Added sql_handler.h
sql/lock.cc:
  Split functions to allow one to cache value if store_lock() (for HANDLER functions).
  - Split mysql_lock_tables() into two functions, where first one allocates MYSQL_LOCK and other other one uses it.
  - Made get_lock_data() an external function.
  - Added argument to mysql_unlock_tables() to not free sql_lock.
  - Added argument to reset_lock_data() to reset lock structure to initial state (as after get_lock_data())
sql/mysql_priv.h:
  Moved handler function prototypes to sql_handler.h
  Added new lock functions.
sql/mysqld.cc:
  Added --thread-alarm startup option
sql/net_serv.cc:
  Don't call vio_blocking() if not needed
sql/sql_base.cc:
  include sql_handler.h
sql/sql_class.cc:
  include sql_handler.h
  Remove not anymore used 'thd->locked' member
sql/sql_class.h:
  Remove not anymore used 'thd->locked' member
sql/sql_db.cc:
  include sql_handler.h
sql/sql_delete.cc:
  include sql_handler.h
sql/sql_handler.cc:
  Rewrote all code to use SQL_HANDLER instead of TABLE_LIST (original interface)
  Rewrote mysql_ha_open() to cache all things from TABLE_LIST and items for field list, where etc.
  In mysql_ha_open() also cache MYSQL_LOCK structure from get_lock_data().
  Split functions into smaller sub functions (needed to be able to implement mysql_ha_read_prepare())
  Added mysql_ha_read_prepare() to allow one to prepare HANDLER READ.
sql/sql_handler.h:
  Interface to sql_handler.cc
sql/sql_parse.cc:
  include sql_handler.h
sql/sql_prepare.cc:
  Added mysql_test_handler_read(), prepare for HANDLER READ
sql/sql_rename.cc:
  include sql_handler.h
sql/sql_show.cc:
  Removed usage of thd->locked
sql/sql_table.cc:
  include sql_handler.h
sql/sql_trigger.cc:
  include sql_handler.h
2011-01-04 00:55:41 +02:00
Sergei Golubchik
31a78529bc virtual columns:
* move a capability from a virtual handler method to table_flags()
 * rephrase error messages to avoid hard-coded English parts
 * admit in test cases that they need xtradb, not innodb

mysql-test/suite/vcol/t/rpl_vcol.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_handler_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_keys_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_partition_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_select_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test:
  this test needs xtradb, it will fail with innodb
mysql-test/suite/vcol/t/vcol_view_innodb.test:
  this test needs xtradb, it will fail with innodb
sql/ha_partition.h:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
sql/handler.h:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
sql/share/errmsg.txt:
  no hard-coded english parts in the error messages (ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN)
sql/sql_table.cc:
  no hard-coded english parts in the error messages
sql/table.cc:
  * check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
  * no "csv workaround" is needed
  * no hard-coded english parts in the error messages
storage/maria/ha_maria.cc:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
storage/maria/ha_maria.h:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
storage/myisam/ha_myisam.cc:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
storage/myisam/ha_myisam.h:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
storage/xtradb/handler/ha_innodb.cc:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
storage/xtradb/handler/ha_innodb.h:
  check_if_supported_virtual_columns() -> HA_CAN_VIRTUAL_COLUMNS
2010-12-31 10:39:14 +01:00
Sergei Golubchik
fda18d8fa2 lpbug#665028 SHOW STORAGE ENGINES shows incorrect Transaction support for Aria
don't fill in handlerton::commit member, as it's not used
and makes MySQL believe that Aria is transactional.
Fix the TRANSACTIONAL=1 warning.
2010-12-27 10:53:02 +01:00
Michael Widenius
b7b25dc666 Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist'

Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
2010-12-06 10:25:44 +02:00
Michael Widenius
1e5061fe3b merge with 5.1 2010-11-30 23:11:03 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Michael Widenius
1a6373e8e2 Merge with MySQL 5.1.53
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
 - Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255 
- Werror is disabled;  Should be enabled after merge with xtradb.
2010-11-25 00:57:34 +02:00
Michael Widenius
52090a4434 Code cleanup to get fewer reallocs() during execution.
- Changed TABLE->alias to String to get fewer reallocs when alias are used.
- Preallocate some buffers

Changed some String->c_ptr() -> String->ptr() when \0 is not needed.
Fixed wrong usage of String->ptr() when we need a \0 terminated string.
Use my_strtod() instead of my_atof() to avoid having to add \0 to string.
c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
zr 

sql/event_db_repository.cc:
  Update usage of TABLE->alias
sql/event_scheduler.cc:
  c_ptr() -> c_ptr_safe()
sql/events.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/field.cc:
  Update usage of TABLE->alias
sql/field.h:
  Update usage of TABLE->alias
sql/ha_partition.cc:
  Update usage of TABLE->alias
sql/handler.cc:
  Update usage of TABLE->alias
  Fixed wrong usage of str.ptr()
sql/item.cc:
  Fixed error where code wrongly assumed string was \0 terminated.
sql/item_func.cc:
  c_ptr() -> c_ptr_safe()
  Update usage of TABLE->alias
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to avoid having to add \0 to string
sql/lock.cc:
  Update usage of TABLE->alias
sql/log.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/log_event.cc:
  c_ptr_quick() -> ptr() as \0 was not needed
sql/opt_range.cc:
  ptr() -> c_ptr() as \0 is needed
sql/opt_subselect.cc:
  Update usage of TABLE->alias
sql/opt_table_elimination.cc:
  Update usage of TABLE->alias
sql/set_var.cc:
  ptr() -> c_ptr() as \0 is needed
  c_ptr() -> c_ptr_safe()
sql/sp.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sp_rcontext.cc:
  
  Update usage of TABLE->alias
sql/sql_base.cc:
  Preallocate buffers
  Update usage of TABLE->alias
sql/sql_class.cc:
  Fix arguments to sprintf() to work even if string is not \0 terminated
sql/sql_insert.cc:
  Update usage of TABLE->alias
  c_ptr() -> ptr() as \0 was not needed
sql/sql_load.cc:
  Preallocate buffers
  Trivial optimizations
sql/sql_parse.cc:
  Trivial optimization
sql/sql_plugin.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sql_select.cc:
  Update usage of TABLE->alias
sql/sql_show.cc:
  Update usage of TABLE->alias
sql/sql_string.h:
  Added move() function to move allocated memory from one object to another.
sql/sql_table.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_test.cc:
  ptr() -> c_ptr_safe()
sql/sql_trigger.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_update.cc:
  Update usage of TABLE->alias
sql/sql_view.cc:
  ptr() -> c_ptr_safe()
sql/sql_yacc.yy:
  ptr() -> c_ptr()
sql/table.cc:
  
  Update usage of TABLE->alias
sql/table.h:
  Changed TABLE->alias to String to get fewer reallocs when alias are used.
storage/federatedx/ha_federatedx.cc:
  Use c_ptr_safe() to ensure strings are \0 terminated.
storage/maria/ha_maria.cc:
  Update usage of TABLE->alias
storage/myisam/ha_myisam.cc:
  Update usage of TABLE->alias
storage/xtradb/row/row0sel.c:
  Ensure that null bits in record are properly reset.
  (Old code didn't work as row_search_for_mysql() can be called twice while reading fields from one row.
2010-11-24 00:08:48 +02:00
Michael Widenius
b52020221e Merge with MySQL 5.1.52 2010-11-23 23:39:59 +02:00
Vasil Dimov
d5787a3c59 Fix Bug#57739 Scary messages in error log
Silence a warning about old table name when InnoDB tests whether the
format has changed using a nonexistent table name.

Reviewed by:	bar@mysql.com, marko.makela@oracle.com
2010-11-22 16:08:51 +02:00