Commit graph

21819 commits

Author SHA1 Message Date
unknown
b871e8d29e Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build-work
2006-12-18 14:41:55 +01:00
unknown
045158fc28 Fix for bug #10798: If relay log fails to rotate, slave will crash after
The relay log may not be open for some reason (e.g. disk error) after rotation,
and using it causes the slave crash.

Fix: check we have it open before access, return error otherwise.


sql/slave.cc:
  Fix for bug #10798: If relay log fails to rotate, slave will crash after
    - check if the relay log is open before any access.
2006-12-18 17:38:59 +04:00
unknown
e55c9a7ab5 Use a temporary directory for sockets if the socket path becomes too long. 2006-12-18 13:44:21 +01:00
unknown
3c04f839b9 support /etc/mysql/my.cnf in mysqld_multi as well. 2006-12-15 16:17:10 -08:00
unknown
449450804b Added support for /etc/mysql after /etc in the search path for my.cnf
bug #25104


mysys/default.c:
  Added support for /etc/mysql after /etc in the search path for my.cnf
2006-12-15 12:25:09 -08:00
unknown
7579130d2d Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  qualinost.(none):/home/mtaylor/src/mysql-4.1-maint
2006-12-15 11:38:41 -08:00
unknown
c804680134 Added support for sensible-editor from Debian, instead of emacs. 2006-12-15 10:57:58 -08:00
unknown
e071fdb632 BUG#24358 - Table access crashes server
Having broken .frm, particulary number of field names does
not match number of fields, causes server crash.

Refuse to open a table if number of field names in a table
is not equal to number of fields in a table.

No test case, since it requires broken .frm file.


sql/table.cc:
  Refuse to open a table if number of field names in a table
  is not equal to number of fields in a table.
2006-12-15 16:01:56 +04:00
unknown
5029f2729a Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build-work
2006-12-15 09:28:40 +01:00
unknown
08dc2dcb5a Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint


mysql-test/r/myisam.result:
  SCCS merged
2006-12-15 07:59:09 +01:00
unknown
af38c456a2 Bug#17498 failed to put data file in custom directory use "data directory" option
- Result file was not properly committed.
- Update result file to match the new test case.


mysql-test/r/myisam.result:
  Bug#17498 failed to put data file in custom directory use "data directory" option
  
  - Update result file to match the new test case.
2006-12-15 07:56:01 +01:00
unknown
a6f4c958ca myisam.result: a test was moved from the .test file, but the results were not updated.
mysql-test/r/myisam.result:
  Fix results file - a test was moved from the .test file, but the results were not updated.
mysql-test/r/symlink.result:
  echo End of 4.1 tests while I'm here
mysql-test/t/myisam.test:
  echo End of 4.1 tests while I'm here
mysql-test/t/symlink.test:
  echo End of 4.1 tests while I'm here
2006-12-14 16:23:54 -07:00
unknown
8ca9c92880 Merge trift2.:/MySQL/M41/spec-4.1
into  trift2.:/MySQL/M41/push-4.1
2006-12-14 22:57:33 +01:00
unknown
007357e7cd support-files/mysql.spec.sh
The Docs team has two new manpages for the "server" RPM: "my_print_defaults" and "mysql_tzinfo_to_sql".


support-files/mysql.spec.sh:
  The Docs team has two new manpages for the "server" RPM: "my_print_defaults" and "mysql_tzinfo_to_sql".
2006-12-14 22:30:32 +01:00
unknown
b6eaf8cb2c Change permissions on $mysql_unix_port_dir if we create it so that everyone can access it. 2006-12-14 12:18:36 -08:00
unknown
833b235b18 Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
2006-12-14 16:09:15 +01:00
unknown
e21242fef8 Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  naruto.:C:/cpp/mysql-4.1-maint
2006-12-14 16:02:43 +01:00
unknown
c4b2bee9a1 Merge kpdesk.mysql.com:/home/thek/dev/bug17489/my41-bug17498
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint


mysql-test/t/myisam.test:
  SCCS merged
2006-12-14 15:30:00 +01:00
unknown
991de08780 Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build-work
2006-12-14 13:32:27 +01:00
unknown
e524063bee Bug#17498 failed to put data file in custom directory use "data directory" option
- When this bug was corrected it changed the behavior 
  for data/index directory in the myisam test case.
- This patch moves the OS depending tests to a non-windows
  test file.


mysql-test/r/myisam.result:
  moved test from myisam to symlink; new result file
mysql-test/r/symlink.result:
  moved test from myisam to symlink; new result file
mysql-test/t/myisam.test:
  moved test from myisam to symlink
mysql-test/t/symlink.test:
  moved test from myisam to symlink
2006-12-14 13:23:31 +01:00
unknown
789c86abd4 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-4.1/mysql-4.1-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-4.1/mysql-4.1-bug21715
2006-12-14 19:02:57 +08:00
unknown
2f8fd0c44c Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-4.1-ndb
2006-12-14 11:28:28 +01:00
unknown
430b2eafbc Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1
into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
2006-12-14 09:34:24 +01:00
unknown
a4ad07b7ea Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-4.1-engines


mysql-test/r/alter_table.result:
  SCCS merged
mysql-test/t/alter_table.test:
  SCCS merged
2006-12-13 15:53:37 +04:00
unknown
ddb182e53d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug22377/my41-bug22377
2006-12-13 14:05:29 +04:00
unknown
e7cd916e08 Improve error message that describes waitpid($pid) returned unexpected result 2006-12-12 12:28:02 +01:00
unknown
33446269e1 Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.



mysql-test/r/subselect.result:
  Added a test case for bug #24670.
mysql-test/t/subselect.test:
  Added a test case for bug #24670.
sql/item_subselect.cc:
  Fixed bug #24670: optimizations that are legal only for subqueries without tables
  and no WHERE condition were applied for any subquery without tables.
  
  Removed an assertion that caused an abort for subqueries without tables and no 
  WHERE condition. 
  Blocked substitution of a single-row subquery without tables for the constant 
  row from its select list when the subquery contained a WHERE condition.
  This optimization is valid only for subquries without tables with no conditions.
  Any subquery without tables with WHERE clause returns NULL if the WHERE condition
  is FALSE. Erroneously it was always considered as non-nullable that could trigger 
  another optimization concerning IS NULL predicates which is applicable only for 
  non-nullable expressions and ultimately led to a wrong result returned by the outer
  query.
  Added a proper implementation of the virtual method may_be_null for class 
  subselect_single_select_engine.
sql/item_subselect.h:
  Fixed bug #24670: optimizations that are legal only for subqueries without tables
  and no WHERE condition were applied for any subquery without tables.
  Made method may_by_null for class subselect_engine vvirtual.
2006-12-11 18:57:23 -08:00
unknown
4693771f28 Bug#20225 mysqltest runs in an endless loop when trying to start rpl_sys test suite
- Add printout in safe_connect indicating that mysqltest is in a loop waiting for
connection to mysqld. Will be printed when --verbose is passed as argument to
  mysqltest


client/mysqltest.c:
  Bug#20225 mysqltest runs in an endless loop when trying to start rpl_sys test suite
   - Add printout in safe_connect indicating that mysqltest is in a loop waiting for
  connection to mysqld
2006-12-11 15:39:15 +01:00
unknown
0295084e49 Merge bk-internal:/home/bk/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
2006-12-11 13:08:05 +01:00
unknown
e78b4fc276 Merge naruto.:C:/cpp/bug17489/my41-bug17489
into  naruto.:C:/cpp/mysql-4.1-maint
2006-12-11 13:06:59 +01:00
unknown
1c1c35d2b5 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2006-12-11 15:32:07 +04:00
unknown
0ce5985f11 Pass --no-defaults to embedded server to avoid that it reads any defaults file
mysql-test/mysql-test-run.pl:
  Pass "--no-defaults" to embedded server as "--server-arg=--no-defaults"
2006-12-11 12:16:20 +01:00
unknown
7dca488c3e Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1
into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
2006-12-11 10:51:29 +01:00
unknown
b8151c7e44 Makefile.am
- test* targets are identical (as much as possible) to 5.0 & 5.1 versions
    - use @PERL@ ./mysql-test-run.pl, instead of depending on /usr/bin/perl location
    - PHONY: target includes all test targets


Makefile.am:
  - test* targets are identical (as much as possible) to 5.0 & 5.1 versions
  - use @PERL@ ./mysql-test-run.pl, instead of depending on /usr/bin/perl location
  - PHONY: target includes all test targets
2006-12-08 16:17:46 -07:00
unknown
5aa8705ab6 Merge mysql.com:/home/bkroot/mysql-4.1-rpl
into  mysql.com:/home/bk/MERGE/mysql-4.1-merge


sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2006-12-08 23:33:15 +01:00
unknown
0abeff727d Bug#19410 Test 'kill' fails on Windows + SCO
mysql-test/t/kill.test:
  Move the connect of second connection to just before the query to be killed are sent.
  This introduces less variance since the connect time is not included in the delay
  we want between send of query and kill.
2006-12-08 17:09:07 +01:00
unknown
8fc4864ed7 Add missing space 2006-12-08 16:48:49 +01:00
unknown
e8d82549af Bug#19410 Test 'kill' fails on Windows + SCO
- Use "mysql_field_count" to determine if there is a need to
   call "mysql_store_result"


client/mysqltest.c:
  Only call 'mysql_store_result' if 'mysql_field_count' is greater than 0
  indicating that this query has a result set.  This change is mainly since
  if mysql_store_result fails the value returned by mysql_field_count will be reset.
2006-12-08 16:43:50 +01:00
unknown
33a098bf76 Bug#24498 Stack overflow in mysqltest
- Thanks to Vasil Dimov for the patch!


client/mysqltest.c:
  Use my_snprintf to protect against exceeding size of buff
  Since variable name and valu might not be null terminated it's necessary to
  provide the length of the format specifiers.
2006-12-08 16:08:54 +01:00
unknown
ca1aebbd57 Backport fix for mysqladmin on windows test failure 2006-12-08 13:37:40 +01:00
unknown
605f62ce32 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2006-12-08 12:20:48 +01:00
unknown
ca98fb63ad Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/embt/my41-embt


libmysqld/lib_sql.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-12-08 15:15:33 +04:00
unknown
e47ded8114 A fix and test cases for
Bug#4968 "Stored procedure crash if cursor opened on altered table"
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
stored procedure."
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"

Test cases for bugs 4968, 19733, 6895 will be added in 5.0.

Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).

The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table were not
re-execution friendly: during their operation they used to modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc 
for drop_it.remove() and similar patterns to find evidence.

The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement. 

To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.

The problem of crashing bug 22060 stemmed from the fact that the above 
metnioned functions were not only modifying HA_CREATE_INFO structure in 
LEX, but also were changing it to point to areas in volatile memory of 
the execution memory root.
 
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO (note that code in 5.1 already creates and
uses a copy of this structure in mysql_create_table()/alter_table(),
but this approach didn't work well for CREATE TABLE SELECT statement).


mysql-test/r/ps.result:
  Update test results (Bug#19182, Bug#22060)
mysql-test/t/ps.test:
  Add a test case for Bug#19182, Bug#22060 (4.1-only parts)
sql/mysql_priv.h:
  LEX::key_list and LEX::create_list were moved to LEX::alter_info.
  Update declarations to use LEX::alter_info instead of these two
  members.
sql/sql_class.h:
  Replace pair<columns, keys> with an instance of Alter_info in
  select_create constructor. We create a new copy of Alter_info
  each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
  Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
  Implement Alter_info::Alter_info that would make a "deep" copy
  of all definition lists (keys, columns).
sql/sql_lex.h:
  Move key_list and create_list to class Alter_info. Implement
  Alter_info::Alter_info that can be used with PS and SP.
sql/sql_list.h:
  Implement a copy constructor of class List that makes a deep copy
  of all list nodes.
sql/sql_parse.cc:
  Adjust to new signatures of mysql_create_table, mysql_alter_table,
  select_create. Functions mysql_create_index and mysql_drop_index has
  become identical after initialization of alter_info was moved to the 
  parser, and were merged. Flag enable_slow_log was not updated for 
  SQLCOM_DROP_INDEX, which is a bug. Just like CREATE INDEX, DROP INDEX
  is currently done via complete table rebuild and is rightfully a slow
  administrative statement.
sql/sql_show.cc:
  Adjust mysqld_show_create_db to a new signature.
sql/sql_table.cc:
  Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
  mysql_prepare_table to new signatures.
sql/sql_yacc.yy:
  LEX::key_list and LEX::create_list moved to class Alter_info
2006-12-08 02:20:09 +03:00
unknown
1267a7fb3c Bug#17498 failed to put data file in custom directory use "data directory" option
- Using DATA/INDEX DIRECTORY option on Windows put data/index file into
  default directory because the OS doesn't support readlink().
- The procedure for changing data/index file directory is 
  different under Windows.
- With this fix we report a warning if DATA/INDEX option is used,
  but OS doesn't support readlink().


mysql-test/r/windows.result:
  - updated result file.
mysql-test/t/windows.test:
  - Added test case to verify we get warnings if we specify DATA/INDEX
    DIRECTORY on a platform which doesn't support readlink().
sql/sql_parse.cc:
  - Added warnings if DATA/INDEX DIRECTORY option is used but not supported
    by the target platform.
2006-12-07 17:01:00 +01:00
unknown
60b3a86ad4 do not autorelease build ids when a child of mysql-test-run.pl dies
mysql-test/lib/mtr_unique.pl:
  do not autorelease build ids when a child dies
2006-12-07 16:06:29 +01:00
unknown
1d23a8f65b Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-4.1-ndb
2006-12-07 15:59:15 +01:00
unknown
6e47c11c7a Bug#24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld: Added test case 2006-12-07 15:49:59 +01:00
unknown
1cb8e4e9c9 BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the
table

ROW_FORMAT option is lost during CREATE/DROP INDEX.

This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing
mysql_alter_table() that ROW_FORMAT is not used during creating/dropping
indexes.


mysql-test/r/alter_table.result:
  A test case for bug#23404.
mysql-test/t/alter_table.test:
  A test case for bug#23404.
sql/sql_parse.cc:
  CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type
  to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not
  used during alteration, and thus must be retained.
2006-12-07 18:32:40 +04:00
unknown
c29d22c96d BUG#24780 use --sysconfdir in scripts
scripts/Makefile.am:
  pass --sysconfdir to scripts
scripts/mysqlaccess.sh:
  use --sysconfdir instead of hardcoded /etc
scripts/mysqld_multi.sh:
  use --sysconfdir instead of hardcoded /etc
2006-12-07 15:02:32 +01:00
unknown
63fce3a24e bug #22372
datafile added to be used in gis.test


mysql-test/std_data/bad_gis_data.dat:
  New BitKeeper file ``mysql-test/std_data/bad_gis_data.dat''
2006-12-06 21:47:29 +04:00