Commit graph

10703 commits

Author SHA1 Message Date
unknown
62e102b42e 5.0-specific fixes when merging the fix for bug #11655 and bug #20927 from 4.1
mysql-test/r/func_time.result:
  Fixed func_time test when merging the fix for bug #11655 and bug #20927 to 5.0
sql/item_timefunc.cc:
  Fixed compilation when merging the fix for bug #11655 and bug #20927 to 5.0
2006-10-12 11:21:12 +04:00
unknown
78f47fbf3a Merge polly.local:/tmp/maint/bug11655/my41-bug11655
into  polly.local:/tmp/maint/bug11655/my50-bug11655


sql/time.cc:
  Auto merged
include/my_time.h:
  Manually merged
mysql-test/r/func_sapdb.result:
  Manually merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
sql-common/my_time.c:
  Manually merged
sql/field.cc:
  Manually merged
sql/item_timefunc.cc:
  Manually merged
2006-10-11 14:16:30 +04:00
unknown
634d3ff2c6 Fixes a number of problems with time/datetime <-> string conversion functions:
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced


include/my_time.h:
  Added defines for the TIME limits
  Added defines for the warning flags set by str_to_time() and check_time_range()
  Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
  Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
  Fixed testcase which relied on incorrect behaviour
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
  Added check_time_range() to be used from str_to_time() and item_timefunc.cc
  Added new out-of-range flag to str_to_time() warnings
  Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
  Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
  Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
  Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
  Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
  Checks for 'unsigned int' overflows in Item_func_maketime
  Use make_time_with_warn() instead of make_time() in Item_func_maketime
  Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
  Check for return value of str_to_time() along with warning flags
2006-10-04 17:13:32 +04:00
unknown
17bda20821 Merge kpdesk.mysql.com:/home/thek/dev2/bug21139/my41-bug21139
into  kpdesk.mysql.com:/home/thek/dev2/bug21139/my50-bug21139
2006-09-19 12:41:15 +02:00
unknown
7c8931d836 Bug#21139 Handling of database differs in "embedded" , test lowercase_fs_off fails
- Access checks are omitted when compliled without --with-embedded-privilege-control
- Patch: skip this test


mysql-test/t/lowercase_fs_off.test:
  Added test to check if this embedded built in which case we just skip this test.
2006-09-19 12:40:31 +02:00
unknown
9e145670c4 mtr_cases.pl:
Provide a more extensible, easier-to-change way of reordering
  test cases.


mysql-test/lib/mtr_cases.pl:
  Provide a more extensible, easier-to-change way of reordering
  test cases.
2006-09-01 21:53:23 +02:00
unknown
e0bffad3e8 Bug #20908: Crash if select @@""
Zero-length variables caused failures when using the length to look
up the name in a hash.  Instead, signal that no zero-length name can
ever be found and that to encounter one is a syntax error.


mysql-test/r/variables.result:
  Results for test.
mysql-test/t/variables.test:
  Insert tests to prove that zero-length variable names do not cause
  faults.
sql/gen_lex_hash.cc:
  If the length is zero, then there is nothing to look-up in the 
  hash.
sql/sql_lex.cc:
  Names of variables must not be empty.  Signal an error of that 
  happens.
2006-08-15 18:41:21 +02:00
unknown
74214b8635 Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-merge


configure.in:
  Auto merged
man/Makefile.am:
  Auto merged
mysys/my_bitmap.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_locale.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
2006-07-29 13:43:34 +04:00
unknown
3c9ba0208a udf_example.c, udf.test, Makefile.am:
Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)


sql/Makefile.am:
  "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
mysql-test/t/udf.test:
  "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
sql/udf_example.c:
  Changes to be strict ansi, except long long
2006-07-29 04:41:50 +02:00
unknown
1986093055 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  maint1.mysql.com:/data/localhome/tsmith/bk/global-50
2006-07-28 17:40:33 +02:00
unknown
a6557b0c94 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main


VC++Files/sql/mysqld.vcproj:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/warnings-master.opt:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-07-27 13:47:36 +04:00
unknown
b60272915f Merge siva.hindu.god:/usr/home/tim/m/bk/global-41
into  siva.hindu.god:/usr/home/tim/m/bk/global-50


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/field.cc:
  Auto merged
2006-07-26 13:30:03 -06:00
unknown
b0b0c8cc1f "mysql-test-run.pl" must write a "Logging:" line for the evaluation of RPM build tests.
(Re-apply a patch from the general tree to the clone.)


mysql-test/mysql-test-run.pl:
  "mysql-test-run.pl" must write a "Logging:" line for the evaluation of RPM build tests.
  (Re-apply a patch from the general tree to the clone.)
2006-07-25 12:56:23 +02:00
unknown
def55c5219 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Send confusing output to /dev/null


mysql-test/t/mysqlbinlog.test:
  Send confusing error messages to /dev/null so they don't appear in erro log if test case fails
2006-07-24 18:12:57 +02:00
unknown
9d5b76eba9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16327


sql/field.cc:
  Auto merged
mysql-test/r/func_time.result:
  merging
mysql-test/t/func_time.test:
  merging
2006-07-23 14:17:01 +05:00
unknown
a7ba5b75a6 Merge bk://anubis/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/merge/mysql-5.0


sql/handler.cc:
  Auto merged
2006-07-21 10:14:25 -07:00
unknown
1376b5817f Merge patch for bug #15195 from 5.0 -> 5.0-release (for 5.0.24) 2006-07-21 09:53:12 +02:00
unknown
d7baef2a65 Partial merge of the patch for bug #15195 from 4.1 -> 5.0; more changes needed 2006-07-20 00:45:47 -06:00
unknown
0fa250a936 A fix and a test case for Bug#21002 "Derived table not selecting from a
"real" table fails in JOINs".

This is a regression caused by the fix for Bug 18444. 
This fix removed the assignment of empty_c_string to table->db performed 
in add_table_to_list, as neither me nor anyone else knew what it was 
there for. Now we know it and it's covered with tests: the only case 
when a table database name can be empty is when the table is a derived 
table. The fix puts the assignment back but makes it a bit more explicit.

Additionally, finally drop sp.result.orig which was checked in by mistake. 


BitKeeper/deleted/.del-sp.result.orig:
  Delete: mysql-test/r/sp.result.orig
mysql-test/r/derived.result:
  Updated result file.
mysql-test/r/sp.result:
  Test results fixed (Bug#21002)
mysql-test/t/derived.test:
  New error return for the case when MULTI-DELETE tries to delete from
  a derived table: now derived tables belong to their own db (""), and
  MUTLI-DELETE can't find the correspondent table for it in the 
  DELETE list, as it can't resolve tables in different dbs by alias
  (See Bug#21148 for details)
mysql-test/t/sp.test:
  Add a test case for Bug#21002 "Derived table not selecting from a "real"
   table fails in JOINs"
sql/sp.cc:
  Make empty_c_string globally accessible.
sql/sql_class.cc:
  Add empty_c_string definition.
sql/sql_class.h:
  Add a comment for the constructor of Table_ident which is
  used for derived tables. Make sure this constructor also initializes
  the database name, not only the table name.
sql/sql_parse.cc:
  Don't call check_db_name for empty database. 
  Currently the only case when a table database name can be empty
  is when the table is a derived table.
  Report the right error if the database name is wrong (ER_WRONG_DB_NAME,
  not ER_WRONG_TABLE_NAME).
2006-07-19 22:33:19 +04:00
unknown
8a08c80235 Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0


sql/sql_insert.cc:
  Auto merged
2006-07-19 19:52:27 +02:00
unknown
846a99dcd7 manual merge, part 2/2
mysql-test/r/mysqldump.result:
  manual mergies, part 2/2
2006-07-19 16:50:55 +02:00
unknown
92bbb54092 Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-merge


support-files/mysql.spec.sh:
  Auto merged
client/mysqldump.c:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/t/mysqldump.test:
  manual merge
2006-07-19 14:12:30 +02:00
unknown
c185144609 Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
REPLACE ... SELECT would require INSERT privileges on certain tables
when SELECT really suffices. Require INSERT only on target table.


mysql-test/r/insert_select.result:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  Show that REPLACE ... SELECT requires INSERT privileges only on target table.
  (revised test with more view-fu)
mysql-test/t/insert_select.test:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  Show that REPLACE ... SELECT requires INSERT privileges only on target table.
  (revised test with more view-fu)
sql/sql_insert.cc:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  require SELECT rather than INSERT privs on tables that constitute the views we'll read
2006-07-19 11:49:07 +02:00
unknown
9378fc627e "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Post merge changes.
2006-07-18 18:41:36 -07:00
unknown
6ab68cdf29 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.0-bug18764.2


mysql-test/r/federated.result:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
mysql-test/t/federated.test:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
sql/ha_federated.cc:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
2006-07-18 17:21:50 -07:00
unknown
dc50ce9970 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-07-18 23:45:17 +04:00
unknown
6abe1c7158 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
2006-07-18 23:30:09 +04:00
unknown
ec40f4a588 Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/time.cc:
  Manual merge
2006-07-18 21:32:25 +04:00
unknown
5a77e566ab Merge moonbone.local:/work/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
2006-07-18 21:30:26 +04:00
unknown
a00f18e5e6 Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17608


include/my_base.h:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  Auto merged
2006-07-18 10:25:04 -07:00
unknown
469813c7f3 "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Removed logic in ha_federated::write_row, which checks field query ids in the
loop which builds the query to run on the remote server.


mysql-test/r/federated.result:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  
  New test results for test that verifies that one can insert to rows using 
  "insert into... select * from..", delete 
  them by id, then immediately insert them in the same way they were originally 
  inserted.
mysql-test/t/federated.test:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  
  New test that verifies that one can insert to rows using 
  "insert into... select * from..", delete 
  them by id, then immediately insert them in the same way they were originally 
  inserted.
sql/ha_federated.cc:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  Removed the logic in ha_federated::write_row which checked the query id of 
  each field and compared it to the thread query id.
  
  Each field has a query id, and the problem used to be that if I did an insert
  no fields specified, the field value would contain the last inserted value 
  for that field. The way to work around this was to see if the query id for 
  that field was the same as the current query id or of the rest of the field 
  query ids. If it wasn't, that told me the query didn't have the field value 
  specified.
  
  Somewhere from when I wrote that code to now the problem went away, and there
  was no longer the need for this logic. 
  
  Also removed the bool "has_fields", which needs not exist and using 
  table->s->fields is sufficient.
2006-07-17 16:45:04 -07:00
unknown
c3f0d2f6cb Post-merge fix. 2006-07-17 15:28:24 -07:00
unknown
674636e725 Bug# 20221- Dumping of multiple databases containing view(s) yields maleformed dumps.
client/mysqldump.c:
  When dumping more than one database, make sure that the proper database is selected before restoring that database's views.
  Replaced hard-coded database name length with appropiate token.
mysql-test/r/mysqldump.result:
  Added new result and corrected results for existing test cases.
mysql-test/t/mysqldump.test:
  Added new case for dumping and restoring multiple databases each containing a view.
2006-07-17 18:07:08 -04:00
unknown
8972b0bf0d Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2006-07-17 13:24:43 -07:00
unknown
ddde1432e5 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-17 11:41:27 -07:00
unknown
14d72663f1 select.result, select.test:
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.


mysql-test/t/select.test:
  Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
mysql-test/r/select.result:
  Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
2006-07-17 16:12:42 +04:00
unknown
9a5daa602a mysql.test, mysql.result:
Corrected the test case after fixing bug#10977


mysql-test/t/mysql.test:
  Corrected the test case after fixing bug#10977
mysql-test/r/mysql.result:
  Corrected the test case after fixing bug#10977
2006-07-17 14:22:21 +04:00
unknown
30bc19c78d Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt
2006-07-16 12:10:46 -07:00
unknown
1c96f2d73e Fixed bug#10977: No warning issued if a column name is truncated
When an alias is set to a column leading spaces are removed from the alias.
But when this is done on aliases set by user this can lead to confusion.

Now Item::set_name() method issues the warning if leading spaces were removed
from an alias set by user.

New warning message is added.


mysql-test/t/select.test:
  Added test case for bug#10977:No warning issued if a column name is truncated.
mysql-test/r/select.result:
  Added test case for bug#10977:No warning issued if a column name is truncated.
sql/sql_yacc.yy:
  Fixed bug#10977: No warning issued if a column name is truncated
  The is_autogenerated_name flag is set before set_name() method call.
sql/item.cc:
  Fixed bug#10977: No warning issued if a column name is truncated
  Now Item::set_name() method issues the warning if leading spaces were removed
  from an alias set by user.
2006-07-16 00:45:38 +04:00
unknown
109615048d Fixed bug #20869.
The bug caused a crash of the server if a subquery with
ORDER BY DESC used the range access method.
The bug happened because the method QUICK_SELECT_DESC::reset
was not reworked after MRR interface had been introduced.


mysql-test/r/subselect.result:
  Added a test case for bug #20869.
mysql-test/t/subselect.test:
  Added a test case for bug #20869.
2006-07-15 00:28:21 -07:00
unknown
203d46bb38 Fixed bug #20519.
The bug was due to a loss happened during a refactoring made
on May 30 2005 that modified the function JOIN::reinit.
As a result of it for any subquery the value of offset_limit_cnt
was not restored for the following executions. Yet the first 
execution of the subquery made it equal to 0.
The fix restores this value in the function JOIN::reinit.  


mysql-test/r/subselect.result:
  Added a test case fir bug #20519.
mysql-test/t/subselect.test:
  Added a test case fir bug #20519.
2006-07-14 19:28:58 -07:00
unknown
1486a426df 4.1 -> 5.0 merge 2006-07-14 13:30:23 -07:00
unknown
2e3ed9c127 Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-5.0
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/merge-4.1_2_5.0


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
2006-07-14 06:52:25 -07:00
unknown
23c514508e 4.1 -> 5.0 merge fixes 2006-07-14 05:56:30 -07:00
unknown
e7ea49dc0d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b15195
2006-07-14 16:58:51 +05:00
unknown
39f9adfa84 --{skip-}merge option added which allows the user to disable merge engine and
to avoid the potential security problem.
(see bug #15195: Security Breach with MERGE table)
2006-07-14 16:26:58 +05:00
unknown
3d35522f9d Bug#21014: Segmentation fault of mysqldump on view
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump.  this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.


client/mysqldump.c:
  Bug#21014: Segmentation fault of mysqldump on view
  
  failsafe: if "select ... from information_schema.views" returns an
  empty set, don't deref NULL; throw an error instead.
  
  fix: select the correct database not only before dumping tables, but
  before dumping views, as well.
mysql-test/r/mysqldump.result:
  Bug#21014: Segmentation fault of mysqldump on view
  
  show that mysqldump selects the correct database before trying to dump
  views from it.
mysql-test/t/mysqldump.test:
  Bug#21014: Segmentation fault of mysqldump on view
  
  show that mysqldump selects the correct database before trying to dump
  views from it.
2006-07-14 12:50:00 +02:00
unknown
e71cf7c457 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B17212-4.1-opt
2006-07-14 12:49:14 +03:00
unknown
4f580b3e43 Merge macbook.gmz:/Users/kgeorge/mysql/work/B17212-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B17212-5.0-opt


mysql-test/r/innodb_mysql.result:
  Merge 4.1->5.0 for bug #17212
mysql-test/t/innodb_mysql.test:
  Merge 4.1->5.0 for bug #17212
sql/sql_select.cc:
  Merge 4.1->5.0 for bug #17212
2006-07-14 11:20:52 +03:00
unknown
6c18e75cae Correction for test tesults after pushing the fix for bug 19714.
mysql-test/r/ps_7ndb.result:
  Correction for test results after pushing the fix for bug 19714.
2006-07-13 22:00:20 -07:00