Commit graph

87442 commits

Author SHA1 Message Date
Igor Babaev
8efaff4959 Fixed bug mdev-5415.
Do not calculate selectivity of conditions for the tables of the information schema.
2013-12-14 19:13:37 -08:00
Alexander Barkov
d8ac8d187d Merge 10.0->10.0-connect 2013-12-14 15:37:55 +04:00
unknown
dbfe5f4774 MDEV-5363: Make parallel replication waits killable
Add a test case for killing a waiting query in parallel replication.

Fix several bugs found:

 - We should not wakeup_subsequent_commits() in ha_rollback_trans(), since we
   do not know the right wakeup_error() to give.

 - When a wait_for_prior_commit() is killed, we must unregister from the
   waitee so we do not race and get an extra (non-kill) wakeup.

 - We need to deal with error propagation correctly in queue_for_group_commit
   when one thread is killed.

 - Fix one locking issue in queue_for_group_commit(), we could unlock the
   waitee lock too early and this end up processing wakeup() with insufficient
   locking.

 - Fix Xid_log_event::do_apply_event; if commit fails it must not update the
   in-memory @@gtid_slave_pos state.

 - Fix and cleanup some things in the rpl_parallel.cc error handling.

 - Add a missing check for killed in the slave sql driver thread, to avoid a
   race.
2013-12-13 14:26:51 +01:00
Sergei Golubchik
ff485d2dc4 MDEV-5438 A view can mask a table that supports discovery 2013-12-13 14:26:10 +01:00
Alexander Barkov
0c0fe7a862 Fixing temporarily test failures in ctype_xxx.
The problem reported as MDEV-5444.
2013-12-13 17:18:10 +04:00
Sergei Golubchik
e68bccc743 5.3 merge 2013-12-13 13:00:38 +01:00
Sergey Vojtovich
258bf32d3c MDEV-4748 - metadata_lock_info plugin
- include metadata_lock_info plugin into debian packages
- ignore metadata_lock_info plugin in mysqld--help test
- let test suite run with built-in metadata_lock_info plugin
2013-12-13 12:42:45 +04:00
Igor Babaev
3ec4296ec4 Fixed bug mdev-5410.
The fix for bug #27937 was incomplete: it did not handle correctly the queries
containing UNION with global ORDER BY in subselects.
2013-12-12 13:55:33 -08:00
Sergei Golubchik
ca083a764f my_addr_resolve: don't resolve unknown addresses to ??:0(??), but return an error instead
(better to have an address in the output than ??:0)
2013-12-12 18:14:14 +01:00
Sergei Golubchik
c47dd98f90 backport from 10.0: "bugfix: MYSQL_THDVAR_STR plugins with PLUGIN_VAR_MEMALLOC didn't work
(PLUGIN_VAR_MEMALLOC is 0x8000 and cannot be saved in a char as such)"
2013-12-12 18:14:08 +01:00
Sergei Golubchik
5313e00199 fix tokudb tests that fail in --ps-protocol
https://github.com/Tokutek/ft-engine/issues/153
2013-12-12 14:58:44 +01:00
Alexander Barkov
1e711c8d04 ConnectSE: making odbc_postgresql.test independent from
the system locale (on Linux) and code pages (on Windows).
2013-12-12 17:26:01 +04:00
Sergei Golubchik
976e242c78 update tokudb version. mask tests that are broken there. 2013-12-12 11:42:00 +01:00
Olivier Bertrand
a58e4e8af1 - Fix (temporarily) bug on odbc_postgresql.test
modified:
  storage/connect/mysql-test/connect/t/odbc_postgresql.test
  storage/connect/user_connect.cc
2013-12-12 01:33:53 +01:00
Olivier Bertrand
7e8504b523 - Add longjmp initialization in PlgAllocResult
modified:
  storage/connect/plgdbutl.cpp

- Update type translation to take care of type_modifiers

modified:
  storage/connect/ha_connect.cc
  storage/connect/myutil.cpp
  storage/connect/myutil.h
  storage/connect/odbconn.cpp
2013-12-11 23:33:36 +01:00
Igor Babaev
fde2777b27 Another attempt to fix the memory leak of mdev-5400. 2013-12-11 10:13:08 -08:00
Sergei Golubchik
70f6ac10b3 MDEV-5323 Ctrl-C not working under Ubuntu
don't reset interrupted_query after sending the KILL signal, otherwise
the client won't know it has to stop fetching and printing the data.
2013-12-11 17:42:33 +01:00
Olivier Bertrand
3a7f4f241e - Commit merged files from Alexander
added:
  storage/connect/mysql-test/connect/r/odbc_postgresql.result
  storage/connect/mysql-test/connect/t/have_odbc_postgresql.inc
  storage/connect/mysql-test/connect/t/odbc_postgresql.sql
  storage/connect/mysql-test/connect/t/odbc_postgresql.test
modified:
  storage/connect/odbconn.cpp
2013-12-11 16:57:25 +01:00
Olivier Bertrand
f69980c6df - Fix errors and warnings occuring in --embedded tests
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/r/unsigned.result
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/unsigned.test
2013-12-11 16:52:01 +01:00
Alexander Barkov
83416c0fee Fixing the message displayed when the test PostgreSQL data source name
does not exist.
2013-12-11 19:47:37 +04:00
Alexander Barkov
f19f8f0ee4 MDEV-5341 ConnectSE: discovery for ODBC tables does not work if tables
with the same names present in multiple schemas

The "TABNAME" option now supports qualified table names,
to connect to tables residing in a particular schema and catalog.

Qualified table names have the following format:

  [[CatalogName.]SchemaName.]TableName

Qualified table names can be used:

1. In "normal" tables:

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=ConnectEng;UID=mtr;PWD=mtr'
TABNAME='schema1.t1';

2. In catalog tables (CATFUNC=Tables  and CATFUNC=Columns)

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='schema1.t1';

Note, the % and _ wildcards are supported in
the schema name and the table name parts:

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='%.t1';

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC
CONNECTION='DSN=postgresql;UID=user;PWD=password'
TABNAME='schema1.%';
2013-12-11 18:47:46 +04:00
Kentoku SHIBA
3771e14ea9 add metadata_lock_info 2013-12-11 00:31:04 +09:00
Sergei Golubchik
1f9d4819ad add a forgotten my_afree() to make valgrind happy 2013-12-12 20:30:56 +01:00
Sergey Vojtovich
2d7c073852 MDEV-5388 - Reduce usage of LOCK_open: unused_tables
Removed unused_tables, find LRU object by timestamp instead.
2013-12-12 21:49:14 +04:00
Sergey Vojtovich
98c4f167c5 MDEV-4956 - Reduce usage of LOCK_open: TABLE_SHARE::tdc.used_tables
- tc_acquire_table and tc_release_table do not access
  TABLE_SHARE::tdc.used_tables anymore
- in tc_acquire_table(): release LOCK_tdc after we relase LOCK_open
  (saves a few CPU cycles in critical section)
- in tc_release_table(): if we reached table cache threshold, evict
  to-be-released table without moving it to unused_tables. unused_tables
  must be empty at this point.
2013-12-10 19:00:36 +04:00
Sergei Golubchik
b2c56742b5 restore debian/dist/Ubuntu/control that was changed by mistake 2013-12-12 17:02:13 +01:00
Alexander Barkov
57fcf1cbe4 Moving the code checking libxml2 into a *.inc file. 2013-12-10 12:53:46 +04:00
Sergei Golubchik
cec76b3861 correct old assert in add_role_user_mapping_action to match changed function prototypes.
fix the element deleting logic for roles_mappings_hash
2013-12-09 12:39:31 +01:00
Sergei Golubchik
f6fcb348ad remove sys_var specific restore_pluginvar_names() function,
use generic restore_ptr_backup() approach
2013-12-09 12:39:19 +01:00
Sergei Golubchik
47ee721923 MDEV-4403 Attempting to use cassandra storage engine causes "service 'my_snprintf_service' interface version mismatch"
When a DSO is loaded we rewrite service pointers to point to the actual service structures.
But when a DSO is unloaded, we have to restore their original values, in case this DSO
wasn't removed from memory on dlclose() and is later loaded again.
2013-12-09 12:39:13 +01:00
Sergei Golubchik
182ffc0cc8 remove #ifdef ENABLE_BEFORE_END_OF_MERGE_QQ 2013-12-09 12:38:37 +01:00
Sergei Golubchik
517b1f4fb4 cleanups:
* comments from WL#5602 in sql_acl.cc
* rename global memroots in sql_acl.cc
* remove the second empty lex string constant
2013-12-09 12:38:30 +01:00
Sergei Golubchik
93b1555939 bugfix: incorrect buffer sizes for net_store_length() 2013-12-09 12:38:20 +01:00
Sergei Golubchik
e252af7b7e reuse new safe_net_field_length_ll function where appropriate 2013-12-09 12:38:09 +01:00
Sergei Golubchik
bec1d903d9 Do the partial merge of WL#5602 correctly:
Remove unused code (that should not have been merged)
  Add protocol extension (that should have been merged)
  Fix bugs (see pack.c)
2013-12-09 12:38:02 +01:00
Sergei Golubchik
6ae5f0efea MDEV-5115 RBR from MySQL 5.6 to MariaDB 10.0 does not work
Patially merge WL#5917, to understand v2 row events
2013-12-09 12:37:45 +01:00
Igor Babaev
d5262a63fc Fixed bug mdev-5400:
a memory leak in save_index() first seen in the test case for mdev-5382.
2013-12-07 07:51:02 -08:00
Sergei Golubchik
fe38576064 install embedded_priv.h in ${INSTALL_INCLUDEDIR}/private 2013-12-06 15:29:25 +01:00
unknown
b7ae65ef86 MDEV-5363: Make parallel replication waits killable
A couple of more parallel replication waits made killable.
2013-12-06 13:28:23 +01:00
Olivier Bertrand
1e1345c451 - Raise the limit on returned lines for table ODBC catalog tables
to 16384 (MDEV-5393)

modified:
  storage/connect/odbconn.cpp

- Fix sorting catalog table result set (MDEV-5394)

added:
  storage/connect/mysql-test/connect/r/xml_mdev5261.result
  storage/connect/mysql-test/connect/t/xml_mdev5261.test
modified:
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
  storage/connect/table.cpp
  storage/connect/tabodbc.cpp
  storage/connect/xtable.h

- Remove unnecessary closing of opened table in rnd_init

modified:
  storage/connect/ha_connect.cc
2013-12-06 01:37:56 +01:00
Igor Babaev
21d0d8c5bf Merge 2013-12-05 12:40:04 -08:00
Igor Babaev
ccf5871d7b Fixed bug mdev-5382
When marking used columns the function find_field_in_table_ref() erroneously
called the walk method for the real item behind a view/derived table field
with the second parameter set to TRUE.
This erroneous code was introduced in 2006.
2013-12-05 11:13:20 -08:00
Alexander Barkov
37611b2a32 MDEV-5343 ConnectSE: ODBC: CATFUNC=Tables and CATFUNC=Columns crash when
running against a data source with many tables
2013-12-05 18:31:14 +04:00
unknown
4d6ee2d119 MDEV-5363: Make parallel replication waits killable
Make wait_for_prior_commit killable, and handle the error if
killed.
2013-12-05 14:36:09 +01:00
Alexander Barkov
be09466e37 Adding basic ODBC tests that do not need a DSN 2013-12-05 17:26:28 +04:00
Olivier Bertrand
e694ac4193 - Suppress eventual prompting when connecting to an ODBC source
modified:
  storage/connect/odbconn.cpp
2013-12-05 12:32:06 +01:00
Olivier Bertrand
54d4589dde - Previous MDEV-5261 was generating wrong warnings
modified:
  storage/connect/ha_connect.cc
2013-12-05 01:00:28 +01:00
Olivier Bertrand
a8b09c14ef - Fix bug MDEV-5261
modified:
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/mycat.h
2013-12-04 23:53:30 +01:00
unknown
b78f721460 MDEV-5353: server crash on subselect if WHERE applied to some result field
Correct processing of view/derived with no tables added.
2013-12-04 16:54:33 +02:00
Olivier Bertrand
41dbe1c96b - Fix a typo error in tabutil line 213
modified:
  storage/connect/tabutil.cpp
  
- Fix test results to reflect the fact that in discovery, column defaults
  are now retrieved for the MYSQL table type.

modified:
  storage/connect/mysql-test/connect/r/mysql_discovery.result
  storage/connect/mysql-test/connect/r/mysql_new.result

- Restore Unix line endings

modified:
  storage/connect/value.cpp
2013-12-03 23:34:50 +01:00