1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-17 12:02:09 +03:00
Commit Graph

4728 Commits

Author SHA1 Message Date
ec40980ddd Merge 10.3 into 10.4 2019-11-01 15:23:18 +02:00
6f86150ab3 MDEV-17896 Assertion `pfs->get_refcount() > 0' failed
Unfortunate DROP TEMPORARY..IF EXISTS on a regular table may allow
subsequent CREATE TABLE statements to steal away the PFS_table_share
instance from the dropped table.
2019-11-01 11:10:04 +02:00
d6d621cec1 MDEV-18819 ALTER_COLUMN_VCOL is not set for generated stored columns 2019-10-30 16:47:43 +01:00
06d2e1d828 read-only slave using statement replication should replicate tmp tables
Relates to MDEV-17863 DROP TEMPORARY TABLE creates a transaction in
binary log on read only server

Other things:
- Fixed that insert into normal_table select from tmp_table is
  replicated as row events if tmp_table doesn't exists on slave.
2019-10-21 17:17:09 +03:00
b62101f84b Fixes for binary logging --read-only mode
- Any temporary tables created under read-only mode will never be logged
  to binary log.  Any usage of these tables to update normal tables, even
  after read-only has been disabled, will use row base logging (as the
  temporary table will not be on the slave).
- Analyze, check and repair table will not be logged in read-only mode.

Other things:
- Removed not used varaibles in
  MYSQL_BIN_LOG::flush_and_set_pending_rows_event.
- Set table_share->table_creation_was_logged for all normal tables.
- THD::binlog_query() now returns -1 if statement was not logged., This
  is used to update table_share->table_creation_was_logged.
- Don't log admin statements in opt_readonly is set.
- Table's that doesn't have table_creation_was_logged will set binlog format to row
  logging.
- Removed not needed/wrong setting of table->s->table_creation_was_logged
  in create_table_from_items()
2019-10-20 11:52:29 +03:00
d04f2de80a Merge 10.4 into 10.5 2019-10-11 08:41:36 +03:00
09afd3da1a Merge 10.3 into 10.4 2019-10-10 21:30:40 +03:00
647a38818a MDEV-16130 wrong error message adding AS ROW START to versioned table 2019-10-10 00:20:34 +03:00
3616175fdd MDEV-20760 Add Type_handler::KEY_pack_flags() 2019-10-05 18:16:37 +04:00
02dea3ffd5 MDEV-20706 Store scale in Column_definition::decimals rather than Column_definition::pack_flag 2019-10-01 13:12:46 +04:00
1ae09ec863 Merge remote-tracking branch 'origin/10.4' into 10.5 2019-10-01 11:44:27 +04:00
dc588e3d3f Merge remote-tracking branch 'origin/10.3' into 10.4 2019-10-01 10:45:52 +04:00
7e44c455f4 Merge remote-tracking branch 'origin/10.2' into 10.3 2019-10-01 09:37:40 +04:00
f203245e9e Merge remote-tracking branch 'origin/10.1' into 10.2 2019-10-01 07:11:54 +04:00
4bcf524482 Merge remote-tracking branch 'origin/5.5' into 10.1 2019-10-01 06:07:56 +04:00
d481f69a7d MDEV-20704 An index on a double column erroneously uses prefix compression 2019-10-01 05:55:14 +04:00
46b785262b Fix -Wunused for CMAKE_BUILD_TYPE=RelWithDebInfo
For release builds, do not declare unused variables.

unpack_row(): Omit a debug-only variable from WSREP diagnostic message.

create_wsrep_THD(): Fix -Wmaybe-uninitialized for the PSI_thread_key.
2019-09-30 12:49:53 +03:00
f610529d23 MDEV-20696 Remove Column_definition::key_length 2019-09-29 22:10:42 +04:00
ad77e3ac09 Cleanup session tracker
- call current_schema::mark_as_changed() directly
- call state_change::mark_as_changed() directly
- replaced SESSION_TRACKER_CHANGED with dummy tracker
- replaced Session_tracker::mark_as_changed() with
  State_tracker::mark_as_changed()
- hide and devirtualize original State_tracker::mark_as_changed(),
  rename it to set_changed()
- all implementations of mark_as_changed() now check is_enabled() for
  consistency
- no argument casts anymore
2019-09-24 15:49:35 +04:00
edef6a0074 Merge remote-tracking branch 'origin/10.4' into 10.5 2019-09-24 12:53:11 +04:00
1333da90b5 Merge 10.4 into 10.5 2019-09-24 10:07:56 +03:00
b44171428a MDEV-19956 Queries with subqueries containing UNION are not parsed
Shift-Reduce conflicts prevented parsing some queries with subqueries that
used set operations when the subqueries occurred in expressions or in IN
predicands.
The grammar rules for query expression were transformed in order to avoid
these conflicts. New grammar rules employ an idea taken from MySQL 8.0.
2019-09-23 09:57:37 -07:00
e3da362c03 MDEV-19189 ASAN memcpy-param-overlap in fill_alter_inplace_info upon adding indexes
memmove() should be used instead of memcpy() for overlapping memory regions.

Overlapping memory regions itself here are fine, because code simply removes
one element from arbitrary position of an array.
2019-09-23 19:12:24 +03:00
d28686ada6 Merge 10.4 into 10.5 2019-09-12 16:36:46 +03:00
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +03:00
f6a7730c45 MDEV-16490: It's possible to make a system versioned table without any versioning field
* do not allow versioned table to be without versioned (non-system) fields
* prohibit changing field versioning, when removing table versioning
* handle CREATE...SELECT as well
2019-09-09 20:14:47 +03:00
4081b7b27a Merge 10.4 into 10.5 2019-09-06 17:16:40 +03:00
780d2bb8a7 Merge 10.4 into 10.5 2019-09-06 14:25:20 +03:00
244f0e6dd8 Merge branch '10.3' into 10.4 2019-09-06 11:53:10 +02:00
537f8594a6 Merge 10.2 into 10.3 2019-09-04 17:52:04 +03:00
17ab02f4b0 cleanup: on update default now
* remove one level of virtual functions
* remove redundant checks
* remove an if() as the value is always known at compilation time

don't pretend that "DEFAULT expr" and "ON UPDATE DEFAULT NOW"
are "basically the same thing"
2019-09-03 20:34:30 +02:00
db4a27ab73 Merge 10.3 into 10.4 2019-08-31 06:53:45 +03:00
1a3c365953 Merge 10.2 into 10.3 2019-08-29 12:00:12 +03:00
9cd6e7ad73 MDEV-16932: ASAN heap-use-after-free in my_charlen_utf8 / my_well_formed_char_length_utf8 on 2nd execution of SP with ALTER trying to add bad CHECK
Make automatic name generation during execution (not prepare).

Check result of memory allocation operation.
2019-08-28 12:06:52 +02:00
efb8485d85 Merge 10.3 into 10.4, except for MDEV-20265
The MDEV-20265 commit e746f451d5
introduces DBUG_ASSERT(right_op == r_tbl) in
st_select_lex::add_cross_joined_table(), and that assertion would
fail in several tests that exercise joins. That commit was skipped
in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
2019-08-23 08:06:17 +03:00
6dd3f24090 MDEV-19740 Debug build of 10.3.15 FTBFS
* Replace LINT_INIT for non-struct types with ctor initializers;
* Check BUILD_DEPS list is not empty so REMOVE_DUPLICATES won't throw
  error.
2019-08-19 10:38:24 +03:00
67ddb6507d Merge 10.4 into 10.5 2019-08-16 14:35:32 +03:00
1639873671 MDEV-18154 Deadlock and assertion upon no-op ALTER under LOCK TABLES
1. Revert incorrect treatment of m_needs_reopen;
2. Close single instance of TABLE instead of all instances since
   reopened only those that are marked for reopen.
2019-08-16 14:04:59 +03:00
c221bcdce7 Merge 10.3 into 10.4 2019-08-16 10:51:20 +03:00
6073049a36 MDEV-20353 Add separate type handlers for unsigned integer data types 2019-08-15 21:53:24 +04:00
828191b6a0 MDEV-20348: DROP TABLE IF EXISTS killed on master but was replicated
Merge branch '10.2' into 10.3
2019-08-15 14:09:53 +05:30
29e560cdf3 MDEV-20348: DROP TABLE IF EXISTS killed on master but was replicated
Problem:
=======
DROP TABLE IF EXISTS was killed. The table still exists on
the master but the DDL was still logged.

Analysis:
=========
During the execution of DROP TABLE command "ha_delete_table" call is invoked
to delete the table. If the query is killed at this point, the kill command
is not handled within the code. This results in two issues.
1) The table which is not dropped also gets written into the binary log.
2) The code continues further upon receiving 'KILL QUERY'.

Fix:
===
Upon receiving the KILL command the query should stop its current execution.
Tables which were successfully dropped prior to KILL command should be
included in the binary log.
2019-08-14 22:53:16 +05:30
afe6eb499d Revert "MDEV-20342 Turn Field::flags from a member to a method"
This reverts commit e86010f909.

Reverting on Monty's request, as this change makes merging
things from 10.5 to 10.2 much harder.
2019-08-14 20:27:00 +04:00
1d15a28e52 Merge 10.3 into 10.4 2019-08-14 18:06:51 +03:00
e86010f909 MDEV-20342 Turn Field::flags from a member to a method 2019-08-14 13:33:01 +04:00
39db116562 MDEV-18862 Unfortunate error message upon attempt to drop system versioning
Fix error code.
2019-08-14 11:58:58 +03:00
c1599821a5 Merge remote-tracking branch 'origin/10.4' into 10.5 2019-08-13 23:49:10 +04:00
65d48b4a7b Merge 10.2 to 10.3 2019-08-13 19:28:51 +03:00
624dd71b94 Merge 10.4 into 10.5 2019-08-13 18:57:00 +03:00
f25e9aa4ba MDEV-20310: Make InnoDB crash tests Valgrind-friendly
Use DEBUG_SYNC to hang the execution at the interesting point,
and then kill and restart the server externally. This will work
also with Valgrind. DBUG_SUICIDE() causes Valgrind to hang,
and it could also cause uninteresting reports about memory leaks.

While we are at it, let us clean up innodb.innodb_bulk_create_index_debug
so that it will actually test the desired functionality also in future
versions (with instant ADD COLUMN and DROP COLUMN) and avoid
some unnecessary restarts.

We are adding two DEBUG_SYNC points for ALTER TABLE, because there were
none that would be executed right before ha_commit_trans().
2019-08-13 13:32:27 +03:00