Commit graph

14806 commits

Author SHA1 Message Date
unknown
ac8585e88a Merge bk-internal:/home/bk/mysql-5.0
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-bugteam


mysql-test/mysql-test-run.pl:
  Auto merged
2008-05-05 15:04:26 +03:00
unknown
6aadc3e2b9 Merge pilot.mysql.com:/data/msvensson/mysql/my50-bt-36463
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-bugteam


client/mysqltest.c:
  Auto merged
2008-05-02 19:01:32 +02:00
unknown
8d3952e99b Merge pilot.mysql.com:/data/msvensson/mysql/my50-bt-36463
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build


mysql-test/mysql-test-run.pl:
  Auto merged
2008-05-02 14:42:34 +02:00
unknown
6add5be771 Bug#36469 mysql_upgrade does not use --tmpdir
client/mysql_upgrade.c:
  Add --tmpdir option to mysql_upgrade and use it when creating temporary files.
mysql-test/mysql-test-run.pl:
  Pass --tmpdir to mysql_upgrade
2008-05-02 14:41:19 +02:00
unknown
f508244ded Merge pilot.mysql.com:/data/msvensson/mysql/my50-bt-36463
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build


mysql-test/mysql-test-run.pl:
  Auto merged
2008-05-02 09:15:23 +02:00
unknown
9018c56ac4 Bug#36463 mysql-test-run.pl should always use the --tmpdi
mysql-test/mysql-test-run.pl:
  Use the requested tmpdir in 'collect_mysqld_features', create
  it if it does not already exists
2008-05-02 09:13:43 +02:00
unknown
9418fd20d5 Merge bk-internal:/home/bk/mysql-5.0-build
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build


mysql-test/mysql-test-run.pl:
  Auto merged
2008-05-02 08:42:48 +02:00
unknown
1a68ec2809 Fix for bug #35298: GROUP_CONCAT with DISTINCT can crash the server
The bug is a regression introduced by the patch for bug32798.

The code in Item_func_group_concat::clear() relied on the 'distinct'
variable to check if 'unique_filter' was initialized. That, however,
is not always valid because Item_func_group_concat::setup() can do
shortcuts in some cases w/o initializing 'unique_filter'.

Fixed by checking the value of 'unique_filter' instead of 'distinct'
before dereferencing.


mysql-test/r/func_gconcat.result:
  Added test cases for bugs #35298 and #36024.
mysql-test/t/func_gconcat.test:
  Added test cases for bugs #35298 and #36024.
sql/item_sum.cc:
  Check if unique_filter != NULL before dereferencing it. Non-zero value
  of distinct does not always mean that unique_filter is initialized
  because Item_func_group_concat::setup() can do shortcuts is some cases
2008-05-01 13:49:26 +03:00
unknown
cf2b2cc506 Merge bk-internal:/home/bk/mysql-5.0
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-bugteam
2008-05-01 13:40:56 +03:00
unknown
89b866e7bf Bug#36023: Incorrect handling of zero length caused an assertion to fail.
When a zero length is provided to the my_decimal_length_to_precision
function along with unsigned_flag set to false it returns a negative value.
For queries that employs temporary tables may cause failed assertion or
excessive memory consumption while temporary table creation.

Now the my_decimal_length_to_precision and the my_decimal_precision_to_length
functions take unsigned_flag into account only if the length/precision
argument is non-zero.


mysql-test/t/type_decimal.test:
  Added a test case for the bug#36023: Incorrect handling of zero length caused
   an assertion to fail.
mysql-test/r/type_decimal.result:
  Added a test case for the bug#36023: Incorrect handling of zero length caused
   an assertion to fail.
sql/my_decimal.h:
  Bug#36023: Incorrect handling of zero length caused an assertion to fail.
  Now the my_decimal_length_to_precision and the my_decimal_precision_to_length
  functions take unsigned_flag into account only if the length/precision
  argument is non-zero.
2008-04-25 00:39:37 +04:00
unknown
415112a940 subselect.test, subselect.result:
Post-commit minor cleanup of testcase (bug#36139).


mysql-test/r/subselect.result:
  Post-commit minor cleanup of testcase (bug#36139).
mysql-test/t/subselect.test:
  Post-commit minor cleanup of testcase (bug#36139).
2008-04-23 14:22:49 +05:00
unknown
c2d1ac6e2c Merge host.loc:/home/uchum/work/5.0-bugteam-35993
into  host.loc:/home/uchum/work/5.0-bugteam
2008-04-23 02:29:37 +05:00
unknown
73f7de59c2 Fixed bug#36005: server crashes inside NOT IN clause subquery with
impossible WHERE/HAVING clause
                 (subselect_single_select_engine::exec).

Allocation and initialization of joined table list t1, t2... of
subqueries like:

    NOT IN (SELECT ... FROM t1,t2,... WHERE 0)

is optimized out, however server tries to traverse this list.


mysql-test/r/subselect3.result:
  Added test case for bug#36005.
mysql-test/t/subselect3.test:
  Added test case for bug#36005.
sql/sql_select.cc:
  Fixed bug#36005.
  
  1. JOIN::prepare initializes JOIN::table counter (actually a size
     of the JOIN::join_tab array) and sets it to a number of joined tables.
  
  2. The make_join_statistics function (when called from JOIN::optimize)
     allocates and fills the JOIN::join_tab array.
     However, when optimizing subselect has impossible (definite false)
     WHERE or HAVING clause, optimizer skips call to make_join_statistics
     and leaves JOIN::join_tab == NULL.
  
  3. subselect_single_select_engine::exec does traversal of the JOIN::join_tab
     array and the server dies because array is not allocated but array
     counter is greater than 0.
  
  The JOIN::optimize method has been modified to reset the JOIN::table
  counter to 0 in cause of impossible WHERE/HAVING clause.
2008-04-23 02:27:23 +05:00
unknown
d8ebf27639 Fixed bug #35993: memory corruption and crash with multibyte conversion.
Grouping or ordering of long values in not indexed BLOB/TEXT columns
with GBK or BIG5 charsets crashes the server.

MySQL server uses sorting (the filesort procedure) in the temporary
table to evaluate the GROUP BY clause in case of lack of suitable index.
That procedure takes into account only first @max_sort_length bytes
(system variable, usually 1024) of TEXT/BLOB sorting key string.
The my_strnxfrm_gbk and my_strnxfrm_big5 fill temporary keys
with data of whole blob length instead of @max_sort_length bytes
length. That buffer overrun has been fixed.


mysql-test/r/ctype_gbk.result:
  Added test case for bug #35993.
mysql-test/t/ctype_gbk.test:
  Added test case for bug #35993.
strings/ctype-big5.c:
  Fixed bug #35993: memory corruption and crash with multibyte conversion.
  
  Buffer overrun has been fixed in the my_strnxfrm_big5 function.
strings/ctype-gbk.c:
  Fixed bug #35993: memory corruption and crash with multibyte conversion.
  
  Buffer overrun has been fixed in the my_strnxfrm_gbk function.
2008-04-23 02:14:58 +05:00
unknown
1c1f0a62e1 BUG#36139 "float, zerofill, crash with subquery"
- Make convert_zerofill_number_to_string() take into account that the 
  constant it is converting may evaluate to NULL.


mysql-test/r/subselect.result:
  BUG#36139 "float, zerofill, crash with subquery"
  - Testcase
mysql-test/t/subselect.test:
  BUG#36139 "float, zerofill, crash with subquery"
  - Testcase
2008-04-22 02:53:12 +04:00
unknown
a16a72b6c3 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build


mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/type_blob.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/unireg.h:
  Auto merged
2008-04-09 12:27:51 -04:00
unknown
2bc7179d2d Follow-up to B-g#15776, test failures on 64-bit linux.
Make maximum blob size to be 2**32-1, regardless of word size.

Fix failure of timestamp with size of 2**31-1.  The method of
rounding up to the nearest even number would overflow.


mysql-test/r/type_blob.result:
  2**32-1 is not a special case for timestamp.
  
  Test 2**32-1 and 2**64 as the reliable test points for both 32-
  and 64-bit machines.  I'd like to test 2**32, but that would make 
  tests that vary between architectures.
  
  I'd like to generalize the tests by pulling the max blob size from
  the server, and then "eval"ing N-1, N, and N+1 instead of all these
  literal numbers, but I have not found a way to get UINT_MAX.
mysql-test/t/type_blob.test:
  2**32-1 is not a special case for timestamp.
  
  Test 2**32-1 and 2**64 as the reliable test points for both 32-
  and 64-bit machines.  I'd like to test 2**32, but that would make 
  tests that vary between architectures.
  
  I'd like to generalize the tests by pulling the max blob size from
  the server, and then "eval"ing N-1, N, and N+1 instead of all these
  literal numbers, but I have not found a way to get UINT_MAX.
sql/field.cc:
  Fix a bug where the round-to-even code for TIMESTAMP fields
  failed where the size would overflow the size to zero and then
  fail.
  
  Also, since we silently truncate the size of TIMESTAMP fields, set
  the maximum size we report is allowable to be the largest parsable
  number.
sql/unireg.h:
  Make BLOB size the maximum that the packed value in 
  field_blob::get_length() allows.
2008-04-09 12:27:30 -04:00
unknown
1a43dd8a24 Merge skozlov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/ksm/mysql/bugs/commit-mysql-5.0-rpl-bug32653


mysql-test/t/disabled.def:
  Auto merged
2008-04-07 15:59:51 +04:00
unknown
4091635247 Bug#32654. The reason of bug is incorrect clean up during restarting of mysqld under Windows platform (seems some files were in-use).
Mtr restarts servers because an option file exist for slave.
The option file for slave forces to skip test.foo table for replication. 
But really test case does not invlved test.foo table at all.
So option file can be removed and mtr will not restart servers for test case. 


BitKeeper/deleted/.del-rpl_view-slave.opt:
  Rename: mysql-test/t/rpl_view-slave.opt -> BitKeeper/deleted/.del-rpl_view-slave.opt
mysql-test/t/disabled.def:
  updated
2008-04-06 22:24:29 +04:00
unknown
f89f3c803d Merge five.local.lan:/work/merge/mysql-5.0-funcs_1
into  five.local.lan:/work/trees/mysql-5.0-build-src-clean
2008-04-04 18:02:55 +02:00
unknown
1daeb66563 Backport of fix made in 5.1 to 5.0
mysql-test/Makefile.am   :    Fix a copy-paste error ...


mysql-test/Makefile.am:
  Correct the variables used for target directory
  of copy action.
2008-04-04 17:41:14 +02:00
unknown
b2799ebf5a Bug#32653.
Added --log-slave-updates because test requires it. 
The events based on LOAD DATA INFILE masked by --replace_regex instead restarting of slave.
Added waiting start and stop of slave after START|STOP SLAVE statements.


mysql-test/r/rpl_log.result:
  updated result file
mysql-test/t/disabled.def:
  updated disabled.def
mysql-test/t/rpl_log-slave.opt:
  updated option for slave
mysql-test/t/rpl_log.test:
  updated test
2008-04-04 01:16:55 +04:00
unknown
a0d02a942a Merge bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build


sql/share/errmsg.txt:
  Auto merged
2008-04-03 11:28:10 -04:00
unknown
69c54e5438 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-04-03 15:30:39 +02:00
unknown
c4996b3282 Merge five.local.lan:/work/merge/mysql-5.0-funcs_1
into  five.local.lan:/work/trees/mysql-5.0-build-src-clean
2008-04-02 21:29:43 +02:00
unknown
1a07ecbab5 Correct the location of the directory for
"funcs_1" data load
2008-04-02 19:47:20 +02:00
unknown
cb29e2396b Merge bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build


sql/item_create.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2008-04-02 10:58:37 -04:00
unknown
babd981e41 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build


sql/field.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/unireg.h:
  Auto merged
mysql-test/r/type_blob.result:
  Manual merge.
mysql-test/t/type_blob.test:
  Manual merge.
2008-04-02 10:56:49 -04:00
unknown
393c1a01d0 Merge mleich@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  five.local.lan:/work/trees/mysql-5.0-build-src-clean
2008-04-02 14:55:35 +02:00
unknown
68bd2e4a9c Merge five.local.lan:/work/merge/mysql-5.0-Bug
into  five.local.lan:/work/trees/mysql-5.0-build-src-clean
2008-04-01 23:03:23 +02:00
unknown
a9e658408f Test updated. 2008-04-01 12:26:12 -04:00
unknown
edcf2742f8 Post-merge fixes.
mysql-test/r/binlog_index.result:
  Result set change.
2008-04-01 12:29:53 +02:00
unknown
e538761350 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


sql/share/errmsg.txt:
  Manual merge.
2008-04-01 08:43:15 +02:00
unknown
004123892d Fix for
Bug#35335 funcs_1: Some tests fail within load_file during
                      pushbuild runs
   Solution: 1. Move files with input data used in load_file, 
                load data etc. 
                from suite/funcs_1/<whatever>
                to std_data
             2. Use for testsuite funcs_1 the server option
                --secure-file-priv=<MYSQLTEST_VARDIR>
             3. Outfiles have to be stored under MYSQLTEST_VARDIR 
+ changes according to WL#4304 Cleanup in funcs_1 tests
  - backport of fixes/improvements made in 5.1 to 5.0
    The differences between scripts in 5.0 and 5.1 cause
    much additional and annoying work during any upmerge.
  - replace error numbers with names
  - improved comments
  - improved formatting
  - Unify storage engine names so that result files for
    storage engine variants do not differ (some tests)
  - remove a script no more used (tests are done in other scripts)


BitKeeper/deleted/.del-triggers_master.test:
  Delete: mysql-test/suite/funcs_1/triggers/triggers_master.test
mysql-test/std_data/funcs_1/innodb_tb1.txt:
  Rename: mysql-test/suite/funcs_1/data/innodb_tb1.txt -> mysql-test/std_data/funcs_1/innodb_tb1.txt
mysql-test/std_data/funcs_1/innodb_tb2.txt:
  Rename: mysql-test/suite/funcs_1/data/innodb_tb2.txt -> mysql-test/std_data/funcs_1/innodb_tb2.txt
mysql-test/std_data/funcs_1/innodb_tb3.txt:
  Rename: mysql-test/suite/funcs_1/data/innodb_tb3.txt -> mysql-test/std_data/funcs_1/innodb_tb3.txt
mysql-test/std_data/funcs_1/innodb_tb4.txt:
  Rename: mysql-test/suite/funcs_1/data/innodb_tb4.txt -> mysql-test/std_data/funcs_1/innodb_tb4.txt
mysql-test/std_data/funcs_1/memory_tb1.txt:
  Rename: mysql-test/suite/funcs_1/data/memory_tb1.txt -> mysql-test/std_data/funcs_1/memory_tb1.txt
mysql-test/std_data/funcs_1/memory_tb2.txt:
  Rename: mysql-test/suite/funcs_1/data/memory_tb2.txt -> mysql-test/std_data/funcs_1/memory_tb2.txt
mysql-test/std_data/funcs_1/memory_tb3.txt:
  Rename: mysql-test/suite/funcs_1/data/memory_tb3.txt -> mysql-test/std_data/funcs_1/memory_tb3.txt
mysql-test/std_data/funcs_1/memory_tb4.txt:
  Rename: mysql-test/suite/funcs_1/data/memory_tb4.txt -> mysql-test/std_data/funcs_1/memory_tb4.txt
mysql-test/std_data/funcs_1/myisam_tb1.txt:
  Rename: mysql-test/suite/funcs_1/data/myisam_tb1.txt -> mysql-test/std_data/funcs_1/myisam_tb1.txt
mysql-test/std_data/funcs_1/myisam_tb2.txt:
  Rename: mysql-test/suite/funcs_1/data/myisam_tb2.txt -> mysql-test/std_data/funcs_1/myisam_tb2.txt
mysql-test/std_data/funcs_1/myisam_tb3.txt:
  Rename: mysql-test/suite/funcs_1/data/myisam_tb3.txt -> mysql-test/std_data/funcs_1/myisam_tb3.txt
mysql-test/std_data/funcs_1/myisam_tb4.txt:
  Rename: mysql-test/suite/funcs_1/data/myisam_tb4.txt -> mysql-test/std_data/funcs_1/myisam_tb4.txt
mysql-test/std_data/funcs_1/t3.txt:
  Rename: mysql-test/suite/funcs_1/data/t3.txt -> mysql-test/std_data/funcs_1/t3.txt
mysql-test/std_data/funcs_1/t4.txt:
  Rename: mysql-test/suite/funcs_1/data/t4.txt -> mysql-test/std_data/funcs_1/t4.txt
mysql-test/std_data/funcs_1/t7.txt:
  Rename: mysql-test/suite/funcs_1/data/t7.txt -> mysql-test/std_data/funcs_1/t7.txt
mysql-test/std_data/funcs_1/t9.txt:
  Rename: mysql-test/suite/funcs_1/data/t9.txt -> mysql-test/std_data/funcs_1/t9.txt
mysql-test/Makefile.am:
  Introduce installation of funcs_1 files in std_data.
mysql-test/mysql-test-run.pl:
  The tests within funcs_1 need a server started with
      --secure-file-priv=<MYSQLTEST_VARDIR>
  like the main regression tests.
mysql-test/suite/funcs_1/README.txt:
  Extended description
mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc:
  Cleanup
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
  Cleanup
mysql-test/suite/funcs_1/include/innodb_tb1.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb2.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb3.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb4.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb1.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb2.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb3.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb4.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb1.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb2.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb3.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb4.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/sp_tb.inc:
  Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/r/innodb_func_view.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_views.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_innodb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_memory.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_ndb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_innodb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_memory.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_myisam.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_ndb.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_func_view.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_views.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_func_view.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_views.result:
  Updated results
mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc:
  "--echo" instead of SQL command.
mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc:
  Adjustment to new storage place of infile
  + correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_02.inc:
  Backport from 5.1 + correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_03.inc:
  Minor improvements + correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_06.inc:
  Backport from 5.1 + correct formatting
mysql-test/suite/funcs_1/storedproc/storedproc_10.inc:
  Backport from 5.1. + correct formatting
mysql-test/suite/funcs_1/t/innodb_trig_0407.test:
  Cleanup
mysql-test/suite/funcs_1/t/is_basics_mixed.test:
  Adjustment to new storage place of outfile.
mysql-test/suite/funcs_1/t/memory_storedproc_02.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_03.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_06.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_07.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_08.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_10.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_02.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_03.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_06.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_07.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_08.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_10.test:
  Cleanup
mysql-test/suite/funcs_1/triggers/trig_frkey2.inc:
  Cleanup
mysql-test/suite/funcs_1/triggers/triggers_0102.inc:
  Cleanup
mysql-test/suite/funcs_1/triggers/triggers_03.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_0407.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_08.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_09.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/views/func_view.inc:
  Backport from 5.1
mysql-test/suite/funcs_1/views/views_master.inc:
  Cleanup
mysql-test/std_data/funcs_1/load_file.txt:
  New BitKeeper file ``mysql-test/std_data/funcs_1/load_file.txt''
2008-03-31 19:48:02 +02:00
unknown
a49184af50 Removing race conditions from rpl_packet causing test to fail.
mysql-test/r/rpl_packet.result:
  Result change.
mysql-test/t/rpl_packet.test:
  Setting net_buffer_length correctly for the test instead of relying on it
  being set correctly. Waiting for slave to stop after issuing a SLAVE STOP
  and waiting for slave to start when issuing a SLAVE START to prevent race
  conditions causing test failure.
2008-03-31 16:32:45 +02:00
unknown
d59b8cf093 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
2008-03-31 09:57:29 +02:00
unknown
7021064aae Fix tree:
1. Use 'dat' extension, because it is handled in Makefile.am;
  2. Fix typo: the bug id is 35469, not 35649.


mysql-test/std_data/bug35469.dat:
  Rename: mysql-test/std_data/bug35649.data -> mysql-test/std_data/bug35469.dat
mysql-test/r/loaddata.result:
  Update result file.
mysql-test/t/loaddata.test:
  1. Use 'dat' extension, because it is handled in Makefile.am;
  2. Fix typo: the bug id is 35469, not 35649.
2008-03-28 23:39:47 +03:00
unknown
4ec65151dc Fix for Bug#35469: server crash with LOAD DATA INFILE to a VIEW.
The problem was that LOAD DATA code (sql_load.cc) didn't take into
account that there may be items, representing references to other
columns. This is a usual case in views. The crash happened because
Item_direct_view_ref was casted to Item_user_var_as_out_param,
which is not a base class.

The fix is to
  1) Handle references properly;
  2) Ensure that an item is treated as a user variable only when
     it is a user variable indeed;
  3) Report an error if LOAD DATA is used to load data into
     non-updatable column.


mysql-test/r/loaddata.result:
  Update result file.
mysql-test/t/loaddata.test:
  Add a test case form Bug#35469: server crash with
  LOAD DATA INFILE to a VIEW.
sql/share/errmsg.txt:
  Introduce a new error.
sql/sql_load.cc:
  Handle reference-items properly.
mysql-test/std_data/bug35649.data:
  Add a data file for the test case.
2008-03-28 18:59:13 +03:00
unknown
7c156537cc Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  moonbone.local:/work/27219-5.0-opt-mysql


sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2008-03-28 14:31:52 +03:00
unknown
ab82016ae8 Merge bk-internal:/home/bk/mysql-5.0
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-bugteam


sql/sql_acl.cc:
  Auto merged
2008-03-28 11:26:40 +02:00
unknown
b6b4202b48 Merge bk-internal:/home/bk/mysql-5.0
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-bugteam
2008-03-28 10:08:24 +02:00
unknown
ed1d366a23 Merge mysql.com:/misc/mysql/mysql-5.0
into  mysql.com:/misc/mysql/mysql-5.0-opt


CMakeLists.txt:
  Auto merged
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
2008-03-27 23:35:56 +01:00
unknown
9d661efd7f Bug#27219: Aggregate functions in ORDER BY.
Mixing aggregate functions and non-grouping columns is not allowed in the
ONLY_FULL_GROUP_BY mode. However in some cases the error wasn't thrown because
of insufficient check.

In order to check more thoroughly the new algorithm employs a list of outer
fields used in a sum function and a SELECT_LEX::full_group_by_flag.
Each non-outer field checked to find out whether it's aggregated or not and
the current select is marked accordingly.
All outer fields that are used under an aggregate function are added to the
Item_sum::outer_fields list and later checked by the Item_sum::check_sum_func
function.


mysql-test/t/group_by.test:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
mysql-test/r/group_by.result:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
sql/sql_select.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Implementation of new check for mixing non aggregated fields and aggregation
  function in the ONLY_FULL_GROUP_BY mode.
sql/sql_lex.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Initialization of the full_group_by_flag bitmap.
  SELECT_LEX::test_limit function doesn't reset ORDER BY
  clause anymore.
sql/sql_lex.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The full_group_by_flag is added to the SELECT_LEX class.
sql/item_sum.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The outer_fields list is added to the Item_sum class.
sql/mysql_priv.h:
  Bug#27219: Aggregate functions in ORDER BY.
  Defined a set of constants used in the new check for mixing non aggregated
  fields and sum functions in the ONLY_FULL_GROUP_BY_MODE.
sql/item_subselect.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  The Item_in_subselect::select_in_like_transformer function now drops
  ORDER BY clause in all selects in a subquery.
sql/item_sum.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_sum::check_sum_func function now checks whether fields in the
  outer_fields list are aggregated or not and marks selects accordingly.
sql/item.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_field::fix_fields function checks whether the field is aggregated
  or not and marks its select_lex accordingly.
2008-03-27 19:49:32 +03:00
unknown
8e473edd48 Merge host.loc:/home/uchum/work/mysql-5.0
into  host.loc:/home/uchum/work/5.0-opt


configure.in:
  Auto merged
sql/item.cc:
  Auto merged
2008-03-27 20:05:51 +04:00
unknown
f8653a79e9 Patch clean up.
Fixed interference between tests: Users were added but not properly removed.
This caused later tests to fail.


mysql-test/r/grant.result:
  Fixed interference between tests: Users were added but not properly removed.
  This caused later tests to fail.
mysql-test/t/grant.test:
  Fixed interference between tests: Users were added but not properly removed.
  This caused later tests to fail.
2008-03-27 09:37:20 -03:00
unknown
861434c3b0 Merge mysql.com:/Users/davi/mysql/mysql-5.1-bug33201
into  mysql.com:/Users/davi/mysql/mysql-5.0-bugteam


sql/sql_acl.cc:
  Auto merged
2008-03-27 09:13:51 -03:00
unknown
11cfd2ed67 Merge host.loc:/home/uchum/work/mysql-5.0
into  host.loc:/home/uchum/work/5.0-opt


sql/sql_delete.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2008-03-27 15:52:55 +04:00
unknown
9878e861a2 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


configure.in:
  Auto merged
2008-03-27 12:38:21 +01:00
unknown
42a06b4614 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  rhel5-ia64-a.mysql.com:/data0/tsmith/build/50
2008-03-27 08:50:54 +01:00
unknown
4020e6a2d7 post fix after push of BUG#33029
mysql-test/r/binlog_killed_simulate.result:
  Update test result after push of bug#33029
mysql-test/r/mix_innodb_myisam_binlog.result:
  Update test result after push of bug#33029
mysql-test/r/multi_update.result:
  Update test result after push of bug#33029
mysql-test/r/rpl_auto_increment_bug33029.result:
  disable warning messages
mysql-test/r/rpl_user.result:
  Update test result after push of bug#33029
mysql-test/t/rpl_auto_increment_bug33029.test:
  disable warning messages
2008-03-27 13:42:34 +08:00
unknown
ed6b0a2f50 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  mysql.com:/misc/mysql/34731/50-34731
2008-03-27 03:19:21 +01:00
unknown
fd1616311d Merge mysql.com:/misc/mysql/34731_/50-34731
into  mysql.com:/misc/mysql/34731/50-34731


sql/opt_range.cc:
  Auto merged
mysql-test/r/range.result:
  manual merge
mysql-test/t/range.test:
  manual merge
2008-03-27 03:16:35 +01:00
unknown
c3f2e30320 Merge host.loc:/home/uchum/work/5.0-opt-35193
into  host.loc:/home/uchum/work/5.0-opt
2008-03-27 00:44:13 +04:00
unknown
73e1c5ae10 Fix minor complaints of Marc Alff, for patch against B-g#15776.
mysql-test/t/type_blob.test:
  Drop table in case we start from a bad state.
sql/sql_yacc.yy:
  yacc/bison is left-recursive, so FIXME statement is wrong.
2008-03-26 14:52:10 -04:00
unknown
0b8342ba4e Fixed bug #35193.
View definition as SELECT ... FROM DUAL WHERE ... has
valid syntax, but use of such view in SELECT or
SHOW CREATE VIEW syntax causes unexpected syntax error.

Server omits FROM DUAL clause when storing view body
string in a .frm file for further evaluation.
However, syntax of SELECT-witout-FROM query is more
restrictive than SELECT FROM DUAL syntax, and doesn't
allow the WHERE clause.

NOTE: this syntax difference is not documented.


View registration procedure has been modified to
preserve original structure of view's body.



mysql-test/r/view.result:
  Added test case for bug #35193.
mysql-test/t/view.test:
  Added test case for bug #35193.
sql/sql_select.cc:
  Fixed bug #35193.
  The st_select_lex::print function always omits FROM DUAL clause,
  even if original SELECT query has the WHERE clause.
  
  The mysql_register_view function uses this function to reconstruct
  a body of view's AS clause for further evaluation and stores that
  reconstructed clause in a .frm file.
  
  SELECT without FROM syntax is more restrictive than 
  SELECT FROM DUAL syntax: second one allows
  the WHERE clause, but first one is not.
  
  Use of this view in SELECT or SHOW CREATE VIEW queries
  causes unexpected syntax errors.
  
  
  The st_select_lex::print function has been modified to
  reconstruct FROM DUAL clause in queries when needed.
  
  
  TODO: Syntax difference is not documented and should be
  eliminated, however improvement of
  the SELECT-without-FROM syntax is not trivial and leads to
  significant modification of grammar file because of additional
  shift/reduce conflicts.
2008-03-26 22:43:12 +04:00
unknown
4eaa7303fc Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-03-26 16:48:46 +01:00
unknown
a5ac54566c Merge mail.hezx.com:/media/sda3/work/mysql/bkroot/mysql-5.0-rpl
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/b33029_5.0_to_5.1_fails_on_dup_key/5.0
2008-03-26 21:37:34 +08:00
unknown
7587a8710d Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-03-26 09:34:37 +01:00
unknown
0d6f9bad70 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_cp932.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/slave.cc:
  Auto merged
2008-03-26 09:33:55 +01:00
unknown
18801aa829 Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
instructions)

This bug can not be reproduced in the current version,
adding the test case to the test suite for coverage, no code change.


mysql-test/r/sp-code.result:
  Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
  instructions)
mysql-test/t/sp-code.test:
  Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
  instructions)
2008-03-25 11:20:11 -06:00
unknown
d62c9e33ca information_schema.test, information_schema.result:
Minor test case cleanup after bug#34529.


mysql-test/r/information_schema.result:
  Minor test case cleanup after bug#34529.
mysql-test/t/information_schema.test:
  Minor test case cleanup after bug#34529.
2008-03-25 19:44:27 +04:00
unknown
d6fc09af43 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-03-25 14:09:16 +01:00
unknown
4816e7b7fb Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


sql/sql_delete.cc:
  Auto merged
2008-03-25 14:53:23 +03:00
unknown
5ad505dda2 BUG#35509 - Federated leaks memory when connecting to
localhost/default port

When creating federated table that points to unspecified host or
localhost on unspecified port or port is 0, small memory leak occurs.

This happens because we make a copy of unix socket path, which is
never freed.

With this fix we do not make a copy of unix socket path, instead
share->socket points to MYSQL_UNIX_ADDR constant directly.

This fix is covered by a test case for BUG34788.

Affects 5.0 only.


mysql-test/t/federated.test:
  A test case for BUG#35509.
sql/ha_federated.cc:
  When creating federated table we call parse_url() to check if connect
  string is correct. parse_url() may make a copy of unix socket path if
  port is not specified or 0 and host is not specified or 'localhost'.
  This copy is never freed.
  
  As there is no need to make a copy of unix socket path, let
  share->socket point to MYSQL_UNIX_ADDR directly.
2008-03-25 12:47:57 +04:00
unknown
00be935419 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  riffraff.(none):/data0/autopush/my50-bug34529
2008-03-24 16:19:50 +01:00
unknown
21bd55afec Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/33334/my50-33334


client/mysqltest.c:
  Auto merged
2008-03-23 21:53:36 +04:00
unknown
1a841e074a Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.0/bug35178_bh_ai
into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.0-bug18199_35178
2008-03-21 16:11:07 +02:00
unknown
4717ba4405 Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.0/bug18199-purge_no_warn
into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.0-bug18199_35178


sql/log.cc:
  Auto merged
2008-03-21 16:10:15 +02:00
unknown
8030bdfc16 BUG#34788 - malformed federated connection url is not handled
correctly - crashes server !

Creating federated table with connect string containing empty
(zero-length) host name and port is evaluated as 0 (port is
incorrect, omitted or 0) crashes server.

This happens because federated calls strcmp() with NULL pointer.

Fixed by avoiding strcmp() call if hostname is set to NULL.


mysql-test/r/federated.result:
  A test case for BUG#34788.
mysql-test/t/federated.test:
  A test case for BUG#34788.
sql/ha_federated.cc:
  Fixed that parse_url() may call strcmp() with NULL pointer.
2008-03-20 19:07:17 +04:00
unknown
070a233415 Merge host.loc:/home/uchum/work/PA/5.0-opt-34763
into  host.loc:/home/uchum/work/5.0-opt


sql/item.cc:
  Auto merged
2008-03-20 00:29:50 +04:00
unknown
5a6996dbcd Bug #35178 INSERT_ID not written to binary log for inserts against BLACKHOLE backed tables
binlogging of insert into a autoincrement blackhole table ignored
an explicit set insert_id.

Fixed with refining of the blackhole's insert method to call
update_auto_increment() that prepares binlogging the insert query 
with the preceeding set insert_id.

Note, as the engine does not store any actual data one has to explicitly
provide to the server with the value of the autoincrement column via
set insert_id. Otherwise binlogging will happend with the default 
set insert_id=1.


mysql-test/r/blackhole.result:
  results changed
mysql-test/t/blackhole.test:
  a regression test for the bug added
sql/ha_blackhole.cc:
  blackhole's insert method is refined to call update_auto_increment()
  that prepares binlogging the insert query with the preceeding set insert_id.
2008-03-19 18:44:50 +02:00
unknown
3c5894baaa Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY
When swapping out heap I_S tables to disk, this is done after plan refinement.
Thus, READ_RECORD::file will still point to the (deleted) heap handler at start
of execution. This causes segmentation fault if join buffering is used and the 
query is a star query where the result is found to be empty before accessing
some table. In this case that table has not been initialized (i.e. had its 
READ_RECORD re-initialized) before the cleanup routine tries to close the handler.
Fixed by updating READ_RECORD::file when changing handler.


mysql-test/r/information_schema.result:
  Bug#34529: Test result.
mysql-test/t/information_schema.test:
  Bug#34529: Test case.
sql/sql_show.cc:
  Bug#34529: The fix.
2008-03-19 14:32:28 +01:00
unknown
e12afb1e8d Merge kaamos.(none):/data/src/opt/bug34512/my50
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-03-19 16:30:56 +03:00
unknown
4018b13915 Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
Before breaking the connection we have to check that there's no query
  executing at the moment. Otherwise it can lead to crash in embedded server.


client/mysqltest.c:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  Wait until the query thread is finished before we break the connection.
  Waiting part moved to a separate wait_query_thread_end() function
mysql-test/r/flush.result:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  test result
mysql-test/t/flush.test:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  test case
2008-03-19 15:51:22 +04:00
unknown
f77686df0d Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


libmysql/libmysql.c:
  Auto merged
sql-common/client.c:
  Auto merged
tests/mysql_client_test.c:
  Manually merged.
2008-03-18 13:53:51 +03:00
unknown
6cf64b26d8 Bug #18199 PURGE BINARY LOGS fails silently with missing logs;
Bug #18453  Warning/error message if there is a mismatch between ...
 
There were three problems:
 
 1. the reported lack of warnings for the BEFORE syntax of PURGE;
 2. the similar lack of warnings for the TO syntax;
 3. incompatible behaviour between the two in that the latter blanked out
    regardlessly of presence or lack the actual file corresponding to
    an index record; the former version gave up at the first mismatch.

fixed with deploying the warning's generation and synronizing logics of 
purge_logs() and purge_logs_before_date().
my_stat() is called in either of two branches of purge_logs() (responsible
for the TO syntax of PURGE) similarly to how it has behaved in the BEFORE syntax.
If there is no actual binlog file, my_stat returns NULL and my_delete is
not invoked.
A critical error is reported to the user if a file from the index
could not be retrieved info about or deleted with a system error code
different than ENOENT.


sql/log.cc:
  generating warning in two functions.
  refining logics to call my_stat() by purge_logs() as it happens
  in purge_logs_before_date().
  my_delete() is called only if my_stat() ensured existance of the file.
  A critical error is reported to the user if a file from the index
  could not be my_stat():ed or my_delete():d with an error different
  than ENOENT.
sql/share/errmsg.txt:
  new error message
mysql-test/include/show_binary_logs.inc:
  a new macro - shortcut of show binary logs
mysql-test/r/binlog_index.result:
  new results
mysql-test/t/binlog_index.test:
  a regression test for the bugs
2008-03-17 20:19:04 +02:00
unknown
eda0b52c8e Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2008-03-14 15:28:36 -07:00
unknown
451de554fc Post-merge fix 2008-03-14 20:51:32 +01:00
unknown
9699767c95 Fixed bug #34763.
Queries like:

  SELECT ROW(1, 2) IN (SELECT t1.a, 2)
    FROM t1 GROUP BY t1.a

or 

  SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
    FROM t1 GROUP BY t1.a

lead to assertion failure in the
Item_in_subselect::row_value_transformer method in debugging
build, or to unexpected error message in release build:

  ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                      reference in item list)

Unexpected error message and assertion failure have been
eliminated.


mysql-test/r/subselect3.result:
  Added test case for bug #34763.
mysql-test/t/subselect3.test:
  Added test case for bug #34763.
sql/item.cc:
  Fixed bug #34763.
  The Item_ref::fix_fields method has been modified to silently
  ignore not fixed outer references: by the definition, those
  references should be fixed later by the call to the
  fix_inner_refs function.
sql/item_subselect.cc:
  Fixed bug #34763.
  The Item_in_subselect::row_value_transformer method has been
  modified to eliminate assertion failure on not fixed outer
  references: by the definition those references are allowed in
  this context and should be fixed later by the call to the
  fix_inner_refs function.
2008-03-14 23:11:59 +04:00
unknown
3834f42172 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0
2008-03-14 11:23:18 -07:00
unknown
b09254f00b Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-14 10:44:06 -07:00
unknown
7a10ede8ac Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg


sql/sql_yacc.yy:
  Auto merged
2008-03-14 18:28:37 +01:00
unknown
4097ee7ffa Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-03-14 18:24:02 +01:00
unknown
c27e617877 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-03-14 17:52:09 +01:00
unknown
7e01efff53 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG28248/mysql-5.0-engines
2008-03-14 19:42:44 +04:00
unknown
196b616acc BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed
When there are no underlying tables specified for a merge table,
SHOW CREATE TABLE outputs a statement that cannot be executed. The
same is true for mysqldump (it generates dumps that cannot be
executed).

This happens because SQL parser does not accept empty UNION() clause.

This patch changes the following:
- it is now possible to execute CREATE/ALTER statement with
  empty UNION() clause.
- the same as above, but still worth noting: it is now possible to
  remove underlying tables mapping using ALTER TABLE ... UNION=().
- SHOW CREATE TABLE does not output UNION() clause if there are
  no underlying tables specified for a merge table. This makes
  mysqldump slightly smaller.


mysql-test/r/merge.result:
  A test case for BUG#28248.
mysql-test/t/merge.test:
  A test case for BUG#28248.
sql/ha_myisammrg.cc:
  Do not output UNION clause in SHOW CREATE TABLE, when there are
  no underlying tables defined.
sql/sql_yacc.yy:
  Make underlying table list for MERGE engine optional.
  
  As for MERGE engine empty underlying tables list is valid, it should
  be valid for the parser as well.
  
  This change is mostly needed to restore dumps made by earlier MySQL
  versions. Also with this fix it is possible to remove underlying
  tables mapping by using ALTER TABLE ... UNION=().
2008-03-14 19:38:22 +04:00
unknown
ed86d34b6d Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


client/mysqldump.c:
  Auto merged
2008-03-14 14:32:01 +01:00
unknown
3ec867679a BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl

This is a test case fix for BUG#13861.


mysql-test/r/rpl_dual_pos_advance.result:
  Fix for a test case for BUG#13861.
mysql-test/t/rpl_dual_pos_advance.test:
  Fix for a test case for BUG#13861.
  
  master_pos_wait() requires slave sql thread running. But it is not
  guaranteed for this test case. As we use start slave until it may
  execute all events and shutdown before master_pos_wait() is started.
  
  On the other hand it is safe just to wait for slave to stop here,
  as start slave returns _after_ sql thread is started.
2008-03-14 17:17:03 +04:00
unknown
ce86b14625 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-14 09:48:57 +01:00
unknown
d5f09a13de BUG#33029 5.0 to 5.1 replication fails on dup key when inserting
using a trig in SP

For all 5.0 and up to 5.1.12 exclusive, when a stored routine or
trigger caused an INSERT into an AUTO_INCREMENT column, the
generated AUTO_INCREMENT value should not be written into the
binary log, which means if a statement does not generate
AUTO_INCREMENT value itself, there will be no Intvar event (SET
INSERT_ID) associated with it even if one of the stored routine
or trigger caused generation of such a value. And meanwhile, when
executing a stored routine or trigger, it would ignore the
INSERT_ID value even if there is a INSERT_ID value available set
by a SET INSERT_ID statement.

Starting from MySQL 5.1.12, the generated AUTO_INCREMENT value is
written into the binary log, and the value will be used if
available when executing the stored routine or trigger.

Prior fix of this bug in MySQL 5.0 and prior MySQL 5.1.12
(referenced as the buggy versions in the text below), when a
statement that generates AUTO_INCREMENT value by the top
statement was executed in the body of a SP, all statements in the
SP after this statement would be treated as if they had generated
AUTO_INCREMENT by the top statement.  When a statement that did
not generate AUTO_INCREMENT value by the top statement but by a
function/trigger called by it, an erroneous Intvar event would be
associated with the statement, this erroneous INSERT_ID value
wouldn't cause problem when replicating between masters and
slaves of 5.0.x or prior 5.1.12, because the erroneous INSERT_ID
value was not used when executing functions/triggers. But when
replicating from buggy versions to 5.1.12 or newer, which will
use the INSERT_ID value in functions/triggers, the erroneous
value will be used, which would cause duplicate entry error and
cause the slave to stop.

The patch for 5.0 fixed it not to generate the erroneous Intvar
event, another patch for 5.1 fixed it to ignore the SET INSERT_ID
value when executing functions/triggers if it is replicating from
a master of buggy versions.


mysql-test/include/show_binlog_events.inc:
  add $binlog_start parameter to set the start position when show binlog events, if not set a default value will be used.
  
  mask out column 2(Pos), 4(Server_id), table_id, and file_id
sql/sql_class.cc:
  Reset insert_id_used after each query in SP
mysql-test/r/rpl_auto_increment_bug33029.result:
  Add test for bug33029, test if the master generate the erroneous event or not
mysql-test/t/rpl_auto_increment_bug33029.test:
  Add test for bug33029, test if the master generate the erroneous event or not
2008-03-14 10:03:01 +08:00
unknown
e85d6a915d Bug#33756 - query cache with concurrent_insert=0 appears broken
When concurrent inserts were disabled, statements after an INSERT
were not put into the query cache. This happened because we do not
save the current data file length at statement start when
concurrent inserts are disabled. But we checked the always zero
local length against the real file length anyway.
  
Fixed by doing the check only if concurrent inserts are not diabled.


mysql-test/r/query_cache.result:
  Bug#33756 - query cache with concurrent_insert=0 appears broken
  Added test result.
mysql-test/t/query_cache.test:
  Bug#33756 - query cache with concurrent_insert=0 appears broken
  Added test.
sql/ha_myisam.cc:
  Bug#33756 - query cache with concurrent_insert=0 appears broken
  Changed code so that file length check is done only when
  concurrent inserts are possible.
2008-03-13 16:39:27 +01:00
unknown
b80afe5201 Bug#35247 - rpl_transaction.test produces warnings files
The test file tried to use a mysqltest command '--warning'
but there is no such command.

Changed '--warning' to '#--warning'.


mysql-test/t/rpl_transaction.test:
  Bug#35247 - rpl_transaction.test produces warnings files
  Changed '--warning' to '#--warning'.
2008-03-12 15:38:57 +01:00
unknown
326c4e9058 A fix for Bug#34643: TRUNCATE crash if trigger and foreign key.
In cases when TRUNCATE was executed by invoking mysql_delete() rather
than by table recreation (for example, when TRUNCATE was issued on
InnoDB table with is referenced by foreign key) triggers were invoked.
In debug builds this also led to crash because of an assertion, which
assumes that some preliminary actions take place before trigger 
invocation, which doesn't happen in case of TRUNCATE.

The fix is not to execute triggers in mysql_delete() when this
function is used by TRUNCATE.


mysql-test/r/trigger-trans.result:
  Update result file.
mysql-test/t/trigger-trans.test:
  A test case for Bug#34643: TRUNCATE crash if trigger and foreign key.
sql/sql_delete.cc:
  Do not process triggers in TRUNCATE.
2008-03-12 16:13:33 +03:00
unknown
09f8a4af63 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


client/mysql.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
2008-03-12 10:59:15 +03:00
unknown
67d529ed3b Post fix for
WL#4203 Reorganize and fix the data dictionary tests of
        testsuite funcs_1
because the goal to fix
Bug#34532 Some funcs_1 tests do not clean up at end of testing
was partially missed.
Some minor additional modifications are for
   WL#4304 Cleanup in funcs_1 tests


BitKeeper/deleted/.del-innodb_triggers.result:
  Rename: mysql-test/suite/funcs_1/r/innodb_triggers.result -> BitKeeper/deleted/.del-innodb_triggers.result
BitKeeper/deleted/.del-memory_triggers.result:
  Rename: mysql-test/suite/funcs_1/r/memory_triggers.result -> BitKeeper/deleted/.del-memory_triggers.result
BitKeeper/deleted/.del-myisam_triggers.result:
  Rename: mysql-test/suite/funcs_1/r/myisam_triggers.result -> BitKeeper/deleted/.del-myisam_triggers.result
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/memory_storedproc_03.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/memory_storedproc_07.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/memory_storedproc_08.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/memory_storedproc_10.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/myisam_storedproc_03.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/myisam_storedproc_07.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/myisam_storedproc_08.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/r/myisam_storedproc_10.result:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/cursors/cursors_master.test:
  Backport of file in 5.1
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
  Cleanup
mysql-test/suite/funcs_1/r/innodb_views.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_innodb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_memory.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
  Updated results
mysql-test/suite/funcs_1/r/is_columns_ndb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_innodb.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_memory.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_myisam.result:
  Updated results
mysql-test/suite/funcs_1/r/is_tables_ndb.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_views.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_views.result:
  Updated results
mysql-test/suite/funcs_1/t/innodb_storedproc.test:
  Backport of file in 5.1
mysql-test/suite/funcs_1/t/memory_storedproc.test:
  Backport of file in 5.1
mysql-test/suite/funcs_1/t/myisam_storedproc.test:
  Backport of file in 5.1
mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test:
  Cleanup
mysql-test/suite/funcs_1/views/views_master.inc:
  Backport of file in 5.1 which got many fixes for instabilities
  and other improvements
2008-03-11 19:54:35 +01:00
unknown
ec62aba3f0 Bug#34731: highest possible value for INT erroneously filtered by WHERE
WHERE f1 < n ignored row if f1 was indexed integer column and
f1 = TYPE_MAX ^ n = TYPE_MAX+1. The latter value when treated
as TYPE overflowed (obviously). This was not handled, it is now.


mysql-test/r/range.result:
  show that on an index int column, we no longer disregard
  a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
mysql-test/t/range.test:
  show that on an index int column, we no longer disregard
  a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
sql/opt_range.cc:
  Handle overflowing of int-types in range-optimizer.
  Unfortunately requires re-indentation of entire block.
  Overflow (err == 1) was handled, but only if
  field->cmp_type() != value->result_type(), which it
  just wasn't in our case.
2008-03-10 11:12:12 +01:00
unknown
0abcb8ca5e Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/34749/50-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2008-03-10 07:11:12 +01:00
unknown
1e8b11c656 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-07 13:41:11 -08:00
unknown
0e679ab782 Bug #26622 MASTER_POS_WAIT does not work as documented
Affected tests fixing. After the fix for st_relay_log_info::wait_for_pos() that
handles widely used select('master-bin.xxxx',pos) invoked by mysqltest
there appeared to be four tests that either tried synchronizing when
the slave was stopped or used incorrect synchronization method like
to call `sync_with_master' from the current connection being to the
master itself.

Fixed with correcting the current connection or/and using the correct
synchronization macro when possible.


mysql-test/r/rpl_loaddata.result:
  results changed
mysql-test/r/rpl_slave_status.result:
  results changed
mysql-test/t/rpl_loaddata.test:
  fixing cleanup for two tests
mysql-test/t/rpl_skip_error.test:
  fixing cleanup for two tests
mysql-test/t/rpl_slave_status.test:
  fixing cleanup
mysql-test/t/rpl_temporary.test:
  fixing synchronizations to use the intended correct macro.
2008-03-07 21:14:28 +02:00
unknown
e78f628499 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.0-engines
2008-03-07 21:19:30 +04:00
unknown
d6e42aace3 WL#4203 Reorganize and fix the data dictionary tests of
testsuite funcs_1
1. Fix the following bugs
   Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
      Solution: Test variants charset_collation_* adjusted to different builds
   Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
      Solution: Excluding "PROFILING" table from queries
   Bug#33654 "slow log" is missing a line
      Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                STATISTICS.CARDINALITY within result sets
   Bug#34532 Some funcs_1 tests do not clean up at end of testing
      Solution: DROP objects/reset global server variables modified during testing
                + let tests missing implementation end before loading of tables
   Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
      Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
   Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
      Generation of new results during post merge fix
   Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
      Generation of new results during post merge fix
   Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
      Generation of new results during post merge fix
      + removal of platform-specific replace routine (no more needed)
2. Restructure the tests
   - Test not more than one INFORMATION_SCHEMA view per testscript
   - Separate tests of I_S view layout+functionality from content related to the
     all time existing databases "information_schema", "mysql" and "test"
   - Avoid storage engine related variants of tests which are not sensible to
     storage engines at all.
3. Reimplement or add some subtests + cleanup
   There is a some probability that even the reviewed changeset
   - does not fix all bugs from above   or
   - contains new bugs which show up on some platforms <> Linux or on one of
     the various build types
4. The changeset contains fixes according to
   - one code review
   - minor bugs within testing code found after code review (accepted by reviewer)
   - problems found during tests with 5.0.56 in build environment


mysql-test/suite/funcs_1/t/innodb_storedproc_02.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/innodb_storedproc_03.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/innodb_storedproc_06.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/innodb_storedproc_07.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/innodb_storedproc_08.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/innodb_storedproc_10.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_02.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_03.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_06.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_07.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_08.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/memory_storedproc_10.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_02.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_03.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_06.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_07.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_08.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/t/myisam_storedproc_10.test:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_02.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_03.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_06.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_07.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_08.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc:
  Change mode to -rw-rw-r--
mysql-test/suite/funcs_1/storedproc/storedproc_10.inc:
  Change mode to -rw-rw-r--
BitKeeper/deleted/.del-innodb__load.test:
  Delete: mysql-test/suite/funcs_1/t/innodb__load.test
BitKeeper/deleted/.del-innodb__load.result:
  Delete: mysql-test/suite/funcs_1/r/innodb__load.result
BitKeeper/deleted/.del-myisam__load.test:
  Delete: mysql-test/suite/funcs_1/t/myisam__load.test
BitKeeper/deleted/.del-memory__load.test:
  Delete: mysql-test/suite/funcs_1/t/memory__load.test
BitKeeper/deleted/.del-memory__load.result:
  Delete: mysql-test/suite/funcs_1/r/memory__load.result
BitKeeper/deleted/.del-myisam__load.result:
  Delete: mysql-test/suite/funcs_1/r/myisam__load.result
BitKeeper/deleted/.del-create_database.inc:
  Delete: mysql-test/suite/funcs_1/include/create_database.inc
BitKeeper/deleted/.del-create_user_lowest_priv.inc:
  Delete: mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc
BitKeeper/deleted/.del-create_user_no_super.inc:
  Delete: mysql-test/suite/funcs_1/include/create_user_no_super.inc
BitKeeper/deleted/.del-datadict_help_tables_build.result:
  Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_build.result
BitKeeper/deleted/.del-datadict_help_tables_build.test:
  Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_build.test
BitKeeper/deleted/.del-datadict_help_tables_dev.result:
  Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result
BitKeeper/deleted/.del-datadict_help_tables_dev.test:
  Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test
BitKeeper/deleted/.del-datadict_master.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_master.inc
BitKeeper/deleted/.del-datadict_show_schema.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
BitKeeper/deleted/.del-datadict_show_table_design.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc
BitKeeper/deleted/.del-datadict_tables.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables.inc
BitKeeper/deleted/.del-datadict_tables_error.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc
BitKeeper/deleted/.del-datadict_tables_error_1.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc
BitKeeper/deleted/.del-datadict_tables_error_1044.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc
BitKeeper/deleted/.del-datadict_tables_error_1049.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc
BitKeeper/deleted/.del-datadict_tables_error_1051.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc
BitKeeper/deleted/.del-datadict_tables_error_1146.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc
BitKeeper/deleted/.del-datadict_tables_error_1288.inc:
  Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc
BitKeeper/deleted/.del-innodb__datadict.result:
  Delete: mysql-test/suite/funcs_1/r/innodb__datadict.result
BitKeeper/deleted/.del-innodb__datadict.test:
  Delete: mysql-test/suite/funcs_1/t/innodb__datadict.test
BitKeeper/deleted/.del-memory__datadict.test:
  Delete: mysql-test/suite/funcs_1/t/memory__datadict.test
BitKeeper/deleted/.del-myisam__datadict.result:
  Delete: mysql-test/suite/funcs_1/r/myisam__datadict.result
BitKeeper/deleted/.del-myisam__datadict.test:
  Delete: mysql-test/suite/funcs_1/t/myisam__datadict.test
BitKeeper/deleted/.del-memory__datadict.result:
  Delete: mysql-test/suite/funcs_1/r/memory__datadict.result
mysql-test/suite/funcs_1/README.txt:
  Cleanup in description
mysql-test/suite/funcs_1/include/memory_tb1.inc:
  Move setting of variables into the caller scripts
mysql-test/suite/funcs_1/include/memory_tb2.inc:
  Move setting of variables into the caller scripts
mysql-test/suite/funcs_1/include/memory_tb3.inc:
  Move setting of variables into the caller scripts
mysql-test/suite/funcs_1/include/memory_tb4.inc:
  Move setting of variables into the caller scripts
mysql-test/suite/funcs_1/include/sp_tb.inc:
  Remove outdated comment
mysql-test/suite/funcs_1/r/innodb_bitdata.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_cursors.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result:
  Updated results
mysql-test/suite/funcs_1/r/innodb_views.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_bitdata.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_cursors.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/memory_views.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_bitdata.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_cursors.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_03.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_06.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_07.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_08.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_10.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0102.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_03.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0407.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_08.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_09.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result:
  Updated results
mysql-test/suite/funcs_1/r/myisam_views.result:
  Updated results
mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc:
  Move setting of variables into the caller scripts
mysql-test/suite/funcs_1/t/innodb_bitdata.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_cursors.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_0102.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_03.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_0407.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_08.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_09.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_trig_frkey.test:
  Cleanup
mysql-test/suite/funcs_1/t/innodb_views.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_bitdata.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_cursors.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_0102.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_03.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_0407.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_08.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_09.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_trig_1011ext.test:
  Cleanup
mysql-test/suite/funcs_1/t/memory_views.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_bitdata.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_cursors.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_0102.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_03.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_0407.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_08.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_09.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test:
  Cleanup
mysql-test/suite/funcs_1/t/myisam_views.test:
  Cleanup
mysql-test/suite/funcs_1/t/charset_collation_1.test:
  Check content of information_schema views
     character_sets, collations,
     collation_character_set_applicability
  Build variant 1
mysql-test/suite/funcs_1/t/charset_collation_2.test:
  Check content of information_schema views
     character_sets, collations,
     collation_character_set_applicability
  Build variant 2
mysql-test/suite/funcs_1/t/charset_collation_3.test:
  Check content of information_schema views
     character_sets, collations,
     collation_character_set_applicability
  Build variant 3
mysql-test/suite/funcs_1/t/is_basics_mixed.test:
  Test some basic properties which are independend of the storage
  engine used for the creation of tables.
mysql-test/suite/funcs_1/t/is_character_sets.test:
  Tests related to functionality of
  information_schema.character_sets
mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test:
  Tests related to functionality of
  information_schema.collation_character_set_applicability
mysql-test/suite/funcs_1/t/is_collations.test:
  Tests related to functionality of
  information_schema.collations
mysql-test/suite/funcs_1/t/is_column_privileges.test:
  Tests related to functionality of
  information_schema.column_privileges
mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test:
  Check content of information_schema.column_privileges about databases
  mysql and test
mysql-test/suite/funcs_1/t/is_columns.test:
  Tests related to functionality of
  information_schema.columns
mysql-test/suite/funcs_1/t/is_columns_innodb.test:
  Check content of information_schema.columns when some
  tables are preloaded
  Variant for InnoDB
mysql-test/suite/funcs_1/t/is_columns_is.test:
  Check content of information_schema.columns about schema
  information_schema
mysql-test/suite/funcs_1/t/is_columns_memory.test:
  Check content of information_schema.columns when some
  tables are preloaded
  Variant for MEMORY
mysql-test/suite/funcs_1/t/is_columns_myisam.test:
  Check content of information_schema.columns when some
  tables are preloaded
  Variant for MyISAM
mysql-test/suite/funcs_1/t/is_columns_mysql.test:
  Check content of information_schema.columns about schema
  mysql
mysql-test/suite/funcs_1/t/is_columns_ndb.test:
  Check content of information_schema.columns when some
  tables are preloaded
  Variant for NDB
mysql-test/suite/funcs_1/t/is_key_column_usage.test:
  Tests related to functionality of
  information_schema.key_column_usage
mysql-test/suite/funcs_1/t/is_routines.test:
  Tests related to functionality of
  information_schema.routines
mysql-test/suite/funcs_1/t/is_schema_privileges.test:
  Tests related to functionality of
  information_schema.schema_privileges
mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test:
  Check content of information_schema.schema_privileges about schemas
  information_schema, mysql and test
mysql-test/suite/funcs_1/t/is_schemata.test:
  Tests related to functionality of
  information_schema.schemata
mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test:
  Check content of information_schema.schemata about schemas
  information_schema, mysql and test
mysql-test/suite/funcs_1/t/is_statistics.test:
  Tests related to functionality of
  information_schema.statistics
mysql-test/suite/funcs_1/t/is_statistics_is.test:
  Check content of information_schema.statistics about schema
  information_schema
mysql-test/suite/funcs_1/t/is_statistics_mysql.test:
  Check content of information_schema.statistics about schema
  mysql
mysql-test/suite/funcs_1/t/is_table_constraints.test:
  Tests related to functionality of
  information_schema.table_constraints
mysql-test/suite/funcs_1/t/is_table_constraints_is.test:
  Check content of information_schema.table_constraints about schema
  information_schema
mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test:
  Check content of information_schema.table_constraints about schema
  mysql
mysql-test/suite/funcs_1/t/is_table_privileges.test:
  Tests related to functionality of
  information_schema.table_privileges
mysql-test/suite/funcs_1/datadict/basics_mixed1.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/basics_mixed2.inc:
  Auxiliary script
mysql-test/suite/funcs_1/include/cleanup.inc:
  Auxiliary script
mysql-test/suite/funcs_1/r/charset_collation_1.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/charset_collation_2.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/charset_collation_3.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_basics_mixed.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_character_sets.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_collations.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_column_privileges.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_innodb.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_memory.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_mysql.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_columns_ndb.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_key_column_usage.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_routines.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_schema_privileges.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_schemata.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_statistics.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_statistics_is.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_statistics_mysql.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_table_constraints.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_table_constraints_is.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_table_privileges.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_innodb.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_is.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_memory.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_myisam.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_mysql.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_tables_ndb.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_triggers.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_user_privileges.result:
  Expected result for new test
mysql-test/suite/funcs_1/r/is_views.result:
  Expected result for new test
mysql-test/suite/funcs_1/t/is_tables.test:
  Tests related to functionality of
  information_schema.tables
mysql-test/suite/funcs_1/t/is_tables_innodb.test:
  Check content of information_schema.tables when some
  tables are preloaded
  Variant for InnoDB
mysql-test/suite/funcs_1/t/is_tables_is.test:
  Check content of information_schema.tables about schema
  information_schema
mysql-test/suite/funcs_1/t/is_tables_memory.test:
  Check content of information_schema.tables when some
  tables are preloaded
  Variant for MEMORY
mysql-test/suite/funcs_1/t/is_tables_myisam.test:
  Check content of information_schema.tables when some
  tables are preloaded
  Variant for MyISAM
mysql-test/suite/funcs_1/t/is_tables_mysql.test:
  Check content of information_schema.tables about schema
  mysql
mysql-test/suite/funcs_1/t/is_tables_ndb.test:
  Check content of information_schema.tables when some
  tables are preloaded
  Variant for NDB
mysql-test/suite/funcs_1/t/is_triggers.test:
  Tests related to functionality of
  information_schema.triggers
mysql-test/suite/funcs_1/t/is_user_privileges.test:
  Tests related to functionality of
  information_schema.user_privileges
mysql-test/suite/funcs_1/t/is_views.test:
  Tests related to functionality of
  information_schema.views
mysql-test/suite/funcs_1/datadict/basics_mixed3.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/charset_collation.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/columns.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/datadict.pre:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/is_table_query.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/statistics.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/table_constraints.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/tables1.inc:
  Auxiliary script
mysql-test/suite/funcs_1/datadict/tables2.inc:
  Auxiliary script
2008-03-07 17:33:07 +01:00
unknown
a104844dda Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B34909-5.0-opt
2008-03-07 11:17:31 +02:00
unknown
99c0b5e10f Bug #34909: mysqldump returns a 0 status on error when using
--master-data

No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.


client/mysqldump.c:
  Bug #34909: add error code
mysql-test/r/mysqldump-no-binlog.result:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog-master.opt:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog.test:
  Bug #34909: test case
2008-03-07 11:15:49 +02:00
unknown
8270d9875f Fix for bug #34512: CAST( AVG( double ) AS DECIMAL )
returns wrong results

Casting AVG() to DECIMAL led to incorrect results when the arguments
had a non-DECIMAL type, because in this case
Item_sum_avg::val_decimal() performed the division by the number of
arguments twice.

Fixed by changing Item_sum_avg::val_decimal() to not rely on
Item_sum_sum::val_decimal(), i.e. calculate sum and divide using
DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with
subsequent conversion to DECIMAL otherwise.


mysql-test/r/func_group.result:
  Added a test case for bug #34512.
mysql-test/t/func_group.test:
  Added a test case for bug #34512.
sql/item_sum.cc:
  Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal()
  because the first one, depending on the arguments type, may return
  either the sum of the arguments, or the average calculated by the
  virtual val_real() method of Item_sum_avg. Instead, do our own
  calculation based on the arguments type.
2008-03-06 18:19:47 +03:00
unknown
04c5af1802 Bug#26622 MASTER_POS_WAIT does not work as documented
MASTER_POS_WAIT return values are different than expected when the server is not a slave. 
It returns -1 instead of NULL.

Fixed with correcting  st_relay_log_info::wait_for_pos() to return the proper
value in the case of rli info is not inited.


mysql-test/r/rpl_master_pos_wait.result:
  results changed
mysql-test/t/rpl_master_pos_wait.test:
  the new test to check that select master_pos_wait() to a server does 
  not have master info returns NULL as specified.
sql/slave.cc:
  changing the return value to correspond the specification.
2008-03-06 14:49:21 +02:00
unknown
f2c9483dd5 additional test fixes for bug 27580 2008-03-06 09:58:49 +04:00
unknown
89fb97c500 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b27580
into  mysql.com:/home/bar/mysql-work/mysql-5.0.b27580v2


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/include/ctype_common.inc:
  after merge fix
mysql-test/r/ctype_big5.result:
  after merge fix
mysql-test/r/ctype_euckr.result:
  after merge fix
mysql-test/r/ctype_gb2312.result:
  after merge fix
mysql-test/r/ctype_gbk.result:
  after merge fix
mysql-test/r/ctype_uca.result:
  after merge fix
2008-03-06 08:41:05 +04:00
unknown
d20bfbbef6 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-03-05 09:42:26 +01:00
unknown
0769fe5590 Use the same name for mysql_client_test output file in all branches.
mysql-test/t/mysql_client_test.test:
  Rename mysql_client_test output file to mysql_client_test.out.log
2008-03-04 10:32:30 -03:00
unknown
0fa2ee981b Bug#35009 Results of mysql_client_test are discarded upon failure
It's impossible to determine which test inside mysql_client_test
failed if the log file is overwritten by mysqltest when dumping
the test case results. Redirect mysql_client_test output to a
separate file.


mysql-test/t/mysql_client_test.test:
  Redirect mysql_client_test output to a separate log file so
  it doesn't get overwritten by mysqltest.
2008-03-04 10:17:49 -03:00
unknown
cd9f2d1c28 BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
  to before the late NULLs filtering code.
- Backport function comments from 6.0.


mysql-test/r/null_key.result:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Testcase
mysql-test/t/null_key.test:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Testcase
sql/sql_select.cc:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
    to before the late NULLs filtering code.
  - Backport function comments from 6.0
2008-03-03 20:35:44 +03:00
unknown
6153c248cf Bug#34995 mysql-test-run doesn't allow client lib/binary selection
mysql-test/mysql-test-run.pl:
  Add support for spcifying --client-libdir=s and --client-bindir=s
2008-03-03 12:47:05 +01:00
unknown
2cb35cd680 test case fix 2008-03-03 15:02:34 +04:00
unknown
9ffaa74535 Bug#22438
mysql-test/r/mysqldump.result:
  updated result
mysql-test/t/mysqldump.test:
  hide master_log_pos number
2008-03-02 21:20:36 +03:00
unknown
4460f5a5b1 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


mysql-test/t/symlink.test:
  Auto merged
mysql-test/r/symlink.result:
  after merge fix
2008-02-29 16:58:20 +04:00
unknown
be59a0ea7f test fix
mysql-test/r/symlink.result:
  result fix
2008-02-29 16:56:41 +04:00
unknown
fa9e35b48d after merge fix 2008-02-29 15:04:00 +04:00
unknown
8bdb243fd7 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/mysql_priv.h:
  Auto merged
mysql-test/r/symlink.result:
  manual merge
mysql-test/t/symlink.test:
  manual merge
sql/mysqld.cc:
  manual merge
sql/sql_parse.cc:
  manual merge
2008-02-29 14:05:38 +04:00
unknown
ab60425901 Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of mysql data home directory in
DATA DIRECTORY & INDEX DIRECTORY is disallowed.


mysql-test/r/symlink.result:
  test result
mysql-test/t/symlink.test:
  test case
sql/mysql_priv.h:
  new variable mysql_unpacked_real_data_home
sql/mysqld.cc:
  new variable mysql_unpacked_real_data_home
sql/sql_parse.cc:
  added new function test_if_data_home_dir() which checks that
  path does not contain mysql data home directory.
  Using of mysql data home directory in
  DATA DIRECTORY & INDEX DIRECTORY is disallowed.
2008-02-29 13:55:00 +04:00
unknown
7f572871ad Merge host.loc:/home/uchum/work/PP/5.0-opt-34620
into  host.loc:/home/uchum/work/5.0-opt
2008-02-28 22:57:22 +04:00
unknown
d40ca16156 Fixed bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*):
Assertion `0' failed

If ROW item is a part of an expression that also has
aggregate function calls (COUNT/SUM/AVG...), a
"splitting" with an Item::split_sum_func2 function
is applied to that ROW item.
Current implementation of Item::split_sum_func2
replaces this Item_row with a newly created
Item_aggregate_ref reference to it.
Then the row cache tries to work with the
Item_aggregate_ref object as with the Item_row object:
row cache calls row-emulation methods such as cols and
element_index. Item_aggregate_ref (like it's parent
Item_ref) inherits dummy implementations of those
methods from the hierarchy root Item, and call to
them leads to failed assertions and wrong data
output.

Row-emulation virtual functions (cols, element_index, addr,
check_cols, null_inside and bring_value) of Item_ref have
been overloaded to forward calls to an underlying item
reference.




mysql-test/r/row.result:
  Added test case for bug #34620.
mysql-test/t/row.test:
  Added test case for bug #34620.
sql/item.h:
  Fixed bug #34620.
  Row-emulation virtual functions (cols, element_index, addr,
  check_cols, null_inside and bring_value) of Item_ref have
  been overloaded to forward calls to an underlying item
  reference.
2008-02-28 22:53:31 +04:00
unknown
1164e2bc7a Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210
The problem is that passing anything other than a integer to a limit
clause in a prepared statement would fail. This limitation was introduced
to avoid replication problems (e.g: replicating the statement with a
string argument would cause a parse failure in the slave).

The solution is to convert arguments to the limit clause to a integer
value and use this converted value when persisting the query to the log.


mysql-test/r/limit.result:
  Update test case result.
mysql-test/r/ps.result:
  Add test case result for Bug#33851
mysql-test/r/rpl_user_variables.result:
  Test case result for replication of prepared statement with
  limit clause.
mysql-test/t/limit.test:
  Test parameters to limit clause.
mysql-test/t/ps.test:
  Add test case for Bug#33851
mysql-test/t/rpl_user_variables.test:
  Test replication of a parameter which value is converted.
sql/item.cc:
  Convert value to integer if it's a parameter to a limit clause.
sql/item.h:
  Flag signal that item is a parameter to a limit clause.
sql/item_func.cc:
  Const member functions, object is not mutated.
sql/sql_class.h:
  Const member functions, object is not mutated.
sql/sql_yacc.yy:
  Flag that item is a parameter to a limit clause.
2008-02-28 11:34:08 -03:00
unknown
56e6b531d2 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B34747-5.0-opt
2008-02-28 15:27:50 +02:00
unknown
a0eec8abbb Bug#34749: Server crash when using NAME_CONST() with an aggregate function
NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was
not seen as constant, but as FUNCTION_UNARY_MINUS(constant)
while we are at the same time pretending it was a basic const
item. This confused the aggregate handlers in exciting ways.
We now make NAME_CONST() behave more consistently.


mysql-test/r/func_misc.result:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
mysql-test/t/func_misc.test:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
sql/ha_ndbcluster_cond.cc:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/ha_ndbcluster_cond.h:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/item.cc:
  make NAME_CONST() transparent in that type() of
  -constant is that of constant, not that of unary
  minus (id est, FUNC_ITEM).
sql/item.h:
  Move constructor to item.cc
sql/item_func.h:
  Revert Bug#30832; we can apply the magic more narrowly
  (just for NAME_CONST() rather than all Item_func_neg).
  
  Introduce new function type "NEG_FUNC."
2008-02-28 14:23:22 +01:00
unknown
f28612eae2 Bug #34747: crash in debug assertion check after derived table
Was a double-free of the Unique member of Item_func_group_concat.
This was not causing a crash because the Unique is a descendent of
Sql_alloc.
Fixed to free the Unique only if it was allocated for the instance 
of Item_func_group_concat it was referenced from


mysql-test/r/func_gconcat.result:
  Bug #34747: test case
mysql-test/t/func_gconcat.test:
  Bug #34747: test case
sql/item_sum.cc:
  Bug #34747: free the Unique only if it was allocated
  for this instance of Item_func_group_concat
2008-02-28 13:31:19 +02:00
unknown
7ca90d539f Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-27 18:17:25 +03:00
unknown
c8885dfb73 Fixed test suite failures with --ps-protocol introduced in PB by
the patch for bug #33834.
2008-02-27 18:12:08 +03:00
unknown
432bc1f259 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.0-engines
2008-02-27 17:33:19 +04:00
unknown
b66e0f7524 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-27 10:57:48 +01:00
unknown
a86e504f59 Merge quad.:/mnt/raid/alik/MySQL/devel/5.0
into  quad.:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


mysql-test/r/view.result:
  Auto merged
2008-02-26 19:23:37 +03:00
unknown
25620347fc Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/sql_yacc.yy:
  Auto merged
2008-02-26 16:10:31 +03:00
unknown
4f3eab5804 Fix for bug #33834: FRAC_SECOND: Applicability not clear in
documentation

While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
function, it was also possible to use FRAC_SECOND with DATE_ADD(),
DATE_SUB() and +/- INTERVAL.

Fixed the parser to match the manual, i.e. using FRAC_SECOND for 
anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a 
syntax error.

Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.


mysql-test/r/func_time.result:
  Added a test case for bug #33834.
mysql-test/t/func_time.test:
  Added a test case for bug #33834.
sql/sql_yacc.yy:
  Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
  TIMESTAMPDIFF().
  Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
  Warn about FRAC_SECOND being a deprecated unit.
2008-02-25 13:25:57 +03:00
unknown
62ba88327f Merge kaamos.(none):/data/src/opt/bug33049/my50-bug33790
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-22 21:25:11 +03:00
unknown
1bee6a3c7c Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  Auto merged
2008-02-22 16:36:09 +01:00
unknown
fea2a5d83d BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl

Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.

This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.

This is fixed by:
- reading the event to be executed before checking if the until condition
  is satisfied.
- comparing the start position of the event to be executed. Since we do
  not have the start position available, we compute it by subtracting
  event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
  time, that meet until condition, we stop immediately, as in this
  case we do not want to wait for next event.


mysql-test/r/rpl_dual_pos_advance.result:
  A test case for BUG#13861.
mysql-test/t/rpl_dual_pos_advance.test:
  A test case for BUG#13861.
sql/log_event.cc:
  Store length of event. This is needed for further calculation of
  the beginning of event.
sql/slave.cc:
  Slave SQL thread may execute one extra event when there are events
  skipped by slave I/O thread (e.g. originated by the same server).
  Whereas it was requested not to do so by the UNTIL condition.
  
  This happens because we compare with the end position of previously
  executed event. This is fine when there are no skipped by slave I/O
  thread events, as end position of previous event equals to start
  position of to be executed event. Otherwise this position equals to
  start position of skipped event.
  
  This is fixed by:
  - reading the event to be executed before checking if the until condition
    is satisfied.
  - comparing the start position of the event to be executed. Since we do
    not have the start position available, we compute it by subtracting
    event length from end position (which is available).
  - if there are no events on the event queue at the slave sql starting
    time, that meet until condition, we stop immediately, as in this
    case we do not want to wait for next event.
sql/slave.h:
  Added master_log_pos parametr to is_until_satisfied().
mysql-test/t/rpl_dual_pos_advance-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt''
2008-02-22 19:07:07 +04:00
unknown
4368dcdc2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30604-5.0-opt
2008-02-22 15:36:27 +02:00
unknown
d702cb12b2 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/mysql-5.0-opt
2008-02-22 15:04:24 +04:00
unknown
012aab7d8b Fix for bug #33049: Assert while running test-as3ap test(mysql-bench
suite)

Under some circumstances a combination of aggregate functions and
GROUP BY in a SELECT query over a VIEW could lead to incorrect
calculation of the result type of the aggregate function. This in
turn could result in incorrect results, or assertion failures on debug
builds.

Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that
the argument's item is dereferenced before calling its type() method.


mysql-test/r/view.result:
  Added a test case for bug #33049.
mysql-test/t/view.test:
  Added a test case for bug #33049.
sql/item_sum.cc:
  When calculating the result type of an aggregate function, dereference
  the argument's item before calling its type() method.
2008-02-22 11:34:18 +03:00
unknown
1a8be8bccb Bug#23588 SHOW COLUMNS on a temporary table causes locking issues
skip lock_type update for temporary tables


mysql-test/r/tablelock.result:
  test result
mysql-test/t/tablelock.test:
  test case
sql/sql_base.cc:
  skip lock_type update for temporary tables
2008-02-22 12:30:17 +04:00
unknown
315665cf67 Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.

The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.


mysql-test/r/ps.result:
  Add test case result for Bug#32890
mysql-test/t/ps.test:
  Add test case for Bug#32890
sql/item.h:
  Restore original field name if name is auto generated.
sql/sql_prepare.cc:
  Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
  Move privileges check to it's own function.
sql/sql_view.h:
  Export function which check privileges of a CREATE VIEW statement.
2008-02-21 14:58:29 -03:00
unknown
fa7707addf Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd
- fix test failures that was already there but now are
   more consistent when the 1 second sleep has been removed from
   ndb_waiter


mysql-test/t/ndb_autodiscover.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/t/ndb_autodiscover3.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/include/ndb_wait_connected.inc:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
2008-02-21 13:23:58 +01:00
unknown
fa08b28085 Fix for Bug#34337: Server crash when Altering a view using
a table name.
  
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
  
The fix is to ensure that an error is thrown even if the table
is in the cache.

(This is a backport of the original patch for 5.1)


mysql-test/r/view.result:
  Fix result file.
mysql-test/r/view_grant.result:
  Fix result file.
mysql-test/t/view.test:
  Add a test case for Bug#34337: Server crash when Altering a view
  using a table name.
mysql-test/t/view_grant.test:
  Fix order-dependency.
sql/sql_view.cc:
  Report an error if we're going to work with a table.
2008-02-21 12:17:32 +03:00
unknown
c3a5c0a076 Merge xiphis.org:/anubis/antony/work/mysql-5.0-engines
into  xiphis.org:/anubis/antony/work/merge.20080220/mysql-5.0
2008-02-20 22:42:24 -08:00
unknown
0e767df5e0 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-20 19:25:18 +01:00
unknown
463edf377e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33266-bug-5.0-opt-mysql
2008-02-20 18:01:53 +03:00
unknown
daffceb4e2 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.


mysql-test/t/subselect.test:
  Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected test case for the bug#31048.
2008-02-20 17:41:39 +03:00
unknown
681363e29e Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b32510
into  mysql.com:/home/bar/mysql-work/mysql-5.0.b32510v2


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_cp932.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_cp932.test:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2008-02-20 14:38:52 +04:00
unknown
1ac319248f Bug #30604: different flagging of time_zone_used in normal
and ps-protocol
Finding a routine should be a transparent operation as 
far as the binary log is concerned.
But it was influencing the binary log because of the TIMESTAMP
column in the proc table.

Fixed by preserving and restoring the time_zone usage flag when
searching for a stored routine in the proc table.


mysql-test/r/binlog_innodb.result:
  Bug #30604: test case
mysql-test/r/ctype_cp932_binlog.result:
  Bug #30604: updated test results (a procedure call before that)
mysql-test/t/binlog_innodb.test:
  Bug #30604: test case
sql/sp.cc:
  Bug #30604: finding a routine should be a transparent operation as 
  far as the binary log is concerned.
  Fixed by preserving and restoring the time_zone usage flag.
2008-02-19 17:27:18 +02:00
unknown
f802cd5123 BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication

NAME_CONST() didn't replicate constant character set and collation
correctly.

With this fix NAME_CONST() inherits collation from the value argument.


mysql-test/r/func_misc.result:
  A test case for BUG#34289.
mysql-test/t/func_misc.test:
  A test case for BUG#34289.
sql/item.cc:
  Inherit collation from value argument.
2008-02-19 18:16:17 +04:00
unknown
18f885ed4c Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/32942/my50-32942


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  merging
mysql-test/t/select.test:
  merging
2008-02-18 19:18:44 +04:00
unknown
787dbacab2 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-17 16:57:07 +03:00
unknown
d6be1a9b95 Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().

Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.


mysql-test/r/select.result:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
  
  test result
mysql-test/t/select.test:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
  
  test case
sql/sql_select.cc:
  Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
  
  return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
  this table anymore
2008-02-17 15:48:17 +04:00
unknown
4a834b4b12 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2008-02-17 14:37:39 +03:00
unknown
0946b1d2a7 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-15 17:51:35 +01:00
unknown
0529125af1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-15 18:34:03 +02:00
unknown
cc2e929ac4 Bug #31887: DML Select statement not returning same results
when executed in version 5

Zero fill is a field attribute only. So we can't always 
propagate  constants for zerofill fields : the values and 
expression results don't have that flag.

Fixed by converting the const value to a string and 
using that in const propagation when the context allows it. 
Disable const propagation for fields with ZEROFILL flag in
all the other cases.


mysql-test/r/compare.result:
  Bug #31887: test case
mysql-test/t/compare.test:
  Bug #31887: test case
sql/item.cc:
  Bug #31887: If the context allows conversion
  of an int constant to a zero-filled string constant
  put the string constant instead of the int constant
  when doing const propagation
sql/mysql_priv.h:
  Bug #31887: a macro to get all the Field_num
  descendant fields.
2008-02-15 15:47:32 +02:00
unknown
e6a063cfd8 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/5.0-bug33931-assert_write_ignored_ev_when_init_slave_fails
2008-02-14 21:38:30 +02:00
unknown
4f3a1e08f8 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-14 20:24:01 +01:00
unknown
2ffb1e2796 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-14 16:14:30 +01:00
unknown
50bd4a438e bug#33329 extraneous ROLLBACK in binlog on connection does not use trans tables
changes for an assert and an updated results file.


mysql-test/r/mix_innodb_myisam_binlog.result:
  results file changed as there is no ROLLBACK query in binlog as it must be.
sql/sql_update.cc:
  refining assert as the initial value of transactional_tables has been
  changed to zero.
2008-02-14 16:28:32 +02:00
unknown
55f6727b70 BUG#33946 - Join on Federated tables with Unique index gives error 1430
from storage engine

Federated may crash a server, return wrong result set, return
"ERROR 1030 (HY000): Got error 1430 from storage engine" message
when local (engine=federated) table has a key against nullable
column.

The problem was wrong implementation of function that creates
WHERE clause for remote query from key.


mysql-test/r/federated.result:
  A test case for BUG#33946.
mysql-test/t/federated.test:
  A test case for BUG#33946.
sql/ha_federated.cc:
  Fixed that federated adds " IS NULL " condition to a remote query,
  whereas "IS NOT NULL" requested by original query.
  
  Fixed that federated didn't check for end of key buffer, didn't
  setup key buffer pointer and remaining lenght of key buffer,
  didn't add " AND " between conditions in case original query
  has IS [NOT] NULL condition against nullable column.
  
  Fixed that federated wrongly shifts key buffer pointer by extra
  one byte when key part may be null (was: store_length + 1,
  now: store_length).
2008-02-14 16:27:01 +04:00
unknown
8414bd54ea Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/5.0-bug33931-assert_write_ignored_ev_when_init_slave_fails


sql/slave.cc:
  Auto merged
2008-02-14 13:55:11 +02:00
unknown
c4fc5b096e Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-14 12:48:25 +03:00
unknown
be891fc611 Merge host.loc:/home/uchum/work/5.0-opt-gca
into  host.loc:/home/uchum/work/5.0-opt
2008-02-13 19:47:39 +04:00
unknown
7a290b55f7 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.



mysql-test/r/grant3.result:
  Added test case for bug#31194.
mysql-test/t/grant3.test:
  Added test case for bug#31194.
sql/sql_acl.cc:
  Fixed bug#31194.
  The server used the wild_prefix escape character (usually \-character)
  like % and _ wildcards in the get_sort function for sorting weights
  calculation.
  
  The get_sort function has been modified to ignore escaped wildcards
  and alone escapes like in the wild_case_compare function.
2008-02-13 19:34:12 +04:00
unknown
247efb9cf0 Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.

Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.


mysql-test/r/select.result:
  Added test case for bug#33764.
mysql-test/t/select.test:
  Added test case for bug#33764.
sql/item_cmpfunc.cc:
  Fixed bug#33764.
  Copying of a pointer has been replaced with an optional copying of
  a whole array to a newly allocated memory space in case of a
  functional source item.
2008-02-13 19:32:19 +04:00
unknown
ded528ca12 Bug #33931 assertion at write_ignored_events_info_to_relay_log if init_slave_thread() fails
and
bug#33932  assertion at handle_slave_sql if init_slave_thread() fails

the asserts were caused by 
  bug33931: having thd deleted at time of executing err: code plus
            a missed initialization;
  bug33932: initialization of slave_is_running member was missed;

fixed with relocating mi members initialization and removing delete thd
It is safe to do as deletion happens later explicitly in the caller of
init_slave_thread().

Todo: at merging the test is better to be moved into suite/bugs for 5.x (when x>0).


sql/slave.cc:
  adding the bugs simulating code;
  relocating some assignments to satisfy the asserts;
mysql-test/r/rpl_bug33931.result:
  the new result file
mysql-test/t/rpl_bug33931-slave.opt:
  option to spark the simulation code
mysql-test/t/rpl_bug33931.test:
  tests check that slave does not crash as before.
  Slave threads must be in NO running state in the end.
2008-02-13 14:09:41 +02:00
unknown
9e64388d7b Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-02-13 12:48:25 +01:00
unknown
c6610b5791 Merge mbp:src/opt/bug33389/my50-bug25162
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-12 22:51:01 +03:00
unknown
d83cd2149b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31590-bug-5.0-opt-mysql
2008-02-12 21:58:41 +03:00
unknown
269966ec36 Merge mysql1000.dsl.inet.fi:/home/andrei/MySQL/FIXES/5.0/bug34427-rpl_vars_warn_slave_err
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/pushed.mysql-5.0-rpl-bug33329-extra_rollback
2008-02-12 12:47:04 +02:00
unknown
2fa3d82847 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-rpl-merge
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-12 11:22:07 +01:00
unknown
d5092fa9ca Fix for bug #33389: Selecting from a view into a table from within SP
or trigger crashes server

Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.

Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.


mysql-test/r/view.result:
  Added a test case for bug #33389.
mysql-test/t/view.test:
  Added a test case for bug #33389.
sql/item.cc:
  In cases when in Item_field::fix_fields() from_field is a view reference,
  do not return too early, i.e. before marking the reference as an outer
  one when needed.
2008-02-12 12:43:55 +03:00
unknown
9132dc386b Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-11 17:37:25 +01:00
unknown
6edd1bd56f Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-11 11:19:06 +01:00
unknown
7990712713 Merge mysql1000.dsl.inet.fi:/home/andrei/MySQL/FIXES/5.0/bug33329-extra_rollback_when_innodb_in
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/mysql-5.0-rpl-bug33329-extra_rollback
2008-02-11 11:26:02 +02:00
unknown
e4e7f8c385 bug#34427 slave misses rendezvous in rpl_variables
There was no instruction in the test that enforces the slave successfully connect
to the master.
The way the test was been written allowed the slave to had been late for rendezvous 
so that about-connecting time queries to the master failed and are error-logged
to had been seen in Warnings of pb.

Fixed with adding a sychronization primitive to the test.
No test case is possible, observe error logs on pb.

Todo: revise need of rpl_report.pl's rules due to failing execution of
queries from get_master_verion_and_clock().
Any test should try to use a synchornization primitive like the current fix
makes and do not let the slave to miss successful connecting.


mysql-test/t/rpl_variables.test:
  Completing the test's body with a synch macro to not let
  the slave to miss the successful connecting to the master.
2008-02-08 21:03:10 +02:00
unknown
65c7d3004e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  dipika.(none):/opt/local/work/mysql-5.0-runtime
2008-02-08 18:51:07 +03:00
unknown
213b4dcd9e Fixed bug#15409: Columns with 64-element SET may not be updated with integers.
SET column storing procedure has been modified to be 64bit-clean.


mysql-test/r/type_set.result:
  Added test case for bug#15409.
mysql-test/t/type_set.test:
  Added test case for bug#15409.
sql/field.cc:
  Fixed bug#15409.
  The Field_set::store(longlong nr,...) method incompletely
  calculates a bit mask for the comparison with a given number:
  if that number is greater than 0x7F00 0000 0000 0000 (LONGLONG_MAX),
  it uses zero bit mask instead of 0xFFFF FFFF FFFF FFFF (ULONGLONG_MAX).
  
  Incomplete expression has been replaced with a set_bits macro call.
2008-02-08 16:04:01 +04:00
unknown
7d98c21cdf Bug#33798 prepared statements improperly handle large unsigned ints
The unsignedness of large integer user variables was not being
properly preserved when feeded to prepared statements. This was
happening because the unsigned flags wasn't being updated when
converting the user variable is converted to a parameter.

The solution is to copy the unsigned flag when converting the
user variable to a parameter and take the unsigned flag into
account when converting the integer to a string.


mysql-test/r/binlog.result:
  Add test case result for Bug#33798
mysql-test/r/ps.result:
  Add test case result for Bug#33798
mysql-test/t/binlog.test:
  Add test case for Bug#33798
mysql-test/t/ps.test:
  Add test case for Bug#33798
sql/item.cc:
  Take the unsigned flag into account when converting the
  user variable.
2008-02-08 08:55:55 -02:00
unknown
d8eab97693 Bug#31590: Wrong error message on sort buffer being too small.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.

Now filesort throws the error message about sort buffer being too small.


mysql-test/t/order_by.test:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
mysql-test/r/order_by.result:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
sql/filesort.cc:
  Bug#31590: Wrong error message on sort buffer being too small.
  Now filesort throws the error message about sort buffer being too small
  instead of out of memory error.
2008-02-08 13:35:00 +03:00
unknown
178f33e05b Merge pilot.mysql.com:/data/msvensson/mysql/bug31004/my50-bug31004
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-runtime


client/mysqltest.c:
  Auto merged
2008-02-07 12:42:49 +01:00
unknown
1027a2a630 Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 11:13:03 +04:00
unknown
a4eaf17ccb innodb_mysql.test, variables.result, variables.test, innodb_mysql.result:
Minor post-fix for bug#34223.


mysql-test/r/innodb_mysql.result:
  Minor post-fix for bug#34223.
mysql-test/r/variables.result:
  Minor post-fix for bug#34223.
mysql-test/t/innodb_mysql.test:
  Minor post-fix for bug#34223.
mysql-test/t/variables.test:
  Minor post-fix for bug#34223.
2008-02-07 11:12:49 +04:00
unknown
65dfdcdfeb Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 04:57:21 +04:00
unknown
6cdd9d5c87 bdb.result:
Minor post-fix for bug#30059.


mysql-test/r/bdb.result:
  Minor post-fix for bug#30059.
2008-02-07 04:54:58 +04:00
unknown
5cf3f53e42 Fixed bug#34223: Failure on assignment to my_innodb_autoextend_increment
and my_innodb_commit_concurrency global variables.

Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.



mysql-test/r/variables.result:
  Added test case for bug#34223.
mysql-test/t/variables.test:
  Added test case for bug#34223.
sql/mysqld.cc:
  Fixed bug#34223.
  Last update of the getopt_ull_limit_value function introduced
  a sanity check for a variable type (only GET_UINT or GET_ULONG
  are valid types).
  However, my_innodb_autoextend_increment and
  my_innodb_commit_concurrency are declared as GET_LONG.
  Call stack is: 
          sys_var_long_ptr_global::update()
          fix_unsigned()
          getopt_ull_limit_value()
  
  Type of the my_innodb_autoextend_increment and the
  my_innodb_commit_concurrency variables has been changed to
  GET_ULONG.
2008-02-07 04:14:50 +04:00
unknown
3891d43617 Fixed bug#30059.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
   non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
   any mode.

Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.

Binary-encoded string/BLOB columns are not affected.


mysql-test/r/heap.result:
  Updated test case for bug#30059.
mysql-test/r/innodb.result:
  Updated test case for bug#30059.
mysql-test/r/myisam.result:
  Updated test case for bug#30059.
mysql-test/r/strict.result:
  Updated test case for bug#30059.
mysql-test/r/type_binary.result:
  Updated test case for bug#30059.
mysql-test/r/warnings.result:
  Added test case for bug#30059.
mysql-test/t/warnings.test:
  Added test case for bug#30059.
sql/field.cc:
  Fixed bug#30059.
  The report_data_too_long function was replaced with the
  Field_longstr::report_if_important_data method.
  
  The Field_string::store and the Field_blob::store
  methods was synchronized with the Field_varstring::store
  method.
  Changes:
  1. to CHAR(N): posting of space truncation note has been added
     in both (strict and non-strict) modes;
  2. to BLOBs: a check for space truncation has been added,
     a warning in the non-strict mode and an error message in
     the strict mode have been replaced with a truncation note.
  
  Similar parts of Field_string::store, Field_blob::store and
  Field_varstring::store have been moved to the
  Field_longstr::report_if_important_data method.
sql/field.h:
  Fixed bug#30059.
  The Field_longstr::report_if_important_data method has been declared.
2008-02-07 02:33:21 +04:00
unknown
2574d83cc8 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-06 11:42:18 +01:00
unknown
40f2a6ae99 Minor typo fix for mysql-test-run.pl
mysql-test/mysql-test-run.pl:
  Fix typo (missing $prefix arg to mtr_add_arg(--user=root))
2008-02-05 23:16:52 -07:00
unknown
6210278628 Bug#33329 extraneous ROLLBACK in binlog on connection
does not use trans tables

There had been two issues.
Rollback statement was recorded in binlog even though a multi-update
had not modified any non-transactional table.
The reason for this artifact was a false initial value of multi_update::transactional_tables.
Yet another artifact that explained on the bug page is that 
`ha_autocommit_or_rollback' works differently depending on whether
a transaction engine has been compiled in. 

Fixed: with setting multi_update::transactional_tables to zero at initialization
time. Multi-update on non-trans table won't cause ROLLBACK in binlog with
either compilation option.

The 2nd mentioned artifact comprises a self-standing issue (to be reported
separately).


mysql-test/r/multi_update.result:
  results changed - there is no ROLLBACK in binlog anymore as it should be
sql/sql_update.cc:
  A wrong assumption on that there were modified transactional table,
  which is nonsense at the very beginning of the query execution.
2008-02-04 16:37:41 +02:00
unknown
74bd1b0faf Updating result file.
mysql-test/r/rpl_user.result:
  Result change.
2008-02-04 13:19:29 +01:00
unknown
86260ead5a Fixes to make rpl_user test pass in pushbuild.
mysql-test/t/rpl_user.test:
  Removing redundant reset master and deleting users from master
  and slave without using binary log.
2008-02-04 12:22:37 +01:00
unknown
f792cf3e38 Bug#32510 LIKE search fails with indexed 'eucjpms' and 'ujis' char column
Problem: some collation handlers called incorrect version
of my_like_range_xxx(), which led to wrong min_str and max_str,
so like range optimizer threw away good records.
Fix: changing the wrong handlers to call proper version of
my_like_range_xxx().


mysql-test/r/ctype_big5.result:
  Adding test
mysql-test/r/ctype_cp932.result:
  Adding test
mysql-test/r/ctype_eucjpms.result:
  Adding test
mysql-test/r/ctype_euckr.result:
  Adding test
mysql-test/r/ctype_gb2312.result:
  Adding test
mysql-test/r/ctype_gbk.result:
  Adding test
mysql-test/r/ctype_sjis.result:
  Adding test
mysql-test/r/ctype_uca.result:
  Adding test
mysql-test/r/ctype_ucs.result:
  Adding test
mysql-test/r/ctype_ujis.result:
  Adding test
mysql-test/t/ctype_big5.test:
  Adding test
mysql-test/t/ctype_cp932.test:
  Adding test
mysql-test/t/ctype_eucjpms.test:
  Adding test
mysql-test/t/ctype_euckr.test:
  Adding test
mysql-test/t/ctype_gb2312.test:
  Adding test
mysql-test/t/ctype_gbk.test:
  Adding test
mysql-test/t/ctype_sjis.test:
  Adding test
mysql-test/t/ctype_uca.test:
  Adding test
mysql-test/t/ctype_ucs.test:
  Adding test
mysql-test/t/ctype_ujis.test:
  Adding test
strings/ctype-euc_kr.c:
  Changing like_range function
strings/ctype-eucjpms.c:
  Changing like_range function
strings/ctype-gb2312.c:
  Changing like_range function
strings/ctype-ucs2.c:
  Changing like_range function
strings/ctype-ujis.c:
  Changing like_range function
mysql-test/include/ctype_like_range_f1f2.inc:
  New BitKeeper file ``mysql-test/include/ctype_like_range_f1f2.inc''
2008-02-04 11:10:40 +04:00
unknown
0a9fa8265b Again blanking out some numbers in file names that is dependent
on the context.


mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Blanking out yet some numbers in file names.
2008-02-01 17:26:28 +01:00
unknown
818358ed33 Fixes to make tests pass in pushbuild.
mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Fixing test to not be dependent on the sequence numbers
  for file names generated by mysqlbinlog.
2008-02-01 15:34:34 +01:00
unknown
f7d8fb1cdd Bug#33201 Crash occurs when granting update privilege on one column of a view
When issuing a column level grant on a table which require pre-locking the 
server crashed.

The reason behind the crash was that data structures used by the lock api
wasn't properly reinitialized in the case of a column level grant.


mysql-test/r/grant.result:
  * Added test case
mysql-test/t/grant.test:
  * Added test case
sql/sql_acl.cc:
  * The lock api is dending on the thd->lex object and this variable needs to 
    be re-initialized when opened with a new set of tables than specified in the
    original statement.
2008-02-01 14:10:46 +01:00
unknown
d315117745 Various fixes to make tests pass on Windows.
mysql-test/r/mix_innodb_myisam_binlog.result:
  Result change
mysql-test/t/binlog_start_comment.test:
  Adding --local-load to mysqlbinlog to prevent it from failing
  on Windows. Also adding --short-form.
mysql-test/t/mix_innodb_myisam_binlog.test:
  Extending LIKE pattern to use either \n or \r\n in order to work
  on Windows.
2008-02-01 13:18:27 +01:00
unknown
1b15018547 Changes to make tests pass on vanilla build.
mysql-test/t/binlog_start_comment.test:
  Adding --local-infile=1 to enable local infile for mysql client.
2008-02-01 10:46:02 +01:00
unknown
1919d238e5 Merge mbp.local:/Users/kaa/src/opt/bug25162/my50-bug25162
into  mbp.local:/Users/kaa/src/opt/mysql-5.0-opt
2008-02-01 13:37:22 +05:00