Commit graph

3152 commits

Author SHA1 Message Date
Ignacio Galarza
0d588edf61 auto-merge 2009-03-17 16:29:24 -04:00
Alexey Kopytov
07a3de2019 Automerge. 2009-03-18 11:36:48 +03:00
Alexey Kopytov
2b2533955f Manual merge. 2009-03-18 11:27:49 +03:00
Magnus Svensson
aa640b7d0b Bug#43361 msyql_client_test output lost
- Print the output(if any) from the command that failed, in many 
   cases this will make it possible to immediately see what went wrong.
2009-03-13 16:06:50 +01:00
Chad MILLER
510e9ddf36 Merge bug fix and upstream. 2009-03-12 13:32:13 -04:00
Chad MILLER
5139538c9c Merge fix for bug 42635, which is no change for 5.1 except addition of
test and (slightly different than 5.0) results.
2009-03-12 11:39:40 -04:00
Bjorn Munch
5e566b8eff Bug #43532 mtr should not rely on diff to report test results
mtr on Windows does not give decent diff due to missing diff install
Modified to look for 'mtrdiff' if diff not available.
2009-03-11 14:52:50 +01:00
Chad MILLER
b5804db393 Merge from bugfix tree. 2009-03-10 12:53:43 -04:00
Chad MILLER
89a1db2bd2 Bug#42635: mysqldump includes views that were excluded using the \
--ignore-table option

mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.

Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
2009-03-09 16:58:47 -04:00
Chad MILLER
e0bc002576 Fix non-DBUG return. 2009-03-09 16:56:46 -04:00
Georgi Kodinov
3033ea85a2 Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one)
and added it instead of the current implementation.
Added a macro to make the calls to MD5 more streamlined. 

client/mysqlmanager-pwgen.c:
  Bug #42434: changed to call the macro
include/my_md5.h:
  Bug #42434: use the Xfree implementation
mysys/md5.c:
  Bug #42434: use the Xfree implementation
sql/item_strfunc.cc:
  Bug #42434: changed to call the macro
sql/table.cc:
  Bug #42434: changed to call the macro
tools/mysqlmanager.c:
  Bug #42434: changed to call the macro
2009-03-09 20:57:03 +02:00
Georgi Kodinov
dc69c3439f merged bug 31060 to 5.1-bugteam 2009-02-25 11:09:41 +02:00
Georgi Kodinov
4b05db5cfd Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first 
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts 
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the 
command being added is a DELIMITER

client/mysql.cc:
  Bug #31060: Don't add a new line if DELIMTER is added to
  the glob buffer
mysql-test/r/mysql.result:
  Bug #31060: test case
mysql-test/t/mysql.test:
  Bug #31060: test case
2009-02-24 15:06:28 +02:00
Georgi Kodinov
85ea3740ff Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first 
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts 
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the 
command being added is a DELIMITER

client/mysql.cc:
  Bug #31060: Don't add a new line if DELIMTER is added to
  the glob buffer
mysql-test/r/mysql.result:
  Bug #31060: test case
mysql-test/t/mysql.test:
  Bug #31060: test case
2009-02-24 15:06:28 +02:00
Tatiana A. Nurnberg
87fcb23d4b automerge 2009-02-24 09:33:04 +01:00
Tatiana A. Nurnberg
982f88fc31 automerge 2009-02-24 09:31:42 +01:00
Tatiana A. Nurnberg
99d1cdcb11 manual merge 2009-02-19 18:22:28 +01:00
Tatiana A. Nurnberg
4a3f5b2b20 Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-19 17:33:28 +01:00
Tatiana A. Nurnberg
1d0b5cc9db Bug#37400: mysql: Bad help message for charset command
Typo existed in help-text for command "charset" in mysql
client, making the parameter-name different for long and
short forms of the command for no good reason.

Fixed.

client/mysql.cc:
  Make parameter-name in help-text the same for
  long and short forms, for consistency.
2009-02-19 04:58:10 +01:00
Georgi Kodinov
0b87d4363b merge of bug 26724 to 5.1-bugteam 2009-02-18 12:26:11 +02:00
Georgi Kodinov
41728a3104 Bug #26724: mysql command line client, ignores input to internal cmd after space
Removed the misleading "NOTE:" from the \h command. 

client/mysql.cc:
  Bug #26724: removed the misleading note from the \h command
2009-02-18 12:18:38 +02:00
Alexey Kopytov
d8ac91387b Merge from dev tree. 2009-02-14 12:11:32 +03:00
Alexey Kopytov
fb3e5910ec Merge from dev tree. 2009-02-14 12:09:35 +03:00
Ignacio Galarza
5b7347bda3 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Alexey Kopytov
dd35a152f9 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-13 19:20:56 +03:00
Alexey Kopytov
9373b1b880 Merge from dev tree. 2009-02-13 19:17:07 +03:00
Rafal Somla
bdbe393db1 Modifications to MTR and mysqltest to improve feedback from the latter when
testcase checks are made.
      
MTR spawns mysqltest to run check-testcase test before and after each testcase 
it runs. It can also run check-warnings using mysqltest. Since it happened on PB 
that these checks hanged, this patch provides additional feedback to help 
investigating such failures:
      
- mysqltest is modified to give feedback about main steps in execution of a 
testcase if run in verbose mode (including connection to the server),
     
- MTR is modified to run mysqltest in verbose mode when doing check-testcase or 
check-warnings. The diagnostic output from mysqltest is preserved so that it is 
saved upon test failure.

client/mysqltest.cc:
  Add verbose messages informing about main steps in execution of a testcase.
mysql-test/mysql-test-run.pl:
  - When doing check-testcase or check-warnings run mysqltest in verbose mode.
  - Do not delete the mysqltest's error log if errors are detected during these
2009-02-13 16:27:33 +01:00
Ignacio Galarza
54fbbf9591 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Georgi Kodinov
29f898bb64 merged 5.0-bugteam -> 5.1-bugteam 2009-02-10 16:26:18 +02:00
Alexey Kopytov
1571f06196 Merge into dev tree. 2009-02-10 16:27:35 +03:00
Georgi Kodinov
fab053ccf8 From jperkin : Merge libedit 2.11 and related files,
based on NetBSD CVS as of 2009/02/06 20:09:00.
2009-02-10 14:39:14 +02:00
Alexey Kopytov
fd8bf58ca9 Fix for bug #41868: crash or memory overrun with concat + upper,
date_format functions

String::realloc() did not check whether the existing string data fits in
the newly allocated buffer for cases when reallocating a String object
with external buffer (i.e.alloced == FALSE).  This could lead to memory
overruns in some cases.

client/sql_string.cc:
  Fixed String::realloc() to check whether the existing string data fits
  in the newly allocated buffer for cases when reallocating a String
  object with external buffer.
mysql-test/r/func_str.result:
  Added a test case for bug #41868.
mysql-test/t/func_str.test:
  Added a test case for bug #41868.
sql/sql_class.cc:
  After each call to Item::send() in select_send::send_data() reset
  buffer to its original state to reduce unnecessary malloc() calls. See
  comments for bug #41868 for detailed analysis.
sql/sql_string.cc:
  Fixed String::realloc() to check whether the existing string data fits
  in the newly allocated buffer for cases when reallocating a String
  object with external buffer.
2009-02-10 15:38:56 +03:00
Alexey Kopytov
a8c98eb953 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-06 12:53:20 +03:00
Alexey Kopytov
b30239bc1a Temporarily reverted patch for bug #41868 as it was causing problems in PB. 2009-02-06 12:51:11 +03:00
Alexey Kopytov
4cd0e2fac4 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-05 15:49:59 +03:00
Alexey Kopytov
759b626d11 Merge to team tree. 2009-02-05 15:48:30 +03:00
Alexey Kopytov
dfbba6e7fd Fix for bug #41868: crash or memory overrun with concat + upper, date_format
functions
      
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE).  This could lead to memory overruns in some cases.


mysql-test/r/func_str.result:
  Added a test case for bug #41868.
mysql-test/t/func_str.test:
  Added a test case for bug #41868.
sql/sql_class.cc:
  After each call to Item::send() in select_send::send_data() reset buffer to its
  original state to reduce unnecessary malloc() calls. See comments for bug #41868
  for detailed analysis.
sql/sql_string.cc:
  Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer.
2009-02-03 20:19:01 +03:00
Tatiana A. Nurnberg
0ad6e488a2 Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.

client/mysqldump.c:
  in 3.23/4.0 compat mode, don't do charset magic,
  period. not in output, but not on the server,
  either!
mysql-test/r/mysqldump-max.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/r/mysqldump.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/r/openssl_1.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/t/mysqldump.test:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
2009-02-02 18:19:07 +01:00
Georgi Kodinov
83c5317a7f merged 5.0-bugteam -> 5.1-bugteam 2009-01-30 15:57:02 +02:00
Georgi Kodinov
87eb2cb938 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Alexey Kopytov
a01946373d Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases 
depending on whether the text-based or prepared statements protocol is used for a query.

Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.

This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).

client/sql_string.cc:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
libmysql/libmysql.c:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
mysql-test/r/archive_gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_group.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_math.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_str.result:
  Fixed test results to take additional precision into account.
mysql-test/r/gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/innodb_gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/select.result:
  Fixed test results to take additional precision into account.
mysql-test/r/sp.result:
  Fixed test results to take additional precision into account.
mysql-test/r/type_float.result:
  Fixed test results to take additional precision into account.
mysql-test/t/type_float.test:
  Fixed test results to take additional precision into account.
sql/sql_string.cc:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
2009-01-28 20:59:08 +03:00
Bjorn Munch
36118ca6a1 Bug #42216 mysqltest: Use of diff belonging to current OS, with wrong option for Solaris
Check for existence of diff fails on Solaris due to unsupported "-v"
Fix is to do this check only on Windows where it was needed
2009-01-28 14:14:05 +01:00
Alfranio Correia
0888d7c0a8 BUG#36391: "mysqlbinlog creates invalid charset statements"
The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
      
The fix allows the escaping with backslash to take place only inside a string, 
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
2009-01-27 20:49:37 +00:00
Luis Soares
df8543868d merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in client/mysqltest.cc
  Text conflict in mysql-test/include/wait_until_connected_again.inc
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
  Text conflict in mysql-test/r/events_bugs.result
  Text conflict in mysql-test/r/log_state.result
  Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
  Text conflict in mysql-test/r/mysqlcheck.result
  Text conflict in mysql-test/r/query_cache.result
  Text conflict in mysql-test/r/status.result
  Text conflict in mysql-test/suite/binlog/r/binlog_index.result
  Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
  Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
  Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
  Text conflict in mysql-test/t/disabled.def
  Text conflict in mysql-test/t/events_bugs.test
  Text conflict in mysql-test/t/log_state.test
  Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
  Text conflict in mysql-test/t/mysqlcheck.test
  Text conflict in mysql-test/t/query_cache.test
  Text conflict in mysql-test/t/rpl_init_slave_func.test
  Text conflict in mysql-test/t/status.test
2009-01-23 13:22:05 +01:00
Magnus Svensson
bb42e1ab05 Bug#35701 please allow test language variables in connection and
sync_slave_with_master
 - Additional patch for "disconnect $variable"
2009-01-15 09:05:51 +01:00
Ramil Kalimullin
53e42d9ee4 Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.

Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.

Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.

Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.


client/mysqlcheck.c:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - check and set default charset if --default-character-set option
      given.
    - set default charset to "utf8" if there's
      --fix-table-name or --fix-db-name and no --default-character-set.
mysql-test/r/mysqlcheck.result:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - test result.
mysql-test/t/mysqlcheck.test:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - test case.
sql/mysql_priv.h:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - check_n_cut_mysql50_prefix() introduced.
sql/sql_table.cc:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - tablename_to_filename() code split into 2 parts
    - check_n_cut_mysql50_prefix() introduced to cut #mysql50# prefixes,
      used in the trigger code as well.
sql/sql_trigger.cc:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - Table_triggers_list::check_n_load() - checking triggers assume
      a table/database name given may have "#mysql50#" prefix in some cases.
    - Table_triggers_list::change_table_name_in_triggers() -
      create .TRG file in new database directory and delete it in old one,
      as they may differ in case of
      "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME"
    - Table_triggers_list::change_table_name_in_trignames() - remove stale .TRN
      files in #mysql50#dbname directory in case of database upgrade
    - Table_triggers_list::change_table_name() - allow changing trigger's
      database in case of its upgrading
sql/sql_trigger.h:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - new old_db_name parameter added in
      Table_triggers_list::change_table_name_in_trignames() and
      Table_triggers_list::change_table_name_in_triggers()
2009-01-14 18:50:51 +04:00
Georgi Kodinov
e22027ae9e merged 5.0-bugteam -> 5.1-bugteam 2009-01-09 20:35:02 +02:00
Georgi Kodinov
529fff05bf fixed a compile warning 2009-01-09 20:30:55 +02:00
Luis Soares
b2cdc3b6cb merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
2009-01-08 19:03:56 +00:00
Patrick Crews
9cd9b11377 merge 5.0 -> 5.1 2009-01-05 17:25:03 -05:00
Patrick Crews
fec0b2c27a Bug#38833: mysql-test-run needs diff. Problem w/ error handling in calling diff on Windows.
Added function to check for diff and return an error message if the utility is not present.
Previously, the way we did this didn't work on Windows, but did work on *Nix systems.
2009-01-05 12:10:22 -05:00
Georgi Kodinov
f97ef7a40e merged 5.1-main -> 5.1-bugteam 2009-01-05 18:10:20 +02:00
He Zhenxing
2070da7092 BUG#40704 main.events_restart fails sporadically in pushbuild: "server has gone away"
mysqltest command 'shutdown_server' is supposed to shutdown the server
and wait for it to be gone, and kill it when timeout. But because the
arguments passed to my_kill were in the wrong order, 'shutdown_server'
does not wait nor kill the server at all. So after 'shutdown_server',
the server is still running, and the server may still accepting
connections.


mysql-test/include/mtr_warnings.sql:
  Suppress forcing close thread messages when server shuts down
mysql-test/include/restart_mysqld.inc:
  wait_until_disconnected.inc is not required after fix shutdown_server command
2008-12-25 17:53:24 +08:00
Alfranio Correia
19f859a27e merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Chad MILLER
a633e0b98d Merge fix for Bug 33812 from 5.0-bugteam. 2008-12-11 12:46:20 -05:00
Chad MILLER
d84690c92d Bug#33812: mysql client incorrectly parsing DELIMITER
Fix parsing of mysql client commands, especially in relation to
single-line comments when --comments was specified.

This is a little tricky, because we need to allow single-line
comments in the middle of statements, but we don't want to allow
client commands in the middle of statements. So in
comment-preservation mode, we go ahead and send single-line
comments to the server immediately when we encounter them on their
own. 

This is still slightly flawed, in that it does not handle a
single-line comment with leading spaces, followed by a client-side
command when --comment has been enabled. But this isn't a new
problem, and it is quite an edge condition. Fixing it would require
a more extensive overall of how the mysql client parses commands.
2008-12-11 12:26:03 -05:00
Joerg Bruehe
2181c95918 Merge main 5.1 into 5.1-build 2008-12-10 21:14:50 +01:00
Alexey Botchkov
9b6a09d155 Bug#35934 mysql_upgrade calls mysqlcheck with insufficient parameters
modifying the original fix.
    As it turned out --fix-db-names option of the mysqlcheck suppress
    the --check_upgrade option, so we have to call the mysqlcheck twice
    from the mysql_upgrade.

per-file comments:
  client/mysql_upgrade.c
Bug#35934      mysql_upgrade calls mysqlcheck with insufficient parameters
2008-12-09 12:30:49 +04:00
Alexey Botchkov
4670abb0a2 merging 2008-12-08 15:41:45 +04:00
Vladislav Vaintroub
8f500c522b Bug#38522: 5 seconds delay when closing application using embedded server
The problem here is that embedded server starts handle_thread manager 
thread  on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
             
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
            
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
            
Note: Specifically on Windows and when using DBUG version of libmysqld, 
the complete solution requires removing obsolete code my_thread_init() 
from my_thread_var(). This has a side effect that a DBUG statement 
after my_thread_end() can cause thread counter to be incremented, and 
embedded will hang for some seconds. Or worse, my_thread_init() will 
crash if critical sections have been deleted by the global cleanup 
routine that runs in a different thread. 

This patch also fixes and revert prior changes for Bug#38293 
"Libmysqld crash in mysql_library_init if language file missing".

Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
described above




client/mysql.cc:
  sql_protocol_typelib is not exported from libmysqld
  (does not make sense either)
  thus excluded from embedded client
dbug/dbug.c:
  revert changes for Bug#38293
include/my_dbug.h:
  revert changes for Bug#38293
libmysql/libmysql.c:
  Removed DBUG_POP call, because when called after my_end(), will access
  THR_key_mysys that is already deleted. The result of pthread_get_specific
  is not predictable in this case and hence DBUG_POP can crash.
libmysqld/examples/CMakeLists.txt:
  Revert changes for Bug#38293.
libmysqld/lib_sql.cc:
  code to start handle manager is factored out into 
  start_handle_manager() function
libmysqld/libmysqld.def:
  Revert changes for Bug #38293
  Remove excessive exports from libmysqld, export what API documents.
mysys/my_thr_init.c:
  Remove windows-DLL-specific workaround for something (old code, no documentation for
  what specifically). The problem is that even after my_thread_end() is finished, 
  DBUG statement can initiate my_thread_init(). This does not happen anywhere else and 
  should not happen on  Windows either.
sql/mysql_priv.h:
  - new functions start_handle_manager() and stop_handle_manager()
  - move manager_thread_in_use  variable to sql_manager.cc and made
  it static
  - remove manager_status, as it is unused
sql/mysqld.cc:
  Code to start/stop handle_manager thread is factored out into start_handle_manager()
2008-12-04 19:41:53 +01:00
Build Team
74b3540919 mysql-test/r/partition.result
mysql-test/t/partition.test
sql/ha_partition.cc
  Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
  Problem was usage of read_range_first with an empty key.
  Solution was to not to give a key if it was empty. (real author Mattias Jonsson)

storage/archive/archive_reader.c
client/mysqlslap.c
  Aligned the copyright texts output from "--version" of tools, to
  let internal tools be able to change them if needed.

storage/ndb/test/tools/connect.cpp
storage/ndb/test/run-test/atrt.hpp
  Corrected a few GPL headers not restricted to GPL version 2

Makefile.am
  Added missing --report-features to the 'test-bt-fast' target

support-files/mysql.spec.sh
  Reversed the removal of the "%define license GPL" in as internal
  tools depended on it
2008-11-25 03:04:58 +01:00
Serge Kozlov
3e0fb46142 Bug#39861:
1. mysqltest.cc - added flush to log file after each executed command in a testcase.
2. mtr shows 20 last lines from test case log file if timeout reached.
3. Optimizing the code by Magnus review.
4. It is partially fix bug#40150
2008-11-14 23:35:32 +03:00
unknown
bfba620e45 Changes of copyright output from "--version" and similar.
Changes of copyright in RPM spec file.
2008-11-14 17:29:38 +01:00
Magnus Svensson
562f1d6571 WL#4189 Make mysqltest die if fflush fails 2008-11-14 11:08:09 +01:00
Magnus Svensson
34ff714b0d WL#4189 Make mysqltest flush log file at close if logfile is stdout 2008-11-14 11:06:56 +01:00
Ramil Kalimullin
cba2743336 Auto-merge 2008-11-14 13:48:01 +04:00
Ramil Kalimullin
e3de8d361e Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption

Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
The query may fail for some reasons (e.g. null .frm file) then
mysqlcheck doesn't process the database tables.

Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.


client/mysqlcheck.c:
  Fix for bug#37527: mysqlcheck fails to report entire database 
  when InnoDB frm file corruption
    - run "SHOW TABLES" query if "SHOW /*!50002 FULL*/ TABLES" failed;
    - print error info if both failed.
mysql-test/r/mysqlcheck.result:
  Fix for bug#37527: mysqlcheck fails to report entire database 
  when InnoDB frm file corruption
    - test result.
mysql-test/t/mysqlcheck.test:
  Fix for bug#37527: mysqlcheck fails to report entire database 
  when InnoDB frm file corruption
    - test case.
2008-11-14 11:40:46 +04:00
Build Team
e85fe79430 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Magnus Svensson
3b6edab71f Fix DBUG_PRINT 2008-11-10 14:52:51 +01:00
Mats Kindahl
abe177349b Merging with 5.1-rpl 2008-10-29 10:42:45 +01:00
Mats Kindahl
32c161f3ea Merging 5.1 main into 5.1-rpl 2008-10-23 21:27:09 +02:00
Sven Sandberg
c7f8ffe7a7 BUG#35701: please allow test language variables in connection and sync_slave_with_master
Problem: In the mysqltest language, it was not possible to set the current
connection from a variable, and it was not possible to read the current
connection.
Fix: Allow setting the connection from a variable, like:
connection $variable;
and introduce the mysqltest language variable $CURRENT_CONNECTION, which
holds the name of the current connection.


client/mysqltest.cc:
  - Made select_connection use the common argument parser instead of its own
  home-rolled version. That allows variable expansion, for instance.
  - Made select_connection_name set the variable $CURRENT_CONNECTION, so that
  test scripts can use that.
  - Refactored a bit so that stuff that needs to be done when changing connection
  is located to one place.
mysql-test/t/mysqltest.test:
  Added test case for $CURRENT_CONNECTION and "connection $variable"
2008-10-23 16:23:13 +02:00
Tatiana A. Nurnberg
d49ee1933f Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.

client/mysqldump.c:
  When creating a stand-in table, specify its type to
  avoid defaulting to a type with a column-number limit
  (like Inno). The type is always MyISAM as we know that
  to be available.
mysql-test/r/mysqldump-max.result:
  add test results for 31434
mysql-test/r/mysqldump.result:
  mysqldump sets engine-type (MyISAM) for stand-in tables
  for views now. Update test results.
mysql-test/t/mysqldump-max.test:
  Show that mysqldump's stand-in tables for views explicitly
  set engine-type to MyISAM to avoid falling back on an engine
  that might support fewer columns than the final view requires
  (here's lookin' at you, inno). Also show that this actually
  has the desired effect by dumping and reloading a view that
  has more columns than inno supports.
2008-09-11 08:14:19 +02:00
Tatiana A. Nurnberg
6e162ea9eb Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.

client/mysqldump.c:
  When creating a stand-in table, specify its type to
  avoid defaulting to a type with a column-number limit
  (like Inno). The type is always MyISAM as we know that
  to be available.
mysql-test/r/mysqldump.result:
  mysqldump sets engine-type (MyISAM) for stand-in tables
  for views now. Update test results.
2008-09-11 07:46:43 +02:00
He Zhenxing
b17458dcc1 Merge 5.1 main -> 5.1-rpl 2008-09-06 08:51:17 +08:00
Magnus Svensson
13ccc61f9d Print error message in diff_files if any of the two files to diff does not exist 2008-08-29 12:25:19 +02:00
Alexander Barkov
762df2d05c Additional fix for bug#31455 (rpl decoder)
- Implementing --base64-format=decode-rows, to display
  SQL-alike decoded row events without their BINLOG statements.
- Adding --base64-format=decode-rows into tests when
  calling mysqlbinlog to avoid non-deterministic results
- Removing resetting of last_table_id in "RESET MASTER",
  which appeared to be dangerous.
2008-08-21 16:47:23 +05:00
Alexander Barkov
0c5bc2eafc Bug#31455 mysqlbinlog don't print user readable info about RBR events
Implementing -v command line parameter to mysqlbinlog
to decode and print row events.

mysql-test/include/mysqlbinlog_row_engine.inc
mysql-test/r/mysqlbinlog_row.result
mysql-test/r/mysqlbinlog_row_big.result
mysql-test/r/mysqlbinlog_row_innodb.result
mysql-test/r/mysqlbinlog_row_myisam.result
mysql-test/r/mysqlbinlog_row_trans.result
mysql-test/t/mysqlbinlog_row.test
mysql-test/t/mysqlbinlog_row_big.test
mysql-test/t/mysqlbinlog_row_innodb.test
mysql-test/t/mysqlbinlog_row_myisam.test
mysql-test/t/mysqlbinlog_row_trans.test
  Adding tests 

client/Makefile.am
  Adding new files to symlink
  
client/mysqlbinlog.cc
  Adding -v option

sql/log_event.cc
  Impelentations of the new methods

sql/log_event.h
  Declaration of the new methods and member

sql/mysql_priv.h
  Adding new function prototype

sql/rpl_tblmap.cc
  Adding pre-processor conditions 

sql/rpl_tblmap.h
  Adding pre-processor conditions 

sql/rpl_utility.h
  Adding pre-processor conditions 

sql/sql_base.cc
  Adding reset_table_id_sequence() function.

sql/sql_repl.cc
  Resetting table_id on "RESET MASTER"
  
.bzrignore
  Ignoring new symlinked files
2008-08-20 19:06:31 +05:00
He Zhenxing
113deaec30 Merge 5.1-rpl-testfixes -> 5.1-rpl 2008-08-14 17:38:22 +08:00
Chad MILLER
b615e3d535 Backport compiler warning fix from 5.1-bugteam. 2008-08-11 11:28:35 -04:00
Davi Arnaut
1c108906c6 Post-merge fix: Remove Remove unused variable.
client/mysql_upgrade.c:
  Remove Remove unused variable.
2008-08-11 10:13:12 -03:00
Davi Arnaut
d622b04f39 Post-merge fix: Silence warning due to type mismatch.
client/mysql_upgrade.c:
  Silence warning due to type mismatch.
2008-08-11 10:08:21 -03:00
Magnus Svensson
36bebcc13c Fix VS8 build error 2008-08-09 14:59:57 +02:00
Magnus Svensson
fba319490a Open result file in binary moe to avoid CR/LF problems 2008-08-09 14:52:39 +02:00
Magnus Svensson
cd0cd4e0a0 Make events_restart more stable by waiting for the server to be stopped before starting it again 2008-08-09 11:16:12 +02:00
Magnus Svensson
5a9938e584 Fix warnings in mysqltest 2008-08-09 10:52:50 +02:00
Magnus Svensson
d7f846be94 Merge 2008-08-08 20:10:43 +02:00
Chad MILLER
9d2e311b6b merge from local 5.0 fix tree. 2008-08-07 16:27:05 -04:00
Chad MILLER
abeda651c5 Bug#31605: mysql_upgrade relies on Linux /proc filesystem when not \
running on Windows

We used two OS-specific methods of looking up the executable 
name, which don't work outside of those two kinds of OSes 
(Linux+Solaris and Windows).

We assume that if the user ran this program with a certain 
name, we can run the other sibling programs with a similar name.

(re-patch in bzr)
2008-08-07 12:24:39 -04:00
Magnus Svensson
31c7b018bd Merge 2008-08-04 22:25:45 +02:00
Magnus Svensson
27e8584271 Bug #38181 Please print more debug info when tests fail 2008-08-04 21:54:44 +02:00
Magnus Svensson
c7de7ff0bd Bug #32307 mysqltest - does not detect illegal if syntax 2008-08-04 12:38:50 +02:00
Sven Sandberg
4cf30d44ef merged 5.1 main to 5.1-rpl
manually resolved conflicts:
Text conflict in client/mysqltest.c
Contents conflict in mysql-test/include/have_bug25714.inc
Text conflict in mysql-test/include/have_ndbapi_examples.inc
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/suite/parts/inc/partition_check_drop.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check1.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check2.inc
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_basic_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_engine_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_syntax_myisam.result
Text conflict in mysql-test/suite/rpl_ndb/t/disabled.def
Text conflict in mysql-test/t/disabled.def
2008-08-04 07:04:47 +02:00
Davi Arnaut
b757f48565 Bug#37003: Tests sporadically crashes with embedded server
Post-merge fix: Alter linking order so that the thread linking
flags appear last in the list. This needs to be done this way
because some linkers will not search the thread archive again
if a undefined symbol (pthread_kill in this case) appears later.

client/Makefile.am:
  Link mysys before thread libs.
2008-08-01 12:10:06 -03:00
Magnus Svensson
dacfba06f8 Bug #32406 #ifdef LATER_HAVE_NDBCLUSTER_DB in client/mysqladmin.cc 2008-08-01 16:15:27 +02:00
Magnus Svensson
106e64a67f Always print errno after failed file operation 2008-07-30 12:16:30 +02:00
Tatiana A. Nurnberg
bb827398ab auto-merge + post-merge fixies 2008-07-21 11:20:03 +02:00
Georgi Kodinov
5f5a3cf1aa merge of 38158 to 5.1-bugteam 2008-07-18 15:00:45 +03:00
Georgi Kodinov
88d66418c8 Bug 38158: mysql client regression, can't read dump files
- Revert the fix for bug 33812
- fixed a win32 warning

client/mysql.cc:
  revert the fix for bug 33812
mysql-test/r/mysql.result:
  revert the fix for bug 33812
mysql-test/t/mysql_delimiter.sql:
  revert the fix for bug 33812
mysys/default.c:
  fixed a win32 warning
2008-07-18 13:24:59 +03:00
Tatiana A. Nurnberg
6b584b80da Bug#23921: random failure of user_limits.test
mysqltest disconnect/connect-combo could be so
quick that connect would hit the server before
it had processed the disconnect. Since that
resulted in one more concurrent connection than
we meant to have, global or per-user
max-user-connections could be exceeded.
This could lead to "random" failures in tests
that set those limits.


client/mysqltest.c:
  Retry max-connect-retries times if connect in
  connect_n_handle_errors() unexpectedly fails
  on connection-limit as this could be a race.
  Break out code that checks for expected --errors
  into its own function.
mysql-test/r/mysqltest.result:
  show that we throw a warning if test expects a SQL-state from
  a command (diff_files, ...) that clearly can't produce one.
mysql-test/t/disabled.def:
  re-enable user_limits
mysql-test/t/mysqltest.test:
  show that we throw a warning if test expects a SQL-state from
  a command (diff_files, ...) that clearly can't produce one.
2008-07-15 13:42:21 +02:00