Commit graph

268 commits

Author SHA1 Message Date
sergefp@mysql.com
fb0845f848 Post WL#2126 fixes:
* remove get_next_init and move its functionality to QUICK_RANGE_SELECT::reset()
 * added more comments
 * added empty FT_SELECT::reset()
2004-12-29 16:07:27 +03:00
ingo@mysql.com
60e35755ef WL#2126 - Multi_read_range.
Added the required structures and functions for
handing over multiple key ranges to the table handler.
2004-12-23 21:45:10 +01:00
sergefp@mysql.com
88b63ab669 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/dbdata/psergey/mysql-5.0-nov-clean
2004-12-21 02:28:12 +03:00
monty@mysql.com
6477b4dfd2 Merge with global tree
Fixed some found bugs in BIT fields
Added more test cases for BIT fields and varchar
2004-12-19 20:25:19 +02:00
monty@mysql.com
3fb088a075 Add 0x before pointers (to help with debugging)
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
2004-12-18 05:19:21 +02:00
monty@mysql.com
77207d19f2 Merge with new VARCHAR code 2004-12-06 19:18:35 +02:00
monty@mysql.com
67ce247965 Add support for up to VARCHAR (size up to 65535)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
2004-12-06 02:00:37 +02:00
sergefp@mysql.com
10fda3160c Fix for division by zero problem:
* Don't try building ROR-intersect if the queried table has zero rows
 * Don't ever produce an estimate of zero returned rows.
2004-11-28 21:02:30 +03:00
serg@serg.mylan
f09429a4df protection: TRASH in delete
fixed a bug that it discovered
2004-11-28 15:53:17 +01:00
serg@serg.mylan
a8b3a0bbe8 don't crash when trp=0 2004-11-23 16:28:51 +01:00
sergefp@mysql.com
f8b45c6dfc Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/dbdata/psergey/mysql-5.0-nov-clean
2004-11-21 11:58:19 +03:00
sergefp@mysql.com
e6a7386c12 Fix for BUG#4177:
* Make index merge quick selects code allow perform several scans.
 * Delay additional handler objects creation till row retrieval is started.
2004-11-21 11:51:19 +03:00
timour@mysql.com
0a11036e1c Fixed one warning and two errors reported by VC 6.0. 2004-11-18 11:24:18 +02:00
konstantin@mysql.com
ed2674d0a7 Fix warnings and compilation failures (Windows). 2004-11-17 13:45:05 +03:00
monty@mysql.com
2bba55b57f After merge fixes
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
2004-11-09 03:58:44 +02:00
monty@mysql.com
1087186657 Merge with 4.1 to get new thd->mem_root handling 2004-11-08 17:53:32 +02:00
monty@mysql.com
b903a129e2 Simpler arena swapping code
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
2004-11-08 01:13:54 +02:00
monty@mysql.com
071001950e Merge with 4.1 to get in latest bug fixes 2004-11-04 15:06:24 +02:00
bar@mysql.com
45451568bf opt_range.cc, range.result, range.test:
Bug #6045: Binary Comparison regression in MySQL 4.1
  Binary searches didn't use a case insensitive index, now they do.
2004-11-03 15:22:33 +04:00
monty@mysql.com
7d3be517a4 Merge on pull 2004-11-03 13:01:38 +02:00
monty@mysql.com
47bbf768d4 Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
2004-11-03 12:39:38 +02:00
timour@mysql.com
157dfcf4a4 Minor fixes of the patch for BUG#6303 2004-11-01 10:12:39 +02:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
timour@mysql.com
b67f86728b Fix for BUG#6303 + fix for discovered bug with sub-queries when analyzin queries for MIN/MAX optimization (WL#1724). 2004-10-29 18:20:09 +03:00
igor@rurik.mysql.com
44b9faabb4 item_cmpfunc.h:
COND_EQUAL must be derived from Sql_alloc to simplify memory
  management for objects of this class.
  This fixes a leak in mysql-test-run noticed by PEM.
opt_range.cc:
  Fixed uninitialized min_max_range member the QUICK_GROUP_MIN_MAX_SELECT class.
2004-10-25 23:08:55 -07:00
igor@rurik.mysql.com
f0bc019c86 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2004-10-20 13:17:06 -07:00
igor@rurik.mysql.com
f64d88a9f3 opt_range.cc:
Post automerge correction.
2004-10-20 13:16:00 -07:00
ram@gw.mysql.r18.ru
7f884c1f34 code clean-up. 2004-10-20 21:50:55 +05:00
ram@gw.mysql.r18.ru
5c8a14e9b7 A fix (bug #6142: SELECT DISTINCT on key field crashes server) 2004-10-20 21:01:52 +05:00
igor@rurik.mysql.com
a03e5ad8e4 Merge for post-merge fixes for Item_equal patch. 2004-10-19 16:07:10 -07:00
igor@rurik.mysql.com
4c8e391718 table.h, sql_select.h:
Added the code processing on expressions for applying
  multiple equalities.
sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
Many files:
  Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
item.h, item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
2004-10-19 14:12:55 -07:00
serg@serg.mylan
5fd2c489fb compatibility fix
test results corrected
2004-10-18 15:32:06 +02:00
timour@mysql.com
7f55e8eab2 Fixed compilation problem due to WL#1724 code inside #ifndef DBUG_OFF ... #endif. 2004-10-13 16:36:04 +03:00
timour@mysql.com
f23b30a606 Renamed formal parameters of constructors so that they are different from class memebers. 2004-10-12 16:59:15 +03:00
timour@mysql.com
8ab4a7a101 Merge with implementation of WL#1724. 2004-10-11 10:47:08 +03:00
timour@mysql.com
a19eee45f4 Manual merge with implementation for WL#1724 2004-10-11 10:17:17 +03:00
timour@mysql.com
f2a78b13b2 Fixes for WL#1724 required by the third code review. 2004-10-11 08:28:30 +03:00
bell@sanja.is.com.ua
41ddca4d68 prevent substituting Item_ref as VIEW fields in WHERE conditions (BUG#5969)
prevent filling temporary tables of views on list fields command
2004-10-10 11:01:05 +03:00
igor@rurik.mysql.com
71f6ab7a09 Merge for Item_equal. 2004-10-09 10:34:13 -07:00
magnus@neptunus.(none)
ac9016df91 Initialise "sorted" variable in constructor of QUICK_SELECT. The variable is set to 1 in test_if_skip_sort_order if we decide to optimize "order by" by uinsg index_read. 2004-10-07 11:57:48 +02:00
monty@mishka.local
f2941380c4 Strict mode & better warnings
Under strict mode MySQL will generate an error message if there was any conversion when assigning data to a field.
Added checking of date/datetime fields.
If strict mode, give error if we have not given value to field without a default value (for INSERT)
2004-09-28 20:08:00 +03:00
dlenev@brandersnatch.localdomain
f5d1b711c6 Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work
with memory roots in THD/Statement/Item_arena.
Added assertions preventing memory allocation on bzero'ed MEM_ROOT since it is worked by 
pure luck and was very ineffective.
2004-09-23 13:48:17 +04:00
monty@mishka.local
095f7e8740 Removed wrong warnings in test suite (This was because select_insert / select_create results was not freed.
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early
2004-09-17 03:08:23 +03:00
timour@mysql.com
e76e617e01 Implementation of the last review comments for WL#1724
"Min/Max Optimization for Queries with Group By Clause"
2004-09-10 04:45:15 +03:00
monty@mysql.com
f2829d0386 After merge fixes of merge with 4.1 that included the new arena code.
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
serg@serg.mylan
62c2f1c161 sql_print_error cleanup 2004-09-04 20:17:09 +02:00
timour@mysql.com
e2cd3dd1ce WL#1724 "Min/Max Optimization for Queries with Group By Clause"
- after-review changes
- merged with the source tree from 204-08-27
2004-08-27 16:37:13 +03:00
ram@gw.mysql.r18.ru
49868b9fd4 Should check for GEOM_FLAG later because keyX may be partly initialized (min_flag is not set). 2004-08-26 17:43:08 +05:00
ram@gw.mysql.r18.ru
2133721ac6 A fix (Bug#5219: Cannot use '||' with MBRContains(..)). 2004-08-26 16:51:26 +05:00