1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
gkodinov@mysql.com 9ec681ef35 Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
'SELECT DISTINCT a,b FROM t1' should not use temp table if there is unique 
index (or primary key) on a.
There are a number of other similar cases that can be calculated without the
use of a temp table : multi-part unique indexes, primary keys or using GROUP BY 
instead of DISTINCT.
When a GROUP BY/DISTINCT clause contains all key parts of a unique
index, then it is guaranteed that the fields of the clause will be
unique, therefore we can optimize away GROUP BY/DISTINCT altogether.
This optimization has two effects:
* there is no need to create a temporary table to compute the
   GROUP/DISTINCT operation (or the temporary table will be smaller if only GROUP 
   is removed and DISTINCT stays or if DISTINCT is removed and GROUP BY stays)
* this causes the statement in effect to become updatable in Connector/Java
because the result set columns will be direct reference to the primary key of 
the table (instead to the temporary table that it currently references). 

Implemented a check that will optimize away GROUP BY/DISTINCT for queries like 
the above.
Currently it will work only for single non-constant table in the FROM clause.
2006-06-27 17:40:19 +03:00
2006-06-17 15:37:23 +02:00
2005-09-24 15:51:45 +02:00
2005-07-05 23:24:48 +02:00
2006-04-06 11:47:46 +05:00
2005-09-24 15:51:45 +02:00
2005-07-05 23:24:48 +02:00
2006-06-17 15:37:23 +02:00
2005-09-29 02:08:24 +02:00
2005-09-24 15:51:45 +02:00
2005-09-29 02:08:24 +02:00
2006-06-17 11:33:34 +02:00
2005-09-24 15:51:45 +02:00
2006-06-20 19:57:21 -07:00
2005-07-05 23:24:48 +02:00
2005-12-15 02:11:21 -03:00
2000-07-31 21:29:14 +02:00
2006-05-25 11:36:29 -07:00
2006-05-25 11:36:29 -07:00
2004-02-17 21:46:40 +01:00
2006-05-25 11:36:29 -07:00
2000-07-31 21:29:14 +02:00
2006-04-01 04:13:33 +02:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file.
- For commercial distributions, see the MySQLEULA.txt file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

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

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.
Description
Сервер MariaDB - это разработанный сообществом форк сервера MySQL
https://mariadb.org Readme 2 GiB
Languages
MariaDB\ 71.9%
C++ 16.2%
C 10.5%
Shell 0.5%
Perl 0.4%
Other 0.3%