Commit graph

5287 commits

Author SHA1 Message Date
unknown
97c4143e3a Merge bk-internal.mysql.com:/data0/bk/mysql-4.1
into  bk-internal.mysql.com:/data0/bk/mysql-4.1-opt
2007-03-31 09:52:18 +02:00
unknown
080c0c7ac8 BUG#26624: high mem usage (crash) in range optimizer
Pushbuild fixes: 
 - Make MAX_SEL_ARGS smaller (even 16K records_in_range() calls is 
   more than it makes sense to do in typical cases)
 - Don't call sel_arg->test_use_count() if we've already allocated 
   more than MAX_SEL_ARGs elements. The test will succeed but will take
   too much time for the test suite (and not provide much value).


mysql-test/r/range.result:
  BUG#26624: high mem usage (crash) in range optimizer
  Pushbuild fixes: make the test go faster
mysql-test/t/range.test:
  BUG#26624: high mem usage (crash) in range optimizer
  Pushbuild fixes: make the test go faster
2007-03-31 00:29:18 +04:00
unknown
9639eb3dda BUG#26624: high mem usage (crash) in range optimizer
- Added PARAM::alloced_sel_args where we count the # of SEL_ARGs
  created by SEL_ARG tree cloning operations.
- Made the range analyzer to shortcut and not do any more cloning 
  if we've already created MAX_SEL_ARGS SEL_ARG objects in cloning.
- Added comments about space complexity of SEL_ARG-graph 
  representation.


mysql-test/r/range.result:
  BUG#26624: Testcase
mysql-test/t/range.test:
  BUG#26624: Testcase
2007-03-28 20:16:01 +04:00
unknown
cd07f122ad Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-03-28 08:59:30 +02:00
unknown
30bf8b6996 Merge chilla.local:/home/mydev/mysql-4.1-bug26231
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-03-28 08:57:46 +02:00
unknown
fd3b723562 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug24985


mysql-test/r/heap_btree.result:
  Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
              causes incorrect duplicate entries
  Manual merge
mysql-test/t/heap_btree.test:
  Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
              causes incorrect duplicate entries
  Manual merge
2007-03-28 08:51:12 +02:00
unknown
1fd0ba8909 Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
causes incorrect duplicate entries

Keys for BTREE indexes on ENUM and SET columns of MEMORY tables
with character set UTF8 were computed incorrectly. Many
different column values got the same key value.

Apart of possible performance problems, it made unique indexes
of this type unusable because it rejected many different
values as duplicates.

The problem was that multibyte character detection was tried
on the internal numeric column value. Many values were not
identified as characters. Their key value became blank filled.

Thanks to Alexander Barkov and Ramil Kalimullin for the patch,
which sets the character set of ENUM and SET key segments to
the pseudo binary character set.


mysql-test/r/heap_btree.result:
  Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
              causes incorrect duplicate entries
  Added test result.
mysql-test/t/heap_btree.test:
  Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
              causes incorrect duplicate entries
  Added test.
sql/ha_heap.cc:
  Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE
              causes incorrect duplicate entries
  Set key segment charset to my_charset_bin for ENUM and SET
  columns.
2007-03-27 10:49:48 +02:00
unknown
3335f68d89 Bug #27164: not reseting the data pointer
to 0 causes wrong (large) length to be read
 from the row in _mi_calc_blob_length() when 
 storing NULL values in (e.g) POINT columns.
 This large length is then used to allocate
 a block of memory that (on some OSes) causes
 trouble.
 Fixed by calling the base class's 
 Field_blob::reset() from Field_geom::reset()
 that is called when storing a NULL value into
 the column.


mysql-test/r/gis.result:
  Bug #27164: test case
mysql-test/t/gis.test:
  Bug #27164: test case
sql/field.h:
  Bug #27164: not reseting the data pointer
   to 0 causes wrong (large) length to be read
   from the row in _mi_calc_blob_length() when 
   storing NULL values in (e.g) POINT columns.
   This large length is then used to allocate
   a block of memory that (on some OSes) causes
   trouble.
2007-03-26 13:17:40 +03:00
unknown
f9cf31c4df Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug26996
2007-03-23 08:28:21 +01:00
unknown
50b5064ccd bug #16546 (DATETIME + 0 not always coerced in the same way)
fix for cast( AS DATETIME) + 0 operation.
  I just implemented Item_datetime_typecast::val() method
  as it is usually done in other classes.
  Should be fixed more radically in 5.0


mysql-test/r/type_datetime.result:
  result added
mysql-test/t/type_datetime.test:
  testcase
sql/item_timefunc.h:
  added double conversion to Item_datetime_typecast
2007-03-22 12:24:56 +04:00
unknown
db573e637c Bug#26996 - Update of a Field in a Memory Table ends with wrong result
Using a MEMORY table BTREE index for scanning for updatable rows
could lead to an infinite loop.

Everytime a key was inserted into a btree index, the position
in the index scan was cleared. The search started from the
beginning and found the same key again.

Now we do not clear the position on key insert an more.


heap/hp_write.c:
  Bug#26996 - Update of a Field in a Memory Table ends with wrong result
  Removed the index-scan-breaking nulling of last_pos.
  The comment behind this line ("For heap_rnext/heap_rprev")
  was misleading. It should have been "Breaks heap_rnext/heap_rprev".
mysql-test/r/heap_btree.result:
  Bug#26996 - Update of a Field in a Memory Table ends with wrong result
  Added test result.
mysql-test/t/heap_btree.test:
  Bug#26996 - Update of a Field in a Memory Table ends with wrong result
  Added test.
2007-03-19 15:56:53 +01:00
unknown
396f84aa82 Bug#26231 - select count(*) on myisam table returns wrong value
when index is used

When the table contained TEXT columns with empty contents
('', zero length, but not NULL) _and_ strings starting with
control characters like tabulator or newline, the empty values
were not found in a "records in range" estimate. Hence count(*)
missed these records.

The reason was a different set of search flags used for key
insert and key range estimation.

I decided to fix the set of flags used in range estimation.
Otherwise millions of databases around the world would require
a repair after an upgrade.

The consequence is that the manual must be fixed, which claims
that TEXT columns are compared with "end space padding". This
is true for CHAR/VARCHAR but wrong for TEXT. See also bug 21335.


myisam/mi_range.c:
  Bug#26231 - select count(*) on myisam table returns wrong value
              when index is used
  Added SEARCH_UPDATE to the search flags so that it compares
  like write/update/delete operations do. Only so it expects
  the keys at the place where they have been inserted.
myisam/mi_search.c:
  Bug#26231 - select count(*) on myisam table returns wrong value
              when index is used
  Added some comments to explain how _mi_get_binary_pack_key()
  works.
mysql-test/r/myisam.result:
  Bug#26231 - select count(*) on myisam table returns wrong value
              when index is used
  Added a test.
mysql-test/t/myisam.test:
  Bug#26231 - select count(*) on myisam table returns wrong value
              when index is used
  Added test result.
2007-03-16 10:28:48 +01:00
unknown
969b71653d BUG#26881 - Large MERGE tables report incorrect specification when no
differences in tables
Certain merge tables were wrongly reported as having incorrect definition:
- Some fields that are 1 byte long (e.g. TINYINT, CHAR(1)), might
  be internally casted (in certain cases) to a different type on a
  storage engine layer. (affects 4.1 and up)
- If tables in a merge (and a MERGE table itself) had short VARCHAR column (less
  than 4 bytes) and at least one (but not all) tables were ALTER'ed (even to an
  identical table: ALTER TABLE xxx ENGINE=yyy), table definitions went ouf of
  sync. (affects 4.1 only)

This is fixed by relaxing a check for underlying conformance and setting
field type to FIELD_TYPE_STRING in case varchar is shorter than 4
when a table is created.


myisam/mi_create.c:
  Added a comment.
mysql-test/r/merge.result:
  A test case for bug#26881.
mysql-test/t/merge.test:
  A test case for bug#26881.
sql/ha_myisam.cc:
  Relaxed some checks performed by check_definition():
  As comparing of fulltext keys (and key segments) is not yet implemented,
  only return an error in case one of keys is fulltext and other is not.
  Otherwise, if both keys are fulltext, accept them as is.
  
  As comparing of spatial keys (and key segments) is not yet implemented,
  only return an error in case one of keys is spatial and other is not.
  Otherwise, if both keys are spatial, accept them as is.
  
  A workaround to handle situation when field is casted from FIELD_SKIP_ZERO
  to FIELD_NORMAL. This could happen only in case field length is 1 and row
  format is fixed.
sql/sql_parse.cc:
  When a table that has varchar field shorter than 4 is created, field type is
  set to FIELD_TYPE_VAR_STRING. Later, when a table is modified using alter
  table, field type is changed to FIELD_TYPE_STRING (see Field_string::type).
  That means HA_OPTION_PACK_RECORD flag might be lost and thus null_bit might
  be shifted by alter table, in other words alter table doesn't create 100%
  equal table definition.
  
  This is usually not a problem, since when a table is created/altered,
  definition on a storage engine layer is based on one that is passed from
  sql layer. But it is a problem for merge engine - null_bit is shifted when
  a table (merge or underlying) is altered.
  
  Set field type to FIELD_TYPE_STRING in case FIELD_TYPE_VAR_STRING is shorter
  than 4 when a table is created as it is done in Field::type.
2007-03-13 18:02:06 +04:00
unknown
e266365cad Merge mysql.com:/home/svoj/devel/bk/mysql-4.1
into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-engines
2007-03-13 16:57:16 +04:00
unknown
9f911a4cf8 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug25673
2007-03-10 17:01:52 +01:00
unknown
0fcd9c2bfb Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mrg/mysql-4.1-opt
2007-03-08 21:14:31 +04:00
unknown
548a39a104 Bug#25673 - spatial index corruption, error 126
incorrect key file for table

In certain cases it could happen that deleting a row could
corrupt an RTREE index.

According to Guttman's algorithm, page underflow is handled
by storing the page in a list for later re-insertion. The
keys from the stored pages have to be inserted into the
remaining pages of the same level of the tree. Hence the
level number is stored in the re-insertion list together
with the page.

In the MySQL RTree implementation the level counts from zero
at the root page, increasing numbers for levels down the tree.

If during re-insertion of the keys the tree height grows, all
level numbers become invalid. The remaining keys will be
inserted at the wrong level.

The fix is to increment the level numbers stored in the
reinsert list after a split of the root block during reinsertion.


myisam/rt_index.c:
  Bug#25673 - spatial index corruption, error 126
              incorrect key file for table
  Added a loop in rtree_delete() to increment the level numbers
  stored in the reinsert list after a split of the root block
  during reinsertion.
  Added comments and DBUG statements.
myisam/rt_key.c:
  Bug#25673 - spatial index corruption, error 126
              incorrect key file for table
  Added DBUG statements.
myisam/rt_split.c:
  Bug#25673 - spatial index corruption, error 126
              incorrect key file for table
  Added DBUG statements.
mysql-test/r/gis-rtree.result:
  Bug#25673 - spatial index corruption, error 126
              incorrect key file for table
  Added the test result.
mysql-test/t/gis-rtree.test:
  Bug#25673 - spatial index corruption, error 126
              incorrect key file for table
  Added a test.
2007-03-08 09:54:37 +01:00
unknown
cd5140d389 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-4.1-runtime
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/41
2007-03-07 07:02:00 +01:00
unknown
49110f3e30 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/ram/work/b26038/b26038.4.1
2007-03-05 18:21:52 +04:00
unknown
da9c659c81 Bug#26464 - insert delayed + update + merge = corruption
Using INSERT DELAYED on MERGE tables could lead to table
corruptions.

The manual lists a couple of storage engines, which can be
used with INSERT DELAYED. MERGE is not in this list.

The attempt to try it anyway has not been rejected yet.
This bug was not detected earlier as it can work under
special circumstances. Most notable is low concurrency.

To be safe, this patch rejects any attempt to use INSERT
DELAYED on MERGE tables.


mysql-test/r/merge.result:
  Bug#26464 - insert delayed + update + merge = corruption
  Added test result.
mysql-test/t/merge.test:
  Bug#26464 - insert delayed + update + merge = corruption
  Added test.
sql/ha_myisammrg.h:
  Bug#26464 - insert delayed + update + merge = corruption
  Removed HA_CAN_INSERT_DELAYED flag from table_flags().
  The insert delayed thread upgrades the lock from the first
  entry in MYSQL_LOCK::locks only. Hence it is incapable to
  handle MERGE tables, which have as many entries in this
  array as they have MyISAM sub-tables.
2007-03-05 11:52:28 +01:00
unknown
6db4978947 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/ram/work/b23616/b23616.4.1
2007-03-05 12:07:59 +04:00
unknown
72773f4f8a Bug#25126: Wrongly resolved field leads to a crash.
When the ORDER BY clause gets fixed it's allowed to search in the current
item_list in order to find aliased fields and expressions. This is ok for a
SELECT but wrong for an UPDATE statement. If the ORDER BY clause will
contain a non-existing field which is mentioned in the UPDATE set list
then the server will crash due to using of non-existing (0x0) field.

When an Item_field is getting fixed it's allowed to search item list for
aliased expressions and fields only for selects.


sql/sql_base.cc:
  Bug#25126: Wrongly resolved field leads to a crash.
  When an Item_field is getting fixed it's allowed to search item list for
  aliased expressions and fields only for selects.
sql/sql_select.cc:
  Bug#25126: Wrongly resolved field leads to a crash.
  When an Item_field is getting fixed it's allowed to search item list for
  aliased expressions and fields only for selects.
mysql-test/r/update.result:
  Added a test case for bug#25126: Wrongly resolved field leads to a crash.
mysql-test/t/update.test:
  Added a test case for bug#25126: Wrongly resolved field leads to a crash.
2007-03-04 00:47:42 +03:00
unknown
71d12e9f31 Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-4.1-runtime


sql/sql_parse.cc:
  Auto merged
2007-03-01 05:59:16 -07:00
unknown
cbb38476e1 Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
Having maybe_null flag unset for geometry/spatial functions leads to
wrong Item_func_isnull::val_int()'s results.
Fix: set maybe_null flag and add is_null() methods.


mysql-test/r/gis.result:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - test result.
mysql-test/t/gis.test:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - test case.
sql/item_geofunc.cc:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - set maybe_null flag for Item_geometry_func and Item_func_as_wkt.
    - moved length check to the beginnig of the 
      Item_func_spatial_collection::val_str() to affect geometry 
      collection objects at once.
    - changed Item_func_isempty::val_int() and Item_func_issimple::val_int()
      to properly handle null_value.
sql/item_geofunc.h:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - set maybe_null flag for geometry/spatial functions.
    - added is_null() to Item_geometry_func and Item_func_spatial_rel
      classes.
sql/spatial.cc:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - changed return type of Geometry::create_from_wkb() to be 
      consistent with Geometry::create_from_wkt(), now it returns
      Geometry object or NULL in case of error.
sql/spatial.h:
  Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
    - changed return type of Geometry::create_from_wkb() to be 
      consistent with Geometry::create_from_wkt(), now it returns
      Geometry object or NULL in case of error.
2007-02-21 14:45:19 +04:00
unknown
a8be1b9325 Commment out two test's thats just confusing for cmd.exe 2007-02-19 18:23:59 +01:00
unknown
8d7e8d9715 Add cat_file command to mysqltest 2007-02-19 18:19:47 +01:00
unknown
6e8be53804 Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my41-bug23240
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-runtime


sql/sql_parse.cc:
  Auto merged
2007-02-19 15:26:07 +01:00
unknown
114e5b8ddb Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by file bootstrapping wasn't initialized
  and starting time defaulted to 0. This later used value by the Now-
  item and is translated to 1970-01-01 11:00:00.
- marking the time with thd->set_time() before the call to 
  mysql_parse resolves this issue.


mysql-test/r/init_file.result:
  Appended test case
mysql-test/std_data/init_file.dat:
  Appended test case
mysql-test/t/init_file.test:
  Appended test case
2007-02-19 09:37:34 +01:00
unknown
5097c6fc06 Merge calliope.local.cmiller:/Volumes/Source/src/mysql-4.1-maint--bug25126
into  calliope.local.cmiller:/Volumes/Source/src/mysql-4.1-maint


sql/item.cc:
  Auto merged
mysql-test/r/order_by.result:
  Manual merge.
mysql-test/t/order_by.test:
  Manual merge.
2007-02-14 12:24:11 -05:00
unknown
82e677b947 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-02-13 10:54:04 -05:00
unknown
8a34c4bb78 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/tnurnberg/24660/41-24660


sql/table.cc:
  Auto merged
2007-02-12 14:39:45 +01:00
unknown
4dc7c1aa46 Bug#24660: "enum" field type definition problem
ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales.
This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from
being used. Now if 0xff makes an appearance, we find a character not used in the enum and
use that as a separator. If no such character exists, we throw an error.

Any solution would have broken some sort of existing behaviour. This solution should
serve both fractions (those with 0xff and those with ',' in their enums), but
WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/
That is, mysqldump with their current server, and restore when upgrading to one with
this patch.


mysql-test/r/type_enum.result:
  Bug#24660: "enum" field type definition problem
  
  Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
  char in some locales), or ',', or both.
mysql-test/t/type_enum.test:
  Bug#24660: "enum" field type definition problem
  
  Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
  char in some locales), or ',', or both.
sql/table.cc:
  Bug#24660: "enum" field type definition problem
  
  Revert fix for Bug#20922.
sql/unireg.cc:
  Bug#24660: "enum" field type definition problem
  
  Use a field-separator for ENUM-values that is not part of those values. If impossible,
  throw error.
2007-02-12 14:31:44 +01:00
unknown
4c4f506238 Bug#25126: Reference to non-existant column in UPDATE...ORDER BY... crashes server
"update existingtable set anycolumn=nonexisting order by nonexisting" would crash
the server.

Though we would find the reference to a field, that doesn't mean we can then use
it to set some values.  It could be a reference to another field.  If it is NULL, 
don't try to use it to set values in the Item_field and instead return an error.

Over the previous patch, this signals an error at the location of the error, rather
than letting the subsequent deref signal it.


mysql-test/r/order_by.result:
  Verify that all permutations work.
mysql-test/t/order_by.test:
  Verify that all permutations work.
sql/item.cc:
  When the field is NULL, don't dereference it when we set_field().  
  Instead, raise an error.
2007-02-09 11:05:36 +01:00
unknown
43ada21fe1 Merge siva.hindu.god:/home/tsmith/m/bk/41
into  siva.hindu.god:/home/tsmith/m/bk/maint/41


sql/sql_prepare.cc:
  Manual merge
2007-02-08 16:01:13 -07:00
unknown
e3495f5f4b Merge weblab.(none):/home/marcsql/TREE/mysql-4.1
into  weblab.(none):/home/marcsql/TREE/mysql-4.1-rtmerge
2007-02-08 08:51:13 -07:00
unknown
7c08621c5a Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt


sql/item_func.cc:
  Auto merged
2007-02-08 14:54:49 +04:00
unknown
75d614e053 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  poseidon.mysql.com:/home/tomas/mysql-4.1-ndb
2007-02-08 00:25:30 +07:00
unknown
31aee856d8 Merge 192.168.0.10:mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint


mysys/default.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2007-02-06 14:44:05 +01:00
unknown
70323365c1 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug23938/my41-bug23938


sql/item_timefunc.cc:
  Auto merged
2007-02-06 14:58:07 +04:00
unknown
5698114c97 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-02-01 15:51:25 +01:00
unknown
2df2922586 Valgrind error fixes
Notes:
This patch doesn't fix all issues in the tree and we need jani's fix for that
This patch shoud not be merged into 5.0


mysql-test/r/ps.result:
  result fix
mysql-test/r/symlink.result:
  result fix
mysql-test/t/ps.test:
  test is moved to 'symlink' test
mysql-test/t/symlink.test:
  test from 'ps' test
sql/field_conv.cc:
  valgrind error fix: backport from 5.0
sql/mysqld.cc:
  release of ssl_context
vio/viosslfactories.c:
  release of ssl_context
mysql-test/valgrind.supp:
  New BitKeeper file ``mysql-test/valgrind.supp''
  This file is backported from 5.0, added suppressing of OpenSSL errors
2007-02-01 18:00:24 +04:00
unknown
a94b1b5077 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-02-01 07:52:28 +01:00
unknown
70fe372a2c Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
scripts/mysqld_multi.sh:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-01-31 16:26:12 -05:00
unknown
659a1255af Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


configure.in:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/t/range.test:
  Auto merged
2007-01-31 16:23:10 -05:00
unknown
ab3abe1232 Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/WL3567/mysql-4.1-engines
2007-01-31 16:17:27 +04:00
unknown
f7b3c7c531 WL#3567 - MERGE engine: a check for underlying table conformance
When a merge table is opened compare column and key definition of
underlying tables against column and key definition of merge table.

If any of underlying tables have different column/key definition
refuse to open merge table.


mysql-test/r/merge.result:
  A test case for WL#3456.
mysql-test/t/merge.test:
  A test case for WL#3456.
sql/ha_myisam.cc:
  Moved a part of code that converts TABLE object to MyISAM key and column
  definition to a separate function.
  
  Added check_definition() function that compares MyISAM table definitions.
sql/ha_myisammrg.cc:
  Check if underlying table definition conforms to merge table definition,
  and in case underlying table definition differs, refuse to open merge
  table.
2007-01-31 16:15:20 +04:00
unknown
fee0649caa Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/ram/work/b19690/b19690.4.1


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-01-31 14:47:06 +04:00
unknown
faad73550c fix for bug #19690: ORDER BY eliminates rows from the result
Depending on the queries we use different data processing methods
and can lose some data in case of double (and decimal in 4.1) fields.

The fix consists of two parts:
1. double comparison changed, now double a is equal to double b 
if (a-b) is less than 5*0.1^(1 + max(a->decimals, b->decimals)). 
For example, if a->decimals==1, b->decimals==2, a==b if (a-b)<0.005
2. if we use a temporary table, store double values there as is 
to avoid any data conversion (rounding).


mysql-test/r/type_float.result:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - test result
mysql-test/t/type_float.test:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - test case
sql/field.cc:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - use not_fixed flag instead of dec to check bounds.
sql/field.h:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - Field_Double::not_fixed flag introduced, which is set if dec == NOT_FIXED_DEC
      and is used in the ::store() to check bounds. 
    - new constructor introduced (with not_fixed_arg parameter).
sql/init.cc:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - fill log_01[] array with 0.1 powers.
sql/item_cmpfunc.cc:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - compare_real_fixed() and compare_e_real_fixed() introduced,
      they consider double a == double b if a-b is less than 'precision',
      'precision' is set to 5*0.1^(1 + max(a->decimals, b->decimals)), 
      for example, if a->decimals==1, b->decimals==2, 'precision' is 0.005
    - use the above functions if both arguments are fixed.
sql/item_cmpfunc.h:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - Arg_comparator::presision introduced.
    - Arg_comparator::compare_real_fixed(), Arg_comparator::compare_e_real_fixed() introduced.
sql/mysql_priv.h:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - log_01 array of 0.1 powers added.
sql/mysqld.cc:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - log_01 array of 0.1 powers added.
sql/sql_select.cc:
  fix for bug #19690: ORDER BY eliminates rows from the result
    - if we create double field in a temporary table, set not_fixed flag
      (use proper constructor) to avoid data conversion 
      in the Field_double::store(). Otherwise we can lose some data.
2007-01-31 09:51:05 +04:00
unknown
d308799383 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/r/myisam.result:
  Manual merged
mysql-test/t/myisam.test:
  Manual merged
2007-01-29 17:20:18 +01:00
unknown
fddf3c3979 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/4.1


sql/item_func.cc:
  Auto merged
2007-01-26 16:28:32 +04:00