- 12 May, 2018 19 commits
-
-
Aleksey Midenkov authored
MDEV-14823 Wrong error message upon selecting from a system_time partition MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
-
Aleksey Midenkov authored
MDEV-16043 Assertion thd->Item_change_list::is_empty() failed in mysql_parse upon SELECT from a view reading from a versioned table Lost restore_active_arena(). Using of Query_arena_stmt is suggested instead.
-
Sergei Golubchik authored
-
Aleksey Midenkov authored
Store transaction start time in thd->transaction.start_time. THD::transaction_time() wraps over transaction.start_time taking into account current status of BEGIN.
-
Aleksey Midenkov authored
-
Aleksey Midenkov authored
-
Eugene Kosov authored
-
Eugene Kosov authored
-
Sergei Golubchik authored
Don't use hidden system time in versioning, but keep the system time logic in THD to workaround low-res system clock and replication not versioned to versioned. This reverts MDEV-14788 (System versioning cannot be based on local timestamps, as it is now). Versioning is based on local timestamps again, but timestamps are protected by MDEV-15923 (option to control who can set session @@timestamp).
-
Sergei Golubchik authored
--secure-timestamp=NO|SUPER|REPLICATION|YES
-
Sergei Golubchik authored
remove the redundant declaration tail
-
Sergei Golubchik authored
-
Sergei Golubchik authored
this is always enabled now, no need for a conditional
-
Sergei Golubchik authored
-
Sergei Golubchik authored
rename LString/XString classes, remove unused ones
-
Sergei Golubchik authored
Make sure that SELECT_LEX_UNIT::derived, behaves as documented (points to the "TABLE_LIST representing this union in the embedding select"). For recursive CTE this was not necessarily the case, it could've pointed to the TABLE_LIST inside the CTE, not in the embedding select. To fix: * don't update unit->derived in mysql_derived_prepare(), pass derived as an argument to st_select_lex_unit::prepare() * prefer to set unit->derived in TABLE_LIST::init_derived() to the TABLE_LIST in the embedding select, not to the recursive reference. Fail if there are many TABLE_LISTs in the embedding select with conflicting FOR SYSTEM_TIME clauses. cleanup: * remove redundant THD* argument from st_select_lex_unit::prepare()
-
Sergei Golubchik authored
it's internal storage engine error, don't let it leak into the upper layer.
-
Sergei Golubchik authored
Make --gdb to take an optional argument *only* if it's written after '=', not after a space. followup for 339b9055
-
Sergei Golubchik authored
-
- 11 May, 2018 7 commits
-
-
Sergey Vojtovich authored
Compressed blob columns didn't accept data at their capacity. E.g. storing 255 bytes to TINYBLOB results in "Data too long" error. Now it is allowed assuming compression method was able to produce shorter string (so that both metadata and compressed data fits blob) and column_compression_threshold is lower than blob. If no compression was performed, we still have to reserve additional byte for metadata and thus we perform normal data truncation and return it's status.
-
twocode authored
-
Xiangyu Hu authored
-
Alexander Barkov authored
1. Adding THD::convert_string(LEX_CSTRING *to,...) as a wrapper for convert_string(LEX_STRING *to,...), as LEX_CSTRING is now frequently used for conversion purpose. This reduced duplicate code in TEXT_STRING_sys, TEXT_STRING_literal, TEXT_STRING_filesystem grammar rules in *.yy 2. Adding yet another THD::convert_string() with an extra parameter "bool simple_copy_is_possible". This even more reduced repeatable code in the mentioned grammar rules in *.yy 3. Deriving Lex_ident_cli_st from Lex_string_with_metadata_st, as they have very similar functionality. Moving m_quote from Lex_ident_cli_st to Lex_string_with_metadata_st, as m_quote will be used later to optimize string literals anyway (e.g. avoid redundant copying on the tokenizer stage). Adjusting Lex_input_stream::get_text() accordingly. 4. Moving the reminders of the code in TEXT_STRING_sys, TEXT_STRING_literal, TEXT_STRING_filesystem grammar rules as new methods in THD: - make_text_string_sys() - make_text_string_connection() - make_text_string_filesystem() and changing *.yy to use these new methods. This reduced the amount of similar code in sql_yacc.yy and sql_yacc_ora.yy. 5. Removing duplicate code in Lex_input_stream::body_utf8_append_ident(): by reusing THD::make_text_string_sys(). Thanks to #3 and #4. 6. Making THD members charset_is_system_charset, charset_is_collation_connection, charset_is_character_set_filesystem private, as they are not needed externally any more.
-
Sergei Golubchik authored
item->val_int() == bool
-
Sergei Golubchik authored
MDEV-15746 ASAN heap-use-after-free in Item_change_list::rollback_item_tree_changes on ALTER executed as PS 10.3+ fix On ALTER TABLE, if a non-changed column default might need a charset conversion, it must be a blob. Because blob's defaults ar stored as expressions, and for any other type a basic_const_item() will be in the record, so it'll have correct charset and won't need converting. For the same reason it makes no sense to convert blob defaults (and it's unsafe, see MDEV-15746). test case is already in main/ps.test
-
Sergei Golubchik authored
-
- 10 May, 2018 6 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
The code in the "sp_tail" rule in sql_yacc.yy always used YYLIP->get_cpp_tok_start() as the start of the body, and did not check for possible lookahead which happens for keywords "FOR", "VALUES" and "WITH" for LALR(2) resolution in Lex_input_stream::lex_token(). In case of the lookahead token presence, get_tok_start_prev() should have been used instead of get_cpp_tok_start() as the beginning of the SP body. Change summary: This patch hides the implementation of the lookahead token completely inside Lex_input_stream. The users of Lex_input_stream now just get token-by-token transparently and should not care about lookahead any more. Now external users of Lex_input_stream are not aware of the lookahead token at all. Change details: - Moving Lex_input_stream::has_lookahead() into the "private" section. - Removing Lex_input_stream::get_tok_start_prev() and Lex_input_stream::get_cpp_start_prev(). - Fixing the external code to call get_tok_start() and get_cpp_tok_start() in all places where get_tok_start_prev() and get_cpp_start_prev() where used. - Adding a test for has_lookahead() right inside get_tok_start() and get_cpp_tok_start(). If there is a lookahead token, these methods now return the position of the previous token automatically: const char *get_tok_start() { return has_lookahead() ? m_tok_start_prev : m_tok_start; } const char *get_cpp_tok_start() { return has_lookahead() ? m_cpp_tok_start_prev : m_cpp_tok_start; } - Fixing the internal code inside Lex_input_stream methods to use m_tok_start and m_cpp_tok_start directly, instead of calling get_tok_start() and get_cpp_tok_start(), to make sure to access to the *current* token position (independently of a lookahead token presence).
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
MDEV-15746 ASAN heap-use-after-free in Item_change_list::rollback_item_tree_changes on ALTER executed as PS don't try to convert a default value string from a user character set into a column character set, if this particular default value string did not came from the user at all (that is, if it's an ALTER TABLE and the default value string is the *old* default value of the unaltered column). This used to crash, because old defaults are allocated on the old table's memroot, which is freed mid-ALTER when the old table is closed. So thd->rollback_item_tree_changes() at the end of the ALTER was writing into the freed memory.
-
Sergei Golubchik authored
table.cc: virtual columns must be computed for INSERT, if they're part of the partitioning expression. this change broke gcol.gcol_partition_innodb. fix CHECK TABLE for partitioned tables and vcols. sql_partition.cc: mark prerequisite base columns in full_part_field_set ha_partition.cc initialize vcol_set accordingly
-
- 09 May, 2018 8 commits
-
-
Vladislav Vaintroub authored
This previously unreported warning comes from casting size_t to ulong in sql_hset.h in Hash_Set::at(). Change my_hash_element to accept size_t index parameter.
-
Jacob Mathew authored
The remote users need the SUPER privilege because by default Spider sends a 'SET SQL_LOG_OFF' statement to the data nodes. This is controlled by the spider_internal_sql_log_off configuration setting on the Spider node, which can only be set to 0 or 1, with a default value of 1. I have fixed the problem by changing this configuration setting so that if it is NOT SET, which is the most likely case, the Spider node DOES NOT SEND the 'SET SQL_LOG_OFF' statement to the data nodes. However if the spider_internal_sql_log_off setting IS EXPLICITLY SET to either 0 or 1, then the Spider node DOES SEND the 'SET SQL_LOG_OFF' statement, requiring a remote user with the SUPER privilege. The Spider documentation will be updated to reflect this change. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Cherry-Picked: Commit 72f0efac on branch bb-10.3-MDEV-15697
-
Jacob Mathew authored
The remote users need the SUPER privilege because by default Spider sends a 'SET SQL_LOG_OFF' statement to the data nodes. This is controlled by the spider_internal_sql_log_off configuration setting on the Spider node, which can only be set to 0 or 1, with a default value of 1. I have fixed the problem by changing this configuration setting so that if it is NOT SET, which is the most likely case, the Spider node DOES NOT SEND the 'SET SQL_LOG_OFF' statement to the data nodes. However if the spider_internal_sql_log_off setting IS EXPLICITLY SET to either 0 or 1, then the Spider node DOES SEND the 'SET SQL_LOG_OFF' statement, requiring a remote user with the SUPER privilege. The Spider documentation will be updated to reflect this change. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Merged: Branch bb-10.3-MDEV-15697 into 10.3
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
MDEV-16125 Crash or ASAN heap-buffer-overflow in mach_read_from_n_little_endian upon ALTER TABLE with blob - Virtual column should be considered only to find the respective non-null fields. But virtual column can never changed from NULL to NOT NULL.
-
Marko Mäkelä authored
-
Sergei Golubchik authored
-
Thirunarayanan Balathandayuthapani authored
Problem: ======= InnoDB master thread encounters the shutdown state as SRV_SHUTDOWN_FLUSH_PHASE when innodb_force_recovery >=2 and slow scheduling of master thread during shutdown. Fix: ==== There is no need for master thread itself if innodb_force_recovery >=2. Don't create the master thread if innodb_force_recovery >= 2
-