Commit graph

216 commits

Author SHA1 Message Date
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
bell@sanja.is.com.ua
3f160eed87 postmerge fix 2005-09-14 12:24:14 +03:00
bell@sanja.is.com.ua
914b961d01 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
2005-09-14 11:07:04 +03:00
bell@sanja.is.com.ua
71ffbbf81b part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm
2005-09-14 10:53:09 +03:00
msvensson@neptunus.(none)
7d78749320 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
2005-09-14 08:10:18 +02:00
evgen@moonbone.local
62fa6c5eae Merge 2005-09-13 22:22:51 +04:00
msvensson@neptunus.(none)
1ea86dddce Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
2005-09-13 14:46:42 +02:00
msvensson@neptunus.(none)
8a296476c0 BUG#10713 mysqldump includes database in create view and referenced tables
- Update test results
 - Updates after review
2005-09-13 12:43:43 +02:00
timour@mysql.com
9d862db743 Fix for BUG#6808.
The problem was in that add_table_to_list was testing for duplicate tables
in a list of tables that included the created view.
2005-09-12 17:01:17 +03:00
evgen@moonbone.local
75841099ca Fix bug #12993 View column rename broken in subselect
When view column aliased in subselect alias is set on ref which represents
field. When tmp table is created for subselect, it takes name of original field
not ref. Because of this alias on view column in subselect is lost. Which
results in reported error.

Now when alias is set on ref, it's set on ref real item too.
2005-09-12 02:46:35 +04:00
evgen@moonbone.local
f2d6282f6b Manual merge 2005-09-07 22:55:49 +04:00
evgen@moonbone.local
80c3a0b1b6 Fix bug #12922 if(sum(),...) with group from view returns wrong results
Fields of view represented by Item_direct_view_ref. When complex expression
such as if(sum()>...,...) is splited in simpler parts by refs was ignored.
Beside this direct ref doesn't use it's result_field and thus can't store
it's result in tmp table which is needed for sum() ... group.
All this results in reported bug.

Item::split_sum_func2() now converts Item_direct_view_ref to Item_ref to
make fields from view being storable in tmp table.
2005-09-07 22:38:36 +04:00
sergefp@mysql.com
99870f616d Fix for BUG#12941: in create_tmp_field(), if the passed item is an Item_ref, put newly
created item into item->result_field, not *(item->ref)->result_field.
2005-09-07 11:50:41 +04:00
bell@sanja.is.com.ua
dd7ab17059 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-09-01 22:42:37 +03:00
evgen@moonbone.local
dc53ac6d1f Fix bug #12489 wrongly printed strcmp() function results in creation of broken
view.

For Item_func_strcmp print() was not defined and for this class was called
print_op of it's parent class. Because of this strcmp() was printed wrongly
and this results int creation of broken view.

Added function Item_func_strcmp::print() which correctly prints strcmp()
function.
2005-08-31 00:54:41 +04:00
bell@sanja.is.com.ua
5963573c05 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
2005-08-25 17:47:18 +03:00
andrey@lmy004.
d4a25c1b36 Merge lmy004.:/work/mysql-5.0-clean
into lmy004.:/work/mysql-5.0-bug12533-2
2005-08-25 09:38:59 +02:00
andrey@lmy004.
dde57f082b fix for bug #12533 (crash on DESCRIBE <view> after renaming base table column) 2005-08-25 09:24:21 +02:00
georg@lmy002.wdf.sap.corp
254db48603 Fix for bug#5501 (SHOW TABLE STATUS should show "view" in upper case) 2005-08-24 12:51:00 +02:00
bell@sanja.is.com.ua
144c847da6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-08-23 23:17:36 +03:00
igor@rurik.mysql.com
743917759c Manual merge 2005-08-18 15:17:04 -07:00
igor@rurik.mysql.com
5ac7d86793 view.test:
Added a test case for bug #10970.
view.result:
  Added a test case for bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).
2005-08-17 22:19:12 -07:00
bell@sanja.is.com.ua
7f48830f9e sql_view.cc:
correct exit from mysql_create_view to restore ennvironment (BUG#12468)
view.result, view.test:
  test of CRETE VIEW in SP
2005-08-17 22:42:53 +03:00
evgen@moonbone.local
69319f17e7 Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect
results.

st_select_lex_unit::print() was losing UNION ALL if in statement were present
UNION DISTINCT.
2005-08-15 23:05:05 +04:00
evgen@moonbone.local
0f9b982970 Fix bug #12298 Typo in timestampdiff() function name results in erroneous
view being created.

Item_func_timestamp_diff::func_name() were returning function name as
"timestamp_diff" thus when view was executed function parameters wasn't 
properly recognized and error was raised.
2005-08-12 22:42:50 +04:00
igor@rurik.mysql.com
da441e949c sql_base.cc:
Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.
2005-08-12 01:27:04 -07:00
igor@rurik.mysql.com
0aff8a13dc sql_base.cc:
Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
view.result, view.test:
  Added a test case for bug #12382.
2005-08-11 16:10:34 -07:00
sergefp@mysql.com
c6db76b076 Fix for BUG#12228: SP cache code:
* Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
  sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
* Use new SP Cache use contract in the code.

There is no test case because it doesn't seem to be possible to cause thread races to end
the same way they end in heavy-load test. This patch removes the crash in heavy test.
2005-08-08 23:23:34 +00:00
jimw@mysql.com
995b5dd02d Fix out-of-order results in view results file 2005-08-04 16:33:29 -07:00
evgen@moonbone.local
1894cff045 Manual merge of #11335 bugfix 2005-08-05 00:34:42 +04:00
sergefp@mysql.com
f595847ec0 Manual merge 2005-08-03 03:47:07 +00:00
bell@sanja.is.com.ua
4c69fbe632 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
sergefp@mysql.com
de02193bdd Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave prelocked mode for
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126
2005-07-30 08:19:57 +00:00
evgen@moonbone.local
fa0ea36507 Fix bug #11335 View redefines TinyInt(1) column definition
Item_type_holder doesn't store information about length and exact type of
original item which results in redefining length to max_length and geometry 
type to longtext.

Changed the way derived tables except unions are built. Now they are created
from original field list instead of list of Item_type_holder.
2005-07-30 05:53:35 +04:00
igor@rurik.mysql.com
24d148d025 sql_select.cc:
Fixed bug #11412.
  Reversed the patch of cs 1.1934 for the function 
  create_tmp_table. Modified the function to support
  tem_ref objects created for view fields.
item_buff.cc:
  Fixed bug #11412.
  Modified implementation of new_Cached_item to support
  cacheing of view fields.
item.h:
  Fixed bug #11412.
  Changed implementation of Item_ref::get_tmp_table_field and
  added Item_ref::get_tmp_table_item to support Item_ref objects
  created for view fields.
view.test, view.result:
  Added a test case for bug #11412.
2005-07-25 12:57:23 -07:00
evgen@moonbone.local
ef1d27e02a Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11760
2005-07-20 06:59:31 +04:00
evgen@moonbone.local
6b25219fea Fix bug #11760 Typo in Item_func_add_time::print() results in NULLs returned
by subtime() in view

Item_func_add_time::print() were printing arg[0] instead of arg[1] which
results in wrongly created view. Functions addtime() and subtime were
affected by this bug.
2005-07-20 06:55:51 +04:00
dlenev@mysql.com
8a3e723b74 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"
2005-07-19 20:06:49 +04:00
konstantin@mysql.com
8b0adacbc6 After-merge fixes (4.1 -> 5.0). 2005-07-16 16:10:42 +04:00
bell@sanja.is.com.ua
8aad35f9d2 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
2005-07-16 00:17:05 +03:00
bell@sanja.is.com.ua
6114bee47c stop evaluation constant functions in WHERE (BUG#4663)
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)
2005-07-16 00:01:44 +03:00