<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/opt_range.h, branch bb-10.3-proxy-protocol</title>
<subtitle>github.com: MariaDB/server.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/'/>
<entry>
<title>MDEV-12721 Wrong execution plan for WHERE (date_field &lt;=&gt; timestamp_expr AND TRUE)</title>
<updated>2017-05-07T13:44:27+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.org</email>
</author>
<published>2017-05-07T13:44:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=02ada41744382fea11621a5a8094cbbea06c9487'/>
<id>02ada41744382fea11621a5a8094cbbea06c9487</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-11836 vcol.vcol_keys_myisam fails in buildbot and outside</title>
<updated>2017-02-13T17:12:04+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2017-01-22T16:14:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6'/>
<id>29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6</id>
<content type='text'>
move TABLE::key_read into handler. Because in index merge and DS-MRR
there can be many handlers per table, and some of them use
key read while others don't. "keyread" is really per handler,
not per TABLE property.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
move TABLE::key_read into handler. Because in index merge and DS-MRR
there can be many handlers per table, and some of them use
key read while others don't. "keyread" is really per handler,
not per TABLE property.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-11598 Assertion `!table || (!table-&gt;read_set || bitmap_is_set(table-&gt;read_set, field_index))' failed</title>
<updated>2017-01-11T07:19:45+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2017-01-04T23:07:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=135e144479c70d8e470e67fd95e4b17051127952'/>
<id>135e144479c70d8e470e67fd95e4b17051127952</id>
<content type='text'>
Found and fixed 2 problems:

- Filesort addon fields didn't mark virtual columns properly
- multi-range-read calculated vcol bitmap but was not using it.
  This caused wrong vcol field to be calculated on read, which caused the assert.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found and fixed 2 problems:

- Filesort addon fields didn't mark virtual columns properly
- multi-range-read calculated vcol bitmap but was not using it.
  This caused wrong vcol field to be calculated on read, which caused the assert.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed TABLE-&gt;sort to make it possible to have multiple active calls to</title>
<updated>2016-03-22T21:44:52+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2016-03-22T19:51:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=260dd476b057b759af7973550b560dc2f56e18fd'/>
<id>260dd476b057b759af7973550b560dc2f56e18fd</id>
<content type='text'>
filesort and init_read_record() for the same table.
This will simplify code for WINDOW FUNCTIONS (MDEV-6115)

- Filesort_info renamed to SORT_INFO and moved to filesort.h
- filesort now returns SORT_INFO
- init_read_record() now takes a SORT_INFO parameter.
- unique declaration is moved to uniques.h
- subselect caching of buffers is now more explicit than before
- filesort_buffer is now reusable even if rec_length has changed.
- filsort_free_buffers() and free_io_cache() calls are removed
- Remove one malloc() when using get_addon_fields()

Other things:
- Added --debug-assert-on-not-freed-memory option to make it easier to
  debug some not-freed-memory issues.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
filesort and init_read_record() for the same table.
This will simplify code for WINDOW FUNCTIONS (MDEV-6115)

- Filesort_info renamed to SORT_INFO and moved to filesort.h
- filesort now returns SORT_INFO
- init_read_record() now takes a SORT_INFO parameter.
- unique declaration is moved to uniques.h
- subselect caching of buffers is now more explicit than before
- filesort_buffer is now reusable even if rec_length has changed.
- filsort_free_buffers() and free_io_cache() calls are removed
- Remove one malloc() when using get_addon_fields()

Other things:
- Added --debug-assert-on-not-freed-memory option to make it easier to
  debug some not-freed-memory issues.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-8719 - Obsolete sql_memdup() in favor of THD::memdup() and thd_memdup()</title>
<updated>2015-11-26T07:34:15+00:00</updated>
<author>
<name>Sergey Vojtovich</name>
<email>svoj@mariadb.org</email>
</author>
<published>2015-11-18T15:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=13af8650a82f9452d36fe001c42b0b2c794f98d4'/>
<id>13af8650a82f9452d36fe001c42b0b2c794f98d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)</title>
<updated>2015-09-21T14:08:27+00:00</updated>
<author>
<name>Sergei Petrunia</name>
<email>psergey@askmonty.org</email>
</author>
<published>2015-09-20T18:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=9b9e36ed4926edd896aa274e15286f64cfec4313'/>
<id>9b9e36ed4926edd896aa274e15286f64cfec4313</id>
<content type='text'>
The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
(and max_key) to store keys. Buffer size was a good upper bound for
range analysis and partition pruning, but not for EITS selectivity
calculations.

Fixed by making these buffers variable-size. The sizes are calculated
from [pseudo]indexes used for range analysis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
(and max_key) to store keys. Buffer size was a good upper bound for
range analysis and partition pruning, but not for EITS selectivity
calculations.

Fixed by making these buffers variable-size. The sizes are calculated
from [pseudo]indexes used for range analysis.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-8610 "WHERE CONTAINS(indexed_geometry_column,1)" causes full table scan</title>
<updated>2015-08-13T10:25:51+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.org</email>
</author>
<published>2015-08-13T10:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=60985e5375ae7e8143f0ae4f6c70f1833d268f76'/>
<id>60985e5375ae7e8143f0ae4f6c70f1833d268f76</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-8599 "WHERE varchar_field LIKE temporal_const" does not use range optimizer</title>
<updated>2015-08-12T13:28:45+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.org</email>
</author>
<published>2015-08-12T13:28:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=9d884fd3d3fadd5ad31ecfee915877b98258e546'/>
<id>9d884fd3d3fadd5ad31ecfee915877b98258e546</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Renaming variables so that they don't shadow others (After this patch one can compile with -Wshadow and get much fewer warnings)</title>
<updated>2015-07-06T17:24:14+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2015-07-06T17:24:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=7332af49e4ce125a5e316e7e0c82d44df4af54c4'/>
<id>7332af49e4ce125a5e316e7e0c82d44df4af54c4</id>
<content type='text'>
- Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function.
- Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined.
- Removing calls to current_thd when we have access to thd

Part of this is optimization (not calling current_thd when not needed),
but part is bug fixing for error condition when current_thd is not defined
(For example on startup and end of mysqld)

Notable renames done as otherwise a lot of functions would have to be changed:
- In JOIN structure renamed:
   examined_rows -&gt; join_examined_rows
   record_count -&gt; join_record_count
- In Field, renamed new_field() to make_new_field()

Other things:
- Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe.
- Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly
- Added 'thd' as argument to a few functions to avoid calling current_thd.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function.
- Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined.
- Removing calls to current_thd when we have access to thd

Part of this is optimization (not calling current_thd when not needed),
but part is bug fixing for error condition when current_thd is not defined
(For example on startup and end of mysqld)

Notable renames done as otherwise a lot of functions would have to be changed:
- In JOIN structure renamed:
   examined_rows -&gt; join_examined_rows
   record_count -&gt; join_record_count
- In Field, renamed new_field() to make_new_field()

Other things:
- Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe.
- Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly
- Added 'thd' as argument to a few functions to avoid calling current_thd.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-7951 - sql_alloc() takes 0.25% in OLTP RO</title>
<updated>2015-05-13T06:43:14+00:00</updated>
<author>
<name>Sergey Vojtovich</name>
<email>svoj@mariadb.org</email>
</author>
<published>2015-04-17T10:30:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=4d1ccc42890029e07048772579af97072e0fa3d5'/>
<id>4d1ccc42890029e07048772579af97072e0fa3d5</id>
<content type='text'>
sql_alloc() has additional costs compared to direct mem_root allocation:
- function call: it is defined in a separate translation unit and can't be
  inlined
- it needs to call pthread_getspecific() to get THD::mem_root

It is called dozens of times implicitely at least by:
- List&lt;&gt;::push_back()
- List&lt;&gt;::push_front()
- new (for Sql_alloc derived classes)
- sql_memdup()

Replaced lots of implicit sql_alloc() calls with direct mem_root allocation,
passing through THD pointer whenever it is needed.

Number of sql_alloc() calls reduced 345 -&gt; 41 per OLTP RO transaction.
pthread_getspecific() overhead dropped 0.76 -&gt; 0.59
sql_alloc() overhed dropped 0.25 -&gt; 0.06
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sql_alloc() has additional costs compared to direct mem_root allocation:
- function call: it is defined in a separate translation unit and can't be
  inlined
- it needs to call pthread_getspecific() to get THD::mem_root

It is called dozens of times implicitely at least by:
- List&lt;&gt;::push_back()
- List&lt;&gt;::push_front()
- new (for Sql_alloc derived classes)
- sql_memdup()

Replaced lots of implicit sql_alloc() calls with direct mem_root allocation,
passing through THD pointer whenever it is needed.

Number of sql_alloc() calls reduced 345 -&gt; 41 per OLTP RO transaction.
pthread_getspecific() overhead dropped 0.76 -&gt; 0.59
sql_alloc() overhed dropped 0.25 -&gt; 0.06
</pre>
</div>
</content>
</entry>
</feed>
