Commit graph

64711 commits

Author SHA1 Message Date
Alexander Barkov
e09299511e MDEV-9665 Remove cs->cset->ismbchar()
Using a more powerfull cs->cset->charlen() instead.
2016-03-16 10:55:12 +04:00
Oleksandr Byelkin
dc08ccab42 MDEV-9704: ALTER TABLE does not work from client
Do not try to send progress packets if client was not informed about them.
2016-03-14 18:30:14 +01:00
Alexander Barkov
5c1add3e07 MDEV-9709 Unexpected modification of value and warning about out of range value upon ALTER
MDEV-4102 Limitation on DOUBLE or REAL length is ignored with INSERT .. SELECT
2016-03-14 10:22:42 +04:00
Vladislav Vaintroub
75d8544c0b fix openssl memory leak in main thread 2016-03-09 17:01:41 +01:00
Vladislav Vaintroub
35e713dcca Fix leak from missing my_thread_end 2016-03-09 16:42:45 +01:00
Vladislav Vaintroub
351026ca53 Fix threadpool memory leak and connect2 test 2016-03-09 10:19:09 +01:00
Vicențiu Ciorbaru
9c6fd420c1 [MDEV-7978] Post review fixes and cleanups.
* Maintain coding style in sql_yacc.yy in regards to optional clauses.
* Remove unused variable from sql_acl.cc.
* Update test case
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
5e873141a5 [MDEV-7978] Added show create user implementation. 2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
b4fcd1a408 [MDEV-7978] Updated syntax for SHOW CREATE USER 2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
b45c3d0b08 [MDEV-7978] Implement alter user and tested create user
Implemented the alter user syntax. Also tested that create user
creates users accordingly.
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
90b717b3cd [MDEV-7978] Update grammar for new syntax
Extend the syntax accepted by the grammar to account for the new create user
and alter user syntax.
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
6066ede444 Fix warnings in sql_acl.cc 2016-03-08 16:55:17 +02:00
Vladislav Vaintroub
1a3db0e24f Fix threadpool after it was broken by MDEV-6150 2016-03-08 10:28:26 +01:00
Sergey Vojtovich
a8d97fb818 MDEV-9651 - Simplify audit event dispatching
Simplified audit event dispatching call chain from:
  mysql_audit_notify_connection_connect() // can be inlined
  mysql_audit_notify()                    // can't be inlined
  connection_class_handler()              // can't be inlined
  event_class_dispatch()                  // can be inlined
  plugins_dispatch()                      // can be inlined
  plugin->event_notify()                  // can't be inlined
to:
  mysql_audit_notify_connection_connect() // can be inlined
  mysql_audit_notify()                    // can't be inlined
  plugins_dispatch()                      // can be inlined
  plugin->event_notify()                  // can't be inlined
2016-03-08 11:26:28 +04:00
Sergei Petrunia
ab44e892d8 MDEV-9652: EXPLAIN FORMAT=JSON should show outer_ref_cond
Show outer_ref_condition in EXPLAIN FORMAT=JSON output.
2016-02-28 18:18:29 +03:00
Sergey Vojtovich
0dbfc0fde7 Yet more fixes covering thread_id type change
Also fixed race condition in main.connect2 test: we need to wait for
disconnected connections to actually decrease Threads_connected.
2016-02-28 14:54:56 +04:00
Sergey Vojtovich
ee5909111d Yet more fixes covering thread_id type change 2016-02-27 16:57:14 +04:00
Sergey Vojtovich
03839e78f2 Corrected format string for long long thread_id
This is expected to fix many test failures on 32bit builds where creation of
second temporary table was failing.
2016-02-27 13:27:42 +04:00
Alexey Botchkov
0d10b5a5cd MDEV-8713 Add continuous binary log backup to mysqlbinlog.
--raw, --stop-never and --stop-never-slave-server-id=id options
        added to the mysqlbinlog tool.
2016-02-27 11:59:36 +04:00
Sergey Vojtovich
3692bd3238 MDEV-9488 - Table cache cleanups
Cleanup now unused arguments of tdc_open_view().
2016-02-26 18:36:31 +04:00
Sergey Vojtovich
c1d1c59888 MDEV-9488 - Table cache cleanups
Remove tdc_acquire_share() helpers: they don't actually make things simpler.
2016-02-26 18:35:14 +04:00
Sergey Vojtovich
d3af894235 MDEV-9488 - Table cache cleanups
tdc_assign_new_table_id() does not relate to table cache, move it out of
table_cache.cc.
2016-02-26 18:35:14 +04:00
Sergey Vojtovich
ed99046577 Fixed change_user and func_misc in embedded
First thread was getting id 0, while it is intended to get id 1.
2016-02-26 14:55:20 +04:00
Sergei Golubchik
00d1db7a38 Merge branch '10.1' into 10.2 2016-02-25 18:19:55 +01:00
Nirbhay Choubey
0251232f8c Fix to ensure updates in gtid_slave_state table do not get binlogged.
Also, renamed wsrep_skip_append_keys to wsrep_ignore_table.
Test case : galera.galera_as_slave_gtid.test
2016-02-24 23:32:37 -05:00
Sergei Petrunia
b05158cc10 MDEV-8988: Apparently valid SQL query gives wrong result (nested WHERE)
- "Early NULLs filtering" optimization used to "peel off" Item_ref and
  Item_direct_ref wrappers from an outside column reference before
  adding "outer_table_col IS NOT NULL" into JOIN::outer_ref_cond.
- When this happened in a subquery that was evaluated in a post-GROUP-BY
  context, attempt to evaluate JOIN::outer_ref_cond would fetch an
  incorrect value of outer_table_col.
2016-02-24 17:18:53 +03:00
Sergei Golubchik
d044507dc5 Merge branch 'bb-10.1-serg' into 10.1
10.0 merge
10.0-galera merge
connect/10.1 merge
2016-02-24 10:27:23 +01:00
Alexander Barkov
ff2d92b17d MDEV-7231 Field ROUTINE_DEFINITION in INFORMATION_SCHEMA.ROUTINES
contains broken procedure body when used shielding quotes inside.
2016-02-24 13:12:03 +04:00
Nirbhay Choubey
cceec7858f Merge branch '10.0-galera' into bb-10.1-serg 2016-02-24 01:21:40 -05:00
Nirbhay Choubey
1b0d811d2d Merge branch '5.5-galera' into 10.0-galera 2016-02-23 21:08:42 -05:00
Nirbhay Choubey
0d58323e26 Merge tag 'mariadb-10.0.24' into 10.0-galera 2016-02-23 20:53:29 -05:00
Nirbhay Choubey
276d65b324 Fix for test failures. 2016-02-23 20:33:21 -05:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Vicențiu Ciorbaru
28a36f617f Update column bitmaps for delete during binlog row image minimal. 2016-02-23 16:56:37 +02:00
Vicențiu Ciorbaru
de1fa45276 [MDEV-8411] Assertion failed in !table->write_set
The reason for the assertion failure is that the update statement for
the minimal row image sets only the PK column in the write_set of the
table to true. On the other hand, the trigger aims to update a different
column.

Make sure that triggers update the used columns accordingly, when being
processed.
2016-02-23 16:56:37 +02:00
Sergei Golubchik
20c4dfd4a9 MDEV-9576 syntax error on view with nullif and count
don't transform Item_func_nullif if it's context_analysis_only
2016-02-23 10:54:36 +01:00
Sergei Golubchik
216b5cc9b6 MDEV-9606 Server crashes in fix_fields, main.null fails with ps-protocol #2 2016-02-23 10:54:35 +01:00
Sergei Golubchik
9214d043fd disable SHOW I_S_table for built-in I_S tables
This fixes
MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
2016-02-23 10:54:34 +01:00
Sergei Golubchik
57905d18d6 MDEV-9535 Trigger doing "SET NEW.auctionStart = NOW();" on a timestamp kills MariaDB server
when doing set_field_to_new_field (from switch_to_nullable_trigger_fields())
make sure that the field we're about to change actually belongs
to the right table (otherwise we cannot dereference new_field[]
array as the wrong table might have more fields than
new_field[] has elements)
2016-02-23 10:54:34 +01:00
Sergei Golubchik
0fcd0ee34e MDEV-9500 Bug after upgrade to 10.1.10 (and 10.1.11)
Case: table with a NOT NULL field, BEFORE UPDATE trigger,
and UPDATE with a subquery that uses GROUP BY on that
NOT NULL field, and needs a temporary table for it.

Because of the BEFORE trigger, the field becomes nullable
temporarily. But its Item_field (used in GROUP BY) doesn't.
When working with the temptable some code looked at
item->maybe_null, some - at field->null_ptr.
The fix: make Item_field nullable when its field is.

This triggers an assert. The group key size is calculated
before the item is made nullable, so the group key doesn't
have a null byte. The fix: make fields/items nullable
before the group key size is calculated.
2016-02-23 10:53:53 +01:00
Sergei Golubchik
a38b705fe0 MDEV-9560 Mariadb 10.1 Crashes when replicating from 10.0
when replicating old temporal type fields (that don't store
metadata in the binlog), take the precision from
destination fields.

(this fixes the replication failure, crashes were
fixed in a different commit)
2016-02-23 10:46:16 +01:00
Sergei Golubchik
4cabc608b6 correct temporal fields in max_display_length_for_field()
it's *display length* (a.k.a. field_length)
not storage length (a.k.a. pack_length)
2016-02-23 10:46:16 +01:00
Sergei Golubchik
d4b1425b60 cleanup
* make a local variable for target_table->field[col]
* move an often-used bit function to my_bit.h
* remove a non-static and not really needed trivial comparison
  function with a very generic name
2016-02-23 10:46:16 +01:00
Nirbhay Choubey
15118d3561 refs codership/mysql-wsrep#237: Add sync point for mtr test. 2016-02-23 00:30:47 -05:00
sjaakola
32df0b1aac refs codership/mysql-wsrep#233
- avoiding the race condition, by not grabbing thd->LOCK_wsrep_thd for
  accessing thd->wsrep_exec_mode. The caller is same thread and exec mode
  can only be changed by self.
2016-02-23 00:22:04 -05:00
sjaakola
18f160d954 refs codership/mysql-wsrep#233
- added dbug sync points for further mtr test for this issue
2016-02-23 00:13:12 -05:00
Daniele Sciascia
1e14db11ee refs codership/mysql-wsrep#228
- Add calls to wsrep_sync_wait for
  SHOW CREATE DB/PROCEDURE/FUNCTION/TRIGGER/EVENT
  and SHOW PROCEDURE/FUNCTION CODE
2016-02-23 00:10:23 -05:00
Daniele Sciascia
c6659345a0 refs codership/mysql-wsrep#201
Fix remaining issues with wsrep_sync_wait and query cache.

- Fixes misplaced call to invalidate query cache in
  Rows_log_event::do_apply_event().
  Query cache was invalidated too early, and allowed old
  entries to be inserted to the cache.

- Reset thd->wsrep_sync_wait_gtid on query cache hit.
  THD->cleanup_after_query is not called in such cases,
  and thd->wsrep_sync_wait_gtid remained initialized.
2016-02-22 23:42:32 -05:00
Teemu Ollakka
ea0b1837ed refs codership/mysql-wsrep#198 Removed code duplication, PXC specifics
* Total order isolation was started twice for FLUSH TABLES, from
  reload_acl_and_cache() and from mysql_execute_command(). Removed
  the reload_acl_and_cache() part.
* Removed PXC specific stuff from MTR tests
2016-02-22 22:21:29 -05:00
Daniele Sciascia
235bebe02e refs codership/mysql-wsrep#201
- Eliminates code duplication in query cache patch
- Reduces the number of iterations in mysql-wsrep#201.test
  to shorten the execution time
- Adds a new test case that exercises more scenarios
2016-02-22 22:10:51 -05:00