Commit graph

8245 commits

Author SHA1 Message Date
evgen@moonbone.local
de96d52999 Manually merged 2006-05-30 19:16:30 +04:00
evgen@moonbone.local
de8a1b4f19 Merge moonbone.local:/work/18630-bug-4.1-mysql
into moonbone.local:/work/18360-bug-4.1-mysql-opt
2006-05-30 18:57:08 +04:00
evgen@moonbone.local
641f852de8 Fixed bug#18360: Incorrect type coercion in IN() results in false comparison
The IN() function uses agg_cmp_type() to aggregate all types of its arguments
to find out some common type for comparisons. In this particular case the 
char() and the int was aggregated to double because char() can contain values
like '1.5'. But all strings which do not start from a digit are converted to
0. thus 'a' and 'z' become equal. 
This behaviour is reasonable when all function arguments are constants. But 
when there is a field or an expression this can lead to false comparisons. In
this case it makes more sense to coerce constants to the type of the field
argument.

The agg_cmp_type() function now aggregates types of constant and non-constant
items separately. If some non-constant items will be found then their
aggregated type will be returned. Thus after the aggregation constants will be
coerced to the aggregated type.
2006-05-30 00:36:48 +04:00
evgen@moonbone.local
41f968e1b4 Manually merged 2006-05-29 19:07:35 +04:00
msvensson@neptunus.(none)
91e4fd9ac9 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-05-29 09:06:06 +02:00
ramil@mysql.com
6b2ab800c9 manual merge 2006-05-29 11:17:38 +05:00
evgen@moonbone.local
1f30bf5a33 Fixed bug#19225: unchecked error results in server crash
In multi-table delete a table for delete can't be used for selecting in
subselects. Appropriate error was raised but wasn't checked which leads to a
crash at the execution phase.

The mysql_execute_command() now checks for errors before executing select
for multi-delete.
2006-05-29 00:32:59 +04:00
gkodinov@mysql.com
393d1b69e0 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kgeorge/mysql/5.0/clean
2006-05-26 12:13:48 +03:00
gkodinov@mysql.com
b6acee915a Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18681
2006-05-26 11:57:56 +03:00
gkodinov@mysql.com
7552d8d9ba Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18681
2006-05-26 11:51:30 +03:00
gkodinov@mysql.com
f0f9c740ed Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B14875
2006-05-26 11:51:11 +03:00
gkodinov@mysql.com
59837f7a5b Bug #14875: Bad view DEFINER makes SHOW CREATE VIEW fail
When reading a view definition from a .frm file it was
throwing a SQL error if the DEFINER user is not defined.
Changed it to a warning to match the (documented) case
when a view with undefined DEFINER user is created.
2006-05-26 11:49:39 +03:00
gkodinov@mysql.com
a21a2b5bcd BUG#18681: View privileges are broken
The check for view security was lacking several points :
1. Check with the right set of permissions : for each table ref that
participates in a view there were the right credentials to use in it's
security_ctx member, but these weren't used for checking the credentials.
This makes hard enforcing the SQL SECURITY DEFINER|INVOKER property
consistently.
2. Because of the above the security checking for views was just ruled out
in explicit ways in several places.
3. The security was checked only for the columns of the tables that are
brought into the query from a view. So if there is no column reference
outside of the view definition it was not detecting the lack of access to
the tables in the view in SQL SECURITY INVOKER mode.

The fix below tries to fix the above 3 points.
2006-05-26 11:47:53 +03:00
pekka@mysql.com
61057f6112 Merge mysql.com:/space/pekka/ndb/version/my50
into  mysql.com:/space/pekka/ndb/version/my50-bug14509
2006-05-25 13:14:16 +02:00
pekka@mysql.com
da807a85b9 Merge mysql.com:/space/pekka/ndb/version/my50
into  mysql.com:/space/pekka/ndb/version/my50-bug14509
2006-05-25 13:08:50 +02:00
gkodinov@mysql.com
0336a34c7f Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kgeorge/mysql/5.0/clean
2006-05-25 13:12:57 +03:00
gkodinov@mysql.com
d50fcc8644 Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18742-2
2006-05-25 12:21:42 +03:00
gkodinov@mysql.com
bda18671a1 Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18742-2
2006-05-25 10:45:24 +03:00
gkodinov@mysql.com
486837b0fa Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B19700
2006-05-25 10:45:00 +03:00
gkodinov@mysql.com
d6b5a89044 Bug #19700: subselect returning BIGINT always returned it as SIGNED
The unsigned flag in Item was not propagated through the single value subqueries.
This caused the result to be treated as signed.
2006-05-25 10:39:18 +03:00
monty@mysql.com
4064f11acf Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-05-24 17:33:12 +03:00
monty@mysql.com
7cb3df0114 Merge monty@192.168.0.9:/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-05-24 17:32:17 +03:00
monty@mysql.com
9e9ca8b6eb More DBUG statements
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads.
This fixes:
Bug#16986: Deadlock condition with MyISAM tables
Bug#20048: FLUSH TABLES WITH READ LOCK causes a deadlock
2006-05-24 17:21:35 +03:00
svoj@april.(none)
99b1d746b3 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG17001/mysql-5.0
2006-05-24 18:42:18 +05:00
konstantin@mysql.com
9e635c7bfe Merge mysql.com:/opt/local/work/mysql-5.0-root
into  mysql.com:/opt/local/work/mysql-5.0-runtime
2006-05-24 14:54:35 +04:00
svoj@april.(none)
73ae726d60 Merge april.(none):/home/svoj/devel/mysql/BUG12873/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG17001/mysql-5.0
2006-05-24 15:19:48 +05:00
msvensson@neptunus.(none)
dcf9810cb1 Merge neptunus.(none):/home/msvensson/mysql/bug15328/my41-bug15328
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-05-24 10:16:31 +02:00
svoj@april.(none)
fb27799a86 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG18233/mysql-5.0
2006-05-24 10:47:09 +05:00
msvensson@neptunus.(none)
0f1ae1305d Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-05-23 17:05:37 +02:00
msvensson@neptunus.(none)
9580c05ccc Make wait_timeout test not timing dependent 2006-05-23 15:45:16 +02:00
gkodinov@mysql.com
d81a8437e4 Bug #18742: Test 'group_min_max' fails if "classic" configuration in 5.0
Moved the InnoDB related tests to innodb_mysql
2006-05-23 16:43:01 +03:00
svoj@april.(none)
59302e5540 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG18233/mysql-5.0
2006-05-23 17:30:55 +05:00
msvensson@neptunus.(none)
b9779e9acd Move the requirement for "not running as root" to information_schema_chmod 2006-05-23 10:52:53 +02:00
gluh@eagle.intranet.mysql.r18.ru
474ef8ed43 Fix for bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode
transfer NO_DEFAULT_VALUE_FLAG flag to new field
2006-05-23 13:27:45 +05:00
gluh@eagle.intranet.mysql.r18.ru
457aea43fc Bug#16681 information_schema shows forbidden VIEW details
show view definition to users that have the needed privilleges
2006-05-23 12:45:25 +05:00
igor@rurik.mysql.com
4a673444f7 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-05-22 12:55:28 -07:00
gkodinov@mysql.com
b357c232fc Bug#18745: Test case 'func_group' fails if "classic" 5.0 configuration
Moved the InnoDB related test from func_group.test to innodb_mysql.test
2006-05-22 16:10:53 +03:00
ramil@mysql.com
71c035fafb Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b18536
2006-05-22 11:49:35 +05:00
holyfoot@mysql.com
b9cd71e622 Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.mrg
2006-05-21 18:22:13 +05:00
holyfoot@mysql.com
00f3ca8d27 Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-05-21 18:19:51 +05:00
pekka@mysql.com
1a519e2971 ndb - bug#19956 (occurs only in v5.0) 2006-05-21 11:04:57 +02:00
igor@rurik.mysql.com
4a27cbfd02 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-05-20 19:10:43 -07:00
igor@rurik.mysql.com
12e53358f0 Fixed bug #19089.
When a CREATE TABLE command created a table from a materialized
view id does not inherit default values from the underlying table.
Moreover the temporary table used for the view materialization
does not inherit those default values.
In the case when the underlying table contained ENUM fields it caused
misleading error messages. In other cases the created table contained
wrong default values.
The code was modified to ensure inheritance of default values for
materialized views.
2006-05-20 18:54:43 -07:00
jimw@mysql.com
2b13192c2e Merge mysql.com:/home/jimw/my/mysql-5.0-1039
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-05-19 16:17:24 -07:00
ramil@mysql.com
13baf7575f Fix for bug #18536: mysqldump does not maintain table orders as per --tables option 2006-05-19 16:21:32 +05:00
igor@rurik.mysql.com
710d422404 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into  rurik.mysql.com:/home/igor/mysql-5.0
2006-05-18 13:17:59 -07:00
igor@rurik.mysql.com
3b3e6ecb95 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2006-05-18 11:30:42 -07:00
jimw@mysql.com
7d54b004a2 Bug #13975: "same string" + 0 has 2 different results
The 'decimals' member of Item_func was being improperly initialized,
  which resulted in improper results when handling large numeric values.
2006-05-18 10:34:01 -07:00
evgen@moonbone.local
894092becf Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/19077-bug-5.0-mysql
2006-05-18 16:01:13 +04:00
svoj@april.(none)
da1fdb8a5f Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  april.(none):/home/svoj/devel/mysql/BUG18233/mysql-5.0
2006-05-18 16:13:32 +05:00