summaryrefslogtreecommitdiff
path: root/include/mysql
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-15505 Fixes to compilation without -DWITH_WSREP:BOOL=ONTeemu Ollakka2018-03-211-4/+4
| | | | | | | | | | | | | | Removed including wsrep_api.h from service_wsrep.h. This caused various kinds of collisions with definitions when wsrep is not supposed to be built in. Defined functions wsrep_xid_seqno() and wsrep_xid_uuid() in wsrep_dummy.cc. Replaced wsrep_seqno_t with long long where wsrep_api.h is not included. Removed wsrep_xid_seqno() macro from wsrep_mysqld.h and made wsrep code using wsrep_xid_seqno() in handler.cc to be compiled in only if WITH_WSREP is ON. Included wsrep_api.h for mariabackup if WITH_WSREP is ON.
* MDEV-15505 New wsrep XID format for backwards compatibilityTeemu Ollakka2018-03-121-4/+2
| | | | | | | | | | | A new wsrep XID format was added to keep the XID implementation backwards compatible. Original version always reads XID seqno part in host byte order, the new version in little endian byte order. Wsrep XID will always be written in the new format. Included wsrep_api.h from service_wsrep.h for wsrep type definitions. Removed redundant wsrep XID code from mariabackup and included service_wsrep.h in order to use
* MDEV-15505 Fix wsrep XID seqno byte orderTeemu Ollakka2018-03-121-0/+8
| | | | | | | | | | | | | | | | | | The problem is that the seqno part of wsrep XID is always stored in host byte order. This may cause issues when a physical backup is restored on a host with different architecture, the seqno part with XID may have incorrect value. In order to fix this, wsrep XID seqno is always written into XID data buffer in little endian byte order using int8store() and read from data buffer using sint8korr(). For backwards compatibility the seqno is read from TRX_SYS page in host byte order during upgrade. This patch implements byte ordering in wsrep_xid_init(), wsrep_xid_seqno(), and exposes functions to read wsrep XID uuid and seqno in wsrep_service_st. Backwards compatibility for upgrade is provided in trx_rseg_init_wsrep_xid().
* MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-062-6/+6
| | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* Changed database, tablename and alias to be LEX_CSTRINGMonty2018-01-303-27/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
* Merge branch 'github/10.3' into bb-10.3-temporalmariadb-10.3.4Sergei Golubchik2018-01-171-1/+1
|\
| * Minor spelling fixes in code comments, docs and outputOtto Kekäläinen2018-01-121-1/+1
| | | | | | | | | | This commit does not touch any variable names or any other actual code, and thus should not in any way affect how the code works.
* | remove ifdefs around PSI_THREAD_CALLSergei Golubchik2018-01-091-0/+29
|/ | | | same change as for PSI_TABLE_CALL
* CleanupsMonty2017-12-086-6/+0
| | | | | | | | | | | | | | - Remove not used thd_rpl_is_parallel() - Remove not used mysql_notify_thread_having_shared_lock() - Remove not needed LOCK_thread_count from MYSQL_BIN_LOG::reset_logs() - LOCK_thread_count is not protecting against rollback, so this code and comment is not needed - Remove mutex_locks in slave.cc that are not needed. Added THD::assert_not_linked() to ensure that it was safe to remove - Fixed not repeatable test load_data_stmt_view - Updated binlog_killed to test removal of mutex (thanks to Andrei Elkin for test) - More code comments
* Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-046-60/+60
|\
| * Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-026-75/+75
| |\
| | * MDEV-13384 Fix Windows warnings. thd_alloc functions now use size_t parametersVladislav Vaintroub2017-09-286-75/+75
| | | | | | | | | | | | Fixes some warnings in popular headers.
* | | Fix compilation warnings in pluginsSergei Golubchik2017-08-246-39/+21
| | | | | | | | | | | | | | | | | | * update cracklib_password_check to match the new prototype * cannot use __attribute__((format)) for my_snprintf, because we support format extensions that the compiler doesn't know about.
* | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-2/+0
|/ / | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | Merge tag 'mariadb-10.2.6' into bb-10.2-extAlexander Barkov2017-05-2610-2/+372
|\ \ | |/
| * Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-1/+0
| |\ | | | | | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| | * Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-1/+0
| | |\
| | | * Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-1/+0
| | | |\
| | | | * MDEV-12230 include/my_sys.h:600:43: error: unknown type name ↵Sergei Golubchik2017-04-201-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ‘PSI_file_key’" when -DWITHOUT_SERVER=1 cherry-pick 2c2bd8c155 (MDEV-12261 build failure without P_S) from 10.0
| * | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-069-1/+372
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | Also, include fixes by Vladislav Vaintroub to the aws_key_management plugin. The AWS C++ SDK specifically depends on OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
| | * | | MDEV-11663 Create services for functionality used by pluginsVladislav Vaintroub2017-04-279-1/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added service for - encryption (AES) - error reporting, e.g my_printf_error()
* | | | | Fixed compiler warnings and warnings from build.tagsMonty2017-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other things - Ensure that ut_d() is set to EXPR if ut_ad() is DEBUG_ASSERT() If not, we will get a crash in purge_sys_t::~purge_sys_t() as this ut_ad() code expect's that the ut_d() codes has been executed
* | | | | Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-239-36/+103
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* | | | Fix the build on Windows.Vladislav Vaintroub2017-04-021-0/+17
| | | | | | | | | | | | | | | | | | | | Restore MYSQL_SYSVAR_UINT64_T and MYSQL_SYSVAR_SIZE_T in plugin.h
* | | | move rocksdb specific changes into rocksdbSergei Golubchik2017-03-311-17/+0
| | | |
* | | | Merge 10.2 into bb-10.2-mariarocksSergei Petrunia2017-03-3116-929/+1577
|\ \ \ \
| * \ \ \ Merge branch '10.1' into 10.2Sergei Golubchik2017-03-3016-929/+1577
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-03-211-0/+44
| | |\ \ \ | | | |/ /
| | | * | compiler warningSergei Golubchik2017-03-161-2/+2
| | | | |
| | | * | MDEV-12261 build failure without P_SSergei Golubchik2017-03-151-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | restore mysql_file_delete_with_symlink() but let it use new my_handler_delete_with_symlink() mysys helper.
| | * | | Correct FSF addressiangilfillan2017-03-103-3/+3
| | | | |
| | * | | small plugin API related fixesSergei Golubchik2017-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * define MYSQL_DYNAMIC_PLUGIN only for server plugins * don't typedef my_bool in mysql.h if plugin.h has already done it * fix the include guard in plugin.h
| | * | | cleanup: sort various lists of servicesSergei Golubchik2017-03-106-1097/+1097
| | | | |
| | * | | thd_rnd serviceSergei Golubchik2017-03-107-0/+93
| | | | |
| | * | | Auth Plugin API: add THD to MYSQL_SERVER_AUTH_INFOSergei Golubchik2017-03-102-1/+7
| | | | | | | | | | | | | | | | | | | | so that auth plugins could use various thd services
| | * | | base64 serviceSergei Golubchik2017-03-107-0/+163
| | | | |
| | * | | my_sha2 serviceSergei Golubchik2017-03-108-3/+384
| | | | |
| | * | | Merge 10.0 into 10.1Marko Mäkelä2017-03-092-40/+1
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, implement MDEV-11027 a little differently from 5.5 and 10.0: recv_apply_hashed_log_recs(): Change the return type back to void (DB_SUCCESS was always returned). Report progress also via systemd using sd_notifyf().
| | | * | Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-032-40/+1
| | | |\ \ | | | | |/
| | | | * bugfix: remove my_delete_with_symlink()Sergei Golubchik2017-02-271-41/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it was race condition prone. instead use either a pair of my_delete() calls with already resolved paths, or a safe high-level function my_handler_delete_with_symlink(), like MyISAM and Aria already do.
* | | | | Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocksSergei Petrunia2017-03-114-12/+12
|\ \ \ \ \ | |/ / / /
| * | | | Fix many -Wconversion warnings.Marko Mäkelä2017-03-074-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* | | | | MDEV-11901 : MariaRocks on WindowsVladislav Vaintroub2017-02-011-0/+17
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | fixed compilation, disabled unix-only tests (the ones that use bash etc). Changed plugin library name to ha_rocksdb.dll/so
* | | | Merge InnoDB 5.7 from mysql-5.7.9.Jan Lindström2016-09-022-0/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-305-0/+42
|\ \ \ \ | |/ / /
| * | | MDEV-9618 solaris sparc build fails on 10.1.Alexey Botchkov2016-05-045-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler there is strict about the C/C++ call model mixing in function variable assumptions. Fixed by adding some 'extern "C"' and changing '?' operator with 'if'.
* | | | Merge commit 'd5822a3ad0657040114cdc185c6387b9eb3a12b2' into 10.2Monty2016-04-286-6/+13
|\ \ \ \ | |/ / /
| * | | Fixed wrong counting of global Memory_usedMonty2016-04-286-6/+13
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
| |\ \ \ | | |/ /