Commit graph

75813 commits

Author SHA1 Message Date
Michael Widenius
a1bc393630 Fixed MDEV-366: Assertion `share->reopen == 1' failed in maria_extra on DROP TABLE which is locked twice
mysql-test/suite/maria/lock.result:
  Added test case
mysql-test/suite/maria/lock.test:
  Added test case
sql/sql_table.cc:
  One can't call HA_EXTRA_FORCE_REOPEN on something that may be opened twice.
  It's safe to remove the call in this case as we will call HA_EXTRA_PREPARE_FOR_DROP for the table anyway.
  (One nice side effect is that drop is a bit faster as we are not flushing the cache to disk before the drop anymore)
2012-08-15 14:37:55 +03:00
Michael Widenius
fbe5ac4e24 Fixed MDEV-365 "Got assertion when doing alter table on a partition"
mysql-test/r/partition.result:
  Added test case
mysql-test/t/partition.test:
  Added test case
sql/sql_partition.cc:
  Do mysql_trans_prepare_alter_copy_data() after all original tables are locked.
  (We don't want to disable transactions for the original tables, that still may be in the cache)
sql/sql_table.cc:
  Fixed two wrong DBUG_ENTER
2012-08-15 13:33:37 +03:00
Michael Widenius
9c1cc61caf automatic merge 2012-08-15 12:07:21 +03:00
Michael Widenius
dd8bd2e4c3 Fixed compiler warnings
sql/item_subselect.cc:
  Added purecov info
sql/sql_select.cc:
  Added cast
storage/innobase/handler/ha_innodb.cc:
  Added cast
storage/xtradb/btr/btr0btr.c:
  Added buf_block_get_frame_fast() to avoid compiler warning
storage/xtradb/handler/ha_innodb.cc:
  Added cast
storage/xtradb/include/buf0buf.h:
  Innodb has buf_block_get_frame(block) defined as (block)->frame.
  Didn't want to do a big change to break xtradb as it may use block_get_frame() differently, so I mad this quick hack to patch one compiler warning.
2012-08-15 09:34:18 +03:00
Igor Babaev
fbee9f5b6e Corrected the pactch for mdev-449 to fix valgrind failures. 2012-08-14 14:25:56 -07:00
Michael Widenius
b886cac712 Fixed compiler errors
Updated test to also work on 32 bit

mysql-test/suite/heap/heap.test:
  Updated test to also work on 32 bit
2012-08-14 19:59:28 +03:00
unknown
47929af5e0 MDEV-450: Deadlock between starting a slave and reading system variables
Starting the SQL thread might deadlock with reading the values of the
replication filtering options.

The deadlock is due to a lock order violation when the variables are
read or set. For example, reading replicate_ignore_table first
acquires LOCK_global_system_variables in sys_var::value_ptr and later
acquires LOCK_active_mi in Sys_var_rpl_filter::global_value_ptr. This
violates the order established when starting a SQL thread, where
LOCK_active_mi is acquired before start_slave, and ends up creating a
thread (handle_slave_sql) that allocates a THD handle whose
constructor acquires LOCK_global_system_variables in THD::init.

The solution is to unlock LOCK_global_system_variables before the
replication filtering options are set or read. This way the lock
order is preserved and the data being read/set is still protected
given that it acquires LOCK_active_mi.
2012-08-14 12:40:40 +02:00
Igor Babaev
d07b179fd2 Fixed bug mdev-449.
The bug could caused a crash when the server executed a query with
ORDER by and sort_buffer_size was set to a small enough number.
It happened because the small sort buffer did not allow to allocate
all merge buffers in it.
Made sure that the allocated sort buffer would be big enough
to contain all possible merge buffers.
2012-08-13 21:13:14 -07:00
Michael Widenius
c0f04fa31c Automatic merge 2012-08-13 23:45:16 +03:00
Michael Widenius
cee888acb3 Fixed compiler warnings (A few of these was bugs)
client/mysqldump.c:
  Slave needs to be initialized with 0
dbug/dbug.c:
  Removed not existing function
plugin/semisync/semisync_master.cc:
  Fixed compiler warning
sql/opt_range.cc:
  thd needs to be set early as it's used in some error conditions.
sql/sql_table.cc:
  Changed to use uchar* to make array indexing portable
storage/innobase/handler/ha_innodb.cc:
  Removed not used variable
storage/maria/ma_delete.c:
  Fixed compiler warning
storage/maria/ma_write.c:
  Fixed compiler warning
2012-08-13 22:23:28 +03:00
Sergei Golubchik
ecc03af931 MDEV-364 Server crashes in add_identifier on concurrent ALTER TABLE and SHOW ENGINE INNODB STATUS
fix add_identifier() to distinguish between temporary tables (#sql- prefix) and temporary partitions (#TMP# suffix).
change add_identifier() to use the same name variant constants as sql_partition.cc does.
2012-08-13 11:14:43 +02:00
Sergei Golubchik
9ed96f5f86 MDEV-286 mytop is not installed in 5.5
include mytop in bintars, rpms, and debs.
install mysqlbug.1 too.
2012-08-13 09:21:47 +02:00
Sergei Golubchik
c9b95de246 MDEV-336 oqgraph 5.5 crashes in buildbot
compile oqgraph with -fno-strict-aliasing
2012-08-11 10:31:10 +02:00
Sergei Golubchik
16c763098a compiler warnings 2012-08-10 13:48:31 +02:00
Sergei Golubchik
7cc2f8deca fix val_str_ascii to return a string in the ascii-compatible charset.
two items didn't do that properly, one was exploitable, the other was not, but fixed anyway.
2012-08-09 18:25:47 +02:00
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Michael Widenius
1aa6f042da Better test case for MDEV-436 2012-08-08 18:04:57 +03:00
Sergei Golubchik
704898bf32 undo the fix for MySQL Bug#12998841 2012-08-08 12:32:34 +02:00
Sergei Golubchik
e022b6ef07 MDEV-392 MTR: skip-combinations option is declared in help, but is ignored
remove unused mtr option
2012-08-08 12:08:54 +02:00
Michael Widenius
f2d7609ac0 Use less memory when growing HEAP tables. See MDEV-436
mysql-test/suite/heap/heap.result:
  Added test case for MDEV-436
mysql-test/suite/heap/heap.test:
  Added test case for MDEV-436
storage/heap/hp_block.c:
  Don't allocate a set of HP_PTRS when not needed. This saves us about 1024 bytes for most allocations.
storage/heap/hp_create.c:
  Made the initial allocation of block sizes depending on min_records and max_records.
2012-08-07 01:58:05 +03:00
Michael Widenius
a7123f5075 Fixed compiler warnings
sql/log.h:
  Fixed compiler warnings reported for gcc 2.7.1
storage/xtradb/handler/ha_innodb.cc:
  Remove not used variables
2012-08-06 16:33:11 +03:00
Elena Stepanova
4f3674c8c0 MDEV-369 (Mismatches in MySQL engines test suite)
Following reasons caused mismatches:
  - different handling of invalid values;
  - different CAST results with fractional seconds;
  - microseconds support in MariaDB;
  - different algorithm of comparing temporal values;
  - differences in error and warning texts and codes;
  - different approach to truncating datetime values to time;
  - additional collations;
  - different record order for queries without ORDER BY;
  - MySQL bug#66034.
More details in MDEV-369 comments.
2012-08-02 00:58:13 +04:00
Sergei Golubchik
6ed4a283fd MDEV-399 Combinations defined in the base suite cannot be skipped by overlay
When appliying parent combinations to the overlay,
filter them through the %skip_combinations using the overlayed filename
2012-08-01 19:57:36 +02:00
Vladislav Vaintroub
bd39599668 fix oqgraph on MSVC 2012-08-02 23:17:27 +02:00
Elena Stepanova
b69e8d46b6 MDEV-369: Mismatches in MySQL engines test suite
Post-merge fixes for mismatches that only affect 5.5 (but not 5.3)
2012-08-02 04:48:33 +04:00
Elena Stepanova
f2b4305bd4 Merge 5.3->5.5 2012-08-02 04:22:43 +04:00
Sergei Golubchik
6d4acc43e5 MDEV-336 oqgraph 5.5 crashes in buildbot
make CMakeLists.txt to detect if the installed boost can be compiled with the
installed compile and specified set of compiler options.

Background: even sufficiently new Boost cannot be compiled with the sufficiently old gcc
in the presence of -fno-rtti
2012-07-31 22:39:33 +02:00
Sergei Golubchik
0117a92fed MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake
remove dead code and unused HAVE_xxx constants from the sources
2012-07-31 19:29:07 +02:00
Sergei Golubchik
42ea25d4c5 MDEV-375 Server crashes in THD::print_aborted_warning with log_warnings > 3
Don't use ER(xxx) in THD::close_connection(), when current_thd is already reset to NULL.
Prefer ER_THD() or ER_DEFAULT() instead.
2012-07-31 18:32:46 +02:00
Alexey Botchkov
9705ad5e33 MDEV-340 Save replication comments for DROP TABLE.
mysql_rm_table_no_locks() function was modified.
      When we construct log record for the DROP TABLE, now we
      look if there's a comment before the first table name and
      add it to the record if so.
  
per-file comments:
  sql/sql_table.cc
  MDEV-340 Save replication comments for DROP TABLE.
        comment_length() function implemented to find comments in the query,
        call it in mysql_rm_table_no_locks() and use the result to form log record.
  mysql-test/suite/binlog/r/binlog_drop_if_exists.result
  MDEV-340 Save replication comments for DROP TABLE.
        test result updated.
  mysql-test/suite/binlog/t/binlog_drop_if_exists.test
  MDEV-340 Save replication comments for DROP TABLE.
        test case added.
2012-07-31 16:21:53 +05:00
Sergei Golubchik
7368ef56c6 MDEV-418 Feedback plugin statisics problem
Add the check for sys/utsname.h to configure.cmake
2012-07-31 11:31:26 +02:00
Vladislav Vaintroub
257fd9d3d9 MDEV-417 - fix typo that prevented use of atomic instructions on Windows
use correct macro for Microsoft compiler. It is _MSC_VER , not _MSV_VER
2012-07-30 20:13:23 +02:00
Elena Stepanova
d1a90e852b MDEV-369 (Mismatches in MySQL engines test suite)
Following reasons caused mismatches:
  - different handling of invalid values;
  - different CAST results with fractional seconds;
  - microseconds support in MariaDB;
  - different algorithm of comparing temporal values;
  - differences in error and warning texts and codes;
  - different approach to truncating datetime values to time;
  - additional collations;
  - different record order for queries without ORDER BY;
  - MySQL bug#66034.
More details in MDEV-369 comments.
2012-07-30 04:16:49 +04:00
Elena Stepanova
3ca3b44dbb Result files were wrong due to MySQL bug#66034 2012-07-26 23:31:08 +04:00
Sergey Petrunya
55597a4869 MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used
- Make Item_subselect::fix_fields() ignore UNCACHEABLE_EXPLAIN flag when deciding whether 
  the subquery item should be marked as constant.
2012-07-25 20:41:48 +04:00
unknown
a742d49c90 Awoiding registering partiton engine underlying tables whan it has no sens. 2012-07-24 17:50:06 +03:00
Vladislav Vaintroub
13f6783f75 MDEV-409 : /etc/my.cnf config file overwritten during RPM installation
Fix : use attribute %config(noreplace)  for /etc/my.cnf , instead of (automatically generated) %config
2012-07-23 23:54:57 +02:00
Axel Schwenke
cb4bf95214 merged in MDEV-11 "Generic storage engine test suite"
see https://mariadb.atlassian.net/browse/MDEV-11
2012-07-19 13:24:24 +02:00
Axel Schwenke
1b1b36ab3e merged with maria/5.5 2012-07-19 13:21:53 +02:00
Sergey Petrunya
79c4b4e440 Merge 5.3->5.5 2012-07-18 22:40:15 +04:00
Sergey Petrunya
33e961c1ab Merge bug#1007622 from 5.3 to 5.5 2012-07-18 22:36:20 +04:00
Sergey Petrunya
7e6bec87c1 MDEV-398: Sergv related to spacial queries
- index_merge/intersection is unable to work on GIS indexes, because:
  1. index scans have no Rowid-Ordered-Retrieval property
  2. When one does an index-only read over a GIS index, they do not 
     get the index tuple, because index only contains bounding box of the geometry.
     This is why key_copy() call crashed.
This patch fixes #1, which makes the problem go away. Theoretically, it would 
be nice to check #2, too, but SE API semantics is not sufficiently precise to do it.
2012-07-18 15:03:05 +04:00
unknown
82f821ee8f fix to satisfy compiler. 2012-07-16 10:48:03 +03:00
Elena Stepanova
72a5542f0e MDEV-11: Generic storage engine test suite 2012-07-16 06:17:56 +04:00
Elena Stepanova
403cac0fe7 Allow multiple error codes inside a variable in --error command 2012-07-16 06:14:53 +04:00
Elena Stepanova
49da8e7e21 Export sys_errno and errno to variables 2012-07-16 06:12:11 +04:00
unknown
9f6a1c5842 fixed MySQL bug#53775:
Now partition engine adds underlying tables to the QC and ask underlying tables engine permittion to cache the query and return result of the query.

Incorrect QC cleanup in case of table registration failure fixe.

Unified interface for myisammrg & partitioned engnes for QC.
2012-07-13 22:17:32 +03:00
Vladislav Vaintroub
718bbcbfd0 MDEV-393. Remove --loose-pbxt=OFF/loose-skip-pbxt from bootstrapper calls to avoid "unknown parameter" warning 2012-07-12 15:32:35 +02:00
Bjorn Munch
1713550775 Merge unpushed changes from 5.1.64-release 2012-07-12 10:00:14 +02:00
Sergei Golubchik
a08631d696 lp:1023404 problems with savepoints and tokudb with 5.5
fix incorrect merge
2012-07-11 16:19:05 +02:00