Commit graph

3569 commits

Author SHA1 Message Date
unknown
aa3727d7dc select.result:
After revision of the fix for bug #7520.
table.cc:
  Revised the fix for bug #7520.
  Made it compliant with 5.0 code where the bug does not exist.


sql/table.cc:
  Revised the fix for bug #7520.
  Made it compliant with 5.0 code where the bug does not exist.
mysql-test/r/select.result:
  After revision of the fix for bug #7520.
2005-02-11 10:39:26 -08:00
unknown
9540945624 select.result, select.test:
Added a test case for bug #7520.
table.cc:
  Fixed bug #7520.
  The bug was caused by a wrong calculation of the field max_key_length for
  a TABLE structure when there was an index on a blob field.


sql/table.cc:
  Fixed bug #7520.
  The bug was caused by a wrong calculation of the field max_key_length for
  a TABLE structure when there was an index on a blob field.
mysql-test/t/select.test:
  Added a test case for bug #7520.
mysql-test/r/select.result:
  Added a test case for bug #7520.
2005-02-10 22:15:38 -08:00
unknown
6d0d03dab9 Fix QUOTE() to not reuse the input field for output, which resulted in
incorrect results when the input was a constant across a multi-row SELECT
statement. (Bug #8248)


sql/item_strfunc.h:
  Add tmp_value member
sql/item_strfunc.cc:
  Always allocate a new string for QUOTE(), in case the field is being reused
  for multiple rows.
mysql-test/t/func_str.test:
  Add regression test
mysql-test/r/func_str.result:
  Add test results
2005-02-01 18:29:10 -08:00
unknown
faca00b5d5 Merge mysql.com:/home/jimw/my/mysql-4.0-5569
into mysql.com:/home/jimw/my/mysql-4.0-clean


sql/sql_parse.cc:
  Auto merged
2005-02-01 15:38:27 -08:00
unknown
7da72c932e Remove #if 0 as this only confuses the code withing adding anything 2005-02-01 15:36:48 +02:00
unknown
30025f3fdc Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-31 09:34:34 +02:00
unknown
934fde094c Bug#7011
Fix replication for multi-update
  new test - rpl_multi_update2


sql/mysql_priv.h:
  Bug#7011
    New function mysql_multi_update_lock()
sql/sql_parse.cc:
  Bug#7011
    New function check_multi_update_lock()
    For multi-update on slave, perform an early open&lock
sql/sql_update.cc:
  Bug#7011
    Split out multi-update locking into its own function,
      mysql_multi_update_lock()
2005-01-30 10:24:03 +00:00
unknown
0b7ca5e847 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-28 14:17:49 +02:00
unknown
a12d52a1d7 InnoDB: Tolerate negative return values from ftell().
sql/ha_innodb.cc:
  Tolerate negative return values from ftell().
2005-01-27 14:05:44 +02:00
unknown
f7ad204606 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-26 14:07:40 +02:00
unknown
360d32f201 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000
2005-01-26 09:07:25 +01:00
unknown
8deafa8037 order_by.result, order_by.test:
Added a test case for bug #7672.
sql_yacc.yy:
  Fixed bug #7672.
  Made queries of the form (SELECT ...) ORDER BY ... to
  be equivalent to SELECT ... ORDER BY ...


sql/sql_yacc.yy:
  Fixed bug #7672.
  Made queries of the form (SELECT ...) ORDER BY ... to
  be equivalent to SELECT ... ORDER BY ...
mysql-test/t/order_by.test:
  Added a test case for bug #7672.
mysql-test/r/order_by.result:
  Added a test case for bug #7672.
2005-01-25 14:30:38 -08:00
unknown
e1b8a004fe Always call vio_in_addr() so that thd->remote is
always initialized. (Bug #5569)


vio/viosocket.c:
  Remove comment that is no longer correct
sql/sql_parse.cc:
  Always call vio_in_addr() on successful connection,
  so that thd->remote always gets set
vio/viossl.c:
  Remove comment that is no longer correct
2005-01-25 12:06:55 -08:00
unknown
f35117ea34 InnoDB: Backport innodb_autoextend_increment from 4.1
innobase/include/srv0srv.h:
  Add configuration variable srv_auto_extend_increment
innobase/srv/srv0srv.c:
  Add configuration variable srv_auto_extend_increment
sql/ha_innodb.h:
  Add configuration variable srv_auto_extend_increment
sql/mysqld.cc:
  Add startup option innodb_autoextend_increment
sql/set_var.cc:
  Add settable global variable innodb_autoextend_increment
2005-01-25 16:27:13 +02:00
unknown
d7d7741e5b Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000


sql/sql_select.cc:
  Auto merged
2005-01-24 10:08:45 +01:00
unknown
25c2d1adb0 select_found.result, select_found.test:
Added a test case for bug #7945.
sql_select.cc:
  Fixed bug #7945. If DISTINCT is used only with constants
  in a query with GROUP BY, we can apply an optimization
  that set LIMIT to 1 only in the case when there is 
  no SQL_CALC_FOUND_ROWS.


sql/sql_select.cc:
  Fixed bug #7945. If DISTINCT is used only with constants
  in a query with GROUP BY, we can apply an optimization
  that set LIMIT to 1 only in the case when there is 
  no SQL_CALC_FOUND_ROWS.
mysql-test/t/select_found.test:
  Added a test case for bug #7945.
mysql-test/r/select_found.result:
  Added a test case for bug #7945.
2005-01-22 02:40:27 -08:00
unknown
4095dbb973 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000
2005-01-20 16:17:33 +01:00
unknown
353bc07096 BUG#6034 - Error code 124: Wrong medium type.
Version for 4.0. Committed for merge.
If the result table is one of the select tables in INSERT SELECT,
we must not disable the result tables indexes before selecting.
mysql_execute_command() detects the match for other reasons and
adds the flag OPTION_BUFFER_RESULT to the 'select_options'. 
In this case the result is put into a temporary table first. 
Hence, we can defer the preparation of the insert
table until the result is to be used.


mysql-test/r/insert_select.result:
  BUG#6034 - Error code 124:  Wrong medium type.
  The test results.
mysql-test/t/insert_select.test:
  BUG#6034 - Error code 124:  Wrong medium type.
  The test case.
sql/sql_select.cc:
  BUG#6034 - Error code 124:  Wrong medium type.
  With OPTION_BUFFER_RESULT in the 'select_options',
  defer the preparation of the insert table until the 
  result is to be used. Unfortunately, this happens
  at several places.
2005-01-19 21:13:30 +01:00
unknown
803774958c Merge mysql.com:/home/jimw/my/mysql-4.0-7700
into mysql.com:/home/jimw/my/mysql-4.0-clean
2005-01-18 11:39:10 -08:00
unknown
9ed0d85550 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg7884
2005-01-18 17:05:09 +03:00
unknown
b1a0f67a03 Clean up in implementation of f_is_geom()/f_is_bitfield()/f_is_enum()
macros.

It does not fixes any bugs in 4.0. But it prevents from future error in
any bugfixes that may use these macros. Also after merging into 4.1 tree
this cleanup will fix bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix".


sql/field.h:
  Since FIELDFLAG_INTERVAL, FIELDFLAG_BITFIELD, FIELDFLAG_BLOB and
  FIELDFLAG_GEOM flags occupy the same space as number of decimals for
  FIELDFLAG_NUMBER fields, it is safer to check in "f_is_geom()"-type
  macros that we have non-number field, like we already do in f_is_blob()
  macro.
2005-01-18 17:04:16 +03:00
unknown
dd68385435 Fix over-optimization that could result in an unsigned double field being
set to a negative value. (Bug #7700)


sql/field_conv.cc:
  Don't treat real fields as identical when destination is unsigned and
  the source is not.
mysql-test/t/type_float.test:
  Add test for setting double unsigned to a negative value from a signed double
mysql-test/r/type_float.result:
  Add test results
2005-01-17 16:13:56 -08:00
unknown
896cdbe5df Anoter fix for moved IO_CACHE object 2005-01-18 02:04:41 +02:00
unknown
deac81af88 Fixed possible access to unintialized memory in filesort when using many buffers
include/my_sys.h:
  Added function to call if IO_CACHE is moved
mysys/mf_iocache.c:
  Added function to call if IO_CACHE is moved
sql/filesort.cc:
  Tell that io_cache is moved
2005-01-15 03:47:06 +02:00
unknown
d90e3b497f ha_innodb.cc:
Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables


sql/ha_innodb.cc:
  Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
2005-01-13 19:20:49 +02:00
unknown
1e63ecd035 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-13 16:16:05 +02:00
unknown
b692ca4fd5 A fix for Bug#6761 "mysql_list_fields() does not work": test
case will be added to client_test in 4.1


sql/sql_parse.cc:
  A fix for bug #6761: "mysql_list_fields() does not work": init
  thd->query_length, which is used next line. Remove a stale comment.
2005-01-12 17:04:45 +03:00
unknown
c65c72f01a InnoDB: Use system-supplied tmpfile() on Netware, as there is no
open interface for setting the "delete-on-close" flag.


innobase/os/os0file.c:
  Use system-supplied tmpfile() on Netware
sql/ha_innodb.cc:
  Remove innobase_mysql_tmpfile() on Netware.
2005-01-12 15:24:49 +02:00
unknown
7310387078 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/mysqld.cc:
  Auto merged
2005-01-12 12:35:34 +01:00
unknown
0bcfc49b4b added missing Com_update_multi status variable 2005-01-12 12:18:17 +01:00
unknown
d8d9f79e09 Fix for BUG#7658 "optimize crashes slave thread (1 in 1000)]":
mysql_admin_table() attempted to write to a vio which was 0. I could have fixed mysql_admin_table()
but fixing my_net_write() looked more future-proof.


sql/net_serv.cc:
  If no VIO, no write.
2005-01-10 13:52:32 +01:00
unknown
8ffe8ab302 Make query_cache_wlock_invalidate visible in SHOW VARIABLES (Bug #7594)
sql/set_var.cc:
  Make query_cache_wlock_invalidate visible in SHOW VARIABLES
2005-01-04 02:45:01 +01:00
unknown
f077d4b06b Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0
2004-12-31 12:55:42 +01:00
unknown
40a0199e77 unsufficient privilege checks in GRANT, when a grantor has column-level privileges 2004-12-30 21:01:11 +01:00
unknown
15017480a7 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg7297
2004-12-30 21:18:45 +03:00
unknown
1ffd688a4a Fix for bug #7515 "from_unixtime(0) now returns NULL instead of
the Epoch". (With after review fixes).


mysql-test/r/func_time.result:
  Added test for bug #7515 "from_unixtime(0) now returns NULL instead of
  the Epoch".
mysql-test/t/func_time.test:
  Added test for bug #7515 "from_unixtime(0) now returns NULL instead of
  the Epoch".
sql/item_timefunc.cc:
  Item_func_from_unixtime:
   from_unixtime(0) should return Epoch instead of NULL.
sql/item_timefunc.h:
  Item_func_from_unixtime:
   - Removed unused method definition.
   - fix_length_and_dec() should set maybe_null to true since now
     from_unixtime() can return NULL even in case when none of its
     arguments is NULL.
2004-12-30 21:18:10 +03:00
unknown
50bd606d06 A fix (bug #5652: [patch] tcpwrapper support is broken on systems using an unmodified tcpwrapper).
sql/mysqld.cc:
  A fix (bug #5652: [patch] tcpwrapper support is broken on systems using an unmodified tcpwrapper).
  Wrapper for fromhost, hosts_access, eval_client has been removed.
2004-12-24 18:52:24 +04:00
unknown
8feedada9d Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
2004-12-23 21:11:31 +02:00
unknown
8ccfad7636 Fix for a bug #7495
mysql-test/r/func_str.result:
  result for test case for a bug in QUOTE() (Bug #7495)
mysql-test/t/func_str.test:
  test case for a bug in QUOTE() (Bug #7495)
sql/item_strfunc.cc:
  a better fix for a QUOTE() bug (Bug #7495)
2004-12-23 21:08:54 +02:00
unknown
4a5ca0bc63 Make GRANTs, which change SSL attributes and/or user limits,
to behave well on 5.0 tables (well now you can't use tables from 4.1
and 5.0 with 4.0 because former use utf8, but still it is nice to have
similar code in acl_init() and replace_user_table()).
This also will make such GRANTs working in 5.0 (they are broken now).


mysql-test/r/grant.result:
  Added test for GRANT which manipulates user limits.
mysql-test/t/grant.test:
  Added test for GRANT which manipulates user limits.
2004-12-23 21:59:36 +03:00
unknown
74cc635a7c A fix for the bug #7495
mysql-test/r/func_str.result:
  A result for test case for the bug #7495 involving either LTRIM() 
  or TRIM() within QUOTE() function.
mysql-test/t/func_str.test:
  A test case for the bug #7495 involving either LTRIM() or TRIM() 
  within QUOTE() function.
sql/item_strfunc.cc:
  Changes for LTRIM() and TRIM() functions that aleviate the bug  
  entirely.
2004-12-22 21:31:17 +02:00
unknown
e6dfed9f4c ha_innodb.cc:
If AUTOCOMMIT=1, do not acquire an InnoDB table lock in LOCK TABLES; this makes porting of old MyISAM applications to InnoDB easier, since in that mode InnoDB table locks caused deadlocks very easily


sql/ha_innodb.cc:
  If AUTOCOMMIT=1, do not acquire an InnoDB table lock in LOCK TABLES; this makes porting of old MyISAM applications to InnoDB easier, since in that mode InnoDB table locks caused deadlocks very easily
2004-12-22 11:01:25 +02:00
unknown
2ca011d460 Simplify code during review 2004-12-18 13:45:19 +02:00
unknown
c6be66530a Remove bogus lines 2004-12-18 02:34:11 +00:00
unknown
4f9a0a06a8 Bug#7391 - Multi-table UPDATE security regression
Add in missing privilege checks. 
  Tests for the privileges.


mysql-test/r/grant.result:
  Bug#7391 - Multi-table UPDATE security regression
    Tests column, table and db level access
mysql-test/t/grant.test:
  Bug#7391 - Multi-table UPDATE security regression
    Tests column, table and db level access
sql/sql_update.cc:
  Bug#7391 - Multi-table UPDATE security regression
    Add in missing privilege checks.
2004-12-18 02:07:32 +00:00
unknown
2fb340b520 Fix for bug #7297 "Two digit year should be interpreted correctly
even with zero month and day" aka "Date decoding trouble"

Two digit year should be interpreted correctly as year in 20th or 21st
century even with zero month and day. Only exception should be zero date
'00-00-00' or '00-00-00 00:00:00'.


mysql-test/r/type_datetime.result:
  Added test for bug #7297 "Two digit year should be interpreted correctly
  even with zero month and day"
mysql-test/t/type_datetime.test:
  Added test for bug #7297 "Two digit year should be interpreted correctly
  even with zero month and day"
sql/time.cc:
  str_to_TIME(): Two digit year should be interpreted correctly as year
  in 20th or 21st century even with zero month and day. Only exception 
  should be zero date '00-00-00' or '00-00-00 00:00:00'.
2004-12-16 16:31:50 +03:00
unknown
b18e8c92bc Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/dbdata/psergey/mysql-4.0-bug6976
2004-12-11 20:02:45 +03:00
unknown
b5c119e7c0 Fix for BUG#6976:
In Item_ref::Item_ref set maybe_null (and other fields fix_fields sets) to be the 
same as in (*ref), because Item_ref::fix_fields() will not be called.  Previously 
maybe_null was 0 always and this produced a bogus state where 
maybe_null==0 && is_null() == true 
which broke evaluation for some upper-level Items, like AND and OR.


mysql-test/r/group_by.result:
  Test for BUG#6976
mysql-test/t/group_by.test:
  Test for BUG#6976
sql/item.cc:
  Comment added
sql/item.h:
  Fix for BUG#6976:
    in Item_ref::Item_ref(Item**...) fix all fields because fix_fields() will not be called.
2004-12-11 19:59:09 +03:00
unknown
8e4251dd85 Fix for BUG#5837 - attempt 3.
Call mark_as_null_row in join_read_const and join_read_system.


mysql-test/r/multi_update.result:
  Testcase for BUG#5837
mysql-test/t/multi_update.test:
  Testcase for BUG#5837
sql/table.h:
  Added comments
2004-12-11 15:51:52 +03:00
unknown
c486461e44 dict0dict.h, dict0dict.c, ha_innodb.cc:
Fix for the 0xA0 character problem in the InnoDB FOREIGN KEY parser: if my_isspace() treats 0xA0 as space, then let InnoDB do the same; this might break some multi-byte charset id's, though for big5, ujis, sjis this seems not to change the current behavior (I checked the tables in /share/charsets); this fix must NOT be merged to 4.1 because in 4.1 everything is in UTF-8


sql/ha_innodb.cc:
  Fix for the 0xA0 character problem in the InnoDB FOREIGN KEY parser: if my_isspace() treats 0xA0 as space, then let InnoDB do the same; this might break some multi-byte charset id's, though for big5, ujis, sjis this seems not to change the current behavior (I checked the tables in /share/charsets); this fix must NOT be merged to 4.1 because in 4.1 everything is in UTF-8
innobase/dict/dict0dict.c:
  Fix for the 0xA0 character problem in the InnoDB FOREIGN KEY parser: if my_isspace() treats 0xA0 as space, then let InnoDB do the same; this might break some multi-byte charset id's, though for big5, ujis, sjis this seems not to change the current behavior (I checked the tables in /share/charsets); this fix must NOT be merged to 4.1 because in 4.1 everything is in UTF-8
innobase/include/dict0dict.h:
  Fix for the 0xA0 character problem in the InnoDB FOREIGN KEY parser: if my_isspace() treats 0xA0 as space, then let InnoDB do the same; this might break some multi-byte charset id's, though for big5, ujis, sjis this seems not to change the current behavior (I checked the tables in /share/charsets); this fix must NOT be merged to 4.1 because in 4.1 everything is in UTF-8
2004-12-10 17:12:47 +02:00