Commit graph

529 commits

Author SHA1 Message Date
Sergey Glukhov
eeb35b9026 5.0-bugteam->5.1-bugteam merge 2008-08-20 16:42:01 +05:00
Sergey Glukhov
9bc9ddd56e Bug#38291 memory corruption and server crash with view/sp/function
Send_field.org_col_name has broken value on secondary execution.
It happens when result field is created from the field which belongs to view
due to forgotten assignment of some Send_field attributes. 
The fix:
set Send_field.org_col_name,org_table_name with correct value during Send_field intialization.
2008-08-20 14:49:28 +05:00
thek@adventure.(none)
e836ec9d8d Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
Fixed build failure depending on events in embedded build.
2008-05-13 14:06:32 +02:00
kaa@kaamos.(none)
5647dee192 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-17 14:57:01 +03:00
kaa@kaamos.(none)
3daeb40f1f Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-17 14:37:39 +03:00
kaa@kaamos.(none)
9f194149b8 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-13 12:12:00 +03:00
davi@mysql.com/endora.local
1c6768c487 Bug#32633 Can not create any routine if SQL_MODE=no_engine_substitution
The problem is that one can not create a stored routine if sql_mode
contains NO_ENGINE_SUBSTITUTION or PAD_CHAR_TO_FULL_LENGTH. Also when
a event is created, the mode is silently lost if sql_mode contains one
of the aforementioned.  This was happening because the table definitions
which stored sql_mode values weren't being updated to accept new values
of sql_mode.

The solution is to update, in a backwards compatible manner, the various
table definitions (columns) that store the sql_mode value to take into
account the new possible values. One incompatible change is that if a event
that is being created can't be stored to the mysql.event table, an error
will be raised.

The tests case also ensure that new SQL modes will be added to the mysql.proc
and mysql.event tables, otherwise the tests will fail.
2008-02-07 08:47:39 -02:00
evgen@moonbone.local
f967e24718 Bug#30787: Stored function ignores user defined alias.
Simple subselects are pulled into upper selects. This operation substitutes the
pulled subselect for the first item from the select list of the subselect.
If an alias is defined for a subselect it is inherited by the replacement item.
As this is done after fix_fields phase this alias isn't showed if the
replacement item is a stored function. This happens because the Item_func_sp::make_field
function makes send field from its result_field and ignores the defined alias.

Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.
2008-01-31 23:46:26 +03:00
malff@lambda.hsd1.co.comcast.net.
e685e7e354 Manual merge 2008-01-23 16:21:09 -07:00
malff@lambda.hsd1.co.comcast.net.
7bd56cfa79 manual merge 2008-01-23 14:52:40 -07:00
malff@lambda.hsd1.co.comcast.net.
c3ad0cac75 Bug#33618 (Crash in sp_rcontext)
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)

The server used to crash when REPEAT or another control instruction
was used in conjunction with labels and a LEAVE instruction.

The crash was caused by a missing "pop" of handlers or cursors in the
code representing the stored program. When executing the code in a loop,
this missing "pop" would result in a stack overflow, corrupting memory.

Code generation has been fixed to produce the missing h_pop/c_pop
instructions.

Also, the logic checking that labels at the beginning and the end of a
statement are matched was incorrect, causing Bug 33983.
End labels, when used, must match the label used at the beginning of a block.
2008-01-23 13:26:41 -07:00
anozdrin/alik@ibm.
e5ed653e16 Fix merge. 2008-01-20 00:59:24 +03:00
gshchepa/uchum@gleb.loc
5ebb07a8c0 rpl_row_tabledefs_2myisam.result, sp.result, rpl_row_colSize.result:
Error message numbers.
2007-10-28 02:09:24 +04:00
anozdrin/alik@station.
49a0f09bbf Fix for BUG#24923: Functions with ENUM issues.
The problem was that the RETURNS column in the mysql.proc was of
CHAR(64). That was not enough for storing long-named datatypes.

The fix is to change CHAR(64) to LONGBLOB, and to throw warnings
at the time a stored routine is created if some data is truncated
during writing into mysql.proc.
2007-10-17 12:13:56 +04:00
malff@lambda.hsd1.co.comcast.net.
ee3e6d8171 Manual merge of 5.0-runtime to 5.1-runtime 2007-10-16 20:47:08 -06:00
malff@lambda.hsd1.co.comcast.net.
a9c6ed46e2 Implementing code review comments 2007-10-16 11:16:31 -06:00
anozdrin/alik@station.
05cf10bdf6 Cleanup sp.test. 2007-10-10 14:42:29 +04:00
anozdrin/alik@station.
c6c419f919 Fix automerge. 2007-10-10 13:53:24 +04:00
kostja@bodhi.(none)
7ec30183bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-10-08 02:05:55 +04:00
kostja@bodhi.(none)
53b0324824 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-10-08 02:05:10 +04:00
anozdrin/alik@station.
ac875690f7 Fix for BUG#20550: Stored function: wrong RETURN type metadata
when used in a VIEW.

The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.

The fix is to use create_tmp_from_field().
2007-10-05 16:35:01 +04:00
anozdrin/alik@station.
707f067446 Fix for BUG#31035: select from function, group by result crasher.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
  - used_tables() returned RAND_TABLE, which means that the item
    can produce "random" results;
  - but const_item() returned TRUE, which means that the item is
    a constant one.

The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.
2007-10-04 17:19:14 +04:00
gluh@eagle.(none)
88a4df4ec0 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-09-20 14:10:05 +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
gshchepa@devsrv-b.mysql.com
ca15f7b190 Many files:
Merge with 5.0-opt.
2007-09-14 17:21:50 +02:00
gshchepa/uchum@gleb.loc
bd4fd0473c Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-09-13 00:44:50 +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
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
gshchepa/uchum@gleb.loc
adbe17c8a1 sp.result:
Post-merge fix.
2007-09-06 20:42:36 +05:00
gshchepa/uchum@gleb.loc
4732821e9d Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-09-06 19:15:31 +05:00
davi@moksha.local
2e3ded3ec9 The test case for Bug#29936 doesn't work with the embedded version,
the first query is not running while we are doing wait queries on
a second connection.
2007-09-05 15:03:02 -03: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
gluh@mysql.com/eagle.(none)
33eaf2cd95 Bug#29408 Cannot find view in columns table if the selection contains a function
Use view db name as thread default database, in order to ensure
that the view is parsed and prepared correctly.
2007-09-03 12:22:56 +05:00
malff/marcsql@weblab.(none)
496eb569d9 Manual merge 2007-08-29 17:27:38 -06:00
anozdrin/alik@ibm.
290d724943 Test case for Bug#13675: DATETIME/DATE type in store proc param
seems to be converted as varbinary.

The bug has been already fixed. This CS just adds a test case for it.
2007-08-29 14:57:59 +04:00
davi@moksha.local
0b8bc8a96b Add test case for bug 29936 Stored Procedure DML ignores low_priority_updates setting.
This test case uses the wait_condition helper (only available in 5.1) in order to wait till the select/update opens and locks the table.
2007-08-24 19:17:29 -03:00
msvensson@pilot.(none)
2258a423b2 Merge 192.168.0.7:mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-03 12:57:09 +02:00
msvensson@shellback.(none)
d6f02500af Cleanup created procedures in sp.test 2007-08-03 12:56:45 +02:00
gshchepa/uchum@gleb.loc
92eb485fe2 Many files:
Post-merge fix.
2007-08-03 13:07:37 +05:00
gshchepa/uchum@gleb.loc
39c77427a6 sql_yacc.yy, sp.result, disabled.def:
Post-merge fix.
2007-07-31 13:22:01 +05:00
gshchepa/uchum@gleb.loc
c14d3d2f0d Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30120
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-31 12:09:59 +05:00
gshchepa/uchum@gleb.loc
1eb20fc0a5 Fixed bug #30120.
SP with local variables with non-ASCII names crashed the server.

The server replaces SP local variable names with NAME_CONST calls
when putting statements into the binary log. It used UTF8-encoded
item names as variable names for the replacement inside NAME_CONST
calls. However, statement string may be encoded by any
known character set by the SET NAMES statement.
The server used byte length of UTF8-encoded names to increment
the position in the query string that led to array index overrun.
2007-07-30 04:35:16 +05:00
gshchepa/uchum@gleb.loc
8fa8f0064d Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-28 23:38:59 +05:00
gshchepa/uchum@gleb.loc
a077dd8f61 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29834
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-28 23:36:27 +05:00
gshchepa/uchum@gleb.loc
ff5d72021e Fixed bug #29834.
Using view columns by their names during an execution of
a prepared SELECT statement or a SELECT statement inside
a SP caused a memory leak.
2007-07-28 23:10:38 +05:00
gshchepa/uchum@gleb.loc
58f0814c3b Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-22 01:58:37 +05:00
gshchepa/uchum@gleb.loc
882bb64fc6 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29338
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-22 01:52:13 +05:00
gshchepa/uchum@gleb.loc
872d21eb1f sp.test, sp.result:
Additional test case fix for bug #29338.
2007-07-22 01:49:41 +05:00
gshchepa/uchum@gleb.loc
f7010479fb Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-22 00:53:01 +05:00
gshchepa/uchum@gleb.loc
2313bbc304 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29338
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-22 00:40:14 +05:00