Commit graph

71 commits

Author SHA1 Message Date
gkodinov/kgeorge@magare.gmz
d67cd9e8af Bug #31221: Optimizer incorrectly identifies impossible WHERE clause
No warning was generated when a TIMESTAMP with a non-zero time part
 was converted to a DATE value. This caused index lookup to assume
 that this is a valid conversion and was returning rows that match 
 a comparison between a TIMESTAMP value and a DATE keypart.
 Fixed by generating a warning on such a truncation.
2007-10-18 15:19:04 +03:00
msvensson@pilot.blaudden
c550a45522 Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Use mysql_system_tables.sql to create MySQL system tables in
   all places where we create them(mysql_install_db, mysql-test-run-pl
   and mysql_fix_privilege_tables.sql)
2007-02-26 11:49:24 +01:00
kostja@bodhi.local
f22a4ce1a1 A fix and a test case for Bug#21002 "Derived table not selecting from a
"real" table fails in JOINs".

This is a regression caused by the fix for Bug 18444. 
This fix removed the assignment of empty_c_string to table->db performed 
in add_table_to_list, as neither me nor anyone else knew what it was 
there for. Now we know it and it's covered with tests: the only case 
when a table database name can be empty is when the table is a derived 
table. The fix puts the assignment back but makes it a bit more explicit.

Additionally, finally drop sp.result.orig which was checked in by mistake.
2006-07-19 22:33:19 +04:00
acurtis@xiphis.org
e3972e23bb Bug#10586
regression test
2005-09-08 18:15:05 +01:00
evgen@moonbone.local
5dc75a559d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11864
2005-08-15 13:21:55 +04:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03:00
evgen@moonbone.local
baf0c9ad08 Fix bug #11864 non unique names are allowed in subquery
Column names weren't checked for uniqueness for subqueries.

Code for names uniqueness checking used for view creation moved into 
separate function named check_duplicate_names(). It's called on 
preparation of subqueries to check uniqueness of names. If duplicate names 
are found then error is raised.
2005-08-10 17:45:00 +04:00
monty@mysql.com
e2ea35ec67 Merge with 4.1 2005-02-22 15:47:00 +02:00
bell@sanja.is.com.ua
2d3076b69d removed wrong distinct UNION detection (BUG#6565) 2005-02-14 02:06:21 +02:00
monty@mysql.com
b233ddba8e After merge fixes 2005-02-03 18:00:50 +02:00
monty@mysql.com
422c2eb868 4.1 -> 5.0 merge 2005-02-03 13:18:30 +02:00
bell@sanja.is.com.ua
3bd203d3f6 fixed problem with distinct select with grouping and subqueries (BUG#7946) 2005-01-20 13:56:22 +02:00
dlenev@brandersnatch.localdomain
d65e78b527 Added test which covers nicely recent cleanup in derived tables
processing.
2004-12-20 09:55:06 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
sergefp@mysql.com
f874071a26 Range optimizer fix:
If cost(full_scan_on_shortest_covering_index) < cost(best_range_scan) <  cost(full_table_scan)
  use full_scan_on_shortest_covering_index
(before this fix best_range_scan was used)
2004-06-22 04:47:28 +04:00
paul@ice.snake.net
fd1d01e098 Language/consistency edits to error messages
and affected test results.
2004-06-15 22:18:20 -05:00
paul@kite-hub.kitebird.com
f4dbb250fd Language/consistency edits to error messages
and affected test results.
2004-06-15 15:38:36 -05:00
bell@sanja.is.com.ua
d42d709171 after review changes 2004-05-19 17:07:28 +03:00
bell@sanja.is.com.ua
3aae50e8c0 EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639)
EXPLAIN of hidden SELECT of UNION
2004-05-06 20:40:21 +03:00
monty@mysql.com
a5d8b846fa after merge fixes 2004-05-05 21:24:21 +03:00
monty@mysql.com
b6e5c23c26 Ensure that we use unix file format (no \r\n) for all new files
Portability fixes
2004-03-20 12:48:14 +02:00
bell@sanja.is.com.ua
c9938b9dff merge 2004-03-16 17:35:49 +02:00
serg@serg.mylan
15249d6a72 bug#2708
test results updated
2004-02-15 20:36:12 +01:00
bell@sanja.is.com.ua
ff0a6e9686 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1
2004-02-09 15:01:51 +02:00
bell@sanja.is.com.ua
74a9ca1991 ufter revview fix (BUG#2120) 2004-02-09 14:44:03 +02:00
monty@mysql.com
06432eac36 Added --compact to mysqlbinlog
Fixed output from mysqlbinlog when using --skip-comments
Fixed warnings from valgrind
Fixed ref_length when used with HEAP tables
More efficent need_conversion()
Fixed error handling in UPDATE with not updateable tables
Fixed bug in null handling in CAST to signed/unsigned
2004-02-09 12:31:03 +01:00
bell@sanja.is.com.ua
7593d8a056 fixed parsing mode for derived tables (BUG#2421) 2004-02-02 14:58:36 +02:00
bell@sanja.is.com.ua
f9af8578bc make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge)
2004-02-01 20:07:44 +02: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
serg@serg.mylan
b68a83a050 patch reverted - USE_RAID is defined in my_config.h 2004-01-23 11:56:37 +01:00
bell@sanja.is.com.ua
03d7217f77 Merge 2004-01-20 19:23:28 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
aa31e98c90 Fix deprecation warning - database_engine => storage_engine 2004-01-18 22:30:35 +00:00
bell@sanja.is.com.ua
16f2e3d78d new test added
test fixed
2004-01-17 15:28:20 +02:00
bell@sanja.is.com.ua
4714f690f1 assigned correct lex->current_select for derived tables (BUG#2349)
moved LIMIT initialialization, because it is need only for single select derived table
2004-01-14 15:15:42 +02:00
bell@sanja.is.com.ua
501ae0bc52 allow UPDATE and DELETE stetements with tables derived from subquery if they are not updated (BUG#2117)
allow delete table by alias in multi-delete statement
2004-01-04 23:44:33 +02:00
hf@deer.(none)
eb08458c55 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.1727
2003-11-21 11:58:28 +04:00
monty@mashka.mysql.fi
cab1dc628c CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTS
New multi-key-cache handling. This was needed becasue the old one didn't work reliable with MERGE tables.
ALTER TABLE table_name ... CHARACTER SET  ... now changes all char/varchar/text columns to the given character set
(One must use ALTER TABLE ... DEFAULT CHARACTER SET ... to change the default character set)
Fixed that have_compress is detected properly (fixes problems with func_compress.test on platforms without zlib)
New syntax for CACHE INDEX ('keys' is optional if no index name is given and one mentions the key cache name only ones)
Removed compiler warnings
Added mysql_set_server_option() to allow clients like PHP to easaily set/reset the multi-statement flag.
2003-11-18 13:47:27 +02:00
hf@deer.(none)
a88f4ea30f Fix for bug #1727 ( Crash in EXPLAIN & UNION & derived)
another version of the fix.
Here i removed a loop that seems to be superfluous
2003-11-08 16:43:16 +04:00
bell@sanja.is.com.ua
5ad2f38f5d amall fix 2003-10-31 11:52:01 +02:00
bell@sanja.is.com.ua
9d294b869e correct table name assigned to temporary table field:
- correct table name shown in EXPLAIN Iindex reference)
 - pointer on freed memmory (reallocation of table name in reusing table entry) can't be used in EXPLAIN
(BUG#1584)
2003-10-19 14:25:33 +03:00
bell@laptop.sanja.is.com.ua
16733e423e prohibited using derived tables in UPDATE command (BUG#1477)
fixed incorrect table name in test
2003-10-05 21:09:50 +03:00
Sinisa@sinisa.nasamreza.org
a424ccee17 Fix for a bug #1231
Parse error caused global ORDER BY to be initialized although it should
not have been.
2003-09-12 19:17:30 +03:00
gluh@gluh.mysql.r18.ru
548d7dc948 Fix for bug 1176 2003-09-04 17:12:20 +05:00
bell@sanja.is.com.ua
b6a8d68ae4 fixed problem with reference on derived table fields (BUG#1031) 2003-08-12 15:04:49 +03:00
bell@sanja.is.com.ua
da8ab7dd52 test for BUG#969 2003-08-09 17:10:58 +03:00
Sinisa@sinisa.nasamreza.org
19a17f602f Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2003-06-10 15:21:19 +03:00
monty@narttu.mysql.fi
23145cfed7 Added SQLSTATE to client/server protocol
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
2003-06-04 18:28:51 +03:00
Sinisa@sinisa.nasamreza.org
90b6af3da0 Fix for the optimiser problem caused by the fact that with derived
tables one (or more tables) is opened / closed twice.
2003-05-31 18:31:57 +03:00
Sinisa@sinisa.nasamreza.org
47f67214d9 A fix for a crashing bug in EXPLAIN on derived tables with a join. 2003-04-10 21:05:28 +03:00
Sinisa@sinisa.nasamreza.org
d6923a6c10 Adding tests for the fixed ORDER BY 0 bug 2003-03-10 17:07:39 +02:00