Commit graph

104 commits

Author SHA1 Message Date
Michael Widenius
165eb1186c Added extra argument to longlong2str() to make it have same prototype is int2str()
Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.

client/mysqltest.cc:
  longlong2str() -> longlong10_to_str()
include/m_string.h:
  Added extra argument to longlong2str() to make it have same prototype is int2str()
mysys/charset.c:
  Fixed compiler warning
mysys/mf_soundex.c:
  Fixed compiler warning
mysys/my_getopt.c:
  longlong2str() -> longlong10_to_str()
sql/create_options.cc:
  Fixed compiler warning
sql/item_strfunc.cc:
  Added extra argument to longlong2str
sql/opt_range.cc:
  longlong2str() -> longlong10_to_str()
sql/partition_info.cc:
  longlong2str() -> longlong10_to_str()
sql/slave.cc:
  longlong2str() -> longlong10_to_str()
sql/sql_bitmap.h:
  Added extra argument to longlong2str
sql/sql_partition.cc:
  Added extra argument to longlong2str
sql/sql_select.cc:
  longlong2str() -> longlong10_to_str()
sql/sql_show.cc:
  Added extra argument to longlong2str
storage/innodb_plugin/handler/ha_innodb.cc:
  Update to new parameters for longlong2str()
storage/maria/ma_dbug.c:
  longlong2str() -> longlong10_to_str()
storage/maria/maria_chk.c:
  Added extra argument to longlong2str
storage/myisam/mi_dbug.c:
  longlong2str() -> longlong10_to_str()
storage/myisam/myisamchk.c:
  Added extra argument to longlong2str
storage/xtradb/handler/ha_innodb.cc:
  Update to new parameters for longlong2str()
strings/longlong2str.c:
  Added extra argument to longlong2str() to make it have same prototype is int2str()
strings/my_vsnprintf.c:
  Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
  Added cast to get rid of compiler warnings
2010-08-07 15:27:23 +03:00
Michael Widenius
d042146e5b Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
2010-08-05 22:56:11 +03:00
Michael Widenius
e0a6b02c5d Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
2010-08-02 12:01:24 +03:00
unknown
2be1a25faa Automerge MariaDB 5.1->5.2. 2010-07-09 13:39:19 +02:00
Michael Widenius
5a2f40d48a Fixes for Opensolaris (to get buildbot green)
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris


client/mysqldump.c:
  Fixed memory leaks
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
  Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
  Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
  Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
  (OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
  This did speed up logging to cvs with a magnitude for large strings.
2010-06-23 03:48:11 +03:00
Sergei Golubchik
9b48499dc4 merged 2010-06-16 12:58:56 +02:00
Sergei Golubchik
b89384194d mysqltest: use setenv, not putenv, to make gcov happy.
(backport from MySQL)
2010-06-14 11:18:54 +02:00
Michael Widenius
ec281a3c34 Fixed some bugs in the Maria storage engine
- Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
- Fixed a rase condition when two threads calls external_lock and thr_lock() in different order. When this happend the transaction that called external lock first
  and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
- Fixed that one can run maria_chk on an automatcally recovered tables without warnings about too small transaction id
- Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
- Fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.

client/mysqldump.c:
  Add "" around error message to make it more readable
client/mysqltest.cc:
  Free environment variables
mysql-test/r/mysqldump.result:
  Updated results
mysql-test/r/openssl_1.result:
  Updated results
mysql-test/suite/maria/r/maria-recover.result:
  Updated results
mysql-test/suite/maria/r/maria3.result:
  Updated results
mysql-test/suite/maria/t/maria3.test:
  Added more test of temporary tables
storage/maria/ha_maria.cc:
  Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
  Start transaction in ma_block_get_status() instead of in ha_maria::external_lock().
  - This fixes a rase condition when two threads calls external lock and thr_lock() in different order. When this happend the transaction that called external lock first and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
  Store latest transaction id in controll file if recovery was done.
  - This allows one to run maria_chk on an automatcally recovered tables without warnings about too small transaction id
storage/maria/ha_maria.h:
  Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
storage/maria/ma_blockrec.h:
  Added new function "_ma_block_get_status_no_versioning()"
storage/maria/ma_init.c:
  Added hook to create trn in ma_block_get_status() if we are using MariaDB
storage/maria/ma_open.c:
  Ensure we call _ma_block_get_status_no_versioning() for transactional tables without versioning (like tables with fulltext)
storage/maria/ma_pagecache.c:
  Allow one to flush blocks that are pinned for read.
  This fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.
storage/maria/ma_recovery.c:
  Set maria_recovery_changed_data to 1 if recover changed something.
  Set max_trid_in_control_file to max found trn if we found a bigger trn.
  The allows will ensure that the control file is up to date after recovery which allows one to run maria_chk on the tables without warnings about too big trn
storage/maria/ma_state.c:
  Call maria_create_trn_hook() in _ma_setup_live_state() instead of ha_maria::external_lock()
  This ensures that 'state' and trn are in sync and thus fixes the race condition mentioned for ha_maria.cc
storage/maria/ma_static.c:
  Added maria_create_trn_hook() and maria_recovery_changed_data
storage/maria/maria_def.h:
  Added MARIA_HANDLER->external_ptr, which is used to hold MariaDB thd.
  Added some new external variables
  Removed reference to non existing function: maria_concurrent_inserts()
2010-06-14 01:13:32 +03:00
Davi Arnaut
6f3a540c37 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.

client/mysql.cc:
  Remove now-unnecessary casts.
  Break up large strings.
client/mysql_upgrade.c:
  Remove now-unnecessary casts.
client/mysqladmin.cc:
  Remove now-unnecessary casts.
  Break up large strings.
client/mysqlbinlog.cc:
  Remove now-unnecessary casts.
client/mysqlcheck.c:
  Remove now-unnecessary casts.
client/mysqldump.c:
  Remove now-unnecessary casts.
client/mysqlimport.c:
  Remove now-unnecessary casts.
client/mysqlshow.c:
  Remove now-unnecessary casts.
client/mysqlslap.c:
  Remove now-unnecessary casts.
client/mysqltest.cc:
  Remove now-unnecessary casts.
extra/comp_err.c:
  Remove now-unnecessary casts.
extra/my_print_defaults.c:
  Remove now-unnecessary casts.
  Break up large strings.
extra/mysql_waitpid.c:
  Remove now-unnecessary casts.
extra/perror.c:
  Remove now-unnecessary casts.
extra/resolve_stack_dump.c:
  Remove now-unnecessary casts.
extra/resolveip.c:
  Remove now-unnecessary casts.
include/my_getopt.h:
  Use a void pointer type as the opaque type to avoid problems with type
  incompatibility -- GCC issues warnings when the type name is not type
  compatible with a operand. As a side bonus, a explicit cast won't be
  necessary anymore.
include/sslopt-longopts.h:
  Remove now-unnecessary casts.
  Break up large strings.
mysys/my_getopt.c:
  Update opaque type and introduce a type definition for the
  argument to my_getopt_register_get_addr.
server-tools/instance-manager/options.cc:
  Remove now-unnecessary casts.
sql/mysqld.cc:
  Remove now-unnecessary casts.
  Break up large strings.
  Update mysql_getopt_value prototype (the old prototype
  was different from the definition anyway).
sql/sql_plugin.cc:
  The type of a pointer to a function must be compatible with the
  pointed-to function type, otherwise the behavior is undefined.
sql/table.cc:
  The variable buf pointer to pointer to pointer to constant char
  could improperly alias a incompatible type in call to fix_type_
  pointers. Since this was actually dead code, it is simply removed.
sql/unireg.cc:
  Remove call to get_form_pos. The code creates a new FRM file which
  is always truncated and writes the form position as 0. Hence, no
  need to retrieve it, we now for sure it is 0.
storage/archive/archive_reader.c:
  Remove now-unnecessary casts.
storage/myisam/ft_nlq_search.c:
  Read weight directly from the buffer.
storage/myisam/fulltext.h:
  Add explanation about the type duality of a key buffer.
  Add accessor macro to retrieve a FT float value.
storage/myisam/mi_test1.c:
  Remove now-unnecessary casts.
storage/myisam/myisam_ftdump.c:
  Read weight directly from the buffer.
storage/myisam/myisamchk.c:
  Remove now-unnecessary casts.
storage/myisam/myisamlog.c:
  A pointer to char was used to alias a pointer to pointer to
  unsigned char, thus violating strict aliasing rules.
storage/myisam/myisampack.c:
  Remove now-unnecessary casts.
strings/decimal.c:
  Remove aliasing violation, printing the value is enough for
  debugging purposes.
tests/mysql_client_test.c:
  Remove now-unnecessary casts.
2010-06-10 17:16:43 -03:00
Sergei Golubchik
ffc8f62b08 merge 5.1->5.2 2010-06-01 21:52:20 +02:00
unknown
b1e00b6be8 Merge MySQL 5.1.46 into MariaDB.
Still two test failures to be solved: main.myisam and main.subselect.
2010-04-28 14:52:24 +02:00
Davi Arnaut
d585322474 Bug#37316: Anonymous error messages noticed sometimes, while running tests in MTR
The problem was that mysqltest could attempt to execute a
SHOW WARNINGS statement through a connection that was not
properly reaped, thus violating its own rules.

The solution is to skip SHOW WARNINGS if a connection has
not been properly repeaed.

client/mysqltest.cc:
  Skip SHOW WARNINGS if connection hasn't been reaped.
2010-03-08 11:30:20 -03:00
Sergei Golubchik
eb30bb8579 bugfix: change_user should only take the password
of the previous user if it takes the username too.
otherwise it can never change to a passwordless account
2010-02-19 09:08:05 +01:00
Bjorn Munch
ac0d9be196 merge from 5.1-mtr 2010-02-22 14:52:11 +01:00
Bjorn Munch
90c3ace052 Bug #51135 Please increase the maximum number of connections allowed in mysqltest
Added --max-connections= argument to mysqltest and mtr
Small fix to first patch: forgot to check before free'ing connections array
2010-02-17 16:28:02 +01:00
Bjorn Munch
0ad9a5992d Bug #50618 Please allow 'sleep $variable' in mtr
Made mtr's sleep function understand $variables
A few fixes since previous patch, added tests
2010-02-09 18:13:57 +01:00
Bjorn Munch
01c0d46af8 Bug #39774 mysql-test-run's remove_file can't use wildcards, this should be documented
Added remove_files_wildcard that allows to remove multiple files at once.
This is a port of original patch to Windows.
2010-02-04 13:15:42 +01:00
Michael Widenius
a041747567 Fixed compiler warnings & failing test cases
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap

client/mysqltest.cc:
  Fixed compiler warning
mysql-test/t/partition_innodb_semi_consistent.test:
  Added missing --reap (fixes random failure)
sql/net_serv.cc:
  When compiling with debug, don't clear buffer in 'net_clear()'
  - This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
storage/myisam/ft_boolean_search.c:
  Fixed compiler warnings
storage/myisam/ft_parser.c:
  Fixed compiler warnings
storage/myisam/ft_stopwords.c:
  Fixed compiler warnings
support-files/compiler_warnings.supp:
  Added a lot of new suppression of not relevant warnings and warnings in systems we are not in charge of
unittest/mysys/waiting_threads-t.c:
  Fixed compiler warnings
2010-01-28 16:49:14 +02:00
Bjorn Munch
84616df3ff merge 49837 2010-01-20 14:23:57 +01:00
Bjorn Munch
87ff57cb7e merge 48888 2010-01-20 14:22:34 +01:00
Bjorn Munch
94ccc34537 Bug #49878 delimiter under false 'if' makes mysqltest test fail with 'Missing end of block'
delimiter not executed so does not recognize end of block
Always execute delimiter command, revert after false if() block.
2010-01-20 14:18:27 +01:00
Bernd Ocklin
75e9a54a53 exporting server version and other as env var (bug#50471) 2010-01-20 12:54:55 +01:00
Bjorn Munch
b554f4c52d Bug #48888 mysqltest crashes on --replace_result if 'from' is longer than ~1024 symbols
valgrind pointed to a buffer allocated by my_realloc which looked fishy
Replaced size with what was probably intended, added test case.
Now also fixed line after review comment
2010-01-20 12:52:35 +01:00
Bjorn Munch
5ae2eda776 Bug #49837 mysqltest exec cannot handle multi-line command correctly
Since the exec command line is passed on externally, it cannot take newlines
Simply replace \n with space
Now also added test case
2010-01-20 12:51:18 +01:00
Bjorn Munch
e1b42965a5 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'
Undid amendment allowing pending reap after switching connections
Moved check for pending reap earlier; failed if running with ps-protocol
2010-01-07 11:22:45 +01:00
Bjorn Munch
ed64190b23 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'
Small amendment: ignore pending reap when switching connection, add test
2010-01-06 12:56:22 +01:00
Bjorn Munch
08c8863ec4 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'
Set a flag after send to trap the case
2010-01-06 09:45:28 +01:00
Bjorn Munch
5b66dab00f Bug #48863 mysql test: enable and disable case insensitive compare mode
Implemented --lowercase_result which lower cases next result
2010-01-06 09:42:21 +01:00
Michael Widenius
85d78b62cc Fix test suite so that it works when doing configure --without-uca
Simplify testing of needed characterset
Remove ndb from --with-plugins=max build
mysqlbug now sends email to maria-developers@lists.launchpad.net

client/mysqltest.cc:
  SKIP now expands variables (for better error messages)
mysql-test/include/have_big5.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_collation.inc:
  Test if '$collation' is supported
mysql-test/include/have_cp1250_ch.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_cp1251.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_cp866.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_cp932.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_eucjpms.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_euckr.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_gb2312.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_gbk.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_koi8r.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_latin2_ch.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_sjis.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_tis620.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_ucs2.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_ujis.inc:
  Simplify by using have_collation.inc
mysql-test/include/have_utf8.inc:
  Simplify by using have_collation.inc
mysql-test/r/create-uca.result:
  Create tests that uses unicode
mysql-test/r/create.result:
  Move test with unicode to create-uca.test
mysql-test/r/have_big5.require:
  Not needed anymore
mysql-test/r/have_cp1250_ch.require:
  Not needed anymore
mysql-test/r/have_cp1251.require:
  Not needed anymore
mysql-test/r/have_cp866.require:
  Not needed anymore
mysql-test/r/have_cp932.require:
  Not needed anymore
mysql-test/r/have_eucjpms.require:
  Not needed anymore
mysql-test/r/have_euckr.require:
  Not needed anymore
mysql-test/r/have_gb2312.require:
  Not needed anymore
mysql-test/r/have_gbk.require:
  Not needed anymore
mysql-test/r/have_koi8r.require:
  Not needed anymore
mysql-test/r/have_latin2_ch.require:
  Not needed anymore
mysql-test/r/have_sjis.require:
  Not needed anymore
mysql-test/r/have_tis620.require:
  Not needed anymore
mysql-test/r/have_ucs2.require:
  Not needed anymore
mysql-test/r/have_ujis.require:
  Not needed anymore
mysql-test/r/have_utf8.require:
  Not needed anymore
mysql-test/r/innodb.result:
  Move tests that depends on unicode to innodb_utf8.test
mysql-test/r/innodb_utf8.result:
  Test moved from innodb.test
mysql-test/suite/rpl/t/rpl_ignore_table.test:
  Test for required collations
mysql-test/t/create-uca.test:
  Create tests that uses unicode
mysql-test/t/create.test:
  Move test with unicode to create-uca.test
mysql-test/t/ctype_utf8.test:
  Test that require unicode
mysql-test/t/ddl_i18n_koi8r.test:
  Test for required collations
mysql-test/t/ddl_i18n_utf8.test:
  Test for required collations
mysql-test/t/fulltext.test:
  Test for required collations
mysql-test/t/fulltext2.test:
  Test for required collations
mysql-test/t/innodb.test:
  Move tests that depends on unicode to innodb_utf8.test
mysql-test/t/innodb_utf8.test:
  Tests that uses unicode
mysql-test/t/query_cache_ps_no_prot.test:
  Test for required collations
mysql-test/t/query_cache_ps_ps_prot.test:
  Test for required collations
scripts/mysqlbug.sh:
  Send emails to maria-developers@lists.launchpad.net
storage/ndb/plug.in:
  Don't include ndb in 'max' builds
2009-12-27 15:54:41 +02:00
Staale Smedseng
8c65b726a5 Recommit of Bug#49447. 2010-02-04 13:39:42 +01:00
Bjorn Munch
d4676c22e0 Merge from 5.1 main 2009-12-16 10:37:41 +01:00
Bjorn Munch
a88898e692 backport mysqltest send_eval from 42520 2009-12-16 10:06:37 +01:00
Michael Widenius
82e910d146 Merge with maria-5.1-federatedx; A patch to fix bugs in federatedx and enable federated_server.test
Author: Antony Curtis
License: BSD


client/mysql.cc:
  Reset variable if CTRL-C was used to kill running query, so that the user can do it again
client/mysqlcheck.c:
  Indentation fix
client/mysqlslap.c:
  Indentation fixes
client/mysqltest.cc:
  Make testing of commands safer by also testing length
  Removed not used variable
  Fixed indentation to be as it was before last patch
mysql-test/lib/mtr_report.pm:
  Fixed typo
mysql-test/mysql-test-run.pl:
  Merge (Align code with default mysql-tes-run.pl)
mysql-test/suite/federated/disabled.def:
  Removed test case
storage/federatedx/ha_federatedx.cc:
  Removed my changes and applied Antony's instead
2009-12-03 13:19:05 +02:00
Bjorn Munch
69c540588a Bug #48250 mysqtest_embedded can lock destroyed mutex
As suggested, replaced relevant uses of my_fopen with fopen (and close)
Tested on HPUX where it was reproducable with test innodb_bug30919
2009-11-26 11:16:06 +01:00
Davi Arnaut
64f097dc80 Post-merge fixes: fix typo and remove unused variables. 2009-11-21 10:11:45 -02:00
unknown
a962160eec Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.

This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
2009-11-16 21:49:51 +01:00
Bjorn Munch
b229781c2d Bug #48671 mysqltest fails on 'perl' in file sourced inside 'while'
Actually, fails on 'perl' in any while
Fixed essentially the same way as for append_file
2009-11-11 12:46:19 +01:00
Michael Widenius
edd792fe12 Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

Todo before joining with main 5.1 tree:
- Join test fails (Igor to investigate)
- mysql-test-run shows warnings from tests; Some suppression rule is not working (Kristian to investiage)
- Run through all buildbots



sql/sql_table.cc:
  Reverted code for ROW_FORMAT is used. We must set the HA_CREATE_USED_ROW_FORMAT flag in alter table
  to signal the handler that it should not change row_type in update_create_info() (as happens for SHOW CREATE).
storage/maria/ha_maria.cc:
  Update for change in defintion of thd->query
storage/myisam/mi_check.c:
  Simplify code
storage/pbxt/src/discover_xt.cc:
  Update for change in defintion of thd->query
storage/xtradb/dict/dict0dict.c:
  Update for change in defintion of thd->query
storage/xtradb/handler/ha_innodb.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/ha_innodb.h:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/handler0alter.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
2009-11-11 13:17:49 +02:00
Vladislav Vaintroub
b51777484f merge 2009-11-03 01:52:57 +01:00
Vladislav Vaintroub
2377eed362 Bug #47423 mtr connects to wrong database
The reason for the bug is that mysqtest as well as other client tools
running in test suite (mysqlbinlog, mysqldump) will first try to connect 
whatever database has created shared memory with default base name 
"MySQL" and use this. (Same effect could be seen on Unix if mtr would
not care to calculate "port" and "socket" parameter).
      
The fix ensures that all client tools and  running in mtr use unique  
per-database shared memory base parameters, so there is no possibility
to clash with already installed one. We use socket name for shared memory 
base (it's known to be unique). This shared-memory-base is written to the
MTR config file to the [client] and [mysqld] sections. Fix made also made 
sure all client tools understand and correctly handle --shared-memory-base.
Prior to this patch  it was not the case for  mysqltest, mysqlbinlog and 
mysql_client_test.
      
All new connections done from mtr scripts via connect() will by default 
set shared-memory-base. And finally, there is a possibility to force 
shared memory or pipe connection and overwrite shared memory/pipe base name
from within mtr scripts via optional PIPE or SHM modifier. This functionality
was manually backported from 6.0
(original patch  http://lists.mysql.com/commits/74749)
2009-11-03 01:19:37 +01:00
Georgi Kodinov
27c2af97f7 merge 2009-10-30 16:57:16 +02:00
Bjorn Munch
72c96cbd0e merge from 5.1 main 2009-10-16 23:25:05 +02:00
unknown
95270c9c43 Merge with latest MariaDB 5.1 trunk. 2009-10-15 23:52:31 +02:00
unknown
6aad537a6a Merge MySQL 5.1.39 into MariaDB 5.1. 2009-10-15 23:38:29 +02:00
unknown
e702b70d67 Implement mysqltest --enable_prepare_warnings to properly fix some test failures.
The --enable_prepare_warnings allows to not discard warnings from autorepair
of crashed table in --ps-protocol mode.

Use this to properly fix the parts.partition_recover_myisam and
maria.maria-recover tests.

Add a test case for the new feature. This also adds missing test coverage
for the case where the same warning is thrown in both prepare and execute
phase.


client/mysqltest.cc:
  Implement new commands --enable-prepare_warnings and --disable_prepare_warnings.
mysql-test/r/mysqltest_ps.result:
  Add test case for new --enable_prepare_warning mysqltest command.
mysql-test/suite/maria/t/maria-recover.test:
  Better fix of test case using new --enable_prepare_warnings command.
mysql-test/suite/parts/t/partition_recover_myisam.test:
  Fix test failure in --ps-protocol mode.
mysql-test/t/mysqltest_ps.test:
  Add test case for new --enable_prepare_warning mysqltest command.
2009-10-09 10:09:24 +02:00
Frazer Clement
c7470df2fe Merge 5.0-bugteam-> 5.1-bugteam 2009-10-08 16:36:36 +01:00
Bjorn Munch
9edd40c87e Bug #47218 mysqltest ignores "error" command inside if inside loop
This was affected by same problem as append_file etc.
Added Q_ERROR to special handling, and added small test
2009-10-08 11:30:03 +02:00
Frazer Clement
de985fc732 Merge 5.0-bugteam->5.1 bugteam 2009-10-05 13:57:59 +01:00
Georgi Kodinov
9910148c72 automerge 2009-09-23 11:31:18 +03:00
Georgi Kodinov
4ac694822b automerge 2009-09-18 16:35:40 +03:00