Commit graph

152 commits

Author SHA1 Message Date
Sergei Golubchik
36e59752e7 Merge branch '10.2' into 10.3 2018-06-30 16:39:20 +02:00
Sergei Golubchik
b942aa34c1 Merge branch '10.1' into 10.2 2018-06-21 23:47:39 +02:00
Vicențiu Ciorbaru
aa59ecec89 Merge branch '10.0' into 10.1 2018-06-12 18:55:27 +03:00
Vicențiu Ciorbaru
170bec36c0 Merge branch '5.5' into 10.0 2018-06-12 17:59:31 +03:00
Sergei Golubchik
e7ca377cb7 MDEV-16342 SHOW ENGINES: MyISAM description is useless
rewrite tautological engine descriptions
2018-06-11 09:57:54 +02:00
Aleksey Midenkov
60319afff7 MDEV-15969 System versioning and FEDERATED don't work well together: DML and discovery fail
* fixed discovery
* DELETE fix
* federated.test

Closes tempesta-tech/mariadb#490
2018-05-17 15:33:42 +02:00
Sergei Golubchik
dfd6702a29 MDEV-16157 federated corrupts timestamps
do "set time_zone='+00:00'" on remote server
after connecting.

temporarily reset local time zone to my_tz_OFFSET0
whenever Field::val_str() or Field::store()
methods are used.
2018-05-17 15:33:39 +02:00
Sergei Golubchik
221d010f3e MDEV-14789 Creating federated table on versioned table fails
don't allow to discover WITH SYSTEM VERSIONING clause

originally by: Aleksey Midenkov
2018-02-23 15:33:21 +01:00
Marko Mäkelä
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
Monty
54db0be3be Added Max_index_length and Temporary to SHOW TABLE STATUS
- Max_index_length is supported by MyISAM and Aria tables.
- Temporary is a placeholder to signal that a table is a
  temporary table. For the moment this is always "N", except
  "Y" for generated information_schema tables and NULL for
  views. Full temporary table support will be done in another task.
  (No reason to have to update a lot of result files twice in a row)
2018-02-12 17:17:26 +02:00
Sergei Golubchik
7e4c185c77 MDEV-14272 Mariadb crashes with signal 11 when using federatedx engine and galera
cherry-pick e6ce97a592
2017-12-28 02:13:25 +01:00
Monty
d5268a610a MDEV-7700 Spiral patch 002_mariadb-10.0.15.spider.diff, part 2
Allow partition engines to access table->s->connect_string for engines
that uses HTON_CAN_READ_CONNECT_STRING_IN_PARTITION
Don't reset table->s->connect_string in ha_partition::open
2017-12-03 13:58:34 +02:00
Sergei Golubchik
e6ce97a592 MDEV-12951 Server crash [mysqld got exception 0xc0000005]
Same as MDEV-12725 but for federated (not X).
Set and reset mysql.net->thd appropriately.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
cb1e76e4de Merge branch '10.1' into 10.2 2017-08-17 11:38:34 +02:00
Sergei Golubchik
fa1f214cf8 MDEV-12725 select on federated table crashes server
NET can only store current_thd if this NET (or its MYSQL) is not
moved between threads. In FederatedX MYSQL is part of the TABLE,
and a TABLE can migrate between threads.

Fix: associate NET with THD in txn->acquire() , and dissociate
in txn->release()
2017-08-08 22:49:09 +02:00
Sergei Golubchik
785e2248bd MDEV-13089 identifier quoting in partitioning
don't print partitioning expression as it was entered by the user,
use Item::print() according to the sql_mode and sql_quote_show_create
2017-07-05 17:15:59 +02:00
Marko Mäkelä
8c81f24d1b Merge 10.1 into 10.2 2017-05-26 22:45:46 +03:00
Sergei Golubchik
fdc1fd6f49 MDEV-11311 Create federated table does not work as expected.
FederatedX wasn't discovering prefix keys correctly.
Of course, as it had the HA_NO_PREFIX_CHAR_KEYS table_flag set...
2017-05-24 11:59:03 +02:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Marko Mäkelä
ad0c218a44 Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:

recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).

Report progress also via systemd using sd_notifyf().
2017-03-09 08:53:08 +02:00
Vicențiu Ciorbaru
606a4a4847 Post MDEV-11902 Fix test failures in maria and myisam storage engines
my_readline can fail due to missing file. Make my_readline report this
condition separately so that we can catch it and report an appropriate
error message to the user.
2017-03-03 20:12:48 +02:00
Vicențiu Ciorbaru
1acfa942ed Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
Sergei Golubchik
b27fd90ad3 MDEV-11902 mi_open race condition
TOCTOU bug. The path is checked to be valid, symlinks are resolved.
Then the resolved path is opened. Between the check and the open,
there's a window when one can replace some path component with a
symlink, bypassing validity checks.

Fix: after we resolved all symlinks in the path, don't allow open()
to resolve symlinks, there should be none.

Compared to the old MyISAM/Aria code:
* fastpath. Opening of not-symlinked files is just one open(),
  no fn_format() and lstat() anymore.
* opening of symlinked tables doesn't do fn_format() and lstat() either.
  it also doesn't to realpath() (which was lstat-ing every path
  component), instead if opens every path component with O_PATH.
* share->data_file_name stores realpath(path) not readlink(path). So,
  SHOW CREATE TABLE needs to do lstat/readlink() now (see ::info()),
  and certain error messages (cannot open file "XXX") show the real
  file path with all symlinks resolved.
2017-02-27 12:35:10 +01:00
Sergei Golubchik
aebb1038aa bugfix: multi-UPDATE, vcols, const tables
multi-update was setting up read_set/vcol_set in
multi_update::initialize_tables() that is invoked after
the optimizer (JOIN::optimize_inner()). But some rows - if they're from
const tables - will be read already in the optimizer, and these rows
will not have all necessary column/vcol values.

* multi_update::initialize_tables() uses results from the optimizer
  and cannot be moved to be called earlier.
* multi_update::prepare() is called before the optimizer, but
  it cannot set up read_set/vcol_set, because the optimizer
  might reset them (see SELECT_LEX::update_used_tables()).

As a fix I've added a new method, select_result::prepare_to_read_rows(),
it's called from inside the optimizer just before make_join_statistics().
2016-12-12 20:27:38 +01:00
Sergei Golubchik
0bef3bb8d0 cleanup: remove Item::intro_version
and partition_info::set_show_version_string - they were
already broken and impossible to maintain
2016-12-12 20:27:25 +01:00
Sergei Golubchik
6820bf9ca9 do not quote numbers in the DEFAULT clause in SHOW CREATE 2016-08-27 16:59:11 +02:00
Michael Widenius
db7edfed17 MDEV-7563 Support CHECK constraint as in (or close to) SQL Standard
MDEV-10134 Add full support for DEFAULT

- Added support for using tables with MySQL 5.7 virtual fields,
  including MySQL 5.7 syntax
- Better error messages also for old cases
- CREATE ... SELECT now also updates timestamp columns
- Blob can now have default values
- Added new system variable "check_constraint_checks", to turn of
  CHECK constraint checking if needed.
- Removed some engine independent tests in suite vcol to only test myisam
- Moved some tests from 'include' to 't'. Should some day be done for all tests.
- FRM version increased to 11 if one uses virtual fields or constraints
- Changed to use a bitmap to check if a field has got a value, instead of
  setting HAS_EXPLICIT_VALUE bit in field flags
- Expressions can now be up to 65K in total
- Ensure we are not refering to uninitialized fields when handling virtual fields or defaults
- Changed check_vcol_func_processor() to return a bitmap of used types
- Had to change some functions that calculated cached value in fix_fields to do
  this in val() or getdate() instead.
- store_now_in_TIME() now takes a THD argument
- fill_record() now updates default values
- Add a lookahead for NOT NULL, to be able to handle DEFAULT 1+1 NOT NULL
- Automatically generate a name for constraints that doesn't have a name
- Added support for ALTER TABLE DROP CONSTRAINT
- Ensure that partition functions register virtual fields used. This fixes
  some bugs when using virtual fields in a partitioning function
2016-06-30 11:43:02 +02:00
Sergey Vojtovich
282497dd6d MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Sergey Vojtovich
e8085d1b41 MDEV-9346 - The federatedx and spider engine make mysqld crash when they are
configured withtout username

Federated/spider/connect engines or replication threads connecting to other host
with empty user name may crash mysqld.

This is addition to original patch, which adds a test case and amends a macro.
2016-02-16 18:40:04 +04:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Sergei Golubchik
1623995158 Merge branch '5.5' into 10.0 2015-12-13 00:10:40 +01:00
Sergei Golubchik
18954ff25d MDEV-8313 Got an error writing communication packets
Don't let network errors from mysql_close() leak into THD.

* remove incorrect upstream fix
** table->in_use can be NULL, must use ha_thd()
** clear_error() may remove earlier errors, don't use it
* fix the bug properly in federated and federatedx
2015-12-07 15:20:23 +01:00
Alexander Barkov
d9b25ae3db MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty strings
MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
2015-09-17 11:05:07 +04:00
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
Sergei Golubchik
55b96d2708 bump the VERSION to 10.1.6 and related changes
fix two #if MYSQL_VERSION_ID > 100105
2015-06-28 12:09:18 +02:00
Sergei Golubchik
20c3b2ff80 MDEV-6311 Add errors on CREATE SERVER
fail CREATE SERVER foreign data wrapper is "mysql"
and neither HOST nor SOCKET are specified.

Also default PORT to 3306 (again, only for foreign
data wrapper "mysql")
2014-12-04 10:41:51 +01:00
Sergei Golubchik
7f5e51b940 MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove:
* NDB from everywhere
* IM from mtr-v1
* packaging/rpm-oel and packaging/rpm-uln
* few unused spec files
* plug.in file
* .bzrignore
2014-10-11 18:53:06 +02:00
Sergei Golubchik
0dc23679c8 10.0-base merge 2014-02-26 15:28:07 +01:00
Sergei Golubchik
0b9a0a3517 5.5 merge 2014-02-25 16:04:35 +01:00
Sergei Golubchik
84c96a263e different fix for internal Oracle MySQL bug#16324629 that doesn't crash
(simply, copied from FederatedX)
2014-02-17 11:09:33 +01:00
Sergei Golubchik
c73718d917 fix tests for solaris - different errno numbers and/or different errno messages 2014-02-06 16:28:05 +01:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Sergei Golubchik
27fbb637d3 MDEV-5544 Custom errors (generated from storage engine) not getting returned by mariadb 2014-02-01 09:32:59 +01:00
Sergei Golubchik
59d9d08e2b 5.5 merge 2014-02-01 00:54:03 +01:00
Sergei Golubchik
0fdb3bcfdb 10.0-base merge (roles) 2013-10-29 15:08:44 +01:00
Sergei Golubchik
13cca92de4 fix funcs_1.is_engines_federated failure when no ha_federatex.so is present 2013-10-18 13:17:27 -07:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00