summaryrefslogtreecommitdiff
path: root/storage/federated
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2019-05-133-3/+3
|\
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-113-3/+3
| |\
| | * Update FSF AddressVicențiu Ciorbaru2019-05-113-3/+3
| | | | | | | | | | | | * Update wrong zip-code
* | | Merge 10.1 into 10.2Marko Mäkelä2019-04-031-1/+0
|\ \ \ | |/ /
| * | Remove unused declarationsMarko Mäkelä2019-04-032-2/+0
| | |
* | | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2018-06-121-1/+1
| |\ \
| | * \ Merge branch '5.5' into 10.0Vicențiu Ciorbaru2018-06-121-1/+1
| | |\ \ | | | |/
| | | * MDEV-16342 SHOW ENGINES: MyISAM description is uselessSergei Golubchik2018-06-111-1/+1
| | | | | | | | | | | | | | | | rewrite tautological engine descriptions
| | | * MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-171-0/+3
| | | | | | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
| * | | MDEV-14272 Mariadb crashes with signal 11 when using federatedx engine and ↵Sergei Golubchik2017-12-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | galera cherry-pick e6ce97a5928
* | | | MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.Vladislav Vaintroub2017-09-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
* | | | MDEV-12951 Server crash [mysqld got exception 0xc0000005]Sergei Golubchik2017-09-181-2/+7
| | | | | | | | | | | | | | | | | | | | Same as MDEV-12725 but for federated (not X). Set and reset mysql.net->thd appropriately.
* | | | cleanup: remove dead codeSergei Golubchik2017-09-181-60/+0
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-08-171-0/+2
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-08-081-0/+2
| |\ \ \ | | |/ /
| | * | MDEV-12824 GCC 7 warning: this statement may fall through ↵Sergei Golubchik2017-07-201-0/+2
| | | | | | | | | | | | | | | | [-Wimplicit-fallthrough=]
| | * | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
* | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-221-0/+2
|\ \ \ \ | |/ / /
| * | | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
* | | | MDEV-11597 Assertion when doing select from virtual column with impossible valueMonty2017-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed error handlers interface so that they can change error level in the handler - Give warnings and errors when calculating virtual columns - On insert/update error is fatal in strict mode. - SELECT and DELETE will only give a warning if a virtual field generates an error - Added VCOL_UPDATE_FOR_DELETE and VCOL_UPDATE_INDEX_FOR_REPLACE to be able to easily detect in update_virtual_fields() if we should use an error handler to mask errors or not.
* | | | fix build and some warningskevg2016-11-241-1/+0
| | | |
* | | | MDEV-6353 my_ismbchar() and my_mbcharlen() refactoringAlexander Barkov2016-05-171-2/+1
|/ / /
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
|\ \ \ | |/ /
| * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-211-10/+21
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-10/+21
| |\ \ | | |/
| | * MDEV-8313 Got an error writing communication packetsSergei Golubchik2015-12-071-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-121-1/+1
|\ \ \ | |/ /
| * | MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()Oleksandr Byelkin2015-09-061-1/+1
| | | | | | | | | | | | Expression in macro protected by ()
* | | Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-011-2/+2
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-05-041-2/+2
| |\ \ | | |/
| | * Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2015-04-271-2/+2
| | |\
| | | * Bug #12671631 CREATE TABLE .. LIKE .. FEDERATED TABLEArun Kuruvila2015-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CRASHES WITH AUTO_INCREMENT COLUMN Description:- Creating a federated table with AUTO_INCREMENT column using LIKE clause results in a server crash. Analysis:- Creating a federated table with AUTO_INCREMENT column using LIKE clause results in a federated server crash due to the uninitialized connection structure(mysql). Also due to unassigned connection string for the remote server, at the time of preparation of "create_info" structure, the creation of any federated table using LIKE clause fails with an error, "ERROR 1 (HY000): server name: '' doesn't exist!". This bug is not only with AUTO_INCREMENT but in all creations of federated tables with LIKE clause. Fix :- In ha_federated::info(), "mysql->insert_id" assigned to "stats.auto_increment_value" only when there is an active connection. This fixes the crash issue. For creating the federated table with LIKE clause, connection string is assigned at the time of preparation of "create_info" structure.
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-03-071-3/+3
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-02-181-3/+3
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42Sergei Golubchik2015-02-111-3/+3
| | |\ \ | | | |/
| | | * Bug#17599258:- ERROR 1160 (08S01): GOT AN ERROR WRITINGArun Kuruvila2014-11-101-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMMUNICATION PACKETS; FEDERATED TABLE Description:- Execution of FLUSH TABLES on a federated table which has been idle for wait_timeout (on the remote server) + tcp_keepalive_time, fails with an error, "ERROR 1160 (08S01): Got an error writing communication packets." Analysis:- During FLUSH TABLE execution the federated table is closed which will inturn close the federated connection. While closing the connection, federated server tries to communincate with the remote server. Since the connection was idle for wait_timeout(on the remote server)+ tcp_keepalive_time, the socket gets closed. So this communication fails because of broken pipe and the error is thrown. But federated connections are expected to reconnect silently. And also it cannot reconnect because the "auto_reconnect" variable is set to 0 in "mysql_close()". Fix:- Before closing the federated connection, in "ha_federated_close()", a check is added which will verify wheather the connection is alive or not. If the connection is not alive, then "mysql->net.error" is set to 2 which will indicate that the connetion is broken. Also the setting of "auto_reconnect" variable to 0 is delayed and is done after "COM_QUIT" command. NOTE:- For reproducing this issue, "tcp_keepalive_time" has to be set to a smaller value. This value is set in the "/proc/sys/net/ipv4/tcp_keepalive_time" file in Unix systems. So we need root permission for changing it, which can't be done through mtr test. So submitting the patch without mtr test.
| | | * Bug #16324629 : SERVER CRASHES ON UPDATE/JOIN FEDERATED + Arun Kuruvila2013-12-302-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCAL TABLE WHEN ONLY 1 LOCAL ROW Description: When updating a federated table with UPDATE... JOIN, the server consistently crashes with Signal 11 when only 1 row exists in the local table involved in the join and that 1 row can be joined with a row in the federated table. Analysis: Interaction between the federated engine and the optimizer results in the crash. In our scenario, ie, local table having only one row, the program is following a different path because the table is treated as a constant table by the join optimizer. So in this scenario "index_read()" is happening in the prepare phase, since optimizer plan is different for constant table joins. In this case, "index_read_idx_map()" (inside handler.cc) is calling "index_read()" and inside "index_read()", matching rows are fetched and "stored_result" gets populated by calling "store_result()". And just after "index_read()", "index_end()" function is called. And in the "index_end()", its freeing the "stored_result" by calling "free_result()". So when it reaches the execution phase, in "position()" function, we are getting assertion at "DBUG_ASSERT(stored_result);". In all other scenarios (ie, table with more than 1 row), optimizer plan is different and "index_read()" is happening in the execution phase. Fix: So my fix is to have a separate ha_federated member function for "index_read_idx_map()" which will handle federated engine separately. So that position() will be called before index_end() call in constant table scenario.
| | | * Bug #12876932 - INCORRECT SELECT RESULT ON FEDERATED TABLEVenkata Sidagam2012-07-261-1/+1
| | | |\ | | | | | | | | | | Merged from mysql-5.1 to mysql-5.5
| | | | * Bug #12876932 - INCORRECT SELECT RESULT ON FEDERATED TABLEVenkata Sidagam2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem description: Table 't' created with two colums having compound index on both the columns under innodb/myisam engine at remote machine. In the local machine same table is created undet the federated engine. A select having where clause with along 'AND' operation gives wrong results on local machine. Analysis: The given query at federated engine is wrongly transformed by federated::create_where_from_key() function and the same was sent to the remote machine. Hence the local machine is showing wrong results. Given query "select c1 from t where c1 <= 2 and c2 = 1;" Query transformed, after ha_federated::create_where_from_key() function is: SELECT `c1`, `c2` FROM `t` WHERE (`c1` IS NOT NULL ) AND ( (`c1` >= 2) AND (`c2` <= 1) ) and the same sent to real_query(). In the above the '<=' and '=' conditions were transformed to '>=' and '<=' respectively. ha_federated::create_where_from_key() function behaving as below: The key_range is having both the start_key and end_key. The start_key is used to get "(`c1` IS NOT NULL )" part of the where clause, this transformation is correct. The end_key is used to get "( (`c1` >= 2) AND (`c2` <= 1) )", which is wrong, here the given conditions('<=' and '=') are changed as wrong conditions('>=' and '<='). The end_key is having {key = 0x39fa6d0 "", length = 10, keypart_map = 3, flag = HA_READ_AFTER_KEY} The store_length is having value '5'. Based on store_length and length values the condition values is applied in HA_READ_AFTER_KEY switch case. The switch case 'HA_READ_AFTER_KEY' is applicable to only the last part of the end_key and for previous parts it is going to 'HA_READ_KEY_OR_NEXT' case, here the '>=' is getting added as a condition instead of '<='. Fix: Updated the 'if' condition in 'HA_READ_AFTER_KEY' case to affect for all parts of the end_key. i.e 'i > 0' will used for end_key, Hence added it in the if condition.
| | | * | Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| | | |\ \ | | | | |/
| | | | * Updated/added copyright headersKent Boortz2012-02-152-2/+2
| | | | |
| | | * | Auto-merge from mysql-5.1.Ramil Kalimullin2011-12-231-1/+2
| | | |\ \ | | | | |/
| | | | * Fix for bug#11758931 - 51196: SLAVE SQL: GOT AN ERROR WRITINGRamil Kalimullin2011-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMMUNICATION PACKETS, ERROR_CODE: 1160 Addendum: for some queries table->in_use might be NULL - check it.
| | | * | Auto-merge from mysq-5.1.Ramil Kalimullin2011-12-231-0/+9
| | | |\ \ | | | | |/
| | | | * Fix for bug#11758931 - 51196: SLAVE SQL: GOT AN ERROR WRITING Ramil Kalimullin2011-12-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COMMUNICATION PACKETS, ERROR_CODE: 1160 If idle FEDERATED table is evicted from the table cache when a connection to remote server is lost, query that initiated eviction may fail. If this query is executed by slave SQL thread it may fail as well. An error of close was stored in diagnostics area, which was later attributed to the statement that caused eviction. With this patch FEDERATED clears an error of close.
| | | | * Bug #11750417 40942: UNABLE TO INSTALL FEDERATED PLUGINBjorn Munch2011-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link plugin with a copy of string.o Copied test from 5.5 but this was dysfunctional, made it work Also tested on Windows
| | | * | Merging into mysql-5.5.16-release.Mats Kindahl2011-08-151-1/+2
| | | | |
| | | * | Updated/added copyright headersKent Boortz2011-06-302-4/+4
| | | |\ \ | | | | |/