Commit graph

75369 commits

Author SHA1 Message Date
Sergei Golubchik
1a4633059e implement Item_singlerow_subselect::get_date() to avoid
unnecessary date->string->date conversion
2012-05-02 15:23:49 +02:00
Sergei Golubchik
beec2a2b1d MDEV-241 lp:992722 - Server crashes in get_datetime_value
Create an Item_cache based on item's cmp_type, not result_type in 
subselect_engine.

Use result_field in Item_cache_temporal::cache_value(),
just like all other Item_cache*::cache_value() do.
2012-05-02 15:22:47 +02:00
Vladislav Vaintroub
6920491587 merge 2012-05-02 17:04:28 +02:00
Alexey Botchkov
af084bcd78 bug #977021 ST_BUFFER fails with the negative D.
Points and lines should disappear if we got negative D.
  To make it work properly inside the GEOMETRYCOLLECTION,
  we add the empty operation there.

bug #986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int).
  The double->inernal coord conversion produced -0 (minus zero) on some data.
  That minus-zero produces invalid comparison results when compared agains plus-zero.
  So we fixed the gcalc_set_double() to avoid it.

per-file comments:
  mysql-test/r/gis-precise.result
        result updated.
  mysql-test/t/gis-precise.test
        tests for #977021 and #986977 added.
  sql/gcalc_slicescan.cc
        bug #986977. The gcalc_set_double fixed to not produce minus-zero.
  sql/item_geofunc.cc
        bug #977021. Add the NOOP for the disappearing features.
2012-04-29 18:08:11 +05:00
Sergei Golubchik
8cfa6c3f33 MDEV-216 lp:976104 - Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
Don't send_error at the end of mysql_multi_update() if select failed.
The error, if there was any, was already sent by mysql_select
2012-04-26 19:21:37 +02:00
unknown
c04786d3e3 Fix bug lp:985667, MDEV-229
Analysis:

The reason for the wrong result is the interaction between constant
optimization (in this case 1-row table) and subquery optimization.

- First the outer query is optimized, and 'make_join_statistics' finds that
table t2 has one row, reads that row, and marks the whole table as constant.
This also means that all fields of t2 are constant.

- Next, we optimize the subquery in the end of the outer 'make_join_statistics'.
The field 'f2' is considered constant, with value '3'. The subquery predicate
is rewritten as the constant TRUE.

- The outer query execution detects early that the whole query result is empty
and calls 'return_zero_rows'. Since the query is with implicit grouping, we
have to produce one row with special values for the aggregates (depending on
each aggregate function), and NULL values for all non-aggregate fields.  This
function calls 'no_rows_in_result' to set each aggregate function to the
default value when it aggregates over an empty result, and then calls
'send_data', which in turn evaluates each Item in the SELECT list.

- When evaluation reaches the subquery predicate, it executes the subquery
with field 'f2' having a constant value '3', and the subquery produces the
incorrect result '7'.

Solution:

Implement Item::no_rows_in_result for all subquery predicates. In order to
make this work, it is also needed to make all val_* methods of all subquery
predicates respect the Item_subselect::forced_const flag. Otherwise subqueries
are executed anyways, and override the default value set by no_rows_in_result
with whatever result is produced from the subquery evaluation.
2012-04-27 12:59:17 +03:00
Vladislav Vaintroub
feb4776ecf MDEV233 - Support Wix3.6 for MSI 2012-04-25 15:30:19 +02:00
Sergei Golubchik
a37768e11d lp:986120 Problem installing mariadb 5 on solaris 10
remove a redundant line in Makefile.am
2012-04-24 17:29:03 +02:00
Vladislav Vaintroub
76d6549972 merge 2012-04-23 20:37:44 +02:00
Sergei Golubchik
5701d53190 MDEV-207 Install headers required to build external storage plugins
install all private headers in mysql/private/
2012-04-23 09:45:27 +02:00
Vladislav Vaintroub
97aa8e8c0a LPBUG#983285 - incompatibility in frm in case of VIEWs with non-default ALGORITHM option.
As part of derived tables redesign, values for VIEW_ALGORITHM_MERGE and VIEW_ALGORITHM_TMPTABLE have changed from (former values 1 rsp 2 , new values 5 rsp 9).

This lead to the problem that views, created with version 5.2  or earlier would not work in all situations  (e.g "SHOW CREATE VIEW"), or with mysqldump.

The fix is to restore backward compatibility for the from file, and convert algorithm={1,2} in the frm to {5,9} when reading .frm from disk, and store backward compatible values when writing from to disk. 

Also allow processing correct processing for "invalid" .frms created with MariaDB 5.3/5.5 GA releases (where algorithm stored in memory matched the one stored in frm).
2012-04-20 21:09:16 +02:00
unknown
4cae07968c Dependency of tests from ulong size removed. 2012-04-19 17:00:13 +03:00
Alexey Botchkov
d16ea779f8 bug #977021 ST_BUFFER fails with the negative D.
Points and lines should disappear if we got negative D.
  To make it work properly inside the GEOMETRYCOLLECTION,
  we add the empty operation there.

bug #986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int).
  The double->inernal coord conversion produced -0 (minus zero) on some data.
  That minus-zero produces invalid comparison results when compared agains plus-zero.
  So we fixed the gcalc_set_double() to avoid it.

per-file comments:
  mysql-test/r/gis-precise.result
        result updated.
  mysql-test/t/gis-precise.test
        tests for #977021 and #986977 added.
  sql/gcalc_slicescan.cc
        bug #986977. The gcalc_set_double fixed to not produce minus-zero.
  sql/item_geofunc.cc
        bug #977021. Add the NOOP for the disappearing features.
2012-04-29 17:18:38 +05:00
Sergei Golubchik
b6ad03cde9 mdev-202 Overlays do not support nested test suites which exist in MTR 2012-04-21 02:57:28 +02:00
unknown
9997b78ae4 LP BUG#978847 fixed.
Fixed incorrect type casting which made all fields (except very first) changes to materialized table incorrect.
Saved list of view/derived table used items after expanding '*'.
2012-04-19 09:16:30 +03:00
Sergei Golubchik
edfcb97a61 MDEV-220 MariaDB server 5.5 GA candidate has default storage engine MyISAM 2012-04-19 04:02:28 +02:00
Sergey Petrunya
b9bbe4a18b BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
- Part#2: Don't try to construct a LooseScan access on indexes that do not guarantee 
  index-ordered reads.
2012-04-19 05:37:16 +04:00
Sergey Petrunya
994c6db2d1 BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
Part#1: make EXPLAIN's plan match the one by actual execution: 
Item_subselect::used_tables() should return the same value irrespectively 
of whether we're running an EXPLAIN or a SELECT.
2012-04-19 04:50:32 +04:00
Sergei Golubchik
5f68269abe MDEV-217 - Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init on OPTIMIZE two tables when replaced by recreate
call thd_progress_end() in the copy_data_between_tables(), to match its
thd_progress_init().
2012-04-18 20:48:14 +02:00
Sergei Golubchik
ed4ead3a98 lp:982664 there are few broken clients that lie about their capabilities
(for example, one of them sets client capabilities by copying server capabilities)

We cannot fix them - let's tolerate them
2012-04-18 20:04:50 +02:00
Sergei Golubchik
6e827f3455 mdev-224 plugin usage statistics in the feedback reports 2012-04-18 04:00:08 +02:00
Sergei Golubchik
415507d392 add a space between safemalloc error mesage and a stack trace 2012-04-18 03:29:26 +02:00
Sergei Golubchik
e3650f3799 fix information_schema_all_engines test to pass both with ha_xtradb.so and libxtradb.a 2012-04-18 03:29:13 +02:00
Sergei Golubchik
88d29f5caa update @@have_innodb variable when innodb plugin is uninstalled 2012-04-17 20:30:19 +02:00
Sergei Golubchik
2c42bd2236 better fix for string plugin variables pointing into argv[]
for a plugin installed run-time
2012-04-17 20:29:43 +02:00
Sergei Golubchik
1c879717ec bugfix: mysqld failed to start if a compiled-in plugin failed to initialize
(--xxx=ON behaving as --xxx=FORCE)
2012-04-17 20:28:21 +02:00
Sergei Golubchik
580eca69ae typo fixed: space in the status variable name 2012-04-17 20:25:03 +02:00
Sergei Golubchik
81e3e7d4a2 bug fix: I_S plugins were not locked when used 2012-04-17 14:25:08 +02:00
Vladislav Vaintroub
e13e93cb0b merge 2012-04-17 01:03:10 +02:00
Vladislav Vaintroub
2004bd1736 merge 2012-04-16 23:35:38 +02:00
Vladislav Vaintroub
806df88cc6 merge 2012-04-16 23:32:50 +02:00
Vladislav Vaintroub
5af60b5ed4 fix compiler warnings 2012-04-16 23:31:33 +02:00
Vladislav Vaintroub
85f7acf631 backport a change from 5.5 to remove thread sleeps from Innodb assertions on Windows.
This can result in bad deadlocks (e.g loader lock), seen in latest crash reports.
2012-04-16 23:31:02 +02:00
Vladislav Vaintroub
6d22c2e73a merge 2012-04-16 17:41:43 +02:00
Vladislav Vaintroub
dbb744a3bf merge 2012-04-16 15:38:53 +02:00
Vladislav Vaintroub
4da30b3e3d MDEV-221 - Properly escape command line when starting mysql_install_db
since password characters can contain quotes or spaces.

The proper quoting method for command line arguments used here was  extracted from
http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

Additionally, mysql_install_db.exe now passes root password to "mysqld.exe --bootstrap"
 in hexadecimal form, to handle potential special chars inside password string literal.
2012-04-16 15:28:33 +02:00
Vladislav Vaintroub
296167d6d2 fix compile error on unixes 2012-04-15 01:54:28 +02:00
Vladislav Vaintroub
0a2afb7259 exclude cmake generated files from mysql-test installation (applies only for in-source builds) 2012-04-15 01:41:03 +02:00
Vladislav Vaintroub
8bf7aae23e fix application verifier crashes 2012-04-15 01:40:00 +02:00
Vladislav Vaintroub
87b6f24106 Use test/db.opt as dummy file in the package, instead of test/.empty
Also, do not package aria log files in the zip package- not required for the database to function, 
also will avoid trouble with recovery, if someone  accidentially (or on purpose) upgrades by unpacking the zip in the existing install directory.
2012-04-15 01:29:17 +02:00
Vladislav Vaintroub
f18514df2e Add minimal clarication about 'root' user to the installer UI 2012-04-15 01:21:18 +02:00
Vladislav Vaintroub
742ccf7a47 MDEV-221 : Fix potential memory access past the end of input string in filename_to_tablename() 2012-04-15 01:19:39 +02:00
Vladislav Vaintroub
2451628923 Fixed some simple warnings on Windows. 2012-04-13 19:44:22 +02:00
Tor Didriksen
83d455be90 Bug#13871079 RQG_MYISAM_DML_ALTER_VALGRIND FAILS ON VALGRIND PN PB2
The class Copy_field contains a String tmp, 
which may allocate memory on the heap.
That means that all instances of Copy_field
must be properly destroyed. Alas they are not.

Solution: don't use Copy_field::tmp for copying
from_field => tmp => to_field
in do_field_string()


sql/field.cc:
  In Field_set::val_str
  return empty string (of appropriate character set) for an empty set.
sql/field.h:
  New private member in Field_enum: empty_set_string.
sql/field_conv.cc:
  In do_field_string, use an auto variable for copying
  from_field => tmp => to_field
  rather than copy->tmp.
2012-04-12 15:04:22 +02:00
Georgi Kodinov
a84ca72224 merge mysql-5.5->mysql-5.5-security 2012-04-12 14:04:12 +03:00
Sujatha Sivakumar
64e74d484f BUG#12662190:COM_COMMIT IS NOT INCREMENTED FROM THE BINARY LOGS ON SLAVE, COM_BEGIN IS
PROBLEM:

--------

When binary log statements are replayed on the slave, BEGIN is represented

in com_counters but COMMIT is not. Similarly in 'ROW' based replication

'INSERT','UPDATE',and 'DELETE' com_counters are not getting incremented

when the binary log statements are replayed at slave.

ANALYSIS:
---------

In 'ROW' based replication for COMMIT,INSERT,UPDATE and DELETE operations
following special events are invoked.
Xid_log_event,Write_rows_log_event,Update_rows_log_event,Update_rows_log_event.

The above mentioned events doesn't go through the parser where the
'COM_COUNTERS' are incremented.


FIX:
-----
Increment statements are added at appropriate events.
Respective functions are listed below.

'Xid_log_event::do_apply_event'
'Write_rows_log_event::do_before_row_operations'
'Update_rows_log_event::do_before_row_operations'
'Delete_rows_log_event::do_before_row_operations' 

sql/log_event.cc:
  Added code to increment counts for 'COM_INSERT','COM_UPDATE',
  'COM_DELETE' and 'COM_COMMIT'during ROW based replicaiton
2012-04-12 11:07:39 +05:30
Vladislav Vaintroub
85a025f30c Threadpool - use EV_ONESHOT with kevent, to prevent race condition when 2
threads are retrieving events at the same time.
2012-04-12 01:40:44 +02:00
Vladislav Vaintroub
f544b21fcb Fix build on OSX
- Workaround linker bug that prevents linking aria test executables
   using -fno-common on OSX
- Skip system readline detection (OSX readline is incompatible one)
- Make Xcode generator work
2012-04-12 01:33:43 +02:00
unknown
99b18a036c Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
TABLES IN INCORRECT ENGINE

PROBLEM:
  CREATE/ALTER TABLE currently can move system tables like
mysql.db, user, host etc, to engines other than MyISAM. This is not
completely supported as of now, by mysqld. When some of system tables
like plugin, servers, event, func, *_priv, time_zone* are moved
to innodb, mysqld restart crashes. Currently system tables
can be moved to BLACKHOLE also!!!.

ANALYSIS:
  The problem is that there is no check before creating or moving
a system table to some particular engine.

  System tables are suppose to be residing in MyISAM. We can think
of restricting system tables to exist only in MyISAM. But, there could
be future needs of these system tables to be part of other engines
by design. For eg, NDB cluster expects some tables to be on innodb
or ndb engine. This calls for a solution, by which system
tables can be supported by any desired engine, with minimal effort.

FIX:
  The solution provides a handlerton interface using which,
mysqld server can query particular storage engine handlerton for
system tables that it supports. This way each storage engine
layer can define their own system database and system tables.

  The check_engine() function uses the new handlerton function
ha_check_if_supported_system_table() to check if db.tablename
provided in the DDL is supported by the SE.

Note: This fix has modified a test in help.test, which was moving
mysql.help_* to innodb. The primary intention of the test was not
to move them between engines.
2012-04-11 15:53:17 +05:30
Georgi Kodinov
1242176261 empty weave merge mysql-5.1-security->mysql-5.5-security 2012-04-10 14:46:21 +03:00