Commit graph

76985 commits

Author SHA1 Message Date
Alexey Botchkov
511b943263 MDEV-4252 geometry query crashes server.
The bug was found by Alyssa Milburn.
      If the number of points of a geometry feature read from
      binary representation is greater than 0x10000000, then
      the (uint32) (num_points * 16) will cut the higher byte,
      which leads to various errors.
      Fixed by additional check if (num_points > max_n_points).
2013-03-10 23:08:05 +04:00
Sergei Golubchik
086b54c281 Percona-Server-5.5.30-rel30.1.tar.gz 2013-03-08 13:13:46 +01:00
unknown
b9f88d8ed3 2013-03-08 15:51:20 +05:30
Igor Babaev
926b0f54c9 Fixed bug mdev-4250.
This is a bug in the legacy code. It did not manifest itself because
it was masked by other bugs that were fixed by the patches for
mdev-4172 and mdev-4177.
2013-03-08 00:25:26 -08:00
Vladislav Vaintroub
888db0ec09 Fix typo (clang issued warning that =+ was used where += was intended) 2013-03-06 22:22:24 +01:00
unknown
108a0a1823 MDEV-4241 fix.
Field_enum incorrectly inherited decimals() from Field_string.
Field_enum should be always integer in numeric context.
2013-03-06 21:10:58 +02:00
Balasubramanian Kandasamy
0fd024f6ee Added fix for Bug#16445097 2013-03-06 17:05:32 +01:00
Balasubramanian Kandasamy
f3abc36db6 Added fix for Bug#16445097 2013-03-06 16:33:26 +01:00
Vladislav Vaintroub
806e6cda27 MDEV-4249 : when autodetecting default client charset on Windows, fallback to GetACP() whenever GetConsoleCP() returns 0 (i.e appkication does not have a console , which is the case for GUI apps, Windows services etc) 2013-03-06 13:30:40 +01:00
Alexander Barkov
421c885446 The i386 specific code improving character set conversion on the ASCII range
was not enabled on x86_64 machines. Enabling it. Gives up to 18 times
conversion performance improvement.

modified:
  sql/sql_string.cc
2013-03-11 13:50:17 +04:00
Sergei Golubchik
8dad7dfa6a 5.3->5.5 merge 2013-03-10 12:46:56 +01:00
Sergei Golubchik
9d8ee74b38 MDEV-4186 Test case main.myisampack fails on ppc32 (only)
fix the declaration to use the correct type for st_handler_check_param::sort_buffer_length.
remove redundant casts.
2013-03-08 19:09:45 +01:00
Sergei Golubchik
8f1b1ab5b0 MDEV-4175 auth_socket to build on OpenBSD / Bitrig 2013-03-08 19:09:15 +01:00
Sergei Golubchik
0d9a6d52d7 merge with XtraDB as of Percona-Server-5.5.30-rel30.1 2013-03-08 19:08:45 +01:00
Sergei Golubchik
e4e5c9fd14 hack in dependencies to imitate mysql-*.rpm even better 2013-03-06 09:38:08 +01:00
Sergei Golubchik
3bfd88d1d6 MDEV-4068 rpm scriptlet chown command dangerous
add --mysqld option to my_print_defaults
change server-postin script to use that
2013-03-06 09:32:13 +01:00
Sergei Golubchik
62b9be6542 MDEV-4066 semisync_master + temporary tables causes memory leaks
close (and auto-drop) temporary tables before
rolling back the last transaction in the connection.
2013-03-05 17:49:37 +01:00
Alexey Botchkov
7fb55ee807 TODO-424 geometry query crashes server.
The bug was found by Alyssa Milburn.
        If the number of points of a geometry feature read from
        binary representation is greater than 0x10000000, then
        the (uint32) (num_points * 16) will cut the higher byte,
        which leads to various errors.
        Fixed by additional check if (num_points > max_n_points).
2013-03-06 01:45:25 +04:00
Michael Widenius
ab1c228836 Fix for assert found by mysql-test-run
sql/sql_table.cc:
  Don't call allow_access_to_protected_table() if we haven't protected table against usage.
  Table is mainly protected against usage when one disables keys with alter table.
2013-03-05 20:15:36 +02:00
Balasubramanian Kandasamy
673c68a925 Updated Code for Bug#16235828 and Bug#16298542 2013-03-05 16:34:14 +01:00
Balasubramanian Kandasamy
8ac9ee0801 Updated Code for Bug#16235828 2013-03-05 16:16:34 +01:00
Michael Widenius
e2a72fefb4 Fixed issue with LOCK TABLE + ALTER TABLE ENABLE KEYS + SHOW commands.
sql/sql_table.cc:
  Remove version protection from share when repair has been done.
  Without this one can't run SHOW commands on the table if it was locked until it's unlocked.
sql/table.h:
  Allow one to remove version protection with allow_access_to_protected_table()
2013-03-05 00:53:18 +02:00
unknown
9b993fda63 Fix wrong install location for DEB supportfiles. 2013-03-04 12:49:35 +01:00
Igor Babaev
fe6c8d4238 Merge 2013-03-02 14:04:11 -08:00
Igor Babaev
bd305d6b21 Fixed bug mdev-4220.
This bug is a regression bug. The regression was introduced by
the patch for mdev-3851, that tried to weaken the condition when
a ref access with an extended key can be converted to an eq_ref
access. The patch incorrectly formed this condition. As a result,
while improving performance for some queries, the patch caused 
worse performance for another queries.
2013-03-02 12:36:32 -08:00
Vladislav Vaintroub
6c4f41ff32 MDEV-4216 : export additional functions mysql_get_timeout_value(),mysql_get_timeout_value_ms(), mysql_get_socket() from shared client library. They are documented as part of async API.
Also, remove  functions mysql_close_slow_part_start() and mysql_close_slow_part_cont() from exports - they are not documented anywhere.
2013-03-01 20:58:19 +01:00
Daniel Bartholomew
7f47237fb6 Removed the obsolete instructions from the MySQL 5.1 manual. Instead provide a link to https://kb.askmonty.org/en/compiling-mariadb-from-source/ 2013-03-01 11:36:15 -05:00
Michael Widenius
4cace76d4d Automatic merge 2013-03-01 18:09:06 +02:00
Michael Widenius
8ed283d882 Fixed bug MPDEV-628 / LP:989055 - Querying myisam table metadata may corrupt the table.
The issue was that there was that SHOW commands could open the table in the store engine, even in cases
where it should not be allowed to do that (ie, the storage engines meta data for that table was under big changes).

The cases where this should not be allowed are:
- ALTER TABLE DISABLE KEYS
- ALTER TABLE ENABLE KEYS
- REPAIR TABLE
- OPTIMIZE TABLE
- DROP TABLE

This patch adds a new mode, protected_against_usage(). If this is used then the SHOW command will wait until the table
is accessable. This is implemented by re-using the already exising 'version' flag for TABLE_SHARE.
It also added functions to be used to change TABLE_SHARE->version instead of changing it directly.
	


mysql-test/r/myisam-metadata.result:
  Added test case
mysql-test/t/myisam-metadata.test:
  Added test case
sql/mysqld.cc:
  Start from refresh_version 2 as 0 and 1 are reserved.
sql/sql_admin.cc:
  Added MYSQL_OPEN_FOR_REPAIR
  Updated call to wait_while_table_is_used()
sql/sql_base.cc:
  Updated call to wait_while_table_is_used()
  - Allow one to specify how the table should be removed (for all commands except show or for all commands).
  - Don't allow one to reopen the table if one has called share->protect_against_usage()
sql/sql_base.h:
  Added TDC_RT_REMOVE_NOT_OWN_AND_MARK_NOT_USABLE, which is used to mark that no one can reopen this table, except with MYSQL_OPEN_FOR_REPAIR .
  - Added MYSQL_OPEN_FOR_REPAIR
  - Updated prototype for wait_while_table_is_used()
sql/sql_table.cc:
  Updated call to wait_while_table_is_used()
  Use MYSQL_OPEN_FOR_REPAIR for open tables that where repaired.
sql/sql_truncate.cc:
  Updated call to wait_while_table_is_used()
sql/table.cc:
  Use set_refresh_version()
sql/table.h:
  Added functions to be used to change TABLE_SHARE->version instead of changing it directly
2013-03-01 18:01:44 +02:00
unknown
492c3b09d2 Fix compile error when building with DBUG, but without DEBUG_SYNC. 2013-03-01 14:58:19 +01:00
unknown
429e589256 Updated mysql.spec.sh file for br16298542 2013-03-01 14:11:24 +01:00
Marc Alff
3721026182 L0ocal merge 2013-03-01 12:10:09 +01:00
Venkatesh Duggirala
0ebb72b508 BUG#11753923-SQL THREAD CRASHES ON DISK FULL
Fixing post push issue
Simulator name used needs to be changed to make it
work properly.

Analysis: 
Debug control list addition (ListAddDel function
dbug.c file) code was written in such a way that
if new element is subset of already existing element,
then the new element is not added.
i.e., set @@global.debug = '+d,abcd', is existing in
the list then you cannot add "a" or "ab" or "abc"
in the list.
2013-03-01 15:01:32 +05:30
Sergey Petrunya
1a998ee239 Merge 5.3->5.5 2013-03-01 11:44:10 +04:00
Sergey Petrunya
4ad2fd7cdf Fix compile error on windows in fix for mdev-4177. 2013-03-01 08:23:35 +04:00
Igor Babaev
8fb2919e1d Merge 2013-02-28 17:09:56 -08:00
Sergei Golubchik
9d72bbf84c merge with XtraDB as of Percona-Server-5.5.29-rel30.0 2013-02-28 23:56:17 +01:00
Igor Babaev
90c0f3d3ab Fixed bug mdev-4209
Do not include BLOB fields into the key to access the temporary
table created for a materialized view/derived table.
BLOB components are not allowed in keys.
2013-02-28 14:35:46 -08:00
Sergei Golubchik
213f1c76a0 5.3->5.5 merge 2013-02-28 22:47:29 +01:00
Sergei Golubchik
a9f12c27c3 Percona-Server-5.5.29-rel30.0.tar.gz 2013-02-28 22:23:45 +01:00
Sergei Golubchik
c4341d5095 5.2 -> 5.3 2013-02-28 21:48:47 +01:00
Sergei Golubchik
cfa94b4338 revert
revid:georgi.kodinov@oracle.com-20120309130449-82e3bs5v3et1x0ef
  committer: Georgi Kodinov <Georgi.Kodinov@Oracle.com>
  timestamp: Fri 2012-03-09 15:04:49 +0200
  message:
    Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT SAME 
    USER VARIABLE = CRASH
    Moved the preparation of the variables that receive the output from 
    SELECT INTO from execution time (JOIN:execute) to compile time 
    (JOIN::prepare). This ensures that if the same variable is used in the
    SELECT part of SELECT INTO it will be properly marked as non-const
    for this query.
    Test case added.
    Used proper fast iterator.

a better fix (much smaller and without regressions) is coming from 5.1
2013-02-28 20:19:53 +01:00
Sergei Golubchik
5dec570d7c 5.1 -> 5.2 merge 2013-02-28 19:00:58 +01:00
Igor Babaev
0d55ebc05e Fixed a compile error for some platform. 2013-02-28 09:55:35 -08:00
Sergei Golubchik
8161c6772d merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
Michael Widenius
b917fdb9f1 Added test case for bug in replace with replication that existed in MySQL 5.1:
Replace with an auto_increment primary key and another unique key didn't replicate correctly with REPLACE
2013-02-28 16:47:03 +02:00
Jon Olav Hauglid
a4a50271a6 Bug#16385711: HANDLER, CREATE TABLE IF NOT EXISTS,
PROBLEM AFTER MYSQL_HA_FIND

This problem occured if a prepared statement tried to create a table
for which there already existed a view with the same name while a
SQL handler was opened.

Before DDL statements are executed, mysql_ha_rm_tables() is called
to remove any matching tables from the internal list of opened SQL
handler tables. This match was done on TABLE_LIST::db and 
TABLE_LIST::table_name. This is problematic for views (which use
TABLE_LIST::view_db and TABLE_LIST::view_name) and anonymous
derived tables.

This patch fixes the problem by skipping TABLE_LISTs representing
anonymous derived tables and using get_db_name()/get_table_name()
which handles views when looking for SQL handler tables to remove.
2013-02-28 14:52:47 +01:00
unknown
759519034e Updated release number in mysql.spec.sh file for br16298542 2013-02-28 14:49:54 +01:00
unknown
5c22652bab Updated mysql.spec.sh file for br16298542 2013-02-28 14:36:00 +01:00
Marc Alff
99f83c6684 Bug#16414644 ASSERTION FAILED: SIZE == PFS_ALLOCATED_MEMORY
Before this fix, the command
  SHOW ENGINE PERFORMANCE_SCHEMA STATUS
could report wrong amount of memory allocated,
when the amount of memory used exceeds 4GB.

The problem is that size computations are not done using size_t,
so that overflows do occur, truncating the results.

This fix compute memory sizes properly with size_t.

Tested manually.

No test script provided, as the script would need to allocate too much 
memory for the test.
2013-02-28 13:19:15 +01:00