MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown 14b1f91ba4 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.


mysql-test/r/sp-error.result:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/r/sp.result:
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/r/trigger.result:
  Added several tests for triggers using tables.
mysql-test/t/sp-error.test:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/t/sp.test:
  Updated comment about recursive views to reflect current situation.
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/t/trigger.test:
  Added several tests for triggers using tables.
sql/item_func.cc:
  Item_func_sp::cleanup():
    By next statement execution stored function can be dropped or altered so
    we can't assume that sp_head object for it will be still valid.
sql/sp.cc:
  - Added Sroutine_hash_entry structure that represents element in the set of
    stored routines used by statement or routine. We can't as before use
    LEX_STRING for this purprose because we want link all elements of this set
    in list.
  - Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account
    that now we use one hash for stored routines used by statement instead of two
    and which mantains list linking all elelemnts in this hash.
  - Renamed sp_merge_hash() to sp_update_sp_used_routines().
  - Introduced sp_update_stmt_used_routines() for adding elements to the set of
    routines used by statement from another similar set for statement or routine.
    This function will also mantain list linking elements of destination set.
  - Now instead of one sp_cache_routines() function we have family of 
    sp_cache_routines_and_add_tables() functions which are also responsible for
    adding tables used by routines being cached to statement table list. Nice
    optimization - thanks to list linking all elements in the hash of routines
    used by statement we don't need to perform several iterations over this hash
    (as it was before in cases when we have added new elements to it).
sql/sp.h:
  Added declarations of functions used for manipulations with set (hash) of stored
  routines used by statement.
sql/sp_head.cc:
  sp_name::init_qname():
    Now sp_name also holds key identifying routine in the set (hash) of
    stored routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions 
  since now we don't have separate stage on which we add tables used by routines
  used by statement to table list for prelocking. We do it on the same stage as
  we load those routines in SP cache. So all this functionality moved to
  sp_cache_routines_and_add_tables() family of functions.
sql/sp_head.h:
  sp_name:
    Now this class also holds key identifying routine in the set (hash) of stored
    routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have
  separate stage on which we add tables used by routines used by statement to
  table list for prelocking. We do it on the same stage as we load those routines
  in SP cache.
sql/sql_base.cc:
  open_tables():
  - LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash.
  - 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. It is easy to do
    since all routines in the set of routines used by statement are linked in
    the list. This also allows us to calculate table list for prelocking more
    precisely.
  - Now triggers properly inform prelocking algorithm about tables they use.
sql/sql_lex.cc:
  lex_start():
    Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash.
    Added LEX::sroutines_list list linking all elements in this hash.
  st_lex::st_lex():
    Moved definition of LEX constructor to sql_lex.cc file to be able
    use sp_sroutine_key declaration from sp.h in it.
sql/sql_lex.h:
  LEX:
    Replaced two separate hashes for stored routines used by statement with one.
    Added list linking all elements in this hash to be able to iterate through all
    elements and add new elements to this hash at the same time.
    Moved constructor definition to sql_lex.cc.
sql/sql_parse.cc:
  mysql_execute_command():
    Replaced LEX::spfuns/spprocs with one LEX::sroutines hash.
sql/sql_trigger.cc:
  Added missing GNU GPL notice.
  Table_triggers_list::check_n_load()
    Added initialization of sroutines_key which stores key representing
    triggers of this table in the set (hash) of routines used by this statement.
sql/sql_trigger.h:
  Added missing GNU GPL notice.
  Table_triggers_list:
    Added sroutines_key member to store key representing triggers of this
    table in the set (hash) of routines used by this statement.
    Declared sp_cache_routines_and_add_tables_for_triggers() as friend since
    it needs access to sroutines_key and trigger bodies.
sql/sql_yacc.yy:
  - Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding
    elements to the set of stored routines used in statement.
  - Enabled support of subqueries as right sides in assignments to triggers' row
    accessors.
2005-07-09 21:51:59 +04:00
bdb sql/mysql_priv.h 2005-06-09 15:48:57 +02:00
BitKeeper merge 2005-06-14 00:05:27 +02:00
BUILD merge 2005-06-07 12:44:00 +10:00
client WL#2286 - Compile MySQL w/YASSL support 2005-06-12 18:18:46 +05:00
cmd-line-utils Merge bk-internal:/home/bk/mysql-4.1 2005-05-18 04:06:27 +02:00
config/ac-macros WL#2286 - Compile MySQL w/YASSL support 2005-06-12 18:18:46 +05:00
dbug Removed support for RAID, mit-threads, and MySQL FS (really, if someone wants this feature look at a web-dav hookup). 2005-03-16 16:22:56 -08:00
Docs - manual merge 2005-04-21 08:30:59 +02:00
extra WL#2286 - Compile MySQL w/YASSL support 2005-06-15 01:39:58 +05:00
heap fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
include Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-tmp 2005-06-10 20:12:45 +02:00
innobase os0sync.c, os0file.c: 2005-06-10 14:18:36 +03:00
libmysql merge 2005-06-05 17:19:50 +03:00
libmysql_r Removed support for RAID, mit-threads, and MySQL FS (really, if someone wants this feature look at a web-dav hookup). 2005-03-16 16:22:56 -08:00
libmysqld Merge bk-internal:/home/bk/mysql-5.0 2005-06-10 20:23:37 +02:00
man Merge with 4.1 2005-05-14 18:31:22 +03:00
myisam Merge mdk10.(none):/home/reggie/bk/mysql-4.1-base 2005-06-10 16:45:54 -05:00
myisammrg merged changes from 4.1 2005-05-23 12:55:39 -05:00
mysql-test Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers 2005-07-09 21:51:59 +04:00
mysys fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
ndb fix debug string in TR::report_disconnect 2005-06-16 14:21:48 +10:00
netware Fixes some of the failing test cases for Netware. 2005-06-15 10:25:03 +03:00
NEW-RPMS Import changeset 2000-07-31 21:29:14 +02:00
os2 Many files: 2005-01-01 20:54:45 +01:00
pstack few harmless warnings from automated code-checking tools fixed 2005-01-08 21:25:31 +01:00
regex regerror.c: 2005-04-25 16:53:47 -05:00
scripts - make sure to include mysql-test/t/*.sql files in the binary distributions and when 2005-06-08 11:49:24 +02:00
server-tools rename: store_to_string -> store_to_protocol_packet 2005-06-15 01:06:25 +04:00
sql Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers 2005-07-09 21:51:59 +04:00
sql-bench Cleanup during review 2005-06-05 17:01:20 +03:00
sql-common fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
SSL Added missing SSL library (Should be in source distribution) 2003-11-28 12:18:13 +02:00
strings Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0 2005-06-15 19:56:01 +05:00
support-files Merge mysql.com:/space/my/mysql-4.1 2005-06-15 00:57:23 +02:00
tests fix of BUG#11111 fix 2005-06-15 01:57:25 +03:00
tools WL#2286 - Compile MySQL w/YASSL support 2005-06-15 01:39:58 +05:00
VC++Files mysqld.dsp: 2005-06-10 04:09:42 +02:00
vio WL#2286 - Compile MySQL w/YASSL support 2005-06-12 18:18:46 +05:00
zlib upgrade zlib to 1.2.2 2005-03-23 21:08:13 +01:00
.bzrignore Fix for BUG#11211 "GROUP BY doesn't work correctly" 2005-06-15 10:12:49 +03:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
configure.in Merge mysql.com:/home/jimw/my/mysql-4.1-clean 2005-06-09 19:27:45 -07:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
Makefile.am - fixed the "test-force" target in the toplevel Makefile.am for systems on which 2005-05-27 19:20:29 +02:00
README Removed URL (website is not actively maintained anymore) 2002-04-24 08:28:50 +02:00

This is a release of MySQL, a GPL (free) SQL database server (more
licence information in the PUBLIC file and in the reference manual).

Please read the "Upgrading from..." section in the manual first, if you are
migrating from older versions of MySQL!

The latest information about MySQL can be found at:
http://www.mysql.com

To see what it can do take a look at the features section in the
manual.

For installation instructions see the Installation chapter in the
manual.

For future plans see the TODO appendix in the manual.

New features/bug fixes history is in the news appendix in the manual.

For the currently known bugs/misfeatures (known errors) see the bugs
appendix in the manual.

For examples of SQL and benchmarking information see the bench
directory.

The manual mentioned above can be found in the Docs directory. The
manual is available in the following formats: as plain ASCII text in
Docs/manual.txt, in HTML format in Docs/manual_toc.html, as GNU Info in
Docs/mysql.info and as PostScript in Docs/manual.ps.

MySQL is brought to you by the MySQL team at MySQL AB

For a list of developers and other contributors, see the Credits appendix
in the manual.

************************************************************

IMPORTANT:

Send bug (error) reports, questions and comments to the mailing list
at mysql@lists.mysql.com

Please use the 'mysqlbug' script when posting bug reports or questions
about MySQL. mysqlbug will gather some information about your system
and start your editor with a form in which you can describe your
problem. Bug reports might be silently ignored by the MySQL
maintainers if there is not a good reason included in the report as to
why mysqlbug has not been used. A report that says 'MySQL does not
work for me. Why?' is not considered a valid bug report.

The mysqlbug script can be found in the 'scripts' directory of the
distribution, that is '<where-you-installed-mysql>/scripts'.