Commit graph

776 commits

Author SHA1 Message Date
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
a9b1ff4095 Add DROP TABLE before trying to create view (in mysqldump)
Cleaned up xxxx_gis.test's and made gis_generic.inc independent of ndb
(Note that archive_gis.test fails, but this is independent of this patch)
2005-10-27 22:45:18 +03:00
jimw@mysql.com
7a8bd252d2 Merge mysql.com:/home/jimw/my/mysql-4.1-14009
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-27 10:20:38 -07:00
hf@deer.(none)
fa56a9d576 Additional fix for bug #13573 2005-10-26 11:54:15 +05:00
hf@deer.(none)
50a8dbc8c2 Merge deer.(none):/home/hf/work/mysql-5.0.13820
into deer.(none):/home/hf/work/mysql-5.0.12267
2005-10-25 21:10:58 +05:00
igor@rurik.mysql.com
a236acce10 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-10-22 19:35:37 -07:00
jimw@mysql.com
2c90e2f7a6 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-10-19 13:47:05 -07:00
jani@ua141d10.elisa.omakaista.fi
8e1dac44b4 Some fixes to avoid compiler warnings. 2005-10-18 18:03:26 +03:00
jimw@mysql.com
31a79ee3d0 Fix Item_func_abs::fix_length_and_dec() to set maybe_null properly. (Bug #14009) 2005-10-17 17:00:42 -07:00
hf@deer.(none)
15fbd07a22 Fix for bug #13820 (No warning on log(NEGATIVE)) 2005-10-17 12:32:22 +05:00
igor@rurik.mysql.com
c136e9c43b Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
2005-10-15 14:32:37 -07:00
hf@deer.(none)
3f76925d06 Fix for bug #13573 (wrong data inserted for too big decimals) 2005-10-15 21:57:32 +05:00
hf@deer.(none)
ba82a6a759 Fix for bug #9855 (Inconsistend column type in create select) 2005-10-15 19:47:23 +05:00
bar@mysql.com
0bf436a058 Merge mysql.com:/usr/home/bar/mysql-4.1.b13751
into  mysql.com:/usr/home/bar/mysql-5.0.char1
2005-10-14 12:07:13 +05: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
monty@mysql.com
17d7ba931d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-08 03:37:23 +03:00
bar@mysql.com
62ad8922b8 ctype_utf8.result, ctype_utf8.test:
Adding test case.
item_func.cc:
  Bug#13751 find_in_set: Illegal mix of collations.
  Character set conversion was forgotten in find_in_set.
2005-10-07 09:52:15 +05:00
monty@mysql.com
78e828d32f Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code
2005-10-06 17:54:43 +03:00
jonas@perch.ndb.mysql.com
05d875f8c1 sql/item_func.cc
remove extra ";" after function
2005-09-21 14:36:55 +02:00
bell@sanja.is.com.ua
506c6eb922 postmerge fixes 2005-09-21 08:29:47 +03:00
bell@sanja.is.com.ua
3f66053a50 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner5-5.0
2005-09-20 21:27:28 +03:00
bell@sanja.is.com.ua
c1b185f5ff WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
2005-09-20 21:20:38 +03:00
evgen@moonbone.local
b7c42a65d1 item_func.cc:
Fixed mistake in fix for bug#12812
2005-09-20 21:35:57 +04:00
evgen@moonbone.local
e9c3396cd4 Manual merge 2005-09-20 03:31:00 +04:00
evgen@moonbone.local
de4e941e3f Fix bug #12812 create view calling a function works without execute right on function
Execution rigths on function was checked just before function execution,
thus it was unknown on prepare stage whether user have right to execute 
particular function.

Added access rights checking function which is called right after fixing
Item_func_sp.
This have additional effect that if user don't have rights for execution
query will fail on earlier stage and will not waste resources on optimizing
with failing on execution stage.
2005-09-20 03:05:35 +04:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
petr@mysql.com
e8946265fc fix for Bug #12979 Stored procedures: crash if inout decimal parameter 2005-09-14 07:25:32 +04:00
sergefp@mysql.com
eac4388caf Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug12943
2005-09-09 10:08:46 +04:00
sergefp@mysql.com
e5b4252481 Fix for BUG#12637: Make SPs+user variables replication work:
* Allocate thd->user_var_events elements on appropriate mem_root
* If several SP statements are binlogged as a single statement, collect all user var
  accesses they make (grep for StoredRoutinesBinlogging for details)
2005-09-07 19:39:47 +04:00
bell@sanja.is.com.ua
352c7b9cbc Merge sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-mrg-5.0
2005-09-06 20:51:15 +03:00
gluh@eagle.intranet.mysql.r18.ru
a5bd5e9af2 Bug #6172 RAND(a) should only accept constant values as arguments(2nd version)
Argument of RAND function can be constant value only
2005-09-06 16:19:59 +05:00
konstantin@mysql.com
38486e83c1 Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures".
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup, 
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query]   prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).
2005-09-03 03:13:18 +04:00
konstantin@mysql.com
a3ddcdf8fb Rename:
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed 
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to 
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
2005-09-02 17:21:19 +04:00
andrey@lmy004.
235cde55fb fix for bug #12841
(Server crash on DO IFNULL(NULL,NULL)
(fixes also "SELECT CAST(IFNULL(NULL,NULL) as DECIMAL)" unreported
 crash)
(new revampled fix with suggestions from Igor)
2005-08-29 15:45:03 +02:00
igor@rurik.mysql.com
f93e7cc77a func_str.result, null.result:
Corrected results after the fix for bug #12791.
func_test.result, func_test.test:
  Added test cases for bug #12791.
item_func.h, item_func.cc:
  Fixed bug #12791.
  Made LEAST/GREATES fully Oracle compliant.
  LEAST/GREATEST did not return NULL if only some
  arguments were NULLs. This did not comply with Oracle.
2005-08-26 22:25:45 -07:00
sergefp@mysql.com
95c3afc5d9 Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
2005-08-25 17:34:34 +04:00
jimw@mysql.com
1eb0f45d17 Fix minor typo in handling of error conditions and return of SLEEP(). 2005-08-17 19:57:07 -07:00
jimw@mysql.com
054e78943e Fix SLEEP() to be interruptable. (Bug #12582) 2005-08-16 16:31:16 -07:00
monty@mysql.com
df32f7d621 Save and clear run context before executing a stored function or trigger and restore it afterwards.
This allows us to use statement replication with functions and triggers
The following things are fixed with this patch:
- NOW() and automatic timestamps takes the value from the main event for functions and triggers (which allows these to replicate with statement level logging)
- No side effects for triggers or functions with auto-increment values(), last_insert_id(), rand() or found_rows()
- Triggers can't return result sets

Fixes bugs:
#12480: NOW() is not constant in a trigger
#12481: Using NOW() in a stored function breaks statement based replication
#12482: Triggers has side effects with auto_increment values
#11587: trigger causes lost connection error
2005-08-15 18:15:12 +03:00
jimw@mysql.com
898aae5e0f Add SLEEP(seconds) function, which always returns 0 after the given
number of seconds (which can include microseconds). (Bug #6760)
2005-08-11 18:58:22 -07:00
sergefp@mysql.com
f595847ec0 Manual merge 2005-08-03 03:47:07 +00:00
jimw@mysql.com
48d111c8c2 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-01 17:54:57 -07:00
jimw@mysql.com
c3e40306b7 Merge mysql.com:/home/jimw/my/mysql-4.1-11402
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-01 17:11:49 -07:00
jimw@mysql.com
9a5560683f Merge mysql.com:/home/jimw/my/mysql-4.1-10724
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-01 17:10:35 -07: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
bar@mysql.com
0255803b4e Merge mysql.com:/usr/home/bar/mysql-4.1.b10201
into  mysql.com:/usr/home/bar/mysql-5.0
2005-07-26 13:25:18 +05:00
bar@mysql.com
0c2035b7bd func_gconcat.result, func_gconcat.test:
Adding test
item_sum.cc:
  Adding a call for collation/charset aggregation,
      to collect attributes from the arguments. The actual bug fix.
item_func.h, item_func.cc, item.h, item.cc:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,
2005-07-26 12:52:02 +05:00
jimw@mysql.com
3409537f2a Don't force column header to @@session.var_name if @@local.var_name
was used. (Bug #10724)
2005-07-25 11:25:28 -07:00
jimw@mysql.com
80c1c6b33f Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 11:05:49 -07:00
monty@mishka.local
7e83d09ce7 Simple fixes during review of new code 2005-07-19 19:25:05 +03:00
konstantin@mysql.com
8b0adacbc6 After-merge fixes (4.1 -> 5.0). 2005-07-16 16:10:42 +04:00
konstantin@mysql.com
8e72214d74 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/media/sda1/mysql/mysql-5.0-merge
2005-07-16 13:45:32 +04:00
konstantin@mysql.com
e08caeeee2 A fix and a test case for Bug#9359 "Prepared statements take snapshot
of system vars at PREPARE time": implement a special Item
to handle system variables. This item substitutes itself with 
a basic constant containing variable value at fix_fields.
2005-07-16 03:29:13 +04:00
konstantin@mysql.com
1da2b9b4d7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/media/sda1/mysql/mysql-5.0-10760-new
2005-07-14 20:02:36 +04:00
konstantin@mysql.com
3f28ad8eb7 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-14 20:02:32 +04:00
sergefp@mysql.com
86d3c07836 Merge mysql.com:/home/psergey/mysql-4.1-build-tree
into mysql.com:/home/psergey/mysql-4.1-merge-from-build
2005-07-14 16:02:30 +00:00
konstantin@mysql.com
9c6f14aa3d Get rid of checking for ETIME return value of pthread_cond_timedwait.
ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on 
Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
The standard requirement is that the only additional return value
of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
Let us not bloat the application code with redundant checks,
and if we're ever to work on a platform that returns a non-standard 
value, we should write a wrapper for that platform (like we do, e.g., for
Windows).
2005-07-14 19:42:56 +04:00
sergefp@mysql.com
0b3db181bf Fix for BUG#11869: In Item_func_match::fix_index() handle the case when there is no
source table present (this happens for ORDER BY after UNION)
2005-07-14 15:19:26 +00:00
konstantin@mysql.com
b6da7f6227 Merge mysql.com:/opt/local/work/mysql-4.1-9379
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-13 23:49:45 +04:00
konstantin@mysql.com
1755df7649 A fix and a test case for Bug#9379 (collation of a parameter marker is
binary).
2005-07-13 23:43:46 +04:00
dlenev@mysql.com
75b8d4fa08 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg8406
2005-07-09 22:04:18 +04:00
dlenev@mysql.com
923fe817e0 Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers
crash if referencing a table" and several other related bugs.
Fix for bug #11834 "Re-execution of prepared statement with dropped function
crashes server." which was spotted during work on previous bugs.

Also couple of nice cleanups:
- Replaced two separate hashes for stored routines used by statement with one.
- Now instead of doing one pass through all routines used in statement for
  caching them and then doing another pass for adding their tables to table
  list, we do only one pass during which do both things.
2005-07-09 21:51:59 +04:00
hf@deer.(none)
3ddd2771d6 Fix for bug #11708 (real function returns wrongly rounded decimal) 2005-07-07 20:28:47 +05:00
monty@mysql.com
fe30ec9032 manual merge 2005-07-04 03:50:04 +03:00
monty@mysql.com
ec420bfb43 Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling
2005-07-04 03:42:33 +03:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
bell@sanja.is.com.ua
f3b6ec6e5f removed unneed line 2005-06-23 19:33:19 +03:00
bell@sanja.is.com.ua
56b2fc10a8 fixed environment restoring in case of error during SP function execution (BUG#9503)
#define macro improvement
2005-06-23 18:29:10 +03:00
jimw@mysql.com
1fa7b95d98 Fix multiplication of abs() by a negative value. (Bug #11402) 2005-06-22 20:00:21 -07:00
bell@sanja.is.com.ua
a7ca9cb38e fixed view fields names check and generation (changed after Trudy review: underlying field names treat as user set ones) (BUG#7448) 2005-06-21 20:30:48 +03:00
bell@sanja.is.com.ua
6d030c637b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-06-17 20:30:11 +03:00
bell@sanja.is.com.ua
a11677026f fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387) 2005-06-17 17:27:47 +03:00
serg@serg.mylan
1e3eb38724 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-06-15 20:24:13 +02:00
serg@serg.mylan
01b3c70926 renamed:
Item_buff -> Cached_item
  Item_arena -> Query_arena
  TEST_ASSERT -> YYERROR_UNLESS
2005-06-15 19:58:35 +02:00
hf@deer.(none)
971eaa189d Fix for bug #10337 (cast(NULL DECIMAL) crashes the server) 2005-06-15 19:02:35 +05:00
ramil@mysql.com
3ac1c2ca17 a fix (#11235: Expression with IFNULL yields 18 where 1 is correct). 2005-06-14 13:40:12 +05:00
pem@mysql.comhem.se
ca0a72f815 Post-merge fix. 2005-06-10 18:06:12 +02:00
pem@mysql.com
b42bf3cc55 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-06-10 16:56:34 +02:00
pem@mysql.comhem.se
46619fa0e3 Post review and additional fix for BUG#10968: Stored procedures: crash if long loop.
Fixed valgrind complaints. This fixes the memory leak problems for
  procedured, and partially for functions. There's still a leak involving
  results from functions that turned out to be too involved, so it will be
  fixed separately.
2005-06-10 16:14:01 +02:00
holyfoot@hf-ibm.(none)
717d92f6a6 Fix for bug #10083 (round doesn't increase scale) 2005-06-09 15:27:26 +05:00
dlenev@mysql.com
054139fc64 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg10015
2005-06-07 14:54:48 +04:00
dlenev@brandersnatch.localdomain
270b695f59 Fix for bug #10015 "Crash in InnoDB if stored routines are used".
We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.
2005-06-07 14:53:08 +04:00
monty@mysql.com
068bd3eb97 After merge fixes 2005-06-07 05:43:59 +03:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
monty@mysql.com
b46f2ecf2f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-06-06 19:43:07 +03:00
lenz@mysql.com
13afa9129b Some Windows compile improvements:
- removed some unreferenced variables
 - fixed the libmysql project file by removing a duplicate file reference (merge error)
2005-06-06 15:23:04 +02:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
monty@mysql.com
4b7882dc73 merge 2005-06-05 17:19:50 +03:00
monty@mysql.com
25a2c4a71e Cleanup during review
Simple optimization for 2 argument usage to function of variable arguments
Fix stack overrun when using 1+1+1+1+1+1+1+....
Update crash-me results for 5.0
Don't call post_open if pre_open() fails (optimization)
2005-06-05 17:01:20 +03:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
serg@serg.mylan
91f6308d00 yassl template instantiation - don't do too much
mysys/my_access.c: remove incorrect fix
comments
2005-06-03 13:43:17 +02:00
igor@igor-inspiron.creware.com
e5ac58e64a Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into igor-inspiron.creware.com:/home/igor/mysql-5.0
2005-06-02 08:46:10 -07:00
igor@igor-inspiron.creware.com
380411607a Merge igor-inspiron.creware.com:/home/igor/mysql-5.0
into igor-inspiron.creware.com:/home/igor/dev/mysql-5.0-0
2005-06-02 07:33:31 -07:00
igor@igor-inspiron.creware.com
186e8c5891 item_func.h:
Fixed bug #9939: a wrong conversion of arguments
  for functions COALESCE and IFNULL.
  The str_op virtual method was added into Item_func_numhybrid.
item_func.cc:
  Fixed bug #9939: a wrong conversion of arguments
  for functions COALESCE and IFNULL.
  The str_op virtual method was added into Item_func_numhybrid.
item_cmpfunc.h, item_cmpfunc.cc:
  Fixed bug #9939: a wrong conversion of arguments
  for functions COALESCE and IFNULL.
  Item_func_coalesce and Item_func_ifnull now
  inherit from a modified Item_func_numhybrid.
case.test, case.result:
  Added test cases for bug #9939.
2005-06-02 07:27:02 -07:00
serg@serg.mylan
cdb1474dae Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-06-02 15:46:55 +02:00
serg@serg.mylan
4df47b9e4a cleanup 2005-06-02 15:45:20 +02:00
bar@mysql.com
95484f7996 Merge mysql.com:/usr/home/bar/mysql-4.1.sysvar
into mysql.com:/usr/home/bar/mysql-5.0
2005-06-02 17:13:37 +05:00
bar@mysql.com
e686057259 item_func.cc:
set_var.cc:
variables.result
variables.test

  Bug #10904 Illegal mix of collations between a system variable and a constant
  Changing coercibility of system variables to SYSCONST,
  to be the same with USER(), DATABASE(), etc.
2005-06-02 16:17:44 +05:00
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +02:00
jimw@mysql.com
1c387c8f71 Restore a bit of code accidently deleted during merge 2005-06-01 18:08:39 -07:00
kent@mysql.com
f889f0884c Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-06-02 02:57:18 +02:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
jimw@mysql.com
5a271e2c12 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-01 16:13:24 -07:00
jimw@mysql.com
7ac7bfc3c8 Fix handling of NULL fields in FIELD(). (Bug #10944) 2005-06-01 09:48:25 -07:00
pem@mysql.comhem.se
063896a6e7 Post-review fixes of BUG#9937: Crash on call to stored procedure. 2005-05-31 12:06:15 +02:00
pem@mysql.com
e496b24304 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-30 11:06:31 +02:00
pem@mysql.comhem.se
fcb3b0326e Fixed BUG#9559: Functions: Numeric Operations using -ve value gives incorrect
results.
  Actually a problem when converting decimal to int for user variables.
2005-05-27 14:48:33 +02:00
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +02:00
pem@mysql.comhem.se
3eca4bf22e Fixed BUG#9937: Crash on call to stored procedure.
This only showed up on two known platforms, both ia64 (one HP-UX and one Linux wich icc).
For some reason, they only get half the stack size they are supposed to have, which
makes deep SP recursion overrun the stack before check_stack_overrun() is triggered.
Also made som minor fixes in the check_stack_overrun() definition, supporting variable
margins.
No test case added, but the reason for the bug report was a failed existing test case
on these machines, which now works.
2005-05-26 20:36:14 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
ramil@mysql.com
b06181bccd hf's fix for bug #9060 (FORMAT returns incorrect result)
we need proper rounding there
2005-05-20 01:04:08 +05:00
ramil@mysql.com
eed75b052d a fix (bug #10599: Numeric function 'abs' make server crash). 2005-05-19 17:59:14 +05:00
georg@lmy002.wdf.sap.corp
2b04efe21e fixed fatal compiler error (windows) 2005-05-18 14:13:58 +02:00
acurtis@xiphis.org
8df5887ad5 Bug#10246 - Parser: bad syntax for GRANT EXECUTE
Rename some functions
  more fine-grained sp privileges
  make grant/revoke sp grammar less ambigious
2005-05-17 19:54:20 +01:00
monty@mysql.com
9db45adb60 Merge with 4.1 2005-05-14 18:31:22 +03:00
monty@mysql.com
beb5867dfb After merge fixes 2005-05-14 16:24:36 +03:00
monty@mysql.com
b4e92e6360 Merge with 4.0 2005-05-14 00:01:40 +03:00
hf@deer.(none)
3dbe7fb2ca Fix for valgrind bug in decimal code 2005-05-13 14:29:30 +05:00
dlenev@mysql.com
e7f29e1904 Manual merge of fix for bug #9913 into 5.0 tree. 2005-05-09 16:21:57 +04:00
dlenev@mysql.com
12621f349b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg9913
2005-05-09 12:18:19 +04:00
svoj@mysql.com
c7f0fcab23 BUG#7709 fix - Boolean fulltext query against unsupported engines does not
fail.
2005-05-07 15:48:56 +05:00
monty@mishka.local
015cd1cd21 merge 2005-05-06 13:51:58 +03:00
monty@mishka.local
a9f6aab4c9 Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema
2005-05-06 11:39:30 +03:00
holyfoot@mysql.com
556504287b Merge 2005-05-05 20:10:50 +05:00
holyfoot@hf-ibm.(none)
2c8e9df232 A lot of fixes to Precision math
Mostly about precision/decimals of the results of the operations
2005-05-05 20:06:49 +05:00
gbichot@quadita2.mysql.com
b72ae4fe57 Approximative fixes for BUG#2610,2611,9100 i.e. WL#2146 binlogging/replication of routines (stored procs and functions).
Approximative, because it's using our binlogging way (what we call "query"-level) and this is not as good as record-level binlog (5.1) would be. It imposes several
  limitations to routines, and has caveats (which I'll document, and for which the server will try to issue errors but that is not always possible).
  Reason I don't propagate caller info to the binlog as planned is that on master and slave
  users may be different; even with that some caveats would remain.
2005-05-05 14:20:53 +02:00
konstantin@mysql.com
92e4e1a3f8 Manual merge of Bug#9096 2005-05-03 19:32:29 +04:00
konstantin@mysql.com
018b8025c0 Merge mysql.com:/opt/local/work/mysql-4.1-root
into mysql.com:/opt/local/work/mysql-4.1-9096-fresh
2005-05-03 12:49:22 +04:00
konstantin@mysql.com
3589e78fda A fix and test case for Bug#9096 "select doesn't return all matched
records if prepared statements is used".
This fix changes equality evaluation method of basic constants from
by-name to by-value, thus effectively enabling use of parameter markers
in some optimizations (constants propagation, evaluation of possible
keys for query).
2005-05-03 12:47:27 +04:00
serg@serg.mylan
530b6ba541 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-05-01 23:10:55 +02:00
serg@serg.mylan
9c332d8d2a yassl changeset 2:
remove FIX_GCC_LINKING_PROBLEM and -DDEFINE_CXA_PURE_VIRTUAL
  replace echo in configure.in with AC_MSG_WARN/AC_MSG_ERROR
  don't set -DUSE_MYSYS_NEW for gcc 2.95
  set $USE_MYSYS_NEW even if CXX is g++
  yassl bugfixes
  instantiate all yassl templates explicitly
2005-04-30 19:48:45 +02:00
dlenev@brandersnatch.localdomain
8ee6d33bdd Fix for Bug #9913 "udf_deinit is not called after execution of PS"
(aka "deinit is not called when calling udf from trigger").

We should call udf_deinit() function during cleanup phase after prepared
(or ordinary) statement execution instead of calling it from Item's
desctructor.

No test case is provided since it is hard to test UDF's from our test
suite.
2005-04-30 20:23:40 +04:00
monty@mysql.com
28a5491d3d Merge with 4.1 2005-04-30 09:46:08 +03:00
monty@mysql.com
c0e8a8d625 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-04-30 03:46:38 +03:00
monty@mysql.com
129c604032 Setting a variable to CAST(NULL as X) set the result type of the variable to X. (Bug #6598) 2005-04-30 03:14:42 +03:00
monty@mysql.com
fbf31c4a8c CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036)
Produce warnings of wrong cast of strings to signed/unsigned.
Don't block not resolved IP's if DNS server is down (Bug #8467)
Fix compiler problems with MinGW (Bug #8872)
2005-04-29 17:03:34 +03:00
pem@mysql.comhem.se
f769a7a8b0 Post-review fixes of the patch for BUG#8408: Stored procedure crash if function contains SHOW
(Review on irc by monty)
2005-04-27 16:35:49 +02:00
pem@mysql.comhem.se
281c0a8130 Fixed BUG#8408: Stored procedure crash if function contains SHOW
We simply have to disallow any kind of result set being sent back
  from a function. Can't see any way to make that to work.
2005-04-26 17:31:59 +02:00
acurtis@xiphis.org
8689083aca Bug#9775 - Stored procedures: crash if create function that returns enum or set
Fix bug and implement return type casting.
2005-04-20 18:08:42 +01:00
ramil@mysql.com
775010a40d A fix (bug #9837: round(1, 6) delivers wrong value in create table context). 2005-04-19 14:44:54 +05:00
bar@eagle.intranet.mysql.r18.ru
8e028d2f88 item_func.cc:
Post merge additional fix for DECIMAL type:
  Bugs: #9425: A user variable doesn't always have implicit coercibility
2005-03-28 14:15:43 +05:00
bar@eagle.intranet.mysql.r18.ru
ef81035ff4 Merge eagle.intranet.mysql.r18.ru:/home/bar/mysql-4.1
into eagle.intranet.mysql.r18.ru:/home/bar/mysql-5.0
2005-03-28 14:08:25 +05:00
bar@mysql.com
e60daecc87 Bug#9425 A user variable doesn't always have implicit coercibility
Coercibility fixes for numeric types and not defined values were done.
2005-03-28 14:01:57 +05:00
jimw@mysql.com
9307f61cb2 Clarify comment to add which version of the C compiler for AIX needs to have
some code in a specific order.
2005-03-23 17:27:52 -08:00
jimw@mysql.com
4c67678f15 Fix Windows compile warnings, declarations of walk functions 2005-03-22 00:00:24 +01:00
jimw@mysql.com
ee2b4ec959 Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
2005-03-18 16:12:25 -08:00
gluh@gluh.mysql.r18.ru
b435d6e862 Merge 4.1 -> 5.0 2005-03-17 16:51:07 +03:00
monty@mysql.com
f42941073d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-03-16 22:59:06 +02:00
monty@mysql.com
594ef41b2d Cleanup during reviews
Removed some optional arguments
Fixed portability problem in federated tests
2005-03-16 16:11:01 +02:00
bar@mysql.com
a7b877df78 Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY()
not always correct for NULL values.
Now they always result a non NULL value even
the argument is NULL. It is more usefull for 
debugging purposes.
2005-03-16 17:44:29 +04:00