Commit graph

37717 commits

Author SHA1 Message Date
evgen@sunlight.local
2a26db1ffd Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sunlight.local:/local_work/29908-bug-5.0-opt-mysql
2007-09-27 23:45:39 +04:00
gkodinov/kgeorge@magare.gmz
c41cb79463 Fixed a warning cased by the fix for bug 30468 2007-09-27 17:56:50 +03:00
gkodinov/kgeorge@magare.gmz
bebbe4542f separated an assertion from the assignment (bug 30468) 2007-09-27 14:29:46 +03:00
gkodinov/kgeorge@magare.gmz
bbe1d37089 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30468-5.0-opt
2007-09-27 12:17:16 +03:00
gkodinov/kgeorge@magare.gmz
fb3b12176d Bug #30468: column level privileges not respected when joining tables
When expanding a * in a USING/NATURAL join the check for table access
for both tables in the join was done using the grant information of the
first one.
Fixed by getting the grant information for the current table while 
iterating through the columns of the join.
2007-09-27 12:15:19 +03:00
gkodinov/kgeorge@magare.gmz
4cd18bde81 Bug #28702: VIEWs defined with USE/FORCE KEY ignore that request
When storing the VIEW the CREATE VIEW command is reconstructed 
from the parse tree. While constructing the command string
the index hints specified should also be printed.
Fixed by adding code to print the index hints when printing a 
table in the FROM clause.
2007-09-24 15:34:10 +03:00
gkodinov/kgeorge@macbook.local
44292dcb3b Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  macbook.local:/Users/kgeorge/mysql/autopush/B28701-merged-5.0-opt
2007-09-22 14:48:14 +02:00
gkodinov/kgeorge@macbook.local
ae9d734f40 Merge macbook.local:/Users/kgeorge/mysql/work/B28701-5.0-opt
into  macbook.local:/Users/kgeorge/mysql/work/B28701-merged-5.0-opt
2007-09-22 11:42:01 +02:00
evgen@sunlight.local
7ed30b971c Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sunlight.local:/local_work/27216-bug-5.0-opt-mysql
2007-09-22 13:10:44 +04:00
evgen@sunlight.local
36bf417b40 Bug#27216: functions with parameters of different date types may return wrong
type of the result.

There are several functions that accept parameters of different types.
The result field type of such functions was determined based on
the aggregated result type of its arguments. As the DATE and the DATETIME
types are represented by the STRING type, the result field type
of the affected functions was always STRING for DATE/DATETIME arguments.
The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.

Now the affected functions aggregate the field types of their arguments rather
than their result types and return the result of aggregation as their result
field type.
The cached_field_type member variable is added to the number of classes to
hold the aggregated result field type.
The str_to_date() function's result field type now defaults to the
MYSQL_TYPE_DATETIME.
The agg_field_type() function is added. It aggregates field types with help
of the Field::field_type_merge() function.
The create_table_from_items() function now uses the 
item->tmp_table_field_from_field_type() function to get the proper field
when the item is a function with a STRING result type.
2007-09-22 11:49:27 +04:00
evgen@sunlight.local
bb5cdfb87e Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.

While execution of the  CREATE .. SELECT SQL_BUFFER_RESULT statement the 
engine->start_bulk_insert function was called twice. On the first call
On the first call MyISAM disabled all non-unique indexes and on the second
call it decides to not re-enable them because all indexes was disabled.
Due to this no indexes was actually created during CREATE TABLE thus
producing crashed table.

Now the select_inset class has is_bulk_insert_mode flag which prevents
calling the start_bulk_insert function twice.
The flag is set in the select_create::prepare, select_insert::prepare2
functions and the select_insert class constructor.
The flag is reset in the select_insert::send_eof function.
2007-09-21 12:09:00 +04:00
evgen@sunlight.local
ef75db8cba Bug#29908: A user can gain additional access through the ALTER VIEW.
Non-definer of a view was allowed to alter that view. Due to this the alterer
can elevate his access rights to access rights of the view definer and thus
modify data which he wasn't allowed to modify. A view defined with
SQL SECURITY INVOKER can't be used directly for access rights elevation.
But a user can first alter the view SQL code and then alter the view to 
SQL SECURITY DEFINER and thus elevate his access rights. Due to this
altering a view with SQL SECURITY INVOKER is also prohibited.

Now the mysql_create_view function allows ALTER VIEW only to the view
definer or a super user.
2007-09-20 18:05:09 +04:00
gluh@mysql.com/eagle.(none)
4ffcc4f266 result fix 2007-09-20 14:38:41 +05:00
gluh@mysql.com/eagle.(none)
6b81174cde Bug#27747 database metadata doesn't return sufficient column default info
added get_field_default_value() function which obtains default value from the field
(used in store_create_info() & get_schema_column_record() functions)
2007-09-20 13:54:46 +05:00
gluh@eagle.(none)
56c927e696 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-09-19 13:50:38 +05:00
gshchepa@devsrv-b.mysql.com
0aa6e95768 select.test:
Post-fix for bug#27695.
2007-09-15 07:04:32 +02:00
gshchepa@devsrv-b.mysql.com
4bf2408ed4 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  devsrv-b.mysql.com:/data0/gshchepa/mysql-5.0-opt
2007-09-14 21:15:43 +02:00
gkodinov/kgeorge@magare.gmz
0133bc639c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31001-5.0-opt
2007-09-14 19:04:47 +03:00
gkodinov/kgeorge@magare.gmz
a2afc56f61 Bug #31001: ORDER BY DESC in InnoDB not working
The optimizer sets index traversal in reverse order only if there are 
 used key parts that are not compared to a constant.
However using the primary key as an ORDER BY suffix rendered the check
incomplete : going in reverse order must still be used even if 
all the parts of the secondary key are compared to a constant.

Fixed by relaxing the check and set reverse traversal even when all
the secondary index keyparts are compared to a const.
Also account for the case when all the primary keys are compared to a
constant.
2007-09-14 17:43:14 +03:00
sergefp@pylon.mylan
15b7d5e8af Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug30324
2007-09-14 15:00:10 +04:00
sergefp@mysql.com
8a3e6201b3 BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results
- The bug was caused by COUNT(DISTINCT ...) code using Unique object in 
  a way that assumed that BIT(N) column occupies a contiguous space in
  temp_table->record[0] buffer. 
- The fix is to make COUNT(DISTINCT ...) code instruct create_tmp_table to
  create temporary table with column of type BIGINT, not BIT(N).
2007-09-14 14:53:13 +04:00
tomas@whalegate.ndb.mysql.com
7cf77f49d3 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-09-14 11:08:55 +02:00
tomas@whalegate.ndb.mysql.com
965124b4a5 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-09-14 11:05:38 +02:00
gshchepa@devsrv-b.mysql.com
e6e56ccc01 Merge devsrv-b.mysql.com:/users/gshchepa/mysql-5.0-opt
into  devsrv-b.mysql.com:/data0/gshchepa/mysql-5.0-opt
2007-09-14 10:11:51 +02:00
gshchepa/uchum@gleb.loc
72e36e0aa3 Merge gshchepa@bk-internal.mysql.com:/users/gshchepa/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt-27695
2007-09-14 13:11:50 +05:00
gshchepa/uchum@gleb.loc
7284a865df Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-09-14 12:16:19 +05:00
joerg@trift2.
1dc3246fe3 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M50/tmp-5.0
2007-09-13 23:42:17 +02:00
gshchepa/uchum@gleb.loc
e4eadcfbdd Fixed bug #27695.
Declaring an all space column name in the SELECT FROM DUAL or in a view
leads to misleading warning message:
"Leading spaces are removed from name ' '".

The Item::set_name method has been modified to raise warnings like
"Name ' ' has become ''" in case of the truncation of an all
space identifier to an empty string identifier instead of the
"Leading spaces are removed from name ' '" warning message.
2007-09-13 18:41:50 +05:00
mskold/marty@linux.site
f2159e2d21 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-09-13 10:35:11 +02:00
mskold/marty@mysql.com/linux.site
44b6c2edad bug#27494 An invalid subselect crashes mysql server: Added check for missing arguments 2007-09-13 09:47:21 +02:00
gshchepa/uchum@gleb.loc
2e7306d503 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-09-13 11:48:58 +05:00
gshchepa/uchum@gleb.loc
ff042427cf Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-09-12 23:41:35 +05:00
sergefp@mysql.com
1ff0caf49d Better wording in comments 2007-09-12 18:13:19 +04:00
tomas@whalegate.ndb.mysql.com
df552c310d Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-09-12 14:01:51 +02:00
tomas@whalegate.ndb.mysql.com
83eed4d876 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-bj
2007-09-12 13:55:22 +02:00
tomas@whalegate.ndb.mysql.com
461a3dccac BUG#23354 revert 2007-09-12 13:53:32 +02:00
tomas@whalegate.ndb.mysql.com
f1674d1b66 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-09-12 07:34:42 +02:00
sergefp@mysql.com
06f12f66e8 Post-merge fixes 2007-09-12 01:52:27 +04:00
sergefp@mysql.com
6f702a4b42 Post-merge fixes 2007-09-11 02:41:42 +04:00
sergefp@pylon.mylan
d276ce3402 Merge mysql.com:/home/psergey/mysql-4.1-bug30385
into  mysql.com:/home/psergey/mysql-5.0-bug30385
2007-09-11 02:24:08 +04:00
sergefp@mysql.com
da04109de2 BUG#30385: Server crash when deleting with ORDER BY and LIMIT
in get_index_for_order(), don't walk over the end of the index key parts
when matching index description and needed ordering.
2007-09-10 16:26:51 +04:00
gshchepa/uchum@gleb.loc
d330a49105 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-09-06 22:27:13 +05:00
malff/marcsql@weblab.(none)
f4b671d8bc Fixed whitespace 2007-09-04 16:40:27 -06:00
malff/marcsql@weblab.(none)
3a7bcd72f3 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
2007-09-04 14:38:26 -06:00
thek@adventure.(none)
b1d1204576 Merge adventure.(none):/home/thek/Development/cpp/bug21074/my50-bug21074
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-09-03 13:46:10 +02:00
thek@adventure.(none)
a8b9bd9f67 - Fix cross compatibility issues by exchanging pthread_yield with my_sleep(0) 2007-09-03 13:42:32 +02:00
mhansson@dl145s.mysql.com
b1cc84ec1d Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/my50-bug30234-push
2007-09-03 12:44:17 +02:00
mhansson/martin@linux-st28.site
df5c9e69f0 Bug #30234: Unexpected behavior using DELETE with AS and USING
DELETE FROM ... USING ... statements with the following type of 
ambiguous aliasing gave unexpected results:
DELETE FROM t1 AS alias USING t1, t2 AS alias WHERE t1.a = alias.a;
This query would leave table t1 intact but delete rows from t2.
Fixed by changing DELETE FROM ... USING syntax so that only alias 
references (as opposed to alias declarations) may be used in FROM.
2007-09-03 11:55:35 +02:00
thek@adventure.(none)
0184f50f27 Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-09-03 10:59:44 +02:00
thek@adventure.(none)
85d7007848 Merge adventure.(none):/home/thek/Development/cpp/bug21074/my50-bug21074
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-09-03 10:54:33 +02:00