Commit graph

58067 commits

Author SHA1 Message Date
Sergey Petrunya
d762bf21cc MWL#17: Table-elimination
- Addressing review feedback, generation 4.

include/my_global.h:
  Make ALIGN_PTR's action correspond to that of ALIGN_SIZE
sql/item.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item.h:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_cmpfunc.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_subselect.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_subselect.h:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/opt_table_elimination.cc:
  MWL#17: Table-elimination
  - Addressing review feedback, generation 4: abstract everything in case
    we would need to change it for something else in the future.
sql/sql_list.h:
  MWL#17: Table-elimination
  - Introduce exchange_sort(List<T> ...) template function
sql/sql_select.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
2009-09-01 00:02:09 +04:00
Sergey Petrunya
005c24e973 MWL#17: Table elimination:
- Fix a trivial problem when OR-merging two multi-equalities
- Amend testsuite to provide full gcov coverage

mysql-test/r/table_elim.result:
  MWL#17: Table elimination:
  - Amend testsuite to provide full gcov coverage
mysql-test/t/table_elim.test:
  MWL#17: Table elimination:
  - Amend testsuite to provide full gcov coverage
2009-08-27 01:01:40 +04:00
Sergey Petrunya
c483437781 Gcov support improvements
- add process-gcov-annotations.pl script that processes .gcov files 
  according to purecov annotations in source code
- add --gcov-src-dir=subdir option to mysql-test-run so that one can
  do gcov processing only for source files in a certain directory.
2009-08-25 18:02:55 +03:00
Sergey Petrunya
0e7a18e4a8 MWL#17: Table elimination
- Mark gcov deadcode
2009-08-25 17:59:15 +03:00
Sergey Petrunya
de41681afa MWL#17: Table elimination
- More test coverage
- Remove unused code
2009-08-25 13:38:22 +03:00
Sergey Petrunya
9400700b99 MWL#17: Table elimination
- Add more testcases.
- Fix trivial compile failure
- Remove handling of "column IN (one_element)". This is converted to equality 
  elsewhere

mysql-test/r/table_elim.result:
  MWL#17: Table elimination
  - Add more testcases.
  - Fix trivial compile failure
mysql-test/t/table_elim.test:
  MWL#17: Table elimination
  - Add more testcases
sql/mysqld.cc:
  MWL#17: Table elimination
  - Fix trivial compile failure
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Add more testcases.
  - Remove handling of "column IN (one_element)".This is converted to equality 
    elsewhere
2009-08-25 12:27:50 +03:00
Sergey Petrunya
d294aae6c8 MWL#17: Table elimination: last fixes
- Add an @@optimizer_switch flag for table_elimination for debug build
- Better comments 

mysql-test/t/index_merge_myisam.test:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
sql/mysql_priv.h:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
sql/mysqld.cc:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
2009-08-24 22:10:48 +03:00
Sergey Petrunya
21d2573908 MWL#17: Table elimination
- Correctly handle the case where we have multi-table DELETE and a table
  that we're deleting from looks like it could be eliminated.
2009-08-24 10:12:42 +02:00
Sergey Petrunya
f3d0b1c04e MWL#17: Table elimination
- Remove a piece of code that's not needed anymore.
2009-08-21 15:36:06 +02:00
Sergey Petrunya
9c1336801e MWL#17: Table elimination
- More testcases
- Set correct dependencies for non-bound multi-equalities.

mysql-test/r/table_elim.result:
  MWL#17: Table elimination
  - More testcases
mysql-test/t/table_elim.test:
  MWL#17: Table elimination
  - More testcases
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Set correct dependencies for non-bound multi-equalities.
2009-08-21 09:48:22 +02:00
Sergey Petrunya
3f5b494900 MWL#17: Table elimination
- Multiple-equality handling
2009-08-20 17:51:02 +02:00
Sergey Petrunya
46c9677628 Variable/function renames 2009-08-19 15:06:59 +03:00
Sergey Petrunya
c54370d3ff MWL#17: Table elimination
- Use Table_elimination only for functional dependency checking for
  individual objects and rename it to Func_dep_analyzer
2009-08-19 13:18:38 +03:00
Sergey Petrunya
eed5a47c34 More code cleanups 2009-08-19 01:19:48 +03:00
Sergey Petrunya
1396c2d2fa MWL#17: Table elimination
- Better comments
- Switch from "type" enum and switch to virtual functions for member funcs.
2009-08-19 00:18:10 +03:00
Sergey Petrunya
307a6ba5ee MWL#17: Table elimination
- Code cleanup
2009-08-18 18:01:51 +03:00
Sergey Petrunya
c1b69e72eb MWL#17: Table elimination
- Switch from trying to eliminate all tables at once (which didn't work)
  to the original approach of bottom-up elimination.
2009-08-18 16:03:58 +03:00
Sergey Petrunya
049c87fc2e MWL#17: Table elimination
- More testcases
2009-08-17 19:07:24 +03:00
Sergey Petrunya
441434e565 MWL#17: Table elimination
- More dbug printouts
- More testcases
2009-08-17 18:02:29 +03:00
Sergey Petrunya
a14b5d2466 MWL#17: Table elimination
- More comments
2009-08-16 21:01:59 +03:00
Sergey Petrunya
69d4559eed MWL#17: Table elimination
- Better comments
- More OOM checks

sql/sql_select.cc:
  - Remove garbage code
2009-08-16 17:35:47 +03:00
Sergey Petrunya
e845f0f82f - Better comments
- Add OOM error checking
2009-08-16 15:43:31 +03:00
Sergey Petrunya
f260de5c07 MWL#17: Table elimination
- Address review feedback: change expression analyzer used to be a copy-paste
  of ref analyzer. ref analyzer, besides doing ref analysis, also collected 
  info about keys which had sargable predicates. We didn't need that part here.
2009-08-16 15:17:08 +03:00
Sergey Petrunya
b70cb552e5 MWL#17: Table elimination
- code cleanup
2009-08-16 12:15:49 +03:00
Sergey Petrunya
8c00930642 MWL#17: Table elimination
- Fix trivial valgrind failures that shown up after review
2009-08-16 10:25:24 +03:00
Sergey Petrunya
405a36ae39 MWL#17: Table elimination
- Review feedback, more variable renames
2009-08-15 18:39:12 +03:00
Sergey Petrunya
76071c8fbd Fix trivial typo 2009-08-15 16:14:42 +04:00
Sergey Petrunya
85b63c1e67 MWL#17: Table elimination
Continue with addressing review feedback part two: 
- rename enum members
- add checking for out of memory errors on allocation
2009-08-15 14:29:53 +04:00
Sergey Petrunya
ef67ab4d8b MWL#17: Address 2nd post-review feedback
- Switch from uniform graph to bipartite graph with two kinds of nodes:
  "values" (tables and fields) and "modules" (t.col=func(...) equalities, 
  multi-equalities, unique keys, inner sides of outer joins).
- Rename functions, classes, etc.
2009-08-15 10:08:03 +04:00
Sergey Petrunya
57c199d8d1 Merge maria-5.1 -> maria-5.1-table-elimination 2009-08-14 01:12:12 +04:00
Sergey Petrunya
fef409cb9e MWL#17: Table elimination
- More function renames, added comments
2009-08-14 00:44:52 +04:00
Sergey Petrunya
a28390364b MWL#17: Table elimination
- Better comments

sql/sql_select.cc:
  MWL#17: Table elimination
  - Fix buildbot failure: do set correct value to nested_join::n_tables
2009-08-13 23:10:53 +04:00
Sergey Petrunya
536754c8c6 MWL#17: Table elimination
Fixes after post-review fixes:
- Don't search for tables in JOIN_TAB array. it's not initialized yet.
  use select_lex->leaf_tables instead.
2009-08-13 13:36:13 +04:00
Sergey Petrunya
b3f18c8866 MWL#17: Table elimination
- Post-postreview changes fix: Do set NESTED_JOIN::n_tables to number of 
  tables left after elimination.
2009-08-13 13:24:02 +04:00
Sergey Petrunya
40bb97b525 MWL#17: Table elimination
- When making inferences "field is bound" -> "key is bound", do check 
  that the field is part of the key
2009-08-13 04:01:43 +04:00
Sergey Petrunya
b032c7d833 MWL#17: Table elimination
- Continue addressing review feedback: remove "unusable KEYUSEs" 
  extension as it is no longer needed.

sql/item.h:
  MWL#17: Table elimination
  - Code cleanup
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Code cleanup
2009-08-13 03:43:02 +04:00
Sergey Petrunya
854bb82bd8 MWL#17: Table elimination
Address review feedback: 
- Change from Wave-based approach (a-la const table detection) to 
  building and walking functional dependency graph.
- Change from piggy-backing on ref-access code and KEYUSE structures
  to using our own expression analyzer.


sql/item.cc:
  MWL#17: Table elimination
  - Move from C-ish Field_processor_info to C++ ish and generic Field_enumerator
sql/item.h:
  MWL#17: Table elimination
  - Move from C-ish Field_processor_info to C++ ish and generic Field_enumerator
sql/sql_bitmap.h:
  MWL#17: Table elimination
  - Backport of Table_map_iterator from 6.0
2009-08-13 02:34:21 +04:00
unknown
915a624cbc Add a new variant of dlclose() Valgrind suppressions to fix a Buildbot issue. 2009-08-05 09:21:37 +02:00
unknown
d5460e6864 Add a new variant of dlclose() Valgrind suppressions to fix a Buildbot issue. 2009-08-04 16:09:08 +02:00
unknown
916f5e1ed8 Merge XtraDB 6 with latest MariaDB 5.1 2009-08-03 22:19:12 +02:00
unknown
cb6a28aaf9 Merge XtraDB 6 into MariaDB. 2009-08-03 22:09:53 +02:00
unknown
237485ccd6 Add two bug fixes from xtradb6 tarball missing in release-6 bzr branch. 2009-08-03 09:14:02 +02:00
Vadim Tkachenko
9261d53c15 tag 1.0.6 2009-07-24 14:28:39 -07:00
Vadim Tkachenko
53a73c68a2 sync with extensions-1.0 2009-07-24 14:27:34 -07:00
Sergey Petrunya
5ecad03df9 MWL#17: Table elimination
- When collecting Item_subselect::refers_to, put references to the correct
  subselect entry.
2009-07-08 21:10:38 +04:00
unknown
51f3e0049f Solaris 10 build script fixes by Toby Thain.
Added build scripts for 32 bit x86 architecture on Solaris.
Renamed some scripts for consistency.
Changed to dynamic linking of libgcc.


BUILD/compile-solaris-amd64:
  Changed to dynamic linking of libgcc.
  
  The -static-libgcc was a legacy of the original build scripts. -R
  (analogous to -L link time search path) is a Solaris mechanism to
  ensure a needed lib directory is searched at runtime.
  
  In Solaris 10, gcc comes bundled, under /usr/sfw, allowing to use it without
  creating dependency problems. This allows eg. benefiting from ordinary system
  patch maintenance.
BUILD/compile-solaris-amd64-debug:
  Changed to dynamic linking of libgcc.
  
  The -static-libgcc was a legacy of the original build scripts. -R
  (analogous to -L link time search path) is a Solaris mechanism to
  ensure a needed lib directory is searched at runtime.
  
  In Solaris 10, gcc comes bundled, under /usr/sfw, allowing to use it without
  creating dependency problems. This allows eg. benefiting from ordinary system
  patch maintenance.
2009-07-07 13:19:24 +02:00
Vadim Tkachenko
d455680f34 sync with ext rev82 2009-07-05 22:47:15 -07:00
Michael Widenius
9db357e2bf Added MY_CS_NONASCII marker for character sets that are not compatible with latin1 for characters 0x00-0x7f
This allows us to skip and speed up some very common character converts that MySQL is doing when sending data to the client
and this gives us a nice speed increase for most queries that uses only characters in the range 0x00-0x7f.

This code is based on Alexander Barkov's code that he has done in MySQL 6.0


include/m_ctype.h:
  Added MY_CS_NONASCII marker
libmysqld/lib_sql.cc:
  Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
mysys/charset.c:
  Mark character sets with MY_CS_NONASCII
scripts/mysql_install_db.sh:
  Fixed messages to refer to MariaDB instead of MySQL
sql/protocol.cc:
  Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
sql/protocol.h:
  Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments
sql/sql_string.cc:
  Quicker copy of strings with no characters above 0x7f
strings/conf_to_src.c:
  Added printing of MY_CS_NONASCII
strings/ctype-extra.c:
  Mark incompatible character sets with MY_CS_NONASCII
  Removed duplicated character set geostd
strings/ctype-sjis.c:
  Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-uca.c:
  Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-ucs2.c:
  Mark incompatible character sets with MY_CS_NONASCII
strings/ctype-utf8.c:
  Mark incompatible character sets with MY_CS_NONASCII
strings/ctype.c:
  Added function to check if character set is compatible with latin1 in ranges 0x00-0x7f
2009-07-02 13:15:33 +03:00
Sergey Petrunya
7b3d464578 MWL#17: Table elimination
- More comments
- Renove old code
2009-06-30 17:20:18 +04:00
Sergey Petrunya
8156d9eb0a MWL#17: Table elimination
- Last fixes

sql/item.cc:
  MWL#17: Table elimination
  - Don't make multiple calls of ::walk(check_column_usage_processor),
    call once and cache the value
sql/item.h:
  MWL#17: Table elimination
  - s/KEYUSE::usable/KEYUSE::type/, more comments
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Don't make multiple calls of ::walk(check_column_usage_processor),
    call once and cache the value
sql/sql_select.cc:
  MWL#17: Table elimination
  - s/KEYUSE::usable/KEYUSE::type/, more comments
sql/sql_select.h:
  MWL#17: Table elimination
  - s/KEYUSE::usable/KEYUSE::type/, more comments
sql/table.h:
  MWL#17: Table elimination
  - Better comments
2009-06-30 17:11:00 +04:00