Commit graph

86 commits

Author SHA1 Message Date
gkodinov/kgeorge@rakia.gmz
47c044e418 Merge bk-internal:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/work/B15439-5.0-opt
2007-01-03 18:29:39 +02:00
gkodinov/kgeorge@rakia.gmz
770608cf26 sql_udf.cc:
Addendum to the fix for bug#15439 : valgrind pb failed
2007-01-03 18:26:39 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
79361c655a Merge mysql.com:/d2/hf/common/my50-common
into  mysql.com:/d2/hf/opt/my50-opt
2007-01-03 11:13:01 +04:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
gkodinov/kgeorge@macbook.gmz
d56d3a6971 Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case 
insensitive (or whatever the default charset is), whereas finding and 
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table.
2006-12-15 11:38:30 +02:00
msvensson@neptunus.(none)
c83b9a5c1e Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-18 09:32:49 +02:00
msvensson@neptunus.(none)
0efd88bd25 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-10 12:48:09 +02:00
kostja@bodhi.local
2ab1e065e4 Fix compiler warnings in sql_udf.h: ISO C++ forbids casting
between pointer to function and pointer to object.
2006-07-09 13:03:51 +04:00
konstantin@mysql.com
117b76a562 A fix and a test case for
Bug#19022 "Memory bug when switching db during trigger execution"
 Bug#17199 "Problem when view calls function from another database."
 Bug#18444 "Fully qualified stored function names don't work correctly in
            SELECT statements"

 Documentation note: this patch introduces a change in behaviour of prepared
 statements.

 This patch adds a few new invariants with regard to how THD::db should
 be used. These invariants should be preserved in future:

  - one should never refer to THD::db by pointer and always make a deep copy
    (strmake, strdup)
  - one should never compare two databases by pointer, but use strncmp or
    my_strncasecmp
  - TABLE_LIST object table->db should be always initialized in the parser or
    by creator of the object.

    For prepared statements it means that if the current database is changed
    after a statement is prepared, the database that was current at prepare
    remains active. This also means that you can not prepare a statement that
    implicitly refers to the current database if the latter is not set.
    This is not documented, and therefore needs documentation. This is NOT a
    change in behavior for almost all SQL statements except:
     - ALTER TABLE t1 RENAME t2 
     - OPTIMIZE TABLE t1
     - ANALYZE TABLE t1
     - TRUNCATE TABLE t1 --
     until this patch t1 or t2 could be evaluated at the first execution of
     prepared statement. 

     CURRENT_DATABASE() still works OK and is evaluated at every execution
     of prepared statement.

     Note, that in stored routines this is not an issue as the default
     database is the database of the stored procedure and "use" statement
     is prohibited in stored routines.

  This patch makes obsolete the use of check_db_used (it was never used in the
  old code too) and all other places that check for table->db and assign it
  from THD::db if it's NULL, except the parser.

 How this patch was created: THD::{db,db_length} were replaced with a
 LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
 manually checked and:
  - if the place uses thd->db by pointer, it was fixed to make a deep copy
  - if a place compared two db pointers, it was fixed to compare them by value
    (via strcmp/my_strcasecmp, whatever was approproate)
 Then this intermediate patch was used to write a smaller patch that does the
 same thing but without a rename.

 TODO in 5.1:
   - remove check_db_used
   - deploy THD::set_db in mysql_change_db

 See also comments to individual files.
2006-06-27 00:47:52 +04:00
msvensson@neptunus.(none)
2e0cad5404 Bug#20159 Inconsistant generation of generic error messages
- Use hardcoded error message instead of ER_GET_ERRNO
2006-06-07 14:07:11 +02:00
msvensson@neptunus.(none)
0811648e31 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug11835/my50-bug11835
2006-03-20 21:35:05 +01:00
msvensson@devsrv-b.mysql.com
1ab7d91003 Bug#17261 Passing a variable from a stored procedure to UDF crashes mysqld
- Update of test toolsand Makefiles to make it possible to test always test udf's as part 
of the mysql test suite
2006-03-10 10:41:04 +01:00
SergeyV@selena.
78b33e1835 Fixes bug #17595. UDFs are not initialized when running mysqld with
--skip-grant-tables. However when deleting functions UDFs list was checked
regardless of whther UDFs are initialized or not. Additional check is added
into free_udf() and find_udf() functions to prevent possible runtime errors.
2006-02-27 16:27:34 +03:00
konstantin@mysql.com
b1d951d462 Always initialize THD::thread_stack: it's used in
check_stack_overrun().
2005-11-23 21:18:10 +03:00
monty@mishka.mysql.fi
f348f62cc3 Added option --valgrind-mysqltest to mysql-test-run
Added flag to Field::store(longlong) to specify if value is unsigned.
This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
Fixed warning from valgrind in CREATE ... SELECT
Fixed double free of mysql.options if reconnect failed
2005-09-14 01:41:44 +03:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03: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
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
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +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
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +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
reggie@mdk10.(none)
9a1daa6957 Merge mdk10.(none):/home/reggie/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/mysql-5.0
2005-05-19 15:50:44 -05:00
reggie@mdk10.(none)
b5a60fe2a8 This fixed a compile problem on Windows
sql_udf.cc:
  changed dl_name to udf->dl in mysql_create_function
2005-05-19 15:18:49 -05:00
serg@serg.mylan
23a59c9857 merged 2005-05-19 15:20:10 +02:00
serg@serg.mylan
541ff258bf after merge fix 2005-05-19 09:47:13 +02:00
serg@serg.mylan
8044488d7c merged 2005-05-18 22:14:08 +02:00
serg@serg.mylan
50d369bb43 udf: when banning paths from soname in CREATE FUNCTION, check for \ on windows.
when reporting an error, use an appropriate buffer for udf->name
2005-05-18 21:31:39 +02:00
acurtis@xiphis.org
dcc40a080d Merge xiphis.org:/var/db/bk/work-acurtis/bug6776.1
into xiphis.org:/var/db/bk/work-acurtis/bug6776.2
2005-04-09 00:36:08 +01:00
acurtis@xiphis.org
0998ec4264 Fix typos in Bug#6776 2005-04-09 00:21:51 +01:00
acurtis@xiphis.org
e82edda6c6 Merge xiphis.org:/var/db/bk/work-acurtis/bug6776
into xiphis.org:/var/db/bk/work-acurtis/bug6776.1
2005-04-08 21:40:50 +01:00
monty@mysql.com
dd4db08438 Code cleanups during review of pushed code 2005-03-15 16:07:28 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
5eb393973f Bug#6776
Failure to delete rows from mysql.func table caused by missing
  charset conversion for index read by pk.
2005-03-07 13:37:10 +00:00
paul@frost.snake.net
e25a5877e0 sql_udf.cc:
Comment changes: use standard style; fix grammar.
2005-03-05 12:42:05 -06:00
ingo@mysql.com
212388bd3c Merge with after merge fix 2005-03-04 11:37:45 +01:00
serg@serg.mylan
3de51f273b after merge fixes 2005-03-03 23:57:48 +01:00
serg@serg.mylan
e47d0a0e2d merge 2005-03-03 23:07:20 +01:00
serg@serg.mylan
8d9a53a78c Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it) 2005-03-03 19:51:29 +01:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
bell@sanja.is.com.ua
4714a6e744 errors without code removed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
2004-10-20 04:04:37 +03:00
serg@serg.mylan
62c2f1c161 sql_print_error cleanup 2004-09-04 20:17:09 +02:00
gluh@gluh.mysql.r18.ru
e9341da7e7 Fix for bug#1439 UDF Corruption 2004-03-19 14:35:00 +04:00
monty@mysql.com
ce14578909 Merge with 4.0.18 2004-02-11 00:06:46 +01:00
monty@mysql.com
7df839e757 Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461)
DROP DATABASE now assumes RAID directories are in hex. (Bug #2627)
Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506)
Test in configure if pthread_key_delete() exists (to fix compile problem on SCO) (Bug #2461)
2004-02-05 09:12:23 +01:00
bell@sanja.is.com.ua
2a9cd37cd6 now all tables of query are locked in one place (including derived tables)
fixed BUG#2120 and other problem with EXPLAINing derived tables
2004-02-01 15:30:32 +02:00
monty@mashka.mysql.fi
461d1627b3 merge with 4.0 for more memory allocation variables. 2003-10-13 15:50:30 +03:00
monty@mashka.mysql.fi
c95d142f8f Add new user variables for tuning memory usage:
query_alloc_block_size, query_prealloc_size, range_alloc_block_size,transaction_alloc_block_size and transaction_prealloc_size
Add more checks for "out of memory" detection in range optimization
2003-10-11 22:00:24 +03:00