Commit graph

256 commits

Author SHA1 Message Date
igor@rurik.mysql.com
86606615ab Fixed bug #16382.
When an ambiguous field name is used in a group by clause a warning is issued
in the find_order_in_list function by a call to push_warning_printf.
An expression that was not always valid was passed to this call as the field
name parameter.
2006-02-01 20:43:43 -08:00
msvensson@neptunus.(none)
3d5f530caa Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var
into  neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var-integration
2006-01-24 08:43:34 +01:00
msvensson@neptunus.(none)
09ec2919a1 Make it possible to run mysql-test-run.pl with default test suite in different vardir. 2006-01-24 08:30:54 +01:00
igor@rurik.mysql.com
d2cfad167b Fixed bug #16016: MIN/MAX optimization was not applied to views. 2006-01-06 22:28:26 -08:00
monty@mysql.com
b0a5ea01ef Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-01-06 01:08:48 +02:00
monty@mysql.com
6e22e29de6 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null
2006-01-06 00:47:49 +02:00
gluh@eagle.intranet.mysql.r18.ru
f4b052844f Fix for bug#14861 aliased column names are not preserved.
Create tmp table filed using original item name when it's necessary
2005-12-19 15:36:03 +04:00
dlenev@mysql.com
b5e21b60d9 Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11555-2
2005-12-07 14:38:20 +03:00
dlenev@mysql.com
40614adf66 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11555-2
2005-12-07 12:47:25 +03:00
dlenev@mysql.com
06b895c096 Fix for bug #11555 "Stored procedures: current SP tables locking make
impossible view security".

We should not expose names of tables which are explicitly or implicitly (via
routine or trigger) used by view even if we find that they are missing.
So during building of list of prelocked tables for statement we track which
routines (and therefore tables for these routines) are used from views. We
mark elements of LEX::routines set which correspond to routines used in views
by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
object for topmost view which uses routine. We propagate this mark to all
routines which are used by this routine and which we add to this set. We also
mark tables used by such routine which we add to the list of tables for
prelocking as belonging to this view.
2005-12-07 12:27:17 +03:00
serg@serg.mylan
6b5320d617 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-12-05 18:18:56 +01:00
serg@serg.mylan
719089a819 better error for optimize/repair/etc a view 2005-12-05 12:08:30 +01:00
bell@sanja.is.com.ua
b1f0e78146 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge1-5.0
2005-12-02 21:20:25 +02:00
bell@sanja.is.com.ua
45e59f3d76 Now we shall store only position (index of first character)
of SELECT from query begining, to be independet of query buffer
allocation.
Correct procedure used to find beginning of the current statement
during parsing (BUG#14885).
2005-12-02 21:18:12 +02:00
bell@sanja.is.com.ua
2ff98e0586 View creation code fixed to expect empty TABLE_LIST::table pointer (BUG#15096). 2005-12-01 12:15:48 +02:00
evgen@moonbone.local
badc2668ce Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/13622-bug-5.0-mysql
2005-11-18 17:26:44 +03:00
timour@mysql.com
9a644b948c WL#2486 - natural/using joins according to SQL:2003.
Enabled view tests that didn't work before.
2005-11-18 10:51:46 +02:00
evgen@moonbone.local
a031778955 Manually merged 2005-11-18 01:16:15 +03:00
evgen@moonbone.local
7749b8d15b Merge 2005-11-16 02:08:20 +03:00
evgen@moonbone.local
35f7b50b18 Fix bug #14816 test_if_order_by_key() expected only Item_fields.
test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.

Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.
2005-11-14 22:10:34 +03:00
evgen@moonbone.local
70e1974f76 Fix bug #14850 Item_ref's null_value wasn't updated
Item_ref's null_value wasn't updated in save_org_in_field() causing reported
error.
2005-11-14 21:52:39 +03:00
evgen@moonbone.local
508824f7c4 Fix bug #13622 Wrong view .frm created if some field's alias contain \n
View .frm parser assumes that query string will take only 1 line, with \n in
aliases query stringmay take several lines thus produces bad .frm file.

'query' parameter type changed from 'string' to 'escaped string'
2005-11-11 20:03:32 +03:00
anozdrin@mysql.com
491e4f89f5 WL#2818 (Add creator to the trigger definition for privilege
checks on trigger activation)
2005-11-10 22:25:03 +03:00
pem@mysql.com
b01e7393bf Fixed BUG#14719: Views DEFINER grammar is incorrect
Corrected the syntax for the current_user() case.
  (It's "definer = current_user[()]", not just "current_user[()]".)
2005-11-09 16:51:00 +01:00
igor@rurik.mysql.com
60a4b4fb16 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-11-05 22:45:54 -08:00
igor@rurik.mysql.com
0960f5fedc Post review fixes. 2005-11-05 22:41:36 -08:00
sergefp@mysql.com
a88ecb9a3d Post-merge fixes 2005-11-03 12:38:46 +03:00
sergefp@mysql.com
8fefb36800 Merged 2005-11-03 10:28:12 +03:00
igor@rurik.mysql.com
f878cc589d Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-11-02 22:24:36 -08:00
igor@rurik.mysql.com
44dd303c47 Post review fixes. 2005-11-02 22:13:10 -08:00
igor@rurik.mysql.com
fddc99bcd8 #view.test#:
new file
sql_table.cc, handler.h:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
view.test, view.result:
  Added a test case for bug #14540.
errmsg.txt:
  Fixed bug #14540.
  Added error ER_CHECK_NOT_BASE_TABLE.
2005-11-02 13:44:58 -08:00
sergefp@mysql.com
96ff1e808a BUG#14026: When doing the end-of-prepare fix up for TABLE_LISTs used in the PS, do the fixup
for underlying tables of a merge VIEWs, too.
2005-11-02 07:05:19 +03:00
evgen@moonbone.local
2343ff86ca Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
Item_func_group_concat::print() wasn't printing sort order thus creating wrong
view. This results in reported error.
2005-11-01 17:27:10 +03:00
pem@mysql.com
1eaf95d5ca Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/bug14256/mysql-5.0
2005-10-28 14:55:01 +02:00
pem@mysql.com
d201f2443d Fixed BUG#14256: definer in view definition is not fully qualified
Changed the parser test for wildcards in hostname to checking for empty
  strings instead (analogous with the test in default_view_definer()),
  since wildcards do appear in the definer's host-part sometimes.
2005-10-28 12:11:32 +02:00
bell@sanja.is.com.ua
1b164c7b83 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
monty@mysql.com
5513ab69b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-12 00:59:52 +03:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
evgen@moonbone.local
65325ecbbb Fix bug#13327 check_equality() wasn't checking view's fields
check_equality() finds equalities among field items. It checks input items
to be Item_fields thus skipping view's fields, which are represented by
Item_direct_view_ref. Because of this index wasn't applied in all cases
it can be.

To fix this problem check_equality() now takes real item of
Item_direct_view_ref, except outer view refs (with depended_from set).
2005-10-10 18:53:57 +04:00
timour@mysql.com
77cf84186e Fix for BUG#13410 - qualified reference to a view column in the HAVING clause cannot be resolved.
The problem was then when a column reference was resolved to a view column, the new Item
created for this column contained the name of the view, and not the view alias.
2005-10-01 09:35:30 +03:00
igor@rurik.mysql.com
6e2fb27af6 item.cc:
Fixed bug #13410.
  Fixed name resolution for qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13410.
2005-09-26 23:29:02 -07:00
igor@rurik.mysql.com
a43b341c8a sql_base.cc, item.cc:
Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13411.
2005-09-26 20:18:59 -07:00
georg@lmy002.wdf.sap.corp
541d3ae89b Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/bugs/mysql-5.0-master
2005-09-19 05:32:38 +02:00
georg@lmy002.wdf.sap.corp
afe8dcf2e7 Fix for bug#5508 after Sanja's review 2005-09-16 17:13:21 +02:00
evgen@moonbone.local
fcfcc016bd Merge 2005-09-15 20:50:10 +04:00
elliot@mysql.com
f3030c3411 Updated test results for view test. 2005-09-14 16:27:55 -04:00
evgen@moonbone.local
ac32450609 Fix bug #11416 Server crash if using a view that uses function convert_tz
When parser parses function convert_tz it loads available timezone tables in
thd->lex->time_zone_tables_used. But view have another lex that main query.
Thus time_zone_tables_used of main query left uninitialized.
When Item_func_conver_tz is fixed it takes timezone tables from main query
and later when it executed it assumes that timezone tables are loaded and
failed that assertion.
2005-09-15 00:08:12 +04:00
aivanov@mysql.com
a42b5000ca Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-13000
2005-09-14 20:32:59 +04:00
aivanov@mysql.com
53e90b53bc Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
2005-09-14 20:25:00 +04:00
bell@sanja.is.com.ua
2fce07b08b postmerge fix 2005-09-14 17:27:33 +03:00