Commit graph

1391 commits

Author SHA1 Message Date
unknown
95334ac6c7 Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().


mysql-test/r/rpl_heap.result:
  result update
mysql-test/t/rpl_heap.test:
  testing a bug
sql/log.cc:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/mysql_priv.h:
  removing argument no_log from mysql_create_table(); no_log was perfect as some
  binlogging could still be done by open_unireg_entry() for a HEAP table.
sql/sql_class.h:
  new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/sql_parse.cc:
  removing no_log
sql/sql_table.cc:
  removing no_log from mysql_create_table(); instead using new class Disable_binlog.
  Disabling binlogging in some cases, where the binlogging is done later by some other code
  (case of CREATE SELECT and ALTER).
2004-08-19 00:29:11 +02:00
unknown
4dfe16c287 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_4358/mysql-4.0
2004-08-13 02:27:21 +05:00
unknown
a88902033a Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_4358/mysql-4.0


sql/sql_select.cc:
  Auto merged
2004-08-13 02:25:50 +05:00
unknown
7e5247aade fixed Bug #4358 Problem with HAVING clause that uses alias
from the select list and TEXT field 

make setup_copy_fields to insert Item_copy_string for blobs in 
the beginning of the copy_funcs (push_back instead of push_front)

the thing is that Item_copy_string::copy for function can call 
Item_copy_string::val_int for blob via Item_ref.
But if Item_copy_string::copy for blob isn't called before, 
it's value will be wrong.

So all the Item_copy_string::copy for blobs should be called before 
Item_copy_string::copy for functions.


mysql-test/r/having.result:
  added test case for
  Bug #4358 Problem with HAVING clause that uses
              alias from the select list and TEXT field
mysql-test/t/having.test:
  added test case for
  Bug #4358 Problem with HAVING clause that uses
              alias from the select list and TEXT field
sql/sql_select.cc:
  make setup_copy_fields to insert Item_copy_string for blobs in 
  the beginning of the copy_funcs (push_back instead of push_front)
  
  the thing is that Item_copy_string::copy for function can call 
  Item_copy_string::val_int for blob via Item_ref.
  But if Item_copy_string::copy for blob isn't called before, 
  it's value will be wrong.
  
  So all the Item_copy_string::copy for blobs should be called before 
  Item_copy_string::copy for functions.
  
  fixed 
  Bug #4358 Problem with HAVING clause that
             uses alias from the select list and TEXT field
2004-08-12 20:37:31 +05:00
unknown
ab9b33597e Added initial sorting in order to make test case repeatable. 2004-08-12 16:02:12 +05:00
unknown
1b666071d1 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b4898
2004-08-12 14:59:33 +05:00
unknown
6bd68efaf6 A test case (bug #4898: User privileges depending on ORDER BY Settings of table db) 2004-08-12 14:49:16 +05:00
unknown
acf5df3a6d Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/bug4411


BitKeeper/etc/logging_ok:
  auto-union
2004-08-11 23:26:44 +01:00
unknown
4f08c4b726 Bug#4411
Fix for server hang bug


mysql-test/r/heap.result:
  Bug#4411
    Test for server hang bug
mysql-test/t/heap.test:
  Bug#4411
    Test for server hang bug
sql/opt_sum.cc:
  Bug#4411
    Allow code to exit the loop.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-08-11 23:24:36 +01:00
unknown
4c6f6c60d5 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2004-08-11 23:44:08 +02:00
unknown
ab64eb64af Bug #4797 - 32 bit and 64 bit builds behave differently on int32 overflow
include/my_global.h:
  uint_max constants moved from sql_analyse.cc
sql/sql_analyse.cc:
  cleanup
2004-08-11 23:43:41 +02:00
unknown
5ee446d9d0 - fixed non-predictable floating point results in func_math by adding
format() around them (as suggested by serg)
2004-08-11 13:11:59 +02:00
unknown
3a00469e4a Fix for bug #4491 "timestamp(19) doesn't work".
We should allow 19 as length of newly created TIMESTAMP fields.


mysql-test/r/type_timestamp.result:
  Added test of TIMESTAMP(19) support.
mysql-test/t/type_timestamp.test:
  Added test of TIMESTAMP(19) support.
sql/sql_parse.cc:
  add_field_to_list(): TIMESTAMP columns should also support 19 as length since it is
  length of 4.1 compatible representation.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-08-06 12:15:40 +04:00
unknown
d14a27fdad bug#4816. index search for NULL in blob 2004-08-01 13:26:01 +02:00
unknown
9ca47d047e BUG#4393, BUG#4356 - incorrect decimals in fix_length_and_dec() in some functions
mysql-test/mysql-test-run.sh:
  report failed test name
mysql-test/r/func_math.result:
  test results fixed
2004-07-31 22:39:10 +02:00
unknown
65ba6aa293 BUG#4717 - check for valid table names in ALTER TABLE ... RENAME 2004-07-26 10:52:40 +02:00
unknown
382ff793bb Fix for BUG#4551 "Temporary InnoDB tables not replicated properly with CREATE TABLE .. SELECT"
The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because
of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY).


sql/sql_insert.cc:
  Fix for BUG#4551 "Temporary InnoDB tables not replicated properly with CREATE TABLE .. SELECT"
  The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because
  of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY).
  And it led to the above bug, because the binlogging of CREATE SELECT is done by select_insert::send_eof() (same function
  as INSERT SELECT) and so, if the table is transactional and there is a failure, the statement is considered as rolled
  back and so nothing is written in the binlog. So temp table MUST be deleted.
2004-07-18 14:34:35 +02:00
unknown
474c2578c5 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-07-17 17:10:52 +02:00
unknown
cf8dbcc683 Fixes for
BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines",
BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" with a test file.
It was not possible to add a test for BUG#4506 as in the test suite we must use --short-form
which does not display the "# at" lines.


client/mysqlbinlog.cc:
  Fix for BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines"
  when reading a remote binlog, the start position is not always BIN_LOG_HEADER_SIZE (4).
sql/sql_table.cc:
  Fix for BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table"
  we must my_error() _before_ we write to the binlog, so that a meaningful error code is available
  in thd->net.last_errno for storage of the DROP TABLE statement into the binlog.
2004-07-17 16:58:16 +02:00
unknown
139855210b InnoDB: limit the recursion depth for ON (UPDATE|DELETE) CASCADE
(Bug #4446)


innobase/row/row0ins.c:
  row_ins_foreign_check_on_constraint(): limit recursion for UPDATE too
mysql-test/r/innodb.result:
  Add test for recursion depth limit
mysql-test/t/innodb.test:
  Add test for recursion depth limit
2004-07-15 15:46:22 +03:00
unknown
cf8a6e52b7 s/\r\n/\n/ in mysql-test/*/system_mysql_db*
according to http://www.bitkeeper.com/Documentation.FAQS.Windows_NT.html


mysql-test/t/system_mysql_db.test:
  s/\r\n/\n/
mysql-test/t/system_mysql_db_fix-master.opt:
  s/\r\n/\n/
mysql-test/t/system_mysql_db_fix.test:
  s/\r\n/\n/
mysql-test/t/system_mysql_db_refs.test:
  s/\r\n/\n/
mysql-test/r/system_mysql_db.result:
  s/\r\n/\n/
mysql-test/r/system_mysql_db_refs.result:
  s/\r\n/\n/
2004-06-28 15:53:49 +05:00
unknown
f1257b3f91 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug2686
2004-06-25 14:44:37 +02:00
unknown
fb987c8907 Merge
sql/ha_berkeley.cc:
  Auto merged
mysql-test/r/bdb.result:
  SCCS merged
mysql-test/t/bdb.test:
  SCCS merged
2004-06-25 12:59:47 +02:00
unknown
0f42f82d2d Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug3565


sql/sql_table.cc:
  Auto merged
2004-06-25 12:14:54 +02:00
unknown
8f6664c59a bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Redesigned the handler close functions so that they are usable
at different places where waiting for closing tables is done.


mysql-test/r/flush_table.result:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Added the test results.
mysql-test/t/flush_table.test:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Activated old test case.
  Added new test cases.
sql/mysql_priv.h:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Made mysql_ha_close() more flexible.
  Removed mysql_ha_closeall(), which closed only one table despite its name.
  Added mysql_ha_close_list(), which closes the complete list or all tables and does not lock.
  Removed a duplicate declaration.
sql/sql_base.cc:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Added proper close calls before some wait points to avoid deadlocks
  or infinite loops.
sql/sql_handler.cc:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Redesigned the internal function find_table_ptr_by_name().
  It can now suppress locking and tells if the requested table
  has been flushed by itself.
  Extended mysql_ha_close() so that it can now suppres locking
  and error reporting. That way it can be used at more places and the
  old function mysql_ha_closeall() is now obsolete.
  Added a new function mysql_ha_close_list() which closes a whole list
  of HANDLER tables or all HANDLER tables, if the list is NULL.
  Furthermore is can close all 'old' (marked for flush) HANDLER tables.
sql/sql_table.cc:
  bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
  Replaced the obsolte mysql_ha_closeall() by the new mysql_ha_close().
2004-06-24 15:06:56 +02:00
unknown
afe29967e0 bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and 
unpacked with length size of the base column. 
For the purpose of optimal key packing we have the method pack_key(), while rows are 
packed with pack(). Now keys are unpacked with unpack_key() and no longer with 
unpack() which is used for rows.


mysql-test/r/bdb.result:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added the test case results.
mysql-test/t/bdb.test:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added the test case.
sql/field.cc:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added put_length() to get_length() and unpack_key() to pack_key().
  Keys were packed with the minimum size of the length field for the key part and 
  unpacked with length size of the base column. 
  For the purpose of optimal key packing we have the method pack_key(), while rows are packed 
  with pack(). Now keys are unpacked with unpack_key() and no longer with unpack() which is 
  used for rows.
sql/field.h:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added put_length() to get_length() and unpack_key() to pack_key().
  The default implementation simply calls unpack() for those field types that don't need 
  a special key unpacking.
sql/ha_berkeley.cc:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Now keys are unpacked with unpack_key() and no longer with unpack() which is used for rows.
  For most field types, however, this simply calls unpack().
2004-06-24 14:54:28 +02:00
unknown
098a1e3afa Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug2688
2004-06-24 12:07:00 +02:00
unknown
429f9d05a2 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-06-23 16:44:54 +03:00
unknown
3db93f8086 lower_case_table_names=2 (Keep case for table names) was not honored
with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
Make net_buffer_length visible for mysql clients (Bug #4206)


include/mysql.h:
  Make net_buffer_length visible for mysql clients
libmysql/libmysql.c:
  Make net_buffer_length visible for mysql clients
mysql-test/mysql-test-run.sh:
  Don't give warning for some common 'safe' warnings
mysql-test/r/lowercase_table2.result:
  Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
mysql-test/t/lowercase_table2.test:
  Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
scripts/mysql_install_db.sh:
  Removed not used variable
sql/sql_table.cc:
  lower_case_table_names=2 (Keep case for table names) was not honored
  with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
2004-06-23 16:44:34 +03:00
unknown
8f3b8de272 bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
dded code to clear the tail of the reference buffer if the actual key length 
is less than the maximum key length.


mysql-test/r/bdb.result:
  bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
  Added the test case results.
mysql-test/t/bdb.test:
  bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
  Added the test case.
sql/ha_berkeley.cc:
  bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
  Added code to clear the tail of the reference buffer if the actual key length 
  is less than the maximum key length.
2004-06-22 17:27:57 +02:00
unknown
306942c94c do not clear list of changed tables on one statement rollback (Bug #4213)
mysql-test/r/innodb_cache.result:
  test of rollback one statement in transaction
mysql-test/t/innodb_cache.test:
  test of rollback one statement in transaction
sql/handler.cc:
  clear changed tables list only for total roll back
2004-06-20 23:44:21 +03:00
unknown
2871477d5d Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-06-18 02:31:36 +03:00
unknown
209cfe7758 Fixed unlikely bug in the range optimzer when using many IN() queries on different key parts. (Bug #4157)
mysql-test/r/range.result:
  Test of range optimizer bug
mysql-test/t/range.test:
  Test of range optimizer bug
sql/opt_range.cc:
  Fixed unlikely bug in the range optimzer when using many IN() queries on
  different key parts. (Bug #4157)
2004-06-18 02:31:11 +03:00
unknown
d4c72a852d test suite for bug Bug#3969 (commited separetely because it took too long time to parse it on 3.23)
client/mysqltest.c:
  allow big commands in mysql-test
2004-06-11 16:25:18 +03:00
unknown
3e5eb498bc Merge with 3.23 to get latest bug fixes
mysql-test/t/type_date.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
mysql-test/r/type_date.result:
  merge with 3.23
2004-06-10 11:59:45 +03:00
unknown
e6c916ffa8 different (simpler and more compatible) fix for bug#4046 2004-06-09 00:08:24 +02:00
unknown
3665b3be90 Fix for bug #4036 multiple SELECT DATE_FORMAT, incorrect results 2004-06-07 20:35:05 +04:00
unknown
7dc2426be0 BUG#3987 - if(int, aggregate(int)) 2004-06-07 12:38:35 +02:00
unknown
64e98031b2 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b3738
2004-05-28 16:38:06 +05:00
unknown
0cb0e7f5b9 a fix.
(Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used,
 Bug#3845: wrong FOUND_ROWS result)
2004-05-28 15:01:16 +05:00
unknown
b2842c3c07 Portability fix for 32 bit file systems 2004-05-28 00:32:55 +03:00
unknown
a4d82ab8fe backport bug#2708 fix from 4.1
myisam/ft_boolean_search.c:
  perlify comment
2004-05-27 21:14:59 +02:00
unknown
32f2ecd475 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/dbdata/psergey/mysql-4.0-root
2004-05-19 23:20:42 +04:00
unknown
458f07519c Fix for Bug#3754 "SET GLOBAL myisam_max_sort_file_size doesn't
work as expected": precision-losing conversion removed from 
sys_var_thd_ulonglong.


mysql-test/r/variables.result:
  Test case for Bug#3754
mysql-test/t/variables.test:
  Test case for Bug#3754
sql/set_var.cc:
  Fix for Bug#3754: precision-losing conversion removed from 
  sys_var_thd_ulonglong.
2004-05-19 16:42:29 +04:00
unknown
cdf7471c2c Fix and test case for BUG#3649.
mysql-test/r/handler.result:
  Test case for BUG#3649
mysql-test/t/handler.test:
  Test case for BUG#3649
sql/sql_handler.cc:
  Fix for BUG#3649: when doing an index scan for an equality condition, use index_next_same to retrieve subsequent rows.
2004-05-18 22:59:43 +04:00
unknown
efbf373be7 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b3756
2004-05-18 13:56:40 +05:00
unknown
f948d7bb24 added newline at the end of the file. 2004-05-17 13:40:02 +05:00
unknown
ff23273b7a A fix (bug #3756: ISNULL(QUOTE()) returns 1 for every row after 1st NULL) 2004-05-17 12:47:16 +05:00
unknown
028a672fd6 Replication testsuite: making the master-slave synchronization less likely to fail,
by adding sleep-and-retries (max 4 times) if MASTER_POS_WAIT() returns NULL
in sync_with_master and sync_slave_with_master.
The problem showed up only today, in MySQL 5.0 in rpl_server_id2.test,
but may affect 4.x as well, so fixing it here. Note that I am also fixing
5.0 too, with the same exact patch, because I don't want to leave 5.0 broken
until the next 4.0->4.1->5.0 merge.


client/mysqltest.c:
  in sync_with_master (and sync_slave_with_master), if MASTER_POS_WAIT() returns NULL,
  it may be that the slave SQL thread did not have time to start yes, so we sleep
  1 sec and retry, 4 times at most.
mysql-test/r/rpl_server_id2.result:
  result update
mysql-test/t/rpl_server_id2.test:
  master_slave.inc already drops the table
2004-05-14 23:08:03 +02:00
unknown
699cbc02cc Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2004-05-11 12:20:04 +02:00