Commit graph

66430 commits

Author SHA1 Message Date
Sergey Petrunya
af3c1dc508 MWL#90: address review feedback: more test coverage 2011-04-05 11:02:49 +04:00
Sergey Petrunya
8fb724281e Merge MWL#90 with main 5.3 tree 2011-04-02 14:09:00 +04:00
Michael Widenius
d5adc29d1c Fixed compiler warnings
sql/key.cc:
  Fixed compiler warnings about not initialized variables
2011-04-01 12:04:59 +03:00
Michael Widenius
ff650ab048 Automatic merge 2011-03-31 18:35:57 +03:00
Michael Widenius
fc5953250b Fixed unlikely reference to freed memory in item->print().
sql/item.cc:
  If a item_ref is referenced by name, we have to reset it's ref in item_ref::cleanup() as the reference may be to a memory that is freed.
  This happens at least when you have 'HAVING MAX()' in a sub query and you execute 'cond_having->print()' which tries to access items before fix fields.
sql/item.h:
  Added 'reference_trough_name' as a marker for Item_ref that needs to have ref reset during cleanup
2011-03-31 18:30:05 +03:00
Michael Widenius
1ee94dc2f7 Fixed all BUILD scripts to use g++ instead of gcc for linking
Fixed memory leak from HEAP tables that was not deleted properly


BUILD/compile-alpha-ccc:
  Use g++ instead of gcc for linking
BUILD/compile-alpha-debug:
  Use g++ instead of gcc for linking
BUILD/compile-pentium-pgcc:
  Use g++ instead of gcc for linking
BUILD/compile-solaris-sparc:
  Use g++ instead of gcc for linking
BUILD/compile-solaris-sparc-debug:
  Use g++ instead of gcc for linking
BUILD/compile-solaris-sparc-purify:
  Use g++ instead of gcc for linking
sql/item.cc:
  Safety fixes for expr_cache
  Call Item_result:field::cleanup() in Item_cache_wrapper::cleanup()
  More DBUG_PRINT
sql/sql_base.cc:
  Simple optimization for setup_wild
  More DBUG_PRINT
sql/sql_expression_cache.cc:
  Added header
  Removed not needed initialization
sql/sql_lex.cc:
  More DBUG_PRINT
sql/sql_select.cc:
  More DBUG_PRINT
  Fixed memory leak from HEAP tables that was not deleted properly
storage/heap/hp_create.c:
  More DBUG_PRINT
2011-03-31 16:26:51 +03:00
Vladislav Vaintroub
f2f5fd36c0 merge LP BUG#68606 2011-03-30 23:34:48 +02:00
Vladislav Vaintroub
1d8cfe3c77 LP686006 : maria recovery tests fail.
All failing cases were attempts to use connection after
the server was brought down and restarted. Connections 
used client reconnect option.

The reason for failures is the behavior of sockets on Windows:
for a short period after crash (short enough to make the error 
not reproducible under debugger), write to socket on client
side would succeed but subsequent read would fail. 

MYSQL_OPT_RECONNECT does not really help in this case ,
because  in the case given here ,as  mysql_real_query() 
(which can handle reconnect option)  succeeds and 
mysql_read_results() (can't handle reconnect) fails.

The fix is adding --include wait_until_connected_again.inc to 
appropriate places in test. This ensures that read errors are 
caught and connection is recreated.
2011-03-30 21:26:31 +02:00
Michael Widenius
6f20e3a385 Fixed problem that fill_record() allocated memory for every call. This could be a problem when doing big unions as memory could be filled up.
sql/sql_base.cc:
  Don't allocate memory in fill_record().
  Fix was to remove the list of tables. This was not necessary as this call is only used with one table.
2011-03-30 19:20:22 +03:00
Sergey Petrunya
b86abed53d MWL#90: Address review feedback part #17 2011-03-30 14:38:38 +04:00
Michael Widenius
309e016eec Fixes to get more information about random bind failure in pushbuild for windows hosts.
mysql-test/mysql-test-run.pl:
  Set port-open-timeout to 10 to retry binds
sql/mysqld.cc:
  Write error number for bind failure. (perror can't do that on windows as errno dosn't contain error code)
2011-03-30 12:15:58 +03:00
unknown
6902770869 Merge the fix for LP BUG#613029. 2011-03-30 00:48:35 +03:00
Vladislav Vaintroub
3273ce6a77 merge 2011-03-29 22:43:35 +02:00
Vladislav Vaintroub
9e5bf5ae0c Suppress ANALYZE_TABLE output, to be consistent with rest of the test case 2011-03-29 20:56:54 +02:00
Vladislav Vaintroub
9e97c1eb06 Fix formatting error message (invalid table name) in handler tests. 2011-03-29 20:37:30 +02:00
Vladislav Vaintroub
2c0e356ae8 fix VS warning about variable 'unused' being used 2011-03-29 19:15:44 +02:00
Vladislav Vaintroub
c0577f6798 Add optional CMake parameter TINY_VERSION.
Parameter setting has the effect on 4th part of the version string in executable's version info on Windows.
It could be set e.g to bzr revno to uniquely identify  different builds for the same major.minor.patch combo.
2011-03-29 19:01:42 +02:00
Sergey Petrunya
dc937fb53b MWL#90: Address review feedback part #16 2011-03-29 14:33:59 +04:00
Sergey Petrunya
c5c48f1cbd MWL#90: Address review feedback part #15 2011-03-29 12:04:16 +04:00
Sergey Petrunya
74bb936db1 optimize_wo_join_buffering(): Put saving/restoring of cur_sj_inner_tables back,
together with explanation why we need it.
2011-03-29 10:08:23 +04:00
Vladislav Vaintroub
7fc2d46a88 null merge 2011-03-28 17:19:40 +02:00
Vladislav Vaintroub
aa8cc81304 merge 2011-03-28 17:17:41 +02:00
Vladislav Vaintroub
45baac71a4 merge 2011-03-28 17:13:41 +02:00
Vladislav Vaintroub
0f51f46034 CMake/code signing:
Use MYSQL_INSTALL_TARGETS() macro for DLLs 
(libmysql and libmysqld) to ensure that libraries
are signed, if signing is requested.
2011-03-28 17:01:40 +02:00
Sergei Golubchik
0741f1a902 lp:702084 - myisam_block_size is not reported in SHOW GLOBAL VARIABLES
add a read-only server variable @@myisam_block_size
2011-03-28 16:53:46 +02:00
Vladislav Vaintroub
262dd32045 merge 2011-03-28 12:57:52 +02:00
Vladislav Vaintroub
90b5afaab6 Sign MSI if code signing is requested.
Remove SIGNCODE_ENABLED variable from create_msi.cmake.in,
it was already removed from other places.
2011-03-28 12:56:34 +02:00
unknown
7999f40a99 Fix LP BUG#613029
Analysis:
There are two code paths through which JOIN::exec may produce
an all-NULL row for an empty result set. One goes via the
function return_zero_rows(), when query processing detectes
early that the where clause is false, the other one is via
do_select() in the case of join execution.

In the case of do_select(), the problem was that the executioner
didn't set TABLE::null_row to 1. As result when sending the only
result row, the evaluation of each field didn't detect that all
non-aggregated fields are NULL, because Field::is_null returned
true, after checking that field->table->null_row was false.

Given that the each non-aggregated field was not considered NULL,
select_result::send_data sent whatever was in the buffer of each
field. However, since there was no actual data in the field buffer,
send_data() accessed and sent whatever junk was in the field's
data buffer.

Solution:
Similar to the analogous case in return_zero_rows() mark all
tables that their current row is NULL before sending the
artificailly created NULL row.
2011-03-28 12:55:36 +03:00
Michael Widenius
b20efbb119 Fixed test failures with embedded server
mysql-test/mysql-test-run.pl:
  Don't set --log-error when running embedded server as we don't want the mysqltest output into mysqld.1.err
sql/mysqld.cc:
  Allow one to disable --log-error
2011-03-28 12:49:20 +03:00
Vladislav Vaintroub
9762b236d4 merge 2011-03-28 02:04:43 +02:00
Vladislav Vaintroub
6058b9ea0a Fix build error (wrong printf-like format) 2011-03-28 02:02:24 +02:00
Vladislav Vaintroub
98a883f6d5 merge 2011-03-28 01:10:55 +02:00
Vladislav Vaintroub
22a8654a6f CMake fixes for buildbot/MSI package building and signing:
- FIND_PROGRAM (signtool) will now get a hint about location of signtool.exe (Windows SDK)
- Targets "package" or "msi" will now fail, l if signing is requested but does not work
  (e.g invalid certificate)
- During install, do not re-sign binaries, if they are already signed.
- Preserve mysqld_error.h timestamp whenever possible. This helps avoiding situations 
where the whole server is rebuilt, whenever comp_err.exe changes (for example after code 
signing, or also after a minor fix in mysys)
- Fix Wix error in UpgradeVersion, if patch part of the version is 0.
2011-03-28 01:05:34 +02:00
Sergey Petrunya
c763fb1b15 MWL#90: Address review feedback in get_best_combination(). 2011-03-27 04:49:31 +04:00
Sergey Petrunya
73510c289a MWL#90: Switch update_depend_map() back to single loop (so that diff is smaller) 2011-03-27 04:02:27 +04:00
Sergey Petrunya
924bdf3e1c Remove comments 2011-03-27 03:55:38 +04:00
Sergey Petrunya
4e5199912b Rename JOIN::top_jtrange_tables to top_join_tab_count 2011-03-27 03:54:15 +04:00
Sergey Petrunya
5de770f317 MWL#90: Address review feedback part #14 2011-03-27 03:45:16 +04:00
Sergey Petrunya
290a72d50b Check the theory that optimize_wo_join_buffering() doesn't need to save/restore join->cur_sj_inner_tables. 2011-03-26 17:39:34 +03:00
Sergey Petrunya
2071ac10fd MWL#90: Address review feedback part #12
- Address review feedback in select_describe().
2011-03-26 12:46:00 +03:00
Vladislav Vaintroub
493a9108ae merge 2011-03-26 00:15:33 +01:00
Sergey Petrunya
bf894470de MWL#90: Address review feedback part #11. 2011-03-25 18:42:47 +03:00
Sergey Petrunya
5ae088f8c1 Fix a problem introduced in previous cset 2011-03-25 17:10:16 +03:00
Sergey Petrunya
886d84d6d1 BUG#727667: Update test results in pbxt test suite 2011-03-25 16:33:17 +03:00
Sergey Petrunya
5a07fcc6c4 MWL#90: Address review feedback part #10. 2011-03-25 14:24:58 +03:00
Sergey Petrunya
253087815a Make first_linear_tab()/next_linear_tab() use named constants instead of TRUE/FALSE flags, for better readability. 2011-03-25 12:58:27 +03:00
Sergey Petrunya
201fb06db9 Merge in fix for BUG#727667 2011-03-25 12:47:44 +03:00
Sergey Petrunya
0fe8c972c6 BUG#727667 Wrong result with OR + NOT NULL in maria-5.3
- Address review feedback: introduce NO_REF_PART symbolic name, better comments
2011-03-25 12:43:32 +03:00
Sergey Petrunya
432a058723 - Fix valgrind failure introduced in previous push 2011-03-25 12:14:02 +03:00
Sergey Petrunya
daf4acc18a MWL#90: Address review feedback: fix a problem introduced a few csets earlier: Do perform tab->cleanup()
for const tables in JOIN::cleanup().
2011-03-24 22:46:10 +03:00