Commit graph

4638 commits

Author SHA1 Message Date
unknown
1f37efa0ad Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.14183
2005-11-03 12:50:28 +04:00
unknown
03ed0d1d24 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14186-bug-4.1-mysql


sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
2005-11-01 17:34:19 +03:00
unknown
8439e6a482 Fix for bug #14183 (ctype_cp983.test fails with the embedded server)
mysql-test/r/ctype_cp932.result:
  result fixed
mysql-test/t/ctype_cp932.test:
  these lines don't work in embedded-server
2005-11-01 13:18:46 +04:00
unknown
a006453fad Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.12839


sql/field.cc:
  Auto merged
2005-10-31 12:24:43 +04:00
unknown
3a5a518de4 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-28 18:52:10 -07:00
unknown
cb90e54ec1 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  krsna.patg.net:/home/patg/mysql-build/mysql-4.1
2005-10-28 18:23:23 -07:00
unknown
693320149f Merge mysql.com:/home/jimw/my/mysql-4.1-13796
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-28 18:19:19 -07:00
unknown
42155a35d1 Fix bug in handling of decimal fields in UNION statements that could
cause a crash or write to an incorrect memory location. (Bug #14216)


mysql-test/r/union.result:
  Update results
mysql-test/t/union.test:
  Add regression test
sql/item.cc:
  Set max_length for decimal fields correctly
2005-10-28 18:12:57 -07:00
unknown
81882f7127 Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment,
do advance the source pointer over 2 bytes that specify value length.


myisam/mi_key.c:
  Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment,
  do advance the source pointer over 2 bytes that specify value length (for NULL value the 
  format is: null_marker 0x01, value length 0x00 0x00, data: 0x00 keyseg->length times).
  We need to advance over 2 bytes separately as keyseg->length doesn't include them.
mysql-test/r/myisam.result:
  Testcase for BUG#13814
mysql-test/t/myisam.test:
  Testcase for BUG#13814
2005-10-28 23:31:32 +04:00
unknown
d5bb660640 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug14139
2005-10-28 21:42:01 +04:00
unknown
a7ed6ce441 Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
that fields_list is a part of all_fields_list. Because select have only 
3 columns and analyse() redefines it to have 10 columns, int overrun in
setup_copy_fields() occurs and server goes to almost infinite loop.

Because fields_list used not only to send data ad fields types, it's wrong 
to allow procedure redefine it. This patch separates select's fileds_list 
and procedure's one. Now if procedure is present, copy of fields_list is 
created in procedure_fields_list and it is used for sending data and fields.


mysql-test/t/analyse.test:
  Test case for bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
mysql-test/r/analyse.result:
  Test case for bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
sql/sql_select.h:
  Fix bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
  To JOIN  Added separate fields_list for procedure.
sql/sql_select.cc:
  Fix bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
  SELECT's fields_list and procedure's fields_list made split. If procedure is defined
  then procedure's fields_list is used to send fields and data.
2005-10-28 15:24:46 +04:00
unknown
6020281e95 Fix bug#14186 select datefield is null not updated
Date field was declared as not null, thus expression 'datefield is null'
was always false. For SELECT special handling of such cases is used. 
There 'datefield is null' converted to 'datefield eq "0000-00-00"'.

In mysql_update() before creation of select added remove_eq_conds() call.
It makes some optimization of conds and in particular performs conversion
from 'is null' to 'eq'. 
Also remove_eq_conds() makes some evaluation of conds and if it founds that
conds is always false then update statement is not processed further.
All this allows to perform some update statements process faster due to
optimized conds, and not wasting resources if conds known to be false. 


sql/sql_select.cc:
  Fix bug#14186  select datefield is null not updated
  Remove static from remove_eq_conds()
sql/sql_select.h:
   Fix bug#14186  select datefield is null not updated
  Added remove_eq_conds() prototype.
mysql-test/r/update.result:
  Test case for  bug#14186  select datefield is null not updated
mysql-test/t/update.test:
  Test case for  bug#14186  select datefield is null not updated
sql/sql_update.cc:
  Fix bug#14186  select datefield is null not updated
  To mysql_update() added call to remove_eq_conds() to optimize conds and convert 'datefield is null' to 'datefield eq 0000-00-00'
2005-10-28 01:24:11 +04:00
unknown
5e8515d9f2 Merge mysql.com:/home/jimw/my/mysql-4.1-14009
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/item_func.cc:
  Auto merged
2005-10-27 10:20:38 -07:00
unknown
111b40e156 Manually merged
include/config-netware.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  Manually merged fix for bug#13855
mysql-test/t/select.test:
  Manuall merged fix for bug#13855
2005-10-27 17:44:28 +04:00
unknown
6ec1c061a8 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13347
2005-10-27 13:41:09 +05:00
unknown
fff4e673fa Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  krsna.patg.net:/home/patg/mysql-build/mysql-4.1


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
2005-10-26 09:22:47 -07:00
unknown
cf59103d84 BUG# 12123
Made change to mysqlimport to set character_set_database to binary to 
make importing various charsets/columns work correctly.


client/mysqlimport.c:
  BUG# 12123
  
  Added 'set @@character_set_database=binary' to make loading of tables with
  mixed charset types and non-latin characters load.
mysql-test/mysql-test-run.pl:
  BUG #12123
  
  Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/mysql-test-run.sh:
  BUG #12123
  
  Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/r/mysqldump.result:
  BUG #12123
  
  Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
  show that this fix handles dumping and reloading of non-latin1 charsets
  in table with different charset columns (mixing of charsets, also can be a
  UTF table with latin1 tables). Note the select before and after dump and 
  restore - should be exact.
mysql-test/t/mysqldump.test:
  BUG #12123
  
  Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
  show that this fix handles dumping and reloading of non-latin1 charsets
  in table with different charset columns (mixing of charsets, also can be a
  UTF table with latin1 tables). Note the select before and after dump and 
  restore - should be exact. (results of this)
2005-10-25 14:50:08 -07:00
unknown
115bf43602 BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space 
required for field_X in the new table.


mysql-test/r/create.result:
  Testcase for BUG#14139
mysql-test/t/create.test:
  Testcase for BUG#14139
sql/field.cc:
  BUG#14139: Make create_length_to_internal_length() save length-in-characters in 
  create_field::chars_length.
sql/field.h:
  BUG#14139: Add create_length::chars_length where we save length-in-characters, added comments.
sql/sql_table.cc:
  BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
  we get two instances of create_field: (1) is occurence of field_X in create list, and (2) is
  in select list. If we figure they both refer to the same field, we "join" them according to
  some rule that is not explicitly specified anywhere.
  When we do this "join", create_field::length already contains length-in-bytes for both, so
  when we transfer field length (in characters) from (1) to (2), use length-in-characters that
  we have saved in create_length::chars_length.
2005-10-26 00:56:17 +04:00
unknown
5a9dc44dac Merge mysql.com:/home/jimw/my/mysql-4.1-12925
into  mysql.com:/home/jimw/my/mysql-4.1-clean


tests/mysql_client_test.c:
  Auto merged
2005-10-25 10:11:47 -07:00
unknown
b5dc243e3d Fix incorrect casts in my_getopt code that capped the maximum of longlong
options to the wrong value. (Bug #12925)


mysql-test/t/mysql_client_test.test:
  Add parameter for testing getopt bug
mysys/my_getopt.c:
  Remove incorrect and unnecessary casts
tests/mysql_client_test.c:
  Add test case for Bug #12925 (my_getopt bug)
2005-10-25 10:10:53 -07:00
unknown
947de78a36 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14016-bug-4.1-mysql
2005-10-25 20:37:45 +04:00
unknown
b96dbef6fd Fix bug #14016 date_format() 2nd parameter was compared using case insensitive
collation

By default constant strings in second parameter of date_time() have case
insensitive collation. Because of this expressions date_format(f,'%m') and 
date_format(f,'%M') wrongly becomes equal, which results in choosing wrong 
column to sort by.

Now if second parameter of date_format() is constant then it's collation is 
changed to case sensitive.


sql/item_timefunc.cc:
  Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
  If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/date_formats.result:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/date_formats.test:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
2005-10-25 20:37:26 +04:00
unknown
45369edf57 Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE
VALUES() can only refer to table insert going to. 
But Item_insert_value::fix_fields() were passing to it's arg full table list,
This results in finding second column which shouldn't be found, and
failing with error about ambiguous field.

Item_insert_value::fix_fields() now passes only first table of full table
list.


sql/item.cc:
  Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
  If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/insert_select.result:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/insert_select.test:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
2005-10-25 20:04:12 +04:00
unknown
cabb72f27f Bug#13347: empty result from query with like and cp1250 charset
ctype-win1250ch.c:
  Like range prefix tables were wrong.
ctype_cp1250_ch.result, ctype_cp1250_ch.test:
  Adding test case.


strings/ctype-win1250ch.c:
  Bug#13347: empty result from query with like and cp1250 charset
  Like range prefix tables were wrong.
mysql-test/t/ctype_cp1250_ch.test:
  Adding test case.
mysql-test/r/ctype_cp1250_ch.result:
  Adding test case.
2005-10-25 14:49:04 +05:00
unknown
8d6634c9e0 Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization
heap/_check.c:
  Change arguments to ha_key_cmp
heap/hp_create.c:
  Change arguments to ha_key_cmp
include/my_base.h:
  Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
myisam/mi_check.c:
  Change arguments to ha_key_cmp
myisam/mi_rnext_same.c:
  Change arguments to ha_key_cmp
myisam/mi_search.c:
  Change arguments to ha_key_cmp
myisam/mi_write.c:
  Change arguments to ha_key_cmp
myisammrg/myrg_queue.c:
  Change arguments to ha_key_cmp
mysys/my_handler.c:
  Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
  (This removes an if in a loop at the expensive of an int on the stack)
sql/records.cc:
  Simplify new rr_index() code
  Create common error handling function for rr_() functions.
  Remove loop from rr_index() as handler::index_next() can never return HA_ERR_RECORD_DELETED
sql/sql_load.cc:
  Simplify
sql/sql_update.cc:
  Simplify code
  Fixed bug when one is updating an index column that could be used with ORDER BY
sql/structs.h:
  Removed not needed structure element
2005-10-25 02:27:40 +03:00
unknown
3c02a0534d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-nulls-stats-r2


sql/mysqld.cc:
  Auto merged
2005-10-23 02:49:57 +04:00
unknown
1c9783e854 Fix merge of test that left out a drop table.
mysql-test/r/loaddata.result:
  Update esults
mysql-test/t/loaddata.test:
  Add missing drop table
2005-10-21 19:54:34 -07:00
unknown
2750dc8766 Merge mysql.com:/home/jimw/my/mysql-4.1-11203
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_load.cc:
  Auto merged
mysql-test/r/loaddata.result:
  Resolve conflict
mysql-test/t/loaddata.test:
  Resolve conflict
2005-10-21 17:57:51 -07:00
unknown
c9978d8bcb Bug#13233
select distinct char(column) fails with utf8
ctype_utf8.result, ctype_utf8.test:
  Adding test case
sql_yacc.yy:
  Adding new syntax.
item_strfunc.h:
  Fixing wrong max_length calculation.
  Also, adding CHAR(x USING charset),
  for easier migrating from 4.1 to 5.0,
  according to Monty's suggestion.


sql/item_strfunc.h:
  Bug#13233
  select distinct char(column) fails with utf8
  Also, adding CHAR(x USING charset),
  for easier migrating from 4.1 to 5.0.
sql/sql_yacc.yy:
  Adding new syntax.
mysql-test/t/ctype_utf8.test:
  Adding test case
mysql-test/r/ctype_utf8.result:
  Adding test case
2005-10-21 14:41:56 +05:00
unknown
71fdef4d10 BUG#9622, stage 2, work together with fix for BUG#12232:
added "nulls_ignored" index statistics collection method for MyISAM tables.
(notification trigger: this is about BUG#9622).


include/my_base.h:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method:
  Added SEARCH_RETURN_B_POS flag for ha_key_cmp()
include/my_handler.h:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method: added ha_find_null()
include/myisam.h:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
myisam/mi_check.c:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method, added 
   mi_collect_stats_*(), updated update_key_parts() to deal with all 3 methods.
myisam/myisamchk.c:
  BUG#9622: Added nulls_ignored index statistics collection method for MyISAM
myisam/myisamdef.h:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
myisam/sort.c:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
mysql-test/r/myisam.result:
  Testcase for BUG9622
mysql-test/t/myisam.test:
  Testcase for BUG9622
mysys/my_handler.c:
  BUG#9622: ha_key_cmp() now supports new SEARCH_RETURN_B_POS flag, added ha_find_null()
sql/ha_myisam.cc:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
sql/mysqld.cc:
  BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
2005-10-21 06:29:17 +04:00
unknown
65ef7cc2f3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-10-20 10:28:52 +02:00
unknown
6c8c4fdace Merge mysql.com:/home/jimw/my/mysql-4.1-13334
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/mysqld.cc:
  Auto merged
2005-10-18 09:45:12 -07:00
unknown
7d81acb5e9 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug12915-r2


sql/sql_update.cc:
  Auto merged
2005-10-18 14:08:50 +04:00
unknown
47b044f411 Fix Item_func_abs::fix_length_and_dec() to set maybe_null properly. (Bug #14009)
mysql-test/r/func_math.result:
  Add new results
mysql-test/t/func_math.test:
  Add new regression test
sql/item_func.cc:
  Set maybe_null in Item_func_abs::fix_length_and_dec().
2005-10-17 17:00:42 -07:00
unknown
0f1516b98e Fix for bug #9855 (Inconsistend column type in create select)
mysql-test/r/func_gconcat.result:
  result fixed
mysql-test/r/subselect.result:
  result fixed
mysql-test/r/type_float.result:
  result fixed
mysql-test/t/type_float.test:
  testcase added
sql/item_func.cc:
  Now we set decimals to NOT_FIXED_DEC if the max_length is longer than
  maximum possible double length
2005-10-15 19:47:23 +05:00
unknown
05414133af Merge mysql.com:/usr/home/bar/mysql-4.1.b13145
into  mysql.com:/usr/home/bar/mysql-4.1


mysql-test/r/ctype_latin1.result:
  Auto merged
mysql-test/t/ctype_latin1.test:
  Auto merged
2005-10-14 13:57:38 +05:00
unknown
9cc7d75ea3 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13751
2005-10-14 11:54:10 +05:00
unknown
1e11d278c3 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13751
2005-10-14 09:09:25 +05:00
unknown
0390de8672 Fix bug #13855 select distinct with group by caused server crash
DISTINCT wasn't optimized away and caused creation of tmp table in wrong
case. This result in integer overrun and running out of memory.

Fix backported from 4.1. Now if optimizer founds that in result be only 1
row it removes distinct.


sql/sql_select.cc:
  Fix bug #13855 select distinct with group by caused server crash
mysql-test/r/select.result:
  Test case for bug#13855 select distinct with group by caused server crash
mysql-test/t/select.test:
   Test case for bug#13855 select distinct with group by caused server crash
2005-10-14 01:22:24 +04:00
unknown
0069549021 - set 'updating' in both tables list if we have two of them (because of subquery) (BUG#13236)
- fixed test


mysql-test/r/rpl_multi_update2.result:
  fixed setting/reseting environment
  multi-update with subquery added
mysql-test/t/rpl_multi_update2.test:
  fixed setting/reseting environment
  multi-update with subquery added
sql/sql_update.cc:
  set 'updating' in both tables list if we have two of them (because of subquery)
2005-10-14 00:02:38 +03:00
unknown
8402aefe25 Force a server restart for the not_embedded_server test to satisfy
conditions of its first test. (Bug #13796)


mysql-test/t/not_embedded_server-master.opt:
  New BitKeeper file ``mysql-test/t/not_embedded_server-master.opt''
2005-10-13 11:10:45 -07:00
unknown
3d332ea76f merging 2005-10-13 19:51:07 +05:00
unknown
2a0183b54d merging
sql/sql_select.cc:
  Auto merged
2005-10-13 19:31:09 +05:00
unknown
2e887f794a Fix for bug #3874 (Group by field is not considered)
mysql-test/r/select.result:
  test result fixed
mysql-test/t/select.test:
  test case added
sql/sql_select.cc:
  do the same for nullable
2005-10-13 19:23:52 +05:00
unknown
7eee194d6e Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug12698/my41-bug12698
2005-10-13 15:53:02 +02:00
unknown
ab87b08973 Bug #12698 abnormal program termination running mysql_client_test
- Move test for bug#93 from mysql_client_test.c to show_check.test
 - No need for test written in c


mysql-test/r/show_check.result:
  Add test case for bug#93, moved from mysql_client_test.c
mysql-test/t/show_check.test:
  Add test case for bug#93, moved from mysql_client_test.c
tests/mysql_client_test.c:
  Remove test for bug#95 to show_check.test
2005-10-13 15:52:22 +02:00
unknown
8b6ba46c2c Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/13535-bug-4.1-mysql


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2005-10-13 17:17:32 +04:00
unknown
341fbced18 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-release
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-10-13 14:23:37 +02:00
unknown
3818980eb9 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12476


sql/item_cmpfunc.cc:
  Auto merged
2005-10-13 11:25:08 +05:00
unknown
62002fdc00 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-12 16:07:16 -07:00
unknown
ce48949ef9 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-12 14:38:32 -07:00
unknown
d68f16e215 Manual merged
sql/item.cc:
  Auto merged
2005-10-13 01:14:58 +04:00
unknown
a46e8e230e select.test, sql_select.cc, sql_lex.cc, item.cc:
Bug #7672 after merge fix


sql/item.cc:
  Bug #7672 after merge fix
sql/sql_lex.cc:
  Bug #7672 after merge fix
sql/sql_select.cc:
  Bug #7672 after merge fix
mysql-test/t/select.test:
  Bug #7672 after merge fix
2005-10-13 00:58:59 +04:00
unknown
77ad01c270 Merge mysql.com:/home/jimw/my/mysql-4.1-12136
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-12 13:29:49 -07:00
unknown
3b3712fda3 To force a restart at the end of test, the option file must be non-empty, it's not enough if it exists and is empty.
mysql-test/t/rpl_dual_pos_advance-master.opt:
  the option file must be non-empty (because there's a -z test in mysql-test-run)
2005-10-12 22:29:36 +02:00
unknown
0c9997fca7 Merge mysql.com:/home/jimw/my/mysql-4.1-8731b
into  mysql.com:/home/jimw/my/mysql-4.1-clean


configure.in:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-10-12 13:28:46 -07:00
unknown
101d9189bd Merge mysql.com:/home/jimw/my/mysql-4.1-13344
into  mysql.com:/home/jimw/my/mysql-4.1-clean


mysql-test/r/cast.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
sql/item.h:
  Auto merged
2005-10-12 13:27:49 -07:00
unknown
9a3bce50ae Merge mysql.com:/home/jimw/my/mysql-4.1-13619
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-12 13:26:49 -07:00
unknown
228d5c42fa Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/13535-bug-4.1-mysql


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2005-10-13 00:16:33 +04:00
unknown
61dfc3347f merge 2005-10-12 13:31:48 +02:00
unknown
7ff27a614d Fix for BUG#13023: "SQL Thread is up but doesn't move forward". Details in slave.cc;
in short we now record whenever the slave I/O thread ignores a master's event because of its server id,
and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we
do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored*
executed one, which may not be the last of the master's binlog (and so the slave *looks* behind
the master though it's data-wise it's not).


mysql-test/t/rpl_dual_pos_advance-master.opt:
  empty; its goal is just to trigger a server restart after running the test,
  so that the master forgets that it was a slave (otherwise it affects the following tests).
sql/log.cc:
  No more default arguments for Rotate_log_event constructor.
  MYSQL_LOG::appendv() is now called without mutex.
sql/log_event.cc:
  Moving one Rotate_log_event constructor from log_event.h. Support for on-demand choice of
  duplicating the string argument of the constructor or not (because there now are needs for both
  alternatives, see slave.cc).
sql/log_event.h:
  We now have a case where a Rotate_log_event is executed by the slave SQL thread while
  not being in the relay log, so it needs to pretend its length is 0: a ZERO_LEN flag for that;
  a flag DUP_NAME (replaces "bool alloced") to be able to choose if we want the constructor
  to duplicate the string argument or not.
sql/slave.cc:
  A comment for BUG#13861 (to be fixed). llstr() instead of %ld as the number is ulonglong.
  mi->rli becomes rli in some places.
  Fix for BUG#13023:
  - in the slave I/O thread, whenever we ignore an event because of its server id we update
  a couple of coordinates in memory
  - in the slave SQL thread, whenever we bump into the end of the latest relay log, we check
  this couple of coordinates to see if we should advance our Exec_master_log_pos.
  - when the slave I/O thread terminates it saves these in-memory coordinates into a Rotate event
  in the relay log, so that they are durable.
sql/slave.h:
  A couple of coordinates in RELAY_LOG_INFO to keep track of the last ignored events received
  by the slave I/O thread (ignored because of the server id).
mysql-test/r/rpl_dual_pos_advance.result:
  New BitKeeper file ``mysql-test/r/rpl_dual_pos_advance.result''
mysql-test/t/rpl_dual_pos_advance.test:
  Test for BUG#13023 (with a part, disabled, to test BUG#13861 when I fix it).
  Before the fix, this test used to hang.
2005-10-12 13:29:55 +02:00
unknown
be559ad6ce sql_yacc.yy:
Bug #10308: Parse 'purge master logs' with subselect correctly.
subselect.test:
  Bug #10308: Test for 'purge master logs' with subselect.
subselect.result:
  Bug #10308: Test result for 'purge master logs' with subselect.


mysql-test/r/subselect.result:
  Bug #10308: Test result for 'purge master logs' with subselect.
mysql-test/t/subselect.test:
  Bug #10308: Test for 'purge master logs' with subselect.
sql/sql_yacc.yy:
  Bug #10308: Parse 'purge master logs' with subselect correctly.
2005-10-12 09:47:59 +02:00
unknown
b455f7c575 Manual merge, fix for bug #7672
mysql-test/r/select.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
sql/item.cc:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_lex.h:
  Manual merge
sql/sql_select.cc:
  Manual merge
2005-10-12 03:32:14 +04:00
unknown
e61dea1b36 Fix wait_timeout (and kill) handling on Mac OS X by cleaning up how
signal handlers are set up, the blocking flags for sockets are set,
and which thread-related functions are used. (Bug #8731)


configure.in:
  Fix flags for Darwin 6 and later. Simplify Darwin 7-9 blocks to simply
  be a catch-all for *darwin* so that future Darwin releases get the
  latest flags.
include/config-win.h:
  Define my_sigset() instead of sigset().
include/my_pthread.h:
  Define my_sigset() instead of trying to monkey with sigset(), and favor
  an implementation based on sigaction().
mysys/my_pthread.c:
  Remove pthread_signal(), which is identical to the new my_sigset() macro.
mysys/thr_alarm.c:
  Use my_sigset() instead of sigset().
sql/mysqld.cc:
  Use my_sigset() instead of signal() and sigset(), remove unnecessary
  definition of sigset on __amiga__. Remove unused THREAD_SPECIFIC_SIGPIPE
  code.
  
  A future improvement would be to re-assess the use of sigaction() here
  and convert its usage to use my_sigset().
vio/vio.c:
  Always call fcntl() to initialize flags of socket in initialization to
  avoid problems on systems that don't report the flags on a socket
  correctly right after it has been returned from accept(), such as
  FreeBSD, Mac OS X, and possibly other BSD-derived systems.
vio/viosocket.c:
  If fcntl() fails in vio_blocking(), restore the flags stored in the
  vio struct.
mysql-test/r/wait_timeout.result:
  New BitKeeper file ``mysql-test/r/wait_timeout.result''
mysql-test/t/wait_timeout-master.opt:
  New BitKeeper file ``mysql-test/t/wait_timeout-master.opt''
mysql-test/t/wait_timeout.test:
  New BitKeeper file ``mysql-test/t/wait_timeout.test''
2005-10-11 09:12:12 -07:00
unknown
4c3f3bd826 Fix minimum value of query_prealloc_size to be the same as its default. (Bug #13334)
mysql-test/r/variables.result:
  Add new results
mysql-test/t/variables.test:
  Add new regression test
sql/mysqld.cc:
  Fix minimum value of query_prealloc_size to be the same as its default.
2005-10-10 19:39:16 -07:00
unknown
aac2575bdb Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.13372


sql/item.cc:
  Auto merged
2005-10-10 21:09:34 +05:00
unknown
5d2bc92523 BUG#12618: Removing fake locking
mysql-test/r/rpl_multi_update3.result:
  New test case
mysql-test/t/rpl_multi_update3.test:
  New test case
sql/sql_parse.cc:
  Removed fake locking
  Changed so that filtering is done later for multi-update
  Removed redundant code
sql/sql_update.cc:
  Moved call to sql_parse.cc
2005-10-10 15:10:14 +02:00
unknown
a1f492840b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.0
into moonbone.local:/work/7672-bug-4.0-mysql
2005-10-09 23:12:12 +04:00
unknown
f3f84ed8a0 Fix bug#7672 Unknown column error in order clause
When fixing Item_func_plus in ORDER BY clause field c is searched in all
opened tables, but because c is an alias it wasn't found there.

This patch adds a flag to select_lex which allows Item_field::fix_fields() 
to look up in select's item_list to find aliased fields.


sql/item.cc:
  Fix bug#7672 Unknown column error in order clause
  When fixing fields in ORDER BY clause allow Item_field::fix_fields() to look up items in select's item list to find aliased fields.
sql/sql_lex.cc:
   Fix bug#7672 Unknown column error in order clause
sql/sql_lex.h:
  Fix bug#7672 Unknown column error in order clause
  Added flag to select_lex allowing Item_field::fix_fields to look up items in select's item list.
sql/sql_select.cc:
  Fix bug#7672 Unknown column error in order clause
mysql-test/t/select.test:
  Test case for bug#7672 Unknown column error in order clause
mysql-test/r/select.result:
  Test case for bug#7672 Unknown column error in order clause
2005-10-09 23:05:44 +04:00
unknown
9f8cbf86d4 func_group.test:
Test requires innodb


mysql-test/t/func_group.test:
  Test requires innodb
2005-10-09 01:32:09 +02:00
unknown
0c16a7ccc7 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-10-08 16:59:08 +02:00
unknown
51907576bd Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
don't allow STOP SLAVE if global read lock is in taken
2005-10-08 14:46:04 +02:00
unknown
d1e71faf61 Populate t1 in order to get more predictable explain results. 2005-10-07 20:14:34 +05:00
unknown
c657d5a72f ctype_utf8.result, ctype_utf8.test:
Adding test case.
item_func.cc:
  Bug#13751 find_in_set: Illegal mix of collations.
  Character set conversion was forgotten in find_in_set.


sql/item_func.cc:
  Bug#13751 find_in_set: Illegal mix of collations.
  Character set conversion was forgotten in find_in_set.
mysql-test/t/ctype_utf8.test:
  Adding test case.
mysql-test/r/ctype_utf8.result:
  Adding test case.
2005-10-07 09:52:15 +05:00
unknown
0ecbc17ccc Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-10-07 04:02:53 +03:00
unknown
3dcf205664 Review of new code since last pull
- Use %lx instead of %p as %p is not portable
- Don't replace ROW item with Item_null


myisam/mi_rkey.c:
  Use %lx instead of %p as %p is not portable
myisam/mi_search.c:
  Use %lx instead of %p as %p is not portable
mysql-test/r/select.result:
  More test for ROW comparison
mysql-test/t/select.test:
  More test for ROW comparison
sql/item.cc:
  We can't replace a ROW item with Item_null because:
  - Arg_comparator is still using the orignal row items and it's not good to have args[0] different from what is actually compared
  - If we are using the <=> comparator, NULL can still be compared as true
  - We would break things if we would ever use resolve_const_item() for operators like >, < etc.
2005-10-07 03:12:15 +03:00
unknown
041123bade Handle errors returned by system crypt() in ENCRYPT(). (Bug #13619)
mysql-test/r/func_crypt.result:
  Add new results
mysql-test/t/func_crypt.test:
  Add new regression test
sql/item_strfunc.cc:
  Handle NULL result from call to crypt().
2005-10-06 16:15:53 -07:00
unknown
07daa79569 Fix for bug#13605 'rpl_openssl' test hangs 2005-10-06 19:51:08 +05:00
unknown
f8efbcefca Bug#12476 Some big5 codes are still missing.
ctype-big5.c:
  Adding extra cp950 characters into Unicode mapping.
ctype_big5.result, ctype_big5.test:
  Adding test case


strings/ctype-big5.c:
  Bug#12476 Some big5 codes are still missing.
  Adding extra cp950 characters into Unicode mapping.
mysql-test/t/ctype_big5.test:
  Adding test case
mysql-test/r/ctype_big5.result:
  Adding test case
2005-10-05 19:20:49 +05:00
unknown
709f8556bf Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13046
2005-10-05 11:28:08 +05:00
unknown
78e8833f39 Fix bug#13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
After SHOW TABLE STATUS last_insert_id wasn't cleaned, and next select
erroneously rewrites WHERE condition and returs a row;
5.0 isn't affected because of different SHOW TABLE STATUS handling.

last_insert_id cleanup added to mysqld_extend_show_tables().


sql/sql_show.cc:
  Fix bug #13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
  Added last_insert_id cleanup after SHOW TABLE STATUS command.
mysql-test/t/select.test:
  Test case for bug #13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
mysql-test/r/select.result:
  Test case for bug #13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
2005-10-03 23:22:46 +04:00
unknown
1fe423aeba BUG#12915: Added single-table UPDATE/DELTE ... ORDER BY ... LIMIT
optimization: now can use index to find records to update/delete
when there is no WHERE clause.


mysql-test/r/update.result:
  Testcase for BUG#12915
mysql-test/t/update.test:
  Testcase for BUG#12915
sql/mysql_priv.h:
  BUG#12915: Added init_read_record_idx function.
sql/opt_range.cc:
  BUG#12915: Added get_index_for_order() - find an index that can be
  used to get first N table records in given ordering cheaper then 
  one would with full table scan.
sql/opt_range.h:
  BUG#12915: Added get_index_for_order() function
sql/records.cc:
  BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
  index using init_read_record()/read_record.read_record()
sql/sql_delete.cc:
  BUG#12915: Added single-table DELETE ... ORDER BY ... LIMIT optimization: 
  now can use index to find records to delete when there is no WHERE clause.
sql/sql_update.cc:
  BUG#12915: Added single-table UPDATE ... ORDER BY ... LIMIT optimization: 
  now can use index to find records to update when there is no WHERE clause.
sql/structs.h:
  BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
  index using init_read_record()/READ_RECORD::read_record()
2005-09-30 15:21:37 +04:00
unknown
e99221d78a Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-push
2005-09-30 12:25:46 +02:00
unknown
72411c193f Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-push
2005-09-30 12:24:56 +02:00
unknown
8c570f3f56 ndb -
add support for reading config.ini from ndb_config
 (as alternative to contacting ndb_mgmd)


mysql-test/r/ndb_config.result:
  Add support for reading config.ini from ndb_config
mysql-test/t/ndb_config.test:
  Add support for reading config.ini from ndb_config
ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Handle prinouts better
ndb/src/mgmsrv/InitConfigFileParser.hpp:
  Handle prinouts better
ndb/tools/ndb_config.cpp:
  Add support for reading config.ini from ndb_config
2005-09-30 11:39:49 +02:00
unknown
3dd066e843 mtr_report.pl:
Text formatting, adjust table header
mysql-test-run.pl:
  Remove requirement for source tree to run embedded server test
mysqldump.test:
  Removed ending ';' from --exec line


mysql-test/t/mysqldump.test:
  Removed ending ';' from --exec line
mysql-test/mysql-test-run.pl:
  Remove requirement for source tree to run embedded server test
mysql-test/lib/mtr_report.pl:
  Text formatting, adjust table header
2005-09-30 00:52:18 +02:00
unknown
48838170c7 Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100


mysql-test/t/merge.test:
  Auto merged
mysql-test/r/merge.result:
  SCCS merged
2005-09-29 13:44:17 +02:00
unknown
a671075d3e Bug#9112 - Merge table with composite index producing invalid results with some queries
Second platform fix for floating point rounding.
2005-09-29 13:37:30 +02:00
unknown
f3ad732052 Fix for bug #7977 in sql_mode=ANSI, show create table ignores auto_increment
"CHARACTER SET", "COLLATE", and "DEFAULT" are always
  printed(excepting MODE_MYSQL323 and MODE_MYSQL40)
  "AUTO_INCREMENT", "ON UPDATE CURRENT_TIMESTAMP" are printed only 
  if NO_FIELD_OPTIONS is not set.


mysql-test/r/sql_mode.result:
  Fix for bug #7977 in sql_mode=ANSI, show create table ignores auto_increment
    test case
mysql-test/t/sql_mode.test:
  Fix for bug #7977 in sql_mode=ANSI, show create table ignores auto_increment
    test case
2005-09-29 16:17:45 +05:00
unknown
84454656f6 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13046


sql/item_cmpfunc.cc:
  Auto merged
2005-09-29 16:07:33 +05:00
unknown
9f9bc8347d Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-09-28 20:09:13 +02:00
unknown
68045dfd4b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-28 13:45:42 +02:00
unknown
5e81588100 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-09-28 13:37:58 +02:00
unknown
fe591c50bd Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-09-28 13:23:57 +02:00
unknown
2de206b4ee Fixed a bug checksum table locks the InnoDB table and does not use a
consistent read (Bug #12669).


mysql-test/r/innodb.result:
  Added test results for a checksum test.
mysql-test/t/innodb.test:
  Added test case for a checksum bug #12669.
sql/ha_innodb.cc:
  Use consistent read for checksum table and convert MySQL lock type
  to the TL_READ because at the moment MySQL uses TL_READ_NO_INSERT.
2005-09-28 14:14:49 +03:00
unknown
091432cfd5 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13046
2005-09-28 11:51:03 +05:00
unknown
a17b3dcbe3 Fix bug#13356 resolve_const_item() wasn't able to handle Item_row items.
resolve_const_item() assumed to be not called for Item_row items. For
ensuring that DBUG_ASSERT(0) was set there.

This patch adds section for Item_row items. If it can it recursively calls
resolve_const_item() for each item the Item_row contains. If any of the
contained items is null then whole Item_row substitued by Item_null. Otherwise
it just returns.


sql/item.cc:
  Fix bug#13356 resolve_const_item() wasn't able to handle Item_row items.
  
  Added section to resolve_const_item() for Item_row items. If it can it
  recursively calls resolve_const_item() for each item the Item_row contains. If
  any of the contained items is null then Item_row is substituted by Item_null.
  Otherwise it just returns.
  Comment moved closer to function it belongs to.
mysql-test/t/select.test:
  Test case for bug#13356 resolve_const_item() wasn't able to handle Item_row items.
mysql-test/r/select.result:
  Test case for bug#13356 resolve_const_item() wasn't able to handle Item_row items.
2005-09-28 00:58:12 +04:00
unknown
e4fe90bfa7 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/fix_mysqltest/my41-fix_mysqltest


client/mysqltest.c:
  Manual merge
mysql-test/mysql-test-run.pl:
  patch alredy commited
2005-09-27 16:48:41 +02:00
unknown
e4074a6753 Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100


mysql-test/r/merge.result:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Manual merge
mysql-test/t/merge.test:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Manual merge
2005-09-27 15:42:14 +02:00
unknown
629697e594 Bug#9112 - Merge table with composite index producing invalid results with some queries
Reduced the precision of the test numbers.
Not all platforms could reproduce the exact numbers.


mysql-test/r/merge.result:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  The new test result
2005-09-27 15:26:16 +02:00
unknown
087f7cc82a Fix for bug #13372 (decimal union)
mysql-test/r/type_decimal.result:
  test result fixed
mysql-test/r/type_float.result:
  test result fixed
mysql-test/t/type_decimal.test:
  test case added
mysql-test/t/type_float.test:
  test case added
sql/item.cc:
  Fixed counting of the max_length for the REAL_RESULT
2005-09-27 15:11:39 +05:00
unknown
502b3cc00d Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-09-26 09:56:18 +02:00
unknown
5aecf16a2f disabled.def:
Disable unstable test cases
  new file


mysql-test/t/disabled.def:
  Disable unstable test cases
2005-09-25 11:35:32 +02:00
unknown
a51f78320e Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-09-24 02:32:34 +03:00
unknown
9c0d809270 Bug#9112 - Merge table with composite index producing invalid results with some queries
After merge fix
2005-09-23 17:22:36 +02:00
unknown
32de973588 Fix for BUG#13419: In "ref" optimizer, take into account that item=Item_func_in(x,y) is
not equivalent to "x=y" when item->negated == TRUE.


mysql-test/r/func_in.result:
  Testcase for BUG#13419
mysql-test/t/func_in.test:
  Testcase for BUG#13419
sql/sql_select.cc:
  Fix for BUG#13419:
  * Take into account that item=Item_func_in(x,y) is not equivalent to "x=y" when 
    item->negated == TRUE.
  * Removed comment that is no longer true.
2005-09-23 13:43:20 +04:00
unknown
c08721e5fa Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100


myisam/mi_dbug.c:
  Auto merged
myisam/mi_rkey.c:
  Auto merged
myisam/mi_search.c:
  Auto merged
myisam/myisamdef.h:
  Auto merged
myisammrg/myrg_rkey.c:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Manual merge
mysql-test/r/merge.result:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Manual merge
mysql-test/t/merge.test:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Manual merge
2005-09-23 10:49:08 +02:00
unknown
674c8165ea Bug#9112 - Merge table with composite index producing invalid results with some queries
The problem was an ab-use of last_rkey_length.
Formerly we saved the packed key length (of the search key)
in this element. But in certain cases it got replaced by 
the (packed) result key length.
Now we use a new element of MI_INFO to save the packed key 
length of the search key.


myisam/mi_dbug.c:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Fixed the recognition of NULL values in _mi_print_key().
myisam/mi_rkey.c:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Saved the packed key length in a new element of MI_INFO.
myisam/mi_search.c:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Added a comment and trace prints.
myisam/myisamdef.h:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Added a new element to store the packed key length
  for use by the MyISAMMRG engine.
myisammrg/myrg_rkey.c:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  Changed to use the new element of MI_INFO to get at the
  packed key length.
mysql-test/r/merge.result:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  The test result.
mysql-test/t/merge.test:
  Bug#9112 - Merge table with composite index producing invalid results with some queries
  The test case.
2005-09-23 10:15:11 +02:00
unknown
8be844e451 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13046
2005-09-23 12:57:40 +05:00
unknown
13fa84a7e2 Fix CAST(1.0e+300 TO SIGNED). (Bug #13344)
mysql-test/r/cast.result:
  Update results
mysql-test/t/cast.test:
  Add regression test
sql/item.h:
  Cap Item_real::val_int() to LONGLONG_MIN and LONGLONG_MAX.
2005-09-22 15:59:13 -07:00
unknown
fe61a61355 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1
2005-09-22 12:46:50 +05:00
unknown
91ed9588bf Fix for bug#12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting
set auto_increment_field_not_null to true to preserve zero values
  for autoincrement fields during LOAD DATA execution if 
  NO_AUTO_VALUE_ON_ZERO sql mode is set


mysql-test/r/loaddata.result:
  Fix for bug#12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting
    test case
mysql-test/t/loaddata.test:
  Fix for bug#12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting
    test case
2005-09-22 12:46:01 +05:00
unknown
2543c551cb Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-push
2005-09-22 09:13:14 +02:00
unknown
8e78ba93ec Add testcase for bug#13316
ndb big alter table


mysql-test/r/ndb_alter_table.result:
  Add testcase for bug#13316
mysql-test/t/ndb_alter_table.test:
  Add testcase for bug#13316
2005-09-22 09:09:27 +02:00
unknown
14deb9632b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/13180-bug-4.1-mysql
2005-09-22 01:48:39 +04:00
unknown
1b02a815dd Fix bug #13180 thd->allow_sum_funcs wasn't reset before query processing.
thd->allow_sum_func was left 'true' after previous statement thus allowing
sum funcs to be present in conditions.

thd->allow_sum_func should be set to 0 for each query and each prepared
statement reinitialization. This is done in lex_start() and 
reset_stmt_for_execute().


sql/sql_lex.cc:
  Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
  thd->allow_sum_func is set to 0 in lex_start().
sql/sql_prepare.cc:
  Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
  thd->allow_sum_func is set to 0 in  reset_stmt_for_execute().
mysql-test/t/update.test:
  Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
  processing.
mysql-test/r/update.result:
  Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
  processing.
2005-09-22 01:38:39 +04:00
unknown
14912660c3 Bug#13046: LIKE pattern matching using prefix
index doesn't return correct result
item_cmpfunc.cc:
  Use charset of LIKE to decide whether
  to use 8bit or Unicode "escape" value.
  But use charset of "escape" to scan escape character.
strings/ctype-xxx.c:
  We cannot reduce "end" pointer using charpos(),
  because of possible escape characters in the string.
  Limit the loop using count of written characters instead.
ctype_like_escape.inc:
  new file
mysql-test/t/ctype_xxx:
mysql-test/r/ctype_xxx:
  Adding test case.


strings/ctype-big5.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead.
strings/ctype-cp932.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-gbk.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-mb.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-simple.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-sjis.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-tis620.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
strings/ctype-ucs2.c:
  Bug#13046: LIKE pattern matching using prefix index doesn't return correct
  result
  We cannot change "end" pointer using charpos(),
  because of possible escape characters.
  Use limit by count of written characters instead
mysql-test/t/ctype_big5.test:
  Adding test case.
mysql-test/t/ctype_cp932.test:
  Adding test case.
mysql-test/t/ctype_gbk.test:
  Adding test case.
mysql-test/t/ctype_latin1.test:
  Adding test case.
mysql-test/t/ctype_sjis.test:
  Adding test case.
mysql-test/t/ctype_tis620.test:
  Adding test case.
mysql-test/t/ctype_uca.test:
  Adding test case.
mysql-test/t/ctype_ucs.test:
  Adding test case.
mysql-test/t/ctype_ujis.test:
  Adding test case.
mysql-test/t/ctype_utf8.test:
  Adding test case.
mysql-test/r/ctype_big5.result:
  Adding test case.
mysql-test/r/ctype_cp932.result:
  Adding test case.
mysql-test/r/ctype_gbk.result:
  Adding test case.
mysql-test/r/ctype_latin1.result:
  Adding test case.
mysql-test/r/ctype_sjis.result:
  Adding test case.
mysql-test/r/ctype_tis620.result:
  Adding test case.
mysql-test/r/ctype_uca.result:
  Adding test case.
mysql-test/r/ctype_ucs.result:
  Adding test case.
mysql-test/r/ctype_ujis.result:
  Adding test case.
mysql-test/r/ctype_utf8.result:
  Adding test case.
sql/item_cmpfunc.cc:
  More fixes.
2005-09-21 23:10:51 +05:00
unknown
09225cef3a Merge mysql.com:/home/timka/mysql/src/4.1-virgin
into  mysql.com:/home/timka/mysql/src/4.1-dbg
2005-09-21 18:58:39 +03:00
unknown
381fe39e78 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-09-21 17:28:51 +03:00
unknown
1d16fa5d86 Ensure that hex strings are used as integers in cast(... signed/unsigned)
This fixes the new report for bug #7036


mysql-test/t/cast.test:
  Added test for cast(hex-value to signed/unsigned)
sql/item.h:
  Ensure that hex strings are used as integers in cast(... signed/unsigned)
2005-09-21 17:28:25 +03:00
unknown
8fdef257ae Fix for bug #12839 (Endian support is absurd)
mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis.test:
  test case added
sql/field.cc:
  ::construct calls added
sql/item_geofunc.cc:
  ::construct calls added
sql/spatial.cc:
  Geometry_*::init_from_wkb implemented
sql/spatial.h:
  init_from_wkb methods declared
2005-09-21 14:35:01 +05:00
unknown
24922a3092 a fix (bug #7589: Decimal types are ignored when updating data from another column).
mysql-test/r/union.result:
  a fix (bug #7589: Decimal types are ignored when updating data from another column).
  removed wrong test result (see #13372)
mysql-test/t/union.test:
  a fix (bug #7589: Decimal types are ignored when updating data from another column).
  removed wrong test result (see #13372)
sql/field_conv.cc:
  a fix (bug #7589: Decimal types are ignored when updating data from another column).
  use memcpy() only for identical decimals.
2005-09-21 14:32:19 +05:00
unknown
a4243d3c6b Merge mysql.com:/home/timka/mysql/src/4.1-virgin
into  mysql.com:/home/timka/mysql/src/4.1-dbg


sql/opt_sum.cc:
  Auto merged
2005-09-21 09:53:42 +03:00
unknown
8e7217e43b Fix for BUG#12882 - min/max inconsistent on empty table.
The problem was in that the MIN/MAX optimization in opt_sum_query was
replacing MIN/MAX functions with their constant argument without
taking into account that a query has no result rows.


mysql-test/r/func_group.result:
  Test for BUG#12882.
mysql-test/t/func_group.test:
  Test for BUG#12882.
sql/item_sum.cc:
  If it is known that a query has no result rows, do not call add()
  via the call to Item_sum::no_rows_in_result() which calls reset().
  Instead directly call clear() so that the MIN and MAX functions
  produce NULL when there are no result rows.
sql/opt_sum.cc:
  * Do not apply MIN/MAX optimization when the operand of MIN/MAX is
    a constant if it can't be determined whether the query has any
    result rows. The reason is that if the query has result rows,
    then the result of MIN/MAX is its constant argument, but if the
    query result is empty, then the result of MIN/MAX must be NULL
    irrespective of its argument.
  
  * The patch also simplifies a bit the branch that hadles COUNT().
2005-09-21 09:49:19 +03:00
unknown
458a4234e4 Merge mysql.com:/home/psergey/bk-trees/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-csc6030-r3


sql/mysqld.cc:
  Auto merged
2005-09-21 02:20:55 +04:00
unknown
a2a8216b20 BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index
statistics (like 4.0 did) (patch #3, with review #1 & #2 feedback addressed)


include/myisam.h:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
myisam/mi_check.c:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
myisam/myisamchk.c:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
mysql-test/r/myisam.result:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
mysql-test/t/myisam.test:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/ha_myisam.cc:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/handler.h:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/mysqld.cc:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/set_var.cc:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/sql_class.h:
  BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
2005-09-21 02:18:29 +04:00
unknown
00ed42a30b Tweak kill test to avoid spurious test failure on SCO OpenServer. (Bug #12136)
mysql-test/t/kill.test:
  Add sleep to give time for kill to take effect.
2005-09-20 09:36:35 -07:00
unknown
0aee9b2c19 BUG#12959 mysqltest crashes if testcase passed with -x option
- Enable testcases after help from Serg 


client/mysqltest.c:
  Dump output to stdout if no result file is specified
  Don't print verbose_msg when command fails whith expected error
mysql-test/mysql-test-run.pl:
  Don't add all args to the MYSQL_TEST environment variable.
mysql-test/r/mysqltest.result:
  Add test for mysqltest -x
mysql-test/t/mysqltest.test:
  Add test for mysqltest -x
2005-09-20 14:11:58 +02:00
unknown
f147d73c87 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1
into lmy004.:/work/mysql-4.1-bug12913


mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-09-20 06:55:23 +03:00
unknown
5cf25d8019 Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug11139
2005-09-19 15:45:01 -06:00
unknown
5bc4501259 Fix bug #13218: InnoDB: using a partial-field key prefix in search
This is backport from 5.0 of fix for bug #11039


mysql-test/t/innodb.test:
  Backport from 5.0 of test case for bug#11039
mysql-test/r/innodb.result:
  Backport from 5.0 of test case for bug#11039
sql/opt_sum.cc:
  Fix bug #13218:  backport from 5.0 of bug #11039 fix
2005-09-19 04:39:49 +04:00
unknown
ce7e95d41d Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug11139


mysql-test/r/rpl_multi_delete2.result:
  Auto merged
mysql-test/t/rpl_multi_delete2-slave.opt:
  Auto merged
mysql-test/t/rpl_multi_delete2.test:
  Auto merged
2005-09-17 18:46:54 -06:00
unknown
154434ae78 Bug#13145: A table named "C-cedilla" can't be dropped.
ctype_latin1.test, ctype_latin1.result:
  adding test case
ctype-latin1.c:
  Fixing ctype array to treat extended cp1252
  letters as valid identifiers on server side,
  and as valid "isprint" characters (e.g. on client side).


strings/ctype-latin1.c:
  Bug#13145: A table named "C-cedilla" can't be dropped.
  Accept extended cp1252 letters as valid identifiers.
mysql-test/t/ctype_latin1.test:
  Accept extended cp1252 letters as valid identifiers.
mysql-test/r/ctype_latin1.result:
  adding test case
2005-09-16 14:22:11 +05:00
unknown
36d163d6cf Fix bug#12887 Distinct is not always applied after rollup
For queries with GROUP BY and without hidden GROUP BY fields DISTINCT is
optimized away becuase such queries produce result set without duplicates.
But ROLLUP can add rows which may be same to some rows and this fact was
ignored.

Added check so if ROLLUP is present DISTINCT can't be optimized away.


sql/sql_select.cc:
  Fix bug #12887 Distinct is not always applied after rollup
mysql-test/r/olap.result:
  Test case for bug #12887 Distinct is not always applied after rollup
mysql-test/t/olap.test:
  Test case for bug #12887 Distinct is not always applied after rollup
2005-09-15 21:34:11 +04:00
unknown
3be8c9074a Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug11139


sql/sql_parse.cc:
  Auto merged
2005-09-14 06:37:52 -06:00
unknown
f89424f8b6 fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present): the problem originally was that the tables in auxilliary_tables did not have 
the correct real_name, which caused problems in the second call to tables_ok(). 
The fix corrects the real_name problem, and also sets the updating flag properly, 
which makes the second call to tables_ok() unnecessary.


mysql-test/r/rpl_multi_delete2.result:
  updates for for BUG#11139
mysql-test/t/rpl_multi_delete2-slave.opt:
  updates for for BUG#11139
mysql-test/t/rpl_multi_delete2.test:
  updates for for BUG#11139
sql/mysql_priv.h:
  fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
   present)
sql/slave.cc:
  fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
   present)
sql/sql_parse.cc:
  fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
   present)
sql/sql_yacc.yy:
  fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
   present)
2005-09-14 06:31:38 -06:00
unknown
17233698fc Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/gluh/MySQL/Bugs/4.1.6008
2005-09-12 20:49:48 +05:00
unknown
3ad213baca Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.mysql.com:/home/my/mysql-4.1
2005-09-12 18:49:47 +03:00
unknown
90ca6d15b3 Review fixes since last pull
Fix for bug #13025; Server crash in filesort because wrong call to handler::position()


client/mysqltest.c:
  Code cleanup during review
mysql-test/r/innodb.result:
  Added test case for bug #13025; Server crash in filesort because wrong call to handler::position()
mysql-test/t/innodb.test:
  Added test case for bug #13025; Server crash in filesort because wrong call to handler::position()
sql/filesort.cc:
  Don't call handler::position() if row was not found
sql/item_cmpfunc.cc:
  Indentation changes
sql/sql_select.cc:
  Moved variable to outer level
2005-09-12 18:48:17 +03:00
unknown
bab5cb7834 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/gluh/MySQL/Bugs/4.1.6008
2005-09-12 17:33:21 +05:00
unknown
63080dc200 Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create database if not exists' if database exists
  do not update database options in this case  
  produce warning for 'create table if not exists' if table exists



mysql-test/r/create.result:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    updated test case result
mysql-test/r/temp_table.result:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    updated test case result
mysql-test/r/warnings.result:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    updated test case result
mysql-test/t/create.test:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    test case
sql/sql_db.cc:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    produce warning for 'create database if not exists' if database exists
    do not update database options in this case
sql/sql_table.cc:
  Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
    produce warning for 'create table if not exists' if table exists
2005-09-12 17:09:19 +05:00
unknown
eac9a33778 Reverted old fix with sync_slave_with_master and added a replace commands
to eliminate nondeterminism in slave start
2005-09-12 10:50:42 +02:00
unknown
e21f484390 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-4.1-magnus
2005-09-11 13:46:36 +02:00
unknown
53043f535a Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-09-10 18:41:37 +03:00
unknown
8c129f5012 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/12695-bug-4.1-mysql
2005-09-10 02:31:42 +04:00
unknown
fa13c29b2e insert_select.result, insert_select.test:
Customer's test case for bug#12695 Item_func_isnull::update_used_tables() did 
  not update const_item_cache.


mysql-test/t/insert_select.test:
  Customer's test case for bug#12695 Item_func_isnull::update_used_tables() did 
  not update const_item_cache.
mysql-test/r/insert_select.result:
  Customer's test case for bug#12695 Item_func_isnull::update_used_tables() did 
  not update const_item_cache.
2005-09-10 02:30:26 +04:00
unknown
19fa54f04e Fixed Bug#10716, Procedure Analyse results in wrong values for optimal field type
Added test case.
2005-09-09 20:02:13 +03:00
unknown
213fa9cbc2 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-09-09 01:04:54 +02:00
unknown
5a49a63290 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1


sql/item_cmpfunc.h:
  Auto merged
2005-09-08 23:11:15 +02:00
unknown
afbdcd413a BUG#12695: Item_func_isnull::update_used_tables did not update const_item_cache 2005-09-08 22:57:27 +02:00
unknown
91d2150dd6 sql_select.cc:
Fixed bug #12885.
  Forced inheritence of the maybe_null flag for the expressions
  containing GROUP BY attributes in selects with ROLLUP.
olap.test, olap.result:
  Added test case for bug #12885.


mysql-test/r/olap.result:
  Added test case for bug #12885.
mysql-test/t/olap.test:
  Added test case for bug #12885.
sql/sql_select.cc:
  Fixed bug #12885.
  Forced inheritence of the maybe_null flag for the expressions
  containing GROUP BY attributes in selects with ROLLUP.
2005-09-08 12:37:16 -07:00
unknown
ad754b05e6 Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-4.1
into  selena.:H:/MYSQL/src/#12517-mysql-4.1
2005-09-08 12:12:21 +04:00
unknown
34422f78c1 Modified test case for bug #12517 2005-09-08 12:09:30 +04:00
unknown
7d64ba092d Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2005-09-07 16:33:12 -07:00
unknown
400573f1fc Merge mysql.com:/home/alexi/mysql-4.1
into  mysql.com:/home/alexi/dev/mysql-4.1-0


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
2005-09-07 18:55:33 +04:00
unknown
8b6a8cc561 BUG#12984 mysqltest.test: different output from "exec NonExistsinfComamdn"
- Improved solution


mysql-test/r/mysqltest.result:
  Update test results
mysql-test/t/mysqltest.test:
  Fix test for failing "exec" and "system", by using the false command
2005-09-07 16:39:16 +02:00
unknown
4fdf0ce380 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12611
2005-09-07 16:29:53 +05:00
unknown
44e289b451 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12829


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2005-09-07 13:12:29 +05:00
unknown
d877cdf3e7 func_gconcat.result, func_gconcat.test:
Added test cases for bug #12863.
item_sum.cc, item_sum.h:
  Fixed bug #12863.
  Added a flag to Item_func_group_concat set to FALSE after
  concatenation of the first element of a group.


sql/item_sum.h:
  Fixed bug #12863.
  Added a flag to Item_func_group_concat set to FALSE after
  concatenation of the first element of a group.
sql/item_sum.cc:
  Fixed bug #12863.
  Added a flag to Item_func_group_concat set to FALSE after
  concatenation of the first element of a group.
mysql-test/t/func_gconcat.test:
  Added test cases for bug #12863.
mysql-test/r/func_gconcat.result:
  Added test cases for bug #12863.
2005-09-06 22:20:11 -07:00
unknown
a353608359 Backport fixes for mysqltest.test from 5.0
client/mysqltest.c:
  Backport from 5.0
mysql-test/t/mysqltest.test:
  Remove the extra ;
2005-09-06 22:03:12 +02:00
unknown
f1cc504981 item_cmpfunc.h:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
join_outer.test:
  Added testcases for bugs #12101, #12102


mysql-test/t/join_outer.test:
  Added testcases for bugs #12101, #12102
mysql-test/r/join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
sql/sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
sql/opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql/item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
sql/item_cmpfunc.h:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
2005-09-06 18:03:08 +04:00
unknown
d0b5318132 Added synchronization to rpl_slave_status.test
mysql-test/t/rpl_slave_status.test:
  Added synchronization to make result deterministic
2005-09-06 15:39:20 +02:00
unknown
61a5fac1cc Bug #6172 RAND(a) should only accept constant values as arguments(2nd version)
Argument of RAND function can be constant value only
2005-09-06 16:19:59 +05:00
unknown
965afd45a1 func_like.result, func_like.test:
adding test case.
item_cmpfunc.cc:
  Bug#12611
  ESCAPE + LIKE do not work when the escape char is a multibyte one
  Additional fix for 8bit character sets:
  escape character must be converted into
  operation character set.


sql/item_cmpfunc.cc:
  Bug#12611
  ESCAPE + LIKE do not work when the escape char is a multibyte one
  Additional fix for 8bit character sets:
  escape character must be converted into
  operation character set.
mysql-test/t/func_like.test:
  adding test case.
mysql-test/r/func_like.result:
  adding test case.
2005-09-06 16:16:10 +05:00
unknown
3ae91695de BUG#12959 mysqltest crashes if testcase passed with -x option
- Update test cases


mysql-test/t/mysqltest.test:
  Uncomment the mysqltest -x test. Can't get the output to end up in the result file.
2005-09-06 09:40:42 +02:00
unknown
8b1751e5c3 BUG#12984 mysqltest.test: different output from "exec NonExistsinfComamdn"
mysql-test/r/mysqltest.result:
  Disable test for failing --exec and --system since output can't be piped to /dev/null on all platforms
mysql-test/t/mysqltest.test:
  Disable test for failing --exec and --system since output can't be piped to /dev/null on all platforms
  Avoid "echo -e" by using a temporary .sql file for tests that require more than one line.
2005-09-05 22:40:13 +02:00
unknown
441d80a5b8 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-05 17:12:25 +02:00
unknown
e54b1fd87f Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug12959/my41-bug12959


client/mysqltest.c:
  Auto merged
2005-09-05 17:01:15 +02:00
unknown
e10b50e6f1 Bug#12959 mysqltest crashes if testcase passed with -x option
client/mysqltest.c:
  Fixes for mysqltest -x  <filename>
mysql-test/t/mysqltest.test:
  Test mysqltest -x <filename>
mysql-test/include/mysqltest-x.inc:
  New BitKeeper file ``mysql-test/include/mysqltest-x.inc''
2005-09-05 16:50:32 +02:00
unknown
5168730f6b func_gconcat.test, func_gconcat.result:
Test case for bug #12859 group_concat in subquery cause incorrect not null.


mysql-test/r/func_gconcat.result:
  Test case for bug #12859 group_concat in subquery cause incorrect not null.
mysql-test/t/func_gconcat.test:
  Test case for bug #12859 group_concat in subquery cause incorrect not null.
2005-09-05 17:58:29 +04:00
unknown
e93e346a24 Remove extra ;
mysql-test/t/openssl_1.test:
  Remove extra delimiter ;
2005-09-05 12:33:25 +02:00
unknown
d026dd0e45 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-02 11:21:59 +02:00
unknown
7f98b2a046 mysqltest.test: Remove output from shells in result file
mysql-test/r/mysqltest.result:
  Update test results
mysql-test/t/mysqltest.test:
  Send output from failed command to /dev/null in order to avoid recording the output from different shells
2005-09-02 11:14:47 +02:00
unknown
c99b50f1dd Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12363
2005-09-02 12:01:19 +05:00
unknown
3b077226c9 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12363


mysql-test/t/variables.test:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  SCCS merged
2005-09-02 11:19:43 +05:00
unknown
ee436f7c4a Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-4.1-bug12542


sql/sql_parse.cc:
  Auto merged
2005-09-02 01:37:16 +02:00
unknown
cc75310b23 Fix missing command terminator
mysql-test/t/rpl_slave_status.test:
  Missing command terminator for source command.
2005-09-01 20:49:06 +02:00
unknown
3223cd9327 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-01 20:13:42 +02:00
unknown
2f979b281b Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-4.1-bug12542
2005-09-01 19:03:09 +02:00
unknown
6ee54d733c Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug11316/my41-bug11316


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/create_select_tmp.test:
  Auto merged
mysql-test/t/drop.test:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/handler.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/ndb_autodiscover2.test:
  Auto merged
mysql-test/t/rpl000001.test:
  Auto merged
mysql-test/t/rpl_EE_error.test:
  Auto merged
mysql-test/t/rpl_change_master.test:
  Auto merged
mysql-test/t/rpl_deadlock.test:
  Auto merged
mysql-test/t/rpl_drop.test:
  Auto merged
mysql-test/t/rpl_drop_temp.test:
  Auto merged
mysql-test/t/rpl_error_ignored_table.test:
  Auto merged
mysql-test/t/rpl_flush_log_loop.test:
  Auto merged
mysql-test/t/rpl_insert_id.test:
  Auto merged
mysql-test/t/rpl_loaddata.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/rpl_until.test:
  Auto merged
client/mysqltest.c:
  Manual merge
mysql-test/t/mysqltest.test:
  Manual merge
2005-09-01 17:21:03 +02:00
unknown
84ddd543c7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/dlenev/src/mysql-4.1-bg12423


sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/grant2.result:
  Manual merge.
mysql-test/t/grant2.test:
  Manual merge.
2005-09-01 17:01:25 +04:00
unknown
2a64e9a2e8 Fix for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in
multi-threaded environment".

To avoid deadlocks between several simultaneously run account management 
commands (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT
commands) we should always take table and internal locks during their
execution in the same order. In other words we should first open and lock
privilege tables and only then obtain acl_cache::lock/LOCK_grant locks.


mysql-test/r/grant2.result:
  Added test for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in 
  multi-threaded environment".
mysql-test/t/grant2.test:
  Added test for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in 
  multi-threaded environment".
sql/mysqld.cc:
  acl_init/grant_init() are now used only at server start up so they always
  allocate temporary THD object and don't need argument for passing pointer
  to it.
sql/sql_acl.cc:
  To avoid deadlocks between several simultaneously run account management 
  commands (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT
  commands) we should always take table and internal locks during their
  execution in the same order. In other words we should first open and lock
  privilege tables and only then obtain acl_cache::lock/LOCK_grant locks.
  
  Changed acl_reload()/grant_reload() and change_password()/update_user_table()
  in such way that they obey this principle. Now in acl_reload()/grant_reload()/
  change_password() we open and lock privilege tables, then obtain internal
  locks and then call acl_load()/grant_load()/update_user_table() functions to
  do actual loading or updating.
sql/sql_acl.h:
  acl_init/grant_init() are now used only at server start up so they always
  allocate temporary THD object and don't need argument for passing pointer
  to it. acl_reload()/grant_reload() now are able to report about their
  success or failure through return value.
sql/sql_parse.cc:
  If reload_acl_and_cache() is called from SIGHUP handler we have to
  allocate temporary THD for execution of acl_reload()/grant_reload().
2005-09-01 16:52:59 +04:00
unknown
772843ba41 Bug #3131 mysqltest fails on $2=$1 assignment in test
client/mysqltest.c:
  Fix function var_copy to make it possible to assign one variable to another. 
  ex: let $1=$2
mysql-test/r/mysqltest.result:
  Update test result
mysql-test/t/mysqltest.test:
  Add test cases for variable to variable assignment
2005-09-01 10:53:33 +02:00
unknown
50cc21ea3e Bug #12471 mysqltest, --error within loop affects wrong statement
- Move clearing of expected errors


client/mysqltest.c:
  Move clear of expected errors to the query loop so that the expected error is reset even when the query is retrieved from the q_lines cache.
mysql-test/r/mysqltest.result:
  Update test results
mysql-test/t/mysqltest.test:
  Add test for bug#12471
2005-09-01 09:34:40 +02:00
unknown
53effe94aa Merge mysql.com:/home/jimw/my/mysql-4.1-12325
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-31 18:32:45 -07:00
unknown
b33e9493a1 Fix handling of filenames that start the same as reserved filenames
on Windows. (Bug #12325)


mysql-test/r/lowercase_table.result:
  Update results
mysql-test/t/lowercase_table.test:
  Move test to new windows.test, since it is Windows-specific
mysys/my_access.c:
  Check that we've matched the whole forbidden name.
mysql-test/include/windows.inc:
  New BitKeeper file ``mysql-test/include/windows.inc''
mysql-test/r/windows.result:
  New BitKeeper file ``mysql-test/r/windows.result''
mysql-test/t/windows.test:
  New BitKeeper file ``mysql-test/t/windows.test''
2005-08-31 18:32:15 -07:00
unknown
11bd1f871a fix for bug#12913
(Simple SQL can crash server or connection)
(not initialized member leads to server crash)


mysql-test/r/create.result:
  result of test for bug #12913
mysql-test/t/create.test:
  test for bug#12913
  (Simple SQL can crash server or connection)
sql/sql_table.cc:
  copy the interval pointer too or a bit later
  dereferencing of this pointer being 0x0 will crash the server
  (see bug #12913)
2005-09-01 00:13:02 +02:00
unknown
43422eceb5 Remove syntax !$<err_no> to set an expected error code
Use !<err_no> instead


client/mysqltest.c:
  Remove syntax !$<err_no> to set an expected error code
mysql-test/r/mysqltest.result:
  Update test result
mysql-test/t/mysqltest.test:
  Uncomment tests for the deprecated syntax
2005-08-31 18:10:26 +02:00
unknown
20108d6f4b BUG#12542: All set statements should be executed by slave thd
rpl_replicate_do.result:
  New test case
sql_parse.cc:
  All SET statements should be executed by slave thd
rpl_replicate_do.test:
  New test case


mysql-test/t/rpl_replicate_do.test:
  Added test
sql/sql_parse.cc:
  All SET commands should be executed by slave thd
mysql-test/r/rpl_replicate_do.result:
  New test case
2005-08-31 18:08:45 +02:00
unknown
76c1bcf986 BUG#11316: mysqltest, problems when assigning value with '#' to $variable
- Add stricter checking of syntax in mysqltest


client/mysqltest.c:
  Stricter checking of syntax in mysqltest.
mysql-test/r/mysqltest.result:
  Update test results
mysql-test/t/create.test:
  Remove extra ;
mysql-test/t/create_select_tmp.test:
  Remove extra ;
mysql-test/t/drop.test:
  Remove extra ;
mysql-test/t/flush.test:
  Remove extra ;
mysql-test/t/handler.test:
  Remove extra ;
mysql-test/t/innodb.test:
  Remove extra ;
mysql-test/t/mysqltest.test:
  Add more tests for replace, replace_columns, comments with commands and sync_with_master
mysql-test/t/rpl000001.test:
  Remove extra ;
mysql-test/t/rpl_EE_error.test:
  Remove extra ;
mysql-test/t/rpl_drop.test:
  Remove extra ;
mysql-test/t/rpl_error_ignored_table.test:
  Remove extra ;
mysql-test/t/rpl_loaddata.test:
  Remove extra ;
2005-08-31 17:16:05 +02:00
unknown
fc45b816f7 Fix bug #12861 client hang with group_concat insubquery FROM DUAL.
Item_func_group_concat::fix_fields() set maybe_null flag to 0, and set it to
1 only if some of it's arguments may be null. When used in subquery in tmp 
table created field which can't be null. When no data retireved result field
have to be set to null and error mentioned in bug report occurs. Also this 
bug can occur if selecting from not null field in empty table.

Function group_concat now marked maybe_null from the very beginning not only
if some of it's argument may be null.


sql/item_sum.cc:
  Fix bug #12861 client hang with group_concat insubquery FROM DUAL.
mysql-test/r/func_gconcat.result:
  Test case for bug #12861 client hang with group_concat insubquery FROM DUAL.
mysql-test/t/func_gconcat.test:
  Test case for bug #12861 client hang with group_concat insubquery FROM DUAL.
2005-08-31 18:26:50 +04:00
unknown
d02ec2b5d9 Bug#12611: ESCAPE + LIKE do not work when the escape char is a multibyte one
item_cmpfunc.cc:
  Pass unicode value as "escape" argument to my_wildcmp
  if a multibyte character set is used.
  For single byte character set nothing has changed:
  native (non-unicode) character code is still passed.

ctype_utf8.result, ctype_utf8.test:
  adding test case


sql/item_cmpfunc.cc:
  Bug#12611: ESCAPE + LIKE do not work when the escape char is a multibyte one
  Pass unicode code instead of native code as
  "escape" argument to my_wildcmp.
mysql-test/t/ctype_utf8.test:
  adding test
mysql-test/r/ctype_utf8.result:
  adding test
2005-08-31 14:04:54 +05:00
unknown
f17853cb85 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-30 14:36:07 -07:00
unknown
15bea314cc manual merge of bug fix#12537
sql/item.cc:
  Auto merged
sql/sql_select.cc:
  manual merge
2005-08-30 23:29:47 +04:00
unknown
aa4820af40 Fix incorrect spellings of "dropped" in source and tests. (Bug #12828)
include/my_alloc.h:
  Fix incorrect spelling
mysql-test/t/rpl000009.test:
  Fix incorrect spelling
mysql-test/t/system_mysql_db_fix.test:
  Fix incorrect spelling
sql/sql_table.cc:
  Fix incorrect spelling
tests/mysql_client_test.c:
  Fix incorrect spelling
2005-08-30 12:24:37 -07:00
unknown
e6ac9175d1 Merge baker@bk-internal.mysql.com:/home/bk/mysql-4.1
into  zim.(none):/home/brian/mysql/mysql-4.1
2005-08-30 08:28:34 -07:00
unknown
1a170dc092 Fixes bug #12517. Clear user variables and replication events before
closing temp tables in thread cleanup.


mysql-test/r/connect.result:
  added results for test of bug #12517
mysql-test/t/connect.test:
  added test of bug #12517
sql/sql_class.cc:
  Clear user variables and replication events before
  closing temp tables in thread cleanup.
2005-08-30 17:22:19 +04:00
unknown
2599491a67 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b9613
2005-08-30 17:32:53 +05:00
unknown
033faf7256 Fix bug #12537 UNION produces longtext instead of varchar
Item::tmp_table_field_from_field_type() and create_tmp_field_from_item()
was converting string field to blob depending on byte-wise length instead of
character length, which results in converting valid varchar string with
length == 86 to longtext.

Made that functions above take into account max width of character when
converting string fields to blobs.


sql/item.cc:
  Fix bug #12537 UNION produces longtext instead of varchar
  Item::tmp_table_field_from_field_type() now taking into account max char width when creating tmp field for string fields.
sql/sql_select.cc:
  Fix bug #12537 UNION produces longtext instead of varchar
   create_tmp_field_from_item()now taking into account max char width when creating tmp field for string fields.
mysql-test/r/create.result:
  Test case for bug #12537 UNION produces longtext instead of varchar
mysql-test/t/create.test:
  Test case for bug #12537 UNION produces longtext instead of varchar
2005-08-30 16:19:53 +04:00
unknown
bda02a17e7 Bug#12363
character_set_results is nullable, but value_ptr returns string "NULL"

set_var.cc:
  Create Item_null instead of Item_string for NULL values

variables.result, variables.test:
  adding test case


sql/set_var.cc:
  Bug#12363
  character_set_results is nullable, but value_ptr returns string "NULL"
  Create Item_null instead of Item_string for NULL values
mysql-test/t/variables.test:
  fixing tests accordingly
mysql-test/r/variables.result:
  fixing tests accordingly
2005-08-30 17:11:59 +05:00