Commit graph

18778 commits

Author SHA1 Message Date
unknown
2637338014 fixed substring() length calculation in case of constant negative argument (BUG#10269)
mysql-test/r/func_str.result:
  Correct length reporting from substring()
mysql-test/t/func_str.test:
  Correct length reporting from substring()
sql/item_strfunc.cc:
  fixed substring() length calculation in case of constant negative argument
2005-06-28 21:45:11 +03:00
unknown
dadf91f0ff Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/mysql-4.1
2005-06-28 15:33:41 +03:00
unknown
d8edc2db59 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-28 05:33:40 -07:00
unknown
05c7edf648 Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms


mysys/thr_alarm.c:
  Fixed problem noticed by valgrind
sql/opt_range.cc:
  Simple optimization for common case
sql/sql_base.cc:
  Safety assert
sql/sql_insert.cc:
  Added comment
2005-06-28 15:06:16 +03:00
unknown
69f2934891 Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


sql/sql_select.cc:
  Auto merged
2005-06-28 03:24:06 -07:00
unknown
27478af9d5 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1


sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-28 03:20:00 -07:00
unknown
67abd491a1 group_by.result, group_by.test:
Added a test case for bug #11414.
sql_select.cc:
  Fixed bug #11414: crash on Windows with some simple
  GROUP BY queries.
  It happened to an allocation of an array containing
  0 Copy_field elements in setup_copy_fields.
  The bug had been already fixed in 5.0.


sql/sql_select.cc:
  Fixed bug #11414: crash on Windows with some simple
  GROUP BY queries.
  It happened to an allocation of an array containing
  0 Copy_field elements in setup_copy_fields.
  The bug had been already fixed in 5.0.
mysql-test/t/group_by.test:
  Added a test case for bug #11414.
mysql-test/r/group_by.result:
  Added a test case for bug #11414.
2005-06-28 03:18:37 -07:00
unknown
2776aa35b7 ctype_ucs.result, ctype_ucs.test, ctype_utf8.result, ctype_utf8.test:
Fixing tests accordingly.
ctype-ucs2.c:
  The same fix for UCS2.
ctype-utf8.c:
  Bug #9557
  MyISAM utf8 table crash
  The problem was that my_strnncollsp_xxx could
  return big value in the range 0..0xffff.
  for some constant pairs it could return 32738,
  which is defined as MI_FOUND_WRONG_KEY in
  myisamdef.h. As a result, table considered to
  be crashed. 
  Fix to return -1,0 or 1.


strings/ctype-utf8.c:
  Bug #9557
  MyISAM utf8 table crash
  The problem was that my_strnncollsp_xxx could
  return big value in the range 0..0xffff.
  for some constant pairs it could return 32738,
  which is defined as MI_FOUND_WRONG_KEY in
  myisamdef.h. As a result, table considered to
  be crashed. 
  Fix to return -1,0 or 1.
strings/ctype-ucs2.c:
  The same fix for UCS2.
mysql-test/t/ctype_utf8.test:
  Fixing tests accordingly.
mysql-test/r/ctype_utf8.result:
  Fixing tests accordingly.
mysql-test/t/ctype_ucs.test:
  Fixing tests accordingly.
mysql-test/r/ctype_ucs.result:
  Fixing tests accordingly.
2005-06-28 15:00:22 +05:00
unknown
0037781f05 Makefile.am:
Bug#9873, reenabled --without-man option to work


Makefile.am:
  Bug#9873, reenabled --without-man option to work
2005-06-28 04:49:03 +02:00
unknown
c7e157e71e configure.in:
Enable build with CXX=gcc and gcc version 4


configure.in:
  Enable build with CXX=gcc and gcc version 4
2005-06-28 04:44:27 +02:00
unknown
9c41fbda76 mysqld.dsp:
Corrected quoting of string "pro-nt"


VC++Files/sql/mysqld.dsp:
  Corrected quoting of string "pro-nt"
2005-06-28 04:37:01 +02:00
unknown
f7780a1cc2 opt_range.cc:
Added missing `;' to DBUG_RETURN()


sql/opt_range.cc:
  Added missing `;' to DBUG_RETURN()
2005-06-28 04:33:06 +02:00
unknown
f3dd815156 Fix test after last push 2005-06-27 20:31:02 +03:00
unknown
07de1f820a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
2005-06-27 20:31:01 +03:00
unknown
76d444fcb6 Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning


client/mysqldump.c:
  Cleanup
  Ensure we free allocated memory
  Portability fixes
client/mysqltest.c:
  Cleanup of code during review
  Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
  NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
  Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
  Added test of NULL argument
sql/handler.cc:
  Cleanup during code review
sql/item_strfunc.cc:
  NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
  Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
  Removed extra new line
2005-06-27 20:31:00 +03:00
unknown
b608f091db InnoDB: After review fixes
innobase/os/os0file.c:
  os_file_set_size(): After review fixes (prevent overflows)
2005-06-27 17:25:37 +03:00
unknown
1084e540ee InnoDB: Optimize the extension of files. This will greatly speed
up CREATE TABLE in innodb_file_per_table=1 mode.


innobase/fil/fil0fil.c:
  fil_extend_space_to_desired_size(): Do not allocate or initialize
  more memory than is necessary.  Write at most one megabyte at a time.
innobase/include/os0file.h:
  os_file_set_size(): Corrected the synopsis
innobase/os/os0file.c:
  os_file_set_size(): Corrected the synopsis and some comments.
  s/offset/current_size; s/low/desired_size/;
  Do not allocate or initialize more memory than is necessary.
  Write at most one megabyte at a time.
2005-06-27 17:04:57 +03:00
unknown
78b35bc041 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
2005-06-27 16:49:55 +03:00
unknown
6c46a993d7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.local:/home/my/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-27 16:47:44 +03:00
unknown
d10877ce8c Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part


mysql-test/r/insert_select.result:
  More tests for bug #9728 and #8147
mysql-test/r/insert_update.result:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysql-test/t/insert_select.test:
  More tests for bug #9728 and #8147
mysql-test/t/insert_update.test:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysys/my_access.c:
  Cleanup (shorter loop variable names)
sql/ha_ndbcluster.cc:
  Indentation fixes
sql/item.cc:
  Remove item_flags
sql/item.h:
  Remove item_flags
sql/mysql_priv.h:
  New arguments to mysql_prepare_insert
sql/sql_base.cc:
  Remove old fix for bug #8147
sql/sql_insert.cc:
  Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE
sql/sql_parse.cc:
  Revert fix for #9728
  Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause
sql/sql_prepare.cc:
  New arguments to mysql_prepare_insert
sql/sql_yacc.yy:
  Revert bug fix for #9728
2005-06-27 16:46:41 +03:00
unknown
e00981bb5f Include <sys/wait.h> to get WEXITSTATUS 2005-06-27 15:11:40 +02:00
unknown
8478223a6d Add "#include <stdlib.h>" to define WEXITSTATUS 2005-06-27 15:01:49 +02:00
unknown
f40f711e0c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-06-27 09:53:11 +02:00
unknown
3f499c32d4 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-25 05:45:50 -07:00
unknown
a7e66efc2c Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
Moved the key statistics update to info().
The table is not locked in open(). This made wrong stats possible.

No test case for the test suite.
This happens only with heavy concurrency.
A test script is added to the bug report.


mysql-test/r/heap_hash.result:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Updated test results to reflect the new  statistics behaviour.
mysql-test/t/heap_hash.test:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Added a FLUSH TABLES to avoid statistics differences between normal 
  and ps-protocol tests.
sql/ha_heap.cc:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Moved the key statistics update to info().
  The table is not locked in open(). This made wrong stats possible.
sql/ha_heap.h:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Added an element to track the validity of the key statistics.
2005-06-24 17:47:09 +02:00
unknown
5aa793f72b backport for #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument. 2005-06-24 14:04:48 +05:00
unknown
77dc5c423f an improvement (bug #7851: C++ 'new' conflicts with kernel header asm/system.h).
include/my_global.h:
  an improvement (bug #7851: C++ 'new' conflicts with kernel header asm/system.h).
  redefine 'new' before #include <asm/atomic.h> in any case.
2005-06-24 12:51:11 +05:00
unknown
2288296483 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/timka/mysql/src/4.1-virgin
2005-06-23 22:40:04 +03:00
unknown
26576e9011 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-23 10:09:01 -07:00
unknown
aa4ccff7f7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-06-23 19:06:35 +02:00
unknown
5d12a0bf49 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/timka/mysql/src/4.1-virgin
2005-06-23 20:06:35 +03:00
unknown
7ed5026d36 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-gca
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-06-23 19:06:35 +02:00
unknown
d9a7e4e0dc Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-1
2005-06-23 10:06:35 -07:00
unknown
1093237174 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug10151
2005-06-23 19:06:34 +02:00
unknown
d06446af84 sql_parse.cc:
Fix for fix for bug #9728
  Error caused server hang on prepared insert ... select


sql/sql_parse.cc:
  Fix for fix for bug #9728
  Error caused server hang on prepared insert ... select
2005-06-23 21:06:33 +04:00
unknown
744f6a1a99 mysql-test-run.pl:
Might need a restart after test with special TZ
  Removed unused argument to run_mysqltest()


mysql-test/mysql-test-run.pl:
  Might need a restart after test with special TZ
  Removed unused argument to run_mysqltest()
2005-06-23 17:38:40 +02:00
unknown
7ef70bc949 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug10151
2005-06-23 17:12:04 +02:00
unknown
eb79c6bc9b Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-1
2005-06-23 06:19:28 -07:00
unknown
98253bd64d func_str.result, func_str.test:
Added a test case for bug #10124.
sql_select.h, item_subselect.cc, sql_select.cc:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
field.cc:
  Fixed bug #10124.
  When ussuing a warning the store methods return 2 instead of 1 now.


sql/field.cc:
  Fixed bug #10124.
  When ussuing a warning the store methods return 2 instead of 1 now.
sql/sql_select.cc:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
sql/item_subselect.cc:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
sql/sql_select.h:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
mysql-test/t/func_str.test:
  Added a test case for bug #10124.
mysql-test/r/func_str.result:
  Added a test case for bug #10124.
2005-06-23 06:15:50 -07:00
unknown
16bdd8adce Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-06-23 13:53:59 +02:00
unknown
9ec764c4ff Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.local:/home/my/mysql-4.1
2005-06-23 14:04:11 +03:00
unknown
ab008ede4e Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/timka/mysql/src/4.1-virgin
2005-06-23 13:33:20 +03:00
unknown
165d271a4a Merge lgrimmer@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/my/mysql-4.1
2005-06-23 12:03:10 +02:00
unknown
a0fedf78e6 - manual merge of the new node names 2005-06-23 11:34:58 +02:00
unknown
0beb0abf5a - fixed text file generation - the node names in the info page had changed
BitKeeper/deleted/.del-generate-flag-images~f77476753fff8186:
  Delete: Docs/Support/generate-flag-images
Docs/Makefile.am:
  - fixed node names for the new info file
Docs/Support/generate-text-files.pl:
  - stop printing if the index was reached
2005-06-23 11:30:40 +02:00
unknown
4775eaaaaa Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug10151
2005-06-23 11:03:21 +02:00
unknown
1abe8e6916 Merge mysql.com:/home/timka/mysql/src/4.1-virgin
into mysql.com:/home/timka/mysql/src/4.1-bug-11185
2005-06-23 11:04:40 +03:00
unknown
e4296f5868 Fix for BUG#11185.
The source of the problem is in Field_longlong::cmp. If 'this' is
an unsigned number, the method casts both the current value, and
the constant that we compare with to an unsigned number. As a
result if the constant we compare with is a negative number, it
wraps to some unsigned number, and the comparison is incorrect.

When the optimizer chooses the "range" access method, this problem
causes handler::read_range_next to reject the current key when the
upper bound key is a negative number because handler::compare_key
incorrectly considers the positive and negative keys to be equal.

The current patch does not correct the source of the problem in
Field_longlong::cmp because it is not easy to propagate sign
information about the constant at query execution time. Instead
the patch changes the range optimizer so that it never compares
unsiged fields with negative constants. As an added benefit,
queries that do such comparisons will execute faster because
the range optimizer replaces conditions like:
(a) (unsigned_int [< | <=] negative_constant) == FALSE
(b) (unsigned_int [> | >=] negative_constant) == TRUE
with the corresponding constants.
In some cases this may even result in constant time execution.


mysql-test/r/range.result:
  - Changed incorrect result of an old test
  - Added new results for BUG#11185
mysql-test/t/range.test:
  - Added new tests for BUG#11185
  - Deleted an old comment because now the problem is fixed
sql/opt_range.cc:
  Added a new optimization to the range optimizer where we detect that
  an UNSIGNED field is compared with a negative constant. Depending on
  the comparison operator, we know directly that the result of the
  comparison is either TRUE or FALSE for all input values, and we need
  not check each value.
  
  This optimization is also necessary so that the index range access
  method produces correct results when comparing unsigned fields with
  negative constants.
2005-06-23 10:56:44 +03:00
unknown
6a8945e332 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1


sql/sql_base.cc:
  Auto merged
2005-06-22 20:59:34 +02:00
unknown
31d0786687 Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/mysql-4.1 2005-06-22 20:59:33 +02:00