- 15 Aug, 2009 3 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
Continue with addressing review feedback part two: - rename enum members - add checking for out of memory errors on allocation
-
Sergey Petrunya authored
- 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.
-
- 13 Aug, 2009 6 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
- More function renames, added comments
-
Sergey Petrunya authored
- Better comments sql/sql_select.cc: MWL#17: Table elimination - Fix buildbot failure: do set correct value to nested_join::n_tables
-
Sergey Petrunya authored
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.
-
Sergey Petrunya authored
- Post-postreview changes fix: Do set NESTED_JOIN::n_tables to number of tables left after elimination.
-
Sergey Petrunya authored
- When making inferences "field is bound" -> "key is bound", do check that the field is part of the key
-
- 12 Aug, 2009 2 commits
-
-
Sergey Petrunya authored
- 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
-
Sergey Petrunya authored
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
-
- 05 Aug, 2009 1 commit
-
-
unknown authored
-
- 04 Aug, 2009 1 commit
-
-
unknown authored
-
- 03 Aug, 2009 3 commits
- 24 Jul, 2009 2 commits
-
-
Vadim Tkachenko authored
-
Vadim Tkachenko authored
-
- 08 Jul, 2009 1 commit
-
-
Sergey Petrunya authored
- When collecting Item_subselect::refers_to, put references to the correct subselect entry.
-
- 07 Jul, 2009 1 commit
-
-
unknown authored
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.
-
- 06 Jul, 2009 1 commit
-
-
Vadim Tkachenko authored
-
- 02 Jul, 2009 1 commit
-
-
Michael Widenius authored
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
-
- 30 Jun, 2009 3 commits
-
-
Sergey Petrunya authored
- More comments - Renove old code
-
Sergey Petrunya authored
- 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
-
Michael Widenius authored
Changed default thread stack to 288K to get better memory missalignment between stacks of different threads (should speed up things) and to get a bit extra safety. In maria_open(), don't allocate big arrays on stack as this may lead to stack overflow. This fixes a valgrind warning detected by buildbot include/my_pthread.h: Changed default thread stack to 288K to get better memory missalignment between stacks of different threads (should speed up things) and to get a bit extra safety. storage/maria/ma_open.c: In maria_open(), don't allocate big arrays on stack as this may lead to stack overflow.
-
- 29 Jun, 2009 2 commits
-
-
Michael Widenius authored
- Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. - Extended the maximun key parts for an index from 16 to 32 - Extended MyISAM and Maria engines to support up to 32 parts Added checks for return value from ha_index_init() include/my_handler.h: Extended number of key parts for MyISAM and Maria from 16 to 32 include/my_pthread.h: Ensure we always have 256M of stack. (Required to be able to handle the current number of keys and key parts in MyISAM) mysql-test/r/create.result: Extended to test for 32 key parts mysql-test/r/myisam.result: Test that we can create 32 but not 33 key parts mysql-test/r/ps_1general.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_2myisam.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_3innodb.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_4heap.result: Length of ref is now 2048 as we can have more key parts mysql-test/r/ps_5merge.result: Length of ref is now 2048 as we can have more key parts mysql-test/suite/maria/r/maria.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/maria3.result: Max key length is now 1208 bytes mysql-test/suite/maria/r/ps_maria.result: Max key length is now 1208 byte mysql-test/t/create.test: Extended to test for 32 key parts mysql-test/t/myisam.test: Test that we can create 32 but not 33 key parts sql/handler.cc: Check return value from ha_index_init() sql/handler.h: Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place. sql/sql_select.cc: Checks all return values from ha_index_init() Call prepare_index_scan()) to inform storage engines that an index scan is about to take place. Fixed indentation sql/table.cc: Fixed wrong types for key_length (rest of code assumed this was 32 bit) sql/unireg.h: Extended the maximun key parts for an index from 16 to 32 storage/maria/ha_maria.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/ha_myisam.cc: Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack storage/myisam/mi_check.c: Fixed wrong check if value overflow tests/mysql_client_test.c: Added fflush() to fix output in case of error Fixed wrong check of 'ref' length in EXPLAIN
-
Sergey Petrunya authored
mysql-test/r/table_elim.result: MWL#17: Table elimination - More tests mysql-test/t/table_elim.test: MWL#17: Table elimination - More tests sql/opt_table_elimination.cc: MWL#17: Table elimination - Code cleanup sql/sql_select.cc: MWL#17: Table elimination - Code cleanup sql/sql_select.h: MWL#17: Table elimination - Code cleanup sql/table.h: MWL#17: Table elimination - Code cleanup
-
- 26 Jun, 2009 1 commit
-
-
Vadim Tkachenko authored
-
- 25 Jun, 2009 4 commits
-
-
Sergey Petrunia authored
- Better comments, variable/function renames
-
Sergey Petrunia authored
-
Sergey Petrunia authored
- Moved table elimination code to sql/opt_table_elimination.cc - Added comments .bzrignore: MWL#17: Table elimination - Moved table elimination code to sql/opt_table_elimination.cc libmysqld/Makefile.am: MWL#17: Table elimination - Moved table elimination code to sql/opt_table_elimination.cc sql/CMakeLists.txt: MWL#17: Table elimination - Moved table elimination code to sql/opt_table_elimination.cc sql/Makefile.am: MWL#17: Table elimination - Moved table elimination code to sql/opt_table_elimination.cc
-
Vadim Tkachenko authored
-
- 24 Jun, 2009 3 commits
-
-
Sergey Petrunia authored
- fix a typo bug in has_eqref_access_candidate() - Adjust test to remove race condition mysql-test/r/mysql-bug41486.result: Adjust test to remove race condition mysql-test/t/mysql-bug41486.test: Adjust test to remove race condition sql/item.cc: MWL#17: Table elimination: fix a typo bug in has_eqref_access_candidate()
-
http://bugs.mysql.com/bug.php?id=45632unknown authored
Fix of BUG#45632 (http://bugs.mysql.com/bug.php?id=45632) - sharing non default debug settings between sessions. This bugfix proposed by Monty. mysql-test/r/variables_debug.result: Test that sessions do not share the same session debug variable. mysql-test/t/variables_debug.test: Test that sessions do not share the same session debug variable. sql/set_var.cc: As soon as default setting are shared between sessions we should push dbug state before changing debug setting first time.
-
Sergey Petrunia authored
-
- 23 Jun, 2009 2 commits
-
-
Sergey Petrunia authored
- More testcases - Let add_ft_key() set keyuse->usable 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/sql_select.cc: MWL#17: Table elimination - Let add_ft_key() set keyuse->usable
-
unknown authored
Fix sleep() synchronisation in innodb_information_schema test case. mysql-test/t/innodb_information_schema.test: Using sleep for synchronisation does not work!!! Replace by looping until the required condition is met. sql-common/client.c: mysql_ssl_set() did not free old pointers before overwriting with new ones (happens when mysql_ssl_set() is called twice without calling mysql_close() in-between). This sometimes caused memory leaks in the slave depending on exact timing of master/slave shutdown. Fixed by freeing old pointers before installing new ones in mysql_ssl_set(), just like mysql_options() does.
-
- 22 Jun, 2009 2 commits
-
-
Sergey Petrunia authored
- Make elimination check to be able detect cases like t.primary_key_col1=othertbl.col AND t.primary_key_col2=func(t.primary_key_col1). These are needed to handle e.g. the case of func() being a correlated subquery that selects the latest value. - If we've removed a condition with subquery predicate, EXPLAIN [EXTENDED] won't show the subquery anymore sql/item.cc: MWL#17: Table elimination - Add tem_field::check_column_usage_processor(). it allows to check which key parts a condition depends on. sql/item.h: MWL#17: Table elimination - Add tem_field::check_column_usage_processor(). it allows to check which key parts a condition depends on. sql/item_subselect.cc: MWL#17: Table elimination - Item_subselect got 'eliminated' attribute. It is used only to determine if the subselect should be printed by EXPLAIN. - Item_subselect got List<Item> refers_to - a list of item in the current select that are referred to from within the subselect. - Added Item_*::check_column_usage_processor(). it allows to check which key parts a condition depends on. - Added a comment about possible problem in Item_subselect::walk sql/item_subselect.h: MWL#17: Table elimination - Item_subselect got 'eliminated' attribute. It is used only to determine if the subselect should be printed by EXPLAIN. - Item_subselect got List<Item> refers_to - a list of item in the current select that are referred to from within the subselect. - Added Item_*::check_column_usage_processor(). it allows to check which key parts a condition depends on. sql/item_sum.cc: MWL#17: Table elimination sql/sql_lex.cc: MWL#17: Table elimination sql/sql_lex.h: MWL#17: Table elimination sql/sql_select.h: MWL#17: Table elimination
-
unknown authored
- Better fix for --innodb-use-sys-malloc causing Valgrind warnings. - Different fix for INNODB_IBUF_MAX_SIZE variable changing default value. - Fix some problems with the safe mutex lazy init patch. mysql-test/include/mtr_check.sql: Do not check INNODB_IBUF_MAX_SIZE for changes. It is not a dynamic variable, so cannot be changed by a test case anyway, and the value may vary slightly from one start of the server to the next. mysql-test/lib/mtr_cases.pm: Even just starting and stopping the server with --innodb-use-sys-malloc to check for disabled test case under valgrind will cause valgrind leak warnings. So add not_valgrind to the list of conditions also tested for directly in mysql-test-run.pl. mysql-test/mysql-test-run.pl: Even just starting and stopping the server with --innodb-use-sys-malloc to check for disabled test case under valgrind will cause valgrind leak warnings. So add not_valgrind to the list of conditions also tested for directly in mysql-test-run.pl. mysys/thr_mutex.c: Fix a few problems found during review of the lazy init safe mutex patch. storage/xtradb/ibuf/ibuf0ibuf.c: Revert previous fix of INNODB_IBUF_MAX_SIZE default varying slightly between server starts. (Fixed instead by ignoring that variable in the test suite).
-
- 18 Jun, 2009 1 commit
-
-
unknown authored
Manually merge some InnoDB changes into XtraDB. Fix ALTER TABLE bug in XtraDB with wrong comparison of row type. mysql-test/include/varchar.inc: Fix in test case that which of several duplicate keys triggers an error is not deterministic. mysql-test/mysql-test-run.pl: InnoDB does not bother to free resources individually during shutdown, but due to using its own memory tracking it nevertheless can free everything at exit. But XtraDB adds an option, on by default, to skip this extra tracking. This causes lots of Valgrind warnings, so needs to be disabled for Valgrind testing. mysql-test/r/innodb.result: Fix in test case that which of several duplicate keys triggers an error is not deterministic. mysql-test/t/innodb-use-sys-malloc.test: InnoDB does not bother to free resources individually during shutdown, but due to using its own memory tracking it nevertheless can free everything at exit. But XtraDB adds an option, on by default, to skip this extra tracking. This causes lots of Valgrind warnings, so needs to be disabled for Valgrind testing. sql/sql_table.cc: Add some useful DBUG while debugging alter table. storage/xtradb/handler/ha_innodb.cc: Fix that check_if_incompatible_data did not realise that ROW_TYPE_DEFAULT is identical to the default row format ROW_TYPE_COMPACT, causing excessive table copying in ALTER TABLE Add some useful DBUG while debugging alter table. Manually merge into XtraDB a few small changes for InnoDB from upstream MySQL. storage/xtradb/include/pars0pars.h: Manually merge into XtraDB a few small changes for InnoDB from upstream MySQL. storage/xtradb/include/univ.i: Manually merge a MariaDB fix in InnoDB into XtraDB.
-