- Avoid some realloc() during startup
- Ensure that file_key_management_plugin frees it's memory early, even if
it's linked statically.
- Fixed compiler warnings from unused variables and missing destructors
- Fixed wrong indentation
- Added mem_root to all calls to new Item
- Added private method operator new(size_t size) to Item to ensure that
we always use a mem_root when creating an item.
This saves use once call to current_thd per Item creation
Added mandatory thd parameter to Item (and all derivative classes) constructor.
Added thd parameter to all routines that may create items.
Also removed "current_thd" from Item::Item. This reduced number of
pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
- Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function.
- Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined.
- Removing calls to current_thd when we have access to thd
Part of this is optimization (not calling current_thd when not needed),
but part is bug fixing for error condition when current_thd is not defined
(For example on startup and end of mysqld)
Notable renames done as otherwise a lot of functions would have to be changed:
- In JOIN structure renamed:
examined_rows -> join_examined_rows
record_count -> join_record_count
- In Field, renamed new_field() to make_new_field()
Other things:
- Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe.
- Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly
- Added 'thd' as argument to a few functions to avoid calling current_thd.
fix sys_var->is_default() method (that was using default_val property
in a global sys_var object to track per-session state):
* move timestamp to a dedicated Sys_var_timestamp class
(in fact, rename Sys_var_session_special_double to Sys_var_timestamp)
* make session_is_default a virtual method with a special implementation
for timestamps
* other variables don't have a special behavior for default values
and can have session_is_default() to be always false.
There were two issues:
* set_var_default_role::user was overwritten with a new value,
allocated in the thd->mem_root, which is reset between executions.
That was causing the crash. Solved by introducing set_var_default_role::real_user
* when privilege tables were opened on EXECUTE, the reprepare_observer
would abort the statement (as privilege tables are opened using
the local TABLE_LIST that doesn't preserve metadata from PREPARE, so
reprepare_observer thought they're changed). This issue also applied
to SET PASSWORD. Solved by disabling reprepare_observer.
- Fixed compiler warnings
- Added include/wait_for_binlog_checkpoint.inc, as suggested by JonasO
- Updated 'build-tags' to work with git (Patch by Serg)
1. @@boolean_var differs from SHOW VARIABLES
2. @@str_var ignored variable charset (which is wrong
for path variables that use filesystem charset)
3. @@signed_int_var in the string context was printed
as unsigned
The reason for the failure was a bug in an include file on debian that causes 'struct stat'
to have different sized depending on the environment.
This patch fixes so that we always include my_global.h or my_config.h before we include any other files.
Other things:
- Removed #include <my_global.h> in some include files; Better to always do this at the top level to have as few
"always-include-this-file-first' files as possible.
- Removed usage of some include files that where already included by my_global.h or by other files.
client/mysql_plugin.c:
Use my_global.h first
client/mysqlslap.c:
Remove duplicated include files
extra/comp_err.c:
Remove duplicated include files
include/m_string.h:
Remove duplicated include files
include/maria.h:
Remove duplicated include files
libmysqld/emb_qcache.cc:
Use my_global.h first
plugin/semisync/semisync.h:
Use my_pthread.h first
sql/datadict.cc:
Use my_global.h first
sql/debug_sync.cc:
Use my_global.h first
sql/derror.cc:
Use my_global.h first
sql/des_key_file.cc:
Use my_global.h first
sql/discover.cc:
Use my_global.h first
sql/event_data_objects.cc:
Use my_global.h first
sql/event_db_repository.cc:
Use my_global.h first
sql/event_parse_data.cc:
Use my_global.h first
sql/event_queue.cc:
Use my_global.h first
sql/event_scheduler.cc:
Use my_global.h first
sql/events.cc:
Use my_global.h first
sql/field.cc:
Use my_global.h first
Remove duplicated include files
sql/field_conv.cc:
Use my_global.h first
sql/filesort.cc:
Use my_global.h first
Remove duplicated include files
sql/gstream.cc:
Use my_global.h first
sql/ha_ndbcluster.cc:
Use my_global.h first
sql/ha_ndbcluster_binlog.cc:
Use my_global.h first
sql/ha_ndbcluster_cond.cc:
Use my_global.h first
sql/ha_partition.cc:
Use my_global.h first
sql/handler.cc:
Use my_global.h first
sql/hash_filo.cc:
Use my_global.h first
sql/hostname.cc:
Use my_global.h first
sql/init.cc:
Use my_global.h first
sql/item.cc:
Use my_global.h first
sql/item_buff.cc:
Use my_global.h first
sql/item_cmpfunc.cc:
Use my_global.h first
sql/item_create.cc:
Use my_global.h first
sql/item_geofunc.cc:
Use my_global.h first
sql/item_inetfunc.cc:
Use my_global.h first
sql/item_row.cc:
Use my_global.h first
sql/item_strfunc.cc:
Use my_global.h first
sql/item_subselect.cc:
Use my_global.h first
sql/item_sum.cc:
Use my_global.h first
sql/item_timefunc.cc:
Use my_global.h first
sql/item_xmlfunc.cc:
Use my_global.h first
sql/key.cc:
Use my_global.h first
sql/lock.cc:
Use my_global.h first
sql/log.cc:
Use my_global.h first
sql/log_event.cc:
Use my_global.h first
sql/log_event_old.cc:
Use my_global.h first
sql/mf_iocache.cc:
Use my_global.h first
sql/mysql_install_db.cc:
Remove duplicated include files
sql/mysqld.cc:
Remove duplicated include files
sql/net_serv.cc:
Remove duplicated include files
sql/opt_range.cc:
Use my_global.h first
sql/opt_subselect.cc:
Use my_global.h first
sql/opt_sum.cc:
Use my_global.h first
sql/parse_file.cc:
Use my_global.h first
sql/partition_info.cc:
Use my_global.h first
sql/procedure.cc:
Use my_global.h first
sql/protocol.cc:
Use my_global.h first
sql/records.cc:
Use my_global.h first
sql/records.h:
Don't include my_global.h
Better to do this at the upper level
sql/repl_failsafe.cc:
Use my_global.h first
sql/rpl_filter.cc:
Use my_global.h first
sql/rpl_gtid.cc:
Use my_global.h first
sql/rpl_handler.cc:
Use my_global.h first
sql/rpl_injector.cc:
Use my_global.h first
sql/rpl_record.cc:
Use my_global.h first
sql/rpl_record_old.cc:
Use my_global.h first
sql/rpl_reporting.cc:
Use my_global.h first
sql/rpl_rli.cc:
Use my_global.h first
sql/rpl_tblmap.cc:
Use my_global.h first
sql/rpl_utility.cc:
Use my_global.h first
sql/set_var.cc:
Added comment
sql/slave.cc:
Use my_global.h first
sql/sp.cc:
Use my_global.h first
sql/sp_cache.cc:
Use my_global.h first
sql/sp_head.cc:
Use my_global.h first
sql/sp_pcontext.cc:
Use my_global.h first
sql/sp_rcontext.cc:
Use my_global.h first
sql/spatial.cc:
Use my_global.h first
sql/sql_acl.cc:
Use my_global.h first
sql/sql_admin.cc:
Use my_global.h first
sql/sql_analyse.cc:
Use my_global.h first
sql/sql_audit.cc:
Use my_global.h first
sql/sql_base.cc:
Use my_global.h first
sql/sql_binlog.cc:
Use my_global.h first
sql/sql_bootstrap.cc:
Use my_global.h first
Use my_global.h first
sql/sql_cache.cc:
Use my_global.h first
sql/sql_class.cc:
Use my_global.h first
sql/sql_client.cc:
Use my_global.h first
sql/sql_connect.cc:
Use my_global.h first
sql/sql_crypt.cc:
Use my_global.h first
sql/sql_cursor.cc:
Use my_global.h first
sql/sql_db.cc:
Use my_global.h first
sql/sql_delete.cc:
Use my_global.h first
sql/sql_derived.cc:
Use my_global.h first
sql/sql_do.cc:
Use my_global.h first
sql/sql_error.cc:
Use my_global.h first
sql/sql_explain.cc:
Use my_global.h first
sql/sql_expression_cache.cc:
Use my_global.h first
sql/sql_handler.cc:
Use my_global.h first
sql/sql_help.cc:
Use my_global.h first
sql/sql_insert.cc:
Use my_global.h first
sql/sql_lex.cc:
Use my_global.h first
sql/sql_load.cc:
Use my_global.h first
sql/sql_locale.cc:
Use my_global.h first
sql/sql_manager.cc:
Use my_global.h first
sql/sql_parse.cc:
Use my_global.h first
sql/sql_partition.cc:
Use my_global.h first
sql/sql_plugin.cc:
Added comment
sql/sql_prepare.cc:
Use my_global.h first
sql/sql_priv.h:
Added error if we use this before including my_global.h
This check is here becasue so many files includes sql_priv.h first.
sql/sql_profile.cc:
Use my_global.h first
sql/sql_reload.cc:
Use my_global.h first
sql/sql_rename.cc:
Use my_global.h first
sql/sql_repl.cc:
Use my_global.h first
sql/sql_select.cc:
Use my_global.h first
sql/sql_servers.cc:
Use my_global.h first
sql/sql_show.cc:
Added comment
sql/sql_signal.cc:
Use my_global.h first
sql/sql_statistics.cc:
Use my_global.h first
sql/sql_table.cc:
Use my_global.h first
sql/sql_tablespace.cc:
Use my_global.h first
sql/sql_test.cc:
Use my_global.h first
sql/sql_time.cc:
Use my_global.h first
sql/sql_trigger.cc:
Use my_global.h first
sql/sql_udf.cc:
Use my_global.h first
sql/sql_union.cc:
Use my_global.h first
sql/sql_update.cc:
Use my_global.h first
sql/sql_view.cc:
Use my_global.h first
sql/sys_vars.cc:
Added comment
sql/table.cc:
Use my_global.h first
sql/thr_malloc.cc:
Use my_global.h first
sql/transaction.cc:
Use my_global.h first
sql/uniques.cc:
Use my_global.h first
sql/unireg.cc:
Use my_global.h first
sql/unireg.h:
Removed inclusion of my_global.h
storage/archive/ha_archive.cc:
Added comment
storage/blackhole/ha_blackhole.cc:
Use my_global.h first
storage/csv/ha_tina.cc:
Use my_global.h first
storage/csv/transparent_file.cc:
Use my_global.h first
storage/federated/ha_federated.cc:
Use my_global.h first
storage/federatedx/federatedx_io.cc:
Use my_global.h first
storage/federatedx/federatedx_io_mysql.cc:
Use my_global.h first
storage/federatedx/federatedx_io_null.cc:
Use my_global.h first
storage/federatedx/federatedx_txn.cc:
Use my_global.h first
storage/heap/ha_heap.cc:
Use my_global.h first
storage/innobase/handler/handler0alter.cc:
Use my_global.h first
storage/maria/ha_maria.cc:
Use my_global.h first
storage/maria/unittest/ma_maria_log_cleanup.c:
Remove duplicated include files
storage/maria/unittest/test_file.c:
Added comment
storage/myisam/ha_myisam.cc:
Move sql_plugin.h first as this includes my_global.h
storage/myisammrg/ha_myisammrg.cc:
Use my_global.h first
storage/oqgraph/oqgraph_thunk.cc:
Use my_config.h and my_global.h first
One could not include my_global.h before oqgraph_thunk.h (don't know why)
storage/spider/ha_spider.cc:
Use my_global.h first
storage/spider/hs_client/config.cpp:
Use my_global.h first
storage/spider/hs_client/escape.cpp:
Use my_global.h first
storage/spider/hs_client/fatal.cpp:
Use my_global.h first
storage/spider/hs_client/hstcpcli.cpp:
Use my_global.h first
storage/spider/hs_client/socket.cpp:
Use my_global.h first
storage/spider/hs_client/string_util.cpp:
Use my_global.h first
storage/spider/spd_conn.cc:
Use my_global.h first
storage/spider/spd_copy_tables.cc:
Use my_global.h first
storage/spider/spd_db_conn.cc:
Use my_global.h first
storage/spider/spd_db_handlersocket.cc:
Use my_global.h first
storage/spider/spd_db_mysql.cc:
Use my_global.h first
storage/spider/spd_db_oracle.cc:
Use my_global.h first
storage/spider/spd_direct_sql.cc:
Use my_global.h first
storage/spider/spd_i_s.cc:
Use my_global.h first
storage/spider/spd_malloc.cc:
Use my_global.h first
storage/spider/spd_param.cc:
Use my_global.h first
storage/spider/spd_ping_table.cc:
Use my_global.h first
storage/spider/spd_sys_table.cc:
Use my_global.h first
storage/spider/spd_table.cc:
Use my_global.h first
storage/spider/spd_trx.cc:
Use my_global.h first
storage/xtradb/handler/handler0alter.cc:
Use my_global.h first
storage/xtradb/handler/i_s.cc:
Use my_global.h first
Merged lp:maria/maria-10.0-galera up to revision 3879.
Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
This is port of fix for MySQL BUG#17647863.
revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM
Rename test() macro to MY_TEST() to avoid conflict with libc++.
INSTALL PLUGIN
There was mixed lock order between LOCK_plugin, LOCK_global_system_variables
and LOCK_system_variables_hash. This patch ensures that write-lock on
LOCK_system_variables_hash doesn't intersect with LOCK_plugin.
Fixed by moving initialization/deinitialization of plugin options from
plugin_add()/plugin_del() to plugin_initialize()/plugin_deinitalize().
So that plugin options are handled without protection of LOCK_plugin.
because parser might modify the lex->user (e.g. set lex->user-password).
switch to use LEX_STRING current_user string, and also change other similar constants
to be LEX_STRING's for consistency.
DO WHAT YOU EXPECT"
Fix info:
--------
Backport of the deprecation bug fix (WL#5265) for global variable
'THREAD_CONCURRENCY' from mysql-5.6 to mysql-5.5
Note: With this backport, certain additional deprecation warnings
would be reported under error conditions while setting the
global/session variables.
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
added:
include/mysql/service_thd_timezone.h
libservices/thd_timezone_service.c
storage/connect/inihandl.h
storage/connect/mysql-test/connect/r/grant.result
storage/connect/mysql-test/connect/r/ini_grant.result
storage/connect/mysql-test/connect/r/mysql_grant.result
storage/connect/mysql-test/connect/r/occur.result
storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
storage/connect/mysql-test/connect/r/pivot.result
storage/connect/mysql-test/connect/r/xcol.result
storage/connect/mysql-test/connect/r/xml_grant.result
storage/connect/mysql-test/connect/std_data/expenses.txt
storage/connect/mysql-test/connect/t/grant.test
storage/connect/mysql-test/connect/t/have_odbc_sqlite3.inc
storage/connect/mysql-test/connect/t/ini_grant.test
storage/connect/mysql-test/connect/t/mysql_grant.test
storage/connect/mysql-test/connect/t/occur.test
storage/connect/mysql-test/connect/t/odbc_sqlite3_grant.test
storage/connect/mysql-test/connect/t/pivot.test
storage/connect/mysql-test/connect/t/xcol.test
storage/connect/mysql-test/connect/t/xml_grant.test
storage/connect/rcmsg.h
storage/connect/taboccur.cpp
storage/connect/taboccur.h
storage/connect/tabutil.cpp
storage/connect/tabutil.h
storage/connect/tabxcl.cpp
storage/connect/tabxcl.h
modified:
include/my_global.h
include/my_time.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/services.h
include/mysql_time.h
include/probes_mysql_nodtrace.h
include/service_versions.h
libservices/CMakeLists.txt
mysql-test/r/handlersocket.result
mysql-test/r/plugin.result
mysql-test/suite/plugins/r/show_all_plugins.result
sql/item_func.cc
sql/mysqld.cc
sql/set_var.cc
sql/sql_class.cc
sql/sql_plugin.cc
sql/sql_plugin.h
sql/sql_plugin_services.h
sql/sql_show.cc
sql/sys_vars.cc
storage/connect/CMakeLists.txt
storage/connect/catalog.h
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/connect.h
storage/connect/filamdbf.cpp
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/inihandl.c
storage/connect/maputil.h
storage/connect/mycat.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/mysql-test/connect/r/bin.result
storage/connect/mysql-test/connect/r/csv.result
storage/connect/mysql-test/connect/r/dbf.result
storage/connect/mysql-test/connect/r/dir.result
storage/connect/mysql-test/connect/r/fix.result
storage/connect/mysql-test/connect/r/fmt.result
storage/connect/mysql-test/connect/r/ini.result
storage/connect/mysql-test/connect/r/mysql.result
storage/connect/mysql-test/connect/r/odbc_sqlite3.result
storage/connect/mysql-test/connect/r/tbl.result
storage/connect/mysql-test/connect/r/upd.result
storage/connect/mysql-test/connect/r/vec.result
storage/connect/mysql-test/connect/r/xml.result
storage/connect/mysql-test/connect/t/bin.test
storage/connect/mysql-test/connect/t/csv.test
storage/connect/mysql-test/connect/t/dbf.test
storage/connect/mysql-test/connect/t/dir.test
storage/connect/mysql-test/connect/t/fix.test
storage/connect/mysql-test/connect/t/fmt.test
storage/connect/mysql-test/connect/t/ini.test
storage/connect/mysql-test/connect/t/mysql.test
storage/connect/mysql-test/connect/t/odbc_sqlite3.test
storage/connect/mysql-test/connect/t/tbl.test
storage/connect/mysql-test/connect/t/vec.test
storage/connect/mysql-test/connect/t/xml.test
storage/connect/odbconn.cpp
storage/connect/osutil.c
storage/connect/osutil.h
storage/connect/plgcnx.h
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/plugutil.c
storage/connect/rcmsg.c
storage/connect/reldef.cpp
storage/connect/tabcol.cpp
storage/connect/tabcol.h
storage/connect/tabfmt.cpp
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabodbc.cpp
storage/connect/tabpivot.cpp
storage/connect/tabpivot.h
storage/connect/tabsys.cpp
storage/connect/tabsys.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabwmi.cpp
storage/connect/user_connect.cc
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xobject.h
storage/connect/xtable.h
storage/perfschema/ha_perfschema.cc
pending merges:
Alexander Barkov 2013-06-08 Fixing a few compiler warnings
Olivier Bertrand 2013-06-05 - Change CRLF line endings to LF
Olivier Bertrand 2013-06-04 - Adding parallelism to the TBL table type
Sergei Golubchik 2013-06-03 compiler warnings
Alexander Barkov 2013-06-03 Fixing the problem with my_bool_t define...
Olivier Bertrand 2013-05-28 - Fix crash when a null qrp is returned ...
Olivier Bertrand 2013-05-28 - Extending connect_assisted_discovery c...
Alexander Barkov 2013-05-28 Recording test results forgotten in the ...
Alexander Barkov 2013-05-27 [merge] Merging with the latest 10.0
Alexander Barkov 2013-05-27 - Fixing embedded verision of the Connec...
Alexander Barkov 2013-05-27 Fixing ABI template, to take into accoun...
Alexander Barkov 2013-05-27 Fixing ABI template, to take into accoun...
Olivier Bertrand 2013-05-27 - Fix Windows compile error
Alexander Barkov 2013-05-24 Adding the timezone plugin service, to c...
Alexander Barkov 2013-05-24 Do not run mysql.test in case of embedde...
Alexander Barkov 2013-05-24 Splitting SQLite3 tests into two parts:
Alexander Barkov 2013-05-24 Removing more cases of direct use of thd.
Alexander Barkov 2013-05-24 Removing direct access to thd, using fun...
Olivier Bertrand 2013-05-24 - Fix setting default type to MYSQL->PRO...
Alexander Barkov 2013-05-23 Connect: fixing non thread-safe code.
Olivier Bertrand 2013-05-22 - Changing CONNECT version number and date
Alexander Barkov 2013-05-21 "mtr --suite=connect --embedded" tests d...
Olivier Bertrand 2013-05-20 - Correct misplaced parenthesis in last ...
Olivier Bertrand 2013-05-20 - Save and restore srcdef when getting a...
Olivier Bertrand 2013-05-19 - Removing unused copy file
Olivier Bertrand 2013-05-19 [merge] - Commit merged and resolve
Alexander Barkov 2013-05-13 Fixing warnings (mostly "no previous dec...
Alexander Barkov 2013-05-13 Fixing compiler warnings ("no previous d...
Alexander Barkov 2013-05-13 Fixing a few "no previous declaration" w...
Alexander Barkov 2013-05-13 Fixing a few compilation warnings ("no p...
Olivier Bertrand 2013-05-19 - Allowing views and queries as paramete...
Olivier Bertrand 2013-05-13 [merge] - Commit merged changes
Alexander Barkov 2013-05-13 [merge] Merge from maria-10.0
Alexander Barkov 2013-05-13 Enabling --suite=connect by default
Olivier Bertrand 2013-05-13 - Code cleaning. Eliminating unused code...
Olivier Bertrand 2013-05-13 - fix use of uninitialized variable (colp)
Olivier Bertrand 2013-05-13 - Set tdbp to NULL when ignored
Olivier Bertrand 2013-05-12 - Changing mode from +x to -x
Olivier Bertrand 2013-05-12 - Code cleaning.
Olivier Bertrand 2013-05-11 - Fix tabpivot compile errors on Linux.
Olivier Bertrand 2013-05-11 - Added a test case for PIVOT tables
Olivier Bertrand 2013-05-10 - Add pivot table files and support
Olivier Bertrand 2013-05-10 - Added table type PIVOT
Olivier Bertrand 2013-05-09 - Fix inverted test on am in MYSQLDEF::D...
Olivier Bertrand 2013-05-05 - General code cleaning, eliminating a f...
Olivier Bertrand 2013-05-04 - Add test for XCOL and OCCUR tables
Olivier Bertrand 2013-05-02 - Adding a loop test to prevent PROXY ba...
Olivier Bertrand 2013-04-30 - Change in connect_assisted_discovery t...
Olivier Bertrand 2013-04-30 - Allow PROXY based tables to specify My...
Olivier Bertrand 2013-04-29 - Fix a bug causing a crash when using O...
Olivier Bertrand 2013-04-29 - Adding 3 new table types: