- 27 Mar, 2018 1 commit
-
-
Alexander Barkov authored
The problem resided in this branch of the "option_value_no_option_type" rule: | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default Summary: 1. internal_variable_name initialized tmp.var to trg_new_row_fake_var (0x01). 2. The condition "if (tmp.var == NULL)" did not check the special case with trg_new_row_fake_var, so Lex->set_system_variable(&tmp, $3, $6) was called with tmp.var pointing to trg_new_row_fake_var, which created a sys_var instance pointing to 0x01 instead of a real system variable. 3. Later, at the trigger invocation time, this method was called: sys_var::do_deprecated_warning (this=0x1, thd=0x7ffe6c000a98) Notice, "this" is equal to trg_new_row_fake_var (0x01) Solution: The old implementation with separate rules internal_variable_name (in sql_yacc.yy and sql_yacc_ora.yy) and internal_variable_name_directly_assignable (in sql_yacc_ora.yy only) was too complex and hard to follow. Rewriting the code in a more straightforward way. 1. Changing LEX::set_system_variable() from: bool set_system_variable(struct sys_var_with_base *, enum_var_type, Item *); to: bool set_system_variable(enum_var_type, sys_var *, const LEX_CSTRING *, Item *); 2. Adding new methods in LEX, which operate with variable names: bool set_trigger_field(const LEX_CSTRING *, const LEX_CSTRING *, Item *); bool set_system_variable(enum_var_type var_type, const LEX_CSTRING *name, Item *val); bool set_system_variable(THD *thd, enum_var_type var_type, const LEX_CSTRING *name1, const LEX_CSTRING *name2, Item *val); bool set_default_system_variable(enum_var_type var_type, const LEX_CSTRING *name, Item *val); bool set_variable(const LEX_CSTRING *name, Item *item); 3. Changing the grammar to call the new methods directly in option_value_no_option_type, Removing rules internal_variable_name and internal_variable_name_directly_assignable. 4. Removing "struct sys_var_with_base" and trg_new_row_fake_var. Good side effect: - The code in /sql reduced from 314 to 183 lines. - MDEV-15615 Unexpected syntax error instead of "Unknown system variable" ... was also fixed automatically
-
- 24 Mar, 2018 2 commits
-
-
Alexey Botchkov authored
Scientific notation handling fixed. Conflicts: mysql-test/r/func_json.result mysql-test/t/func_json.test
-
Vladislav Vaintroub authored
-
- 23 Mar, 2018 1 commit
-
-
Vladislav Vaintroub authored
-
- 21 Mar, 2018 2 commits
-
-
Marko Mäkelä authored
-
Teemu Ollakka authored
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.
-
- 20 Mar, 2018 2 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
MDEV-15597 Add class Load_data_outvar and avoid using Item::STRING_ITEM for Item_user_var_as_out_param detection
-
- 17 Mar, 2018 1 commit
-
-
Jan Lindström authored
-
- 16 Mar, 2018 1 commit
-
-
Marko Mäkelä authored
-
- 15 Mar, 2018 5 commits
-
-
Alexander Barkov authored
Methods: - Item_user_var_as_out_param::print_for_load() - sql_exchange::escaped_given(void) Parameters: - sql_exchange in write_execute_load_query_log_event() - sql_exchange in mysql_load() - sql_exchange in Load_log_event::Load_log_event() Also, removing cast to "char*" in a few places in Load_log_event::Load_log_event()
-
Alexander Barkov authored
-
Jan Lindström authored
MDEV-8743: wsrep_sst_common close FDs > 2
-
Jan Lindström authored
MDEV-8743: fopen mode e (glibc only) to prevent galera SST scripts ac…
-
Daniel Black authored
-
- 14 Mar, 2018 1 commit
-
-
Daniel Black authored
As this is the only moderately critical fopened for writing file, create an alternate path to use open and fdopen for non-glibc platforms that support O_CLOEXEC (BSDs). Tested on Linux (by modifing the GLIBC defination) to take this alternate path: $ cd /proc/23874 $ more fdinfo/71 pos: 0 flags: 02100001 mnt_id: 24 $ ls -la fd/71 l-wx------. 1 dan dan 64 Mar 14 13:30 fd/71 -> /dev/shm/var_auto_i7rl/mysqld.1/data/ib_buffer_pool.incomplete
-
- 13 Mar, 2018 4 commits
-
-
Alexander Barkov authored
MDEV-10574 / SUBSTR - sql_mode=Oracle: return null instead of empty string
-
halfspawn authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 12 Mar, 2018 12 commits
-
-
Marko Mäkelä authored
-
Alexey Botchkov authored
in trans_xa_start. test fixed.
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
In thread caching code, clear THD's warnings before reuse.
-
Oleksandr Byelkin authored
There is not current SELECT during assigning SP parameters, do not use it if current_select is empty.
-
Marko Mäkelä authored
-
Teemu Ollakka authored
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
-
Teemu Ollakka authored
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().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fts_sync(): If the dict_table_t::to_be_dropped flag is set, do not "goto begin_sync". Also, clean up the way how dict_index_t::index_fts_syncing is cleared. It looks like this regression was introduced by merging Oracle Bug #24938374 MYSQL CRASHED AFTER LONG WAIT ON DICT OPERATION LOCK WHILE SYNCING FTS INDEX https://github.com/mysql/mysql-server/commit/068f8261d4c1e134965383ff974ddf30c0758f51 from MySQL 5.6.38 into MariaDB 10.0.33, 10.1.29, 10.2.10. The same hang is present in MySQL 5.7.20.
-
Alexey Botchkov authored
in trans_xa_start. THD.transaction.xid_state.xid.rm_error should be cleaned as the thread ends.
-
- 11 Mar, 2018 1 commit
-
-
Sergei Petrunia authored
Don't call handler->position() if the last call to read a row did not succeed.
-
- 10 Mar, 2018 4 commits
-
-
Marko Mäkelä authored
fil_space_t::atomic_write_supported: Always set this flag for TEMPORARY TABLESPACE and during IMPORT TABLESPACE. The page writes during these operations are by definition not crash-safe because they are not written to the redo log. fil_space_t::use_doublewrite(): Determine if doublewrite should be used. buf_dblwr_update(): Add assertions, and let the caller check whether doublewrite buffering is desired. buf_flush_write_block_low(): Disable the doublewrite buffer for the temporary tablespace and for IMPORT TABLESPACE. fil_space_set_imported(), fil_node_open_file(), fil_space_create(): Initialize or revise the space->atomic_write_supported flag. buf_page_io_complete(), buf_flush_write_complete(): Add the parameter dblwr, to indicate whether doublewrite was used for writes. buf_dblwr_sync_datafiles(): Remove an unnecessary flush of persistent tablespaces when flushing temporary tablespaces. (Move the call to buf_dblwr_flush_buffered_writes().)
-
Marko Mäkelä authored
buf_flush_init_for_writing(): Remove the parameter skip_checksum.
-
Marko Mäkelä authored
fsp_init_file_page_low(): Always initialize the page.
-
Marko Mäkelä authored
-
- 09 Mar, 2018 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections ha_close_connection(): Do invoke the method also for plugins for which UNINSTALL PLUGIN was deferred due to open connections.
-
Marko Mäkelä authored
buf_flush_batch(), buf_flush_stats(): Declare static. buf_flush_common(): Remove (unused function).
-