<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/sql_get_diagnostics.cc, branch bb-11.0-monty</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-26611: ERROR_INDEX isn't intuitively clear</title>
<updated>2021-10-05T07:14:55+00:00</updated>
<author>
<name>Rucha Deodhar</name>
<email>rucha.deodhar@mariadb.com</email>
</author>
<published>2021-09-29T08:48:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=d5e606c60545eae8ab86d68e9d432c92450c3122'/>
<id>d5e606c60545eae8ab86d68e9d432c92450c3122</id>
<content type='text'>
Fixup for MDEV-10075

Analysis: ERROR_INDEX implemented in MDEV-10075 was not intuitively clear.

Fix: changed parser to use ROW_NUMBER instead of ERROR_INDEX. Removed
ERROR_INDEX and ERROR_INDEX_SYM from related files. Changed m_error_index
to m_row_number.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixup for MDEV-10075

Analysis: ERROR_INDEX implemented in MDEV-10075 was not intuitively clear.

Fix: changed parser to use ROW_NUMBER instead of ERROR_INDEX. Removed
ERROR_INDEX and ERROR_INDEX_SYM from related files. Changed m_error_index
to m_row_number.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-10075: Provide index of error causing error in array INSERT</title>
<updated>2021-09-16T11:38:48+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2021-09-15T13:54:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=d552e092c9f3e20da078d1b62b976f629f73d3a4'/>
<id>d552e092c9f3e20da078d1b62b976f629f73d3a4</id>
<content type='text'>
use existing Warning_info::m_current_row_for_warning instead
of a newly introduced counter.

But use m_current_row_for_warning to count rows also in the parser
and during prepare.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use existing Warning_info::m_current_row_for_warning instead
of a newly introduced counter.

But use m_current_row_for_warning to count rows also in the parser
and during prepare.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-10075: Provide index of error causing error in array INSERT</title>
<updated>2021-09-15T06:55:34+00:00</updated>
<author>
<name>Rucha Deodhar</name>
<email>rucha.deodhar@mariadb.com</email>
</author>
<published>2021-07-31T07:25:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=ea06c67a49cf6f4b8daa7287454faba6b7cae874'/>
<id>ea06c67a49cf6f4b8daa7287454faba6b7cae874</id>
<content type='text'>
Extended the parser for GET DIAGNOSTICS to use ERROR_INDEX to get
warning/error index.
Error information is stored in Sql_condition. So it can be used to
store the index of warning/error too. THD::current_insert_index keeps a
track of count for each row that is processed or going to be inserted in the
table (or first row in case of prepare phase). When an error occurs,
first we need to fetch corrected error index (using correct_error_index())
for an error number. This is needed because in prepare phase, the error
may not be because of rows/values. In such case, correct value of
error_index should be 0. Once correct value if fetched, assign it to
Sql_condition::error_index when the object is created during error/warning.
This error_index variable is returned when ERROR_INDEX is used in
GET DIAGNOSTICS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extended the parser for GET DIAGNOSTICS to use ERROR_INDEX to get
warning/error index.
Error information is stored in Sql_condition. So it can be used to
store the index of warning/error too. THD::current_insert_index keeps a
track of count for each row that is processed or going to be inserted in the
table (or first row in case of prepare phase). When an error occurs,
first we need to fetch corrected error index (using correct_error_index())
for an error number. This is needed because in prepare phase, the error
may not be because of rows/values. In such case, correct value of
error_index should be 0. Once correct value if fetched, assign it to
Sql_condition::error_index when the object is created during error/warning.
This error_index variable is returned when ERROR_INDEX is used in
GET DIAGNOSTICS.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-19897 Rename source code variable names from utf8 to utf8mb3</title>
<updated>2019-06-28T08:37:04+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.com</email>
</author>
<published>2019-06-28T05:05:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=3e7e87ddccf71ba5328c257b7d642d6803fbca3a'/>
<id>3e7e87ddccf71ba5328c257b7d642d6803fbca3a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 10.2 into 10.3</title>
<updated>2019-05-14T14:18:46+00:00</updated>
<author>
<name>Marko Mäkelä</name>
<email>marko.makela@mariadb.com</email>
</author>
<published>2019-05-14T14:18:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=be85d3e61bb4217453a6879cb28d9bd369ad17dd'/>
<id>be85d3e61bb4217453a6879cb28d9bd369ad17dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update FSF address</title>
<updated>2019-05-11T16:25:02+00:00</updated>
<author>
<name>Vicențiu Ciorbaru</name>
<email>vicentiu@mariadb.org</email>
</author>
<published>2019-05-11T16:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=c0ac0b886047496e105a566a063bf1bd932d00a4'/>
<id>c0ac0b886047496e105a566a063bf1bd932d00a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 10.2 into 10.3</title>
<updated>2018-11-06T07:40:39+00:00</updated>
<author>
<name>Marko Mäkelä</name>
<email>marko.makela@mariadb.com</email>
</author>
<published>2018-11-06T07:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=df563e0c037f9b2cdb22e145575f92a121b4b529'/>
<id>df563e0c037f9b2cdb22e145575f92a121b4b529</id>
<content type='text'>
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-14267: correct FSF address</title>
<updated>2018-10-30T11:45:09+00:00</updated>
<author>
<name>Daniel Black</name>
<email>grooverdan@users.sourceforge.net</email>
</author>
<published>2018-02-10T07:28:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=3859273d048f0a4194c076f44aed4b45475ed158'/>
<id>3859273d048f0a4194c076f44aed4b45475ed158</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-16385 ROW SP variable is allowed in unexpected context</title>
<updated>2018-06-05T06:25:39+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.com</email>
</author>
<published>2018-06-05T06:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=106f0b5798a2b5d13b7d67c3cc678fc0cc2184c2'/>
<id>106f0b5798a2b5d13b7d67c3cc678fc0cc2184c2</id>
<content type='text'>
The problem described in the bug report happened because the code
did not test check_cols(1) after fix_fields() in a few places.

Additionally, fix_fields() could be called multiple times for SP variables,
because they are all fixed at a early stage in append_for_log().

Solution:
1. Adding a few helper methods
   - fix_fields_if_needed()
   - fix_fields_if_needed_for_scalar()
   - fix_fields_if_needed_for_bool()
   - fix_fields_if_needed_for_order_by()
  and using it in many cases instead of fix_fields() where
  the "fixed" status is not definitely known to be "false".

2. Adding DBUG_ASSERT(!fixed) into Item_splocal*::fix_fields()
   to catch double execution.

3. Adding tests.

As a good side effect, the patch removes a lot of duplicate code (~60 lines):

   if (!item-&gt;fixed &amp;&amp;
       item-&gt;fix_fields(..) &amp;&amp;
       item-&gt;check_cols(1))
     return true;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem described in the bug report happened because the code
did not test check_cols(1) after fix_fields() in a few places.

Additionally, fix_fields() could be called multiple times for SP variables,
because they are all fixed at a early stage in append_for_log().

Solution:
1. Adding a few helper methods
   - fix_fields_if_needed()
   - fix_fields_if_needed_for_scalar()
   - fix_fields_if_needed_for_bool()
   - fix_fields_if_needed_for_order_by()
  and using it in many cases instead of fix_fields() where
  the "fixed" status is not definitely known to be "false".

2. Adding DBUG_ASSERT(!fixed) into Item_splocal*::fix_fields()
   to catch double execution.

3. Adding tests.

As a good side effect, the patch removes a lot of duplicate code (~60 lines):

   if (!item-&gt;fixed &amp;&amp;
       item-&gt;fix_fields(..) &amp;&amp;
       item-&gt;check_cols(1))
     return true;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add likely/unlikely to speed up execution</title>
<updated>2018-05-06T21:07:32+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2018-04-04T09:16:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=30ebc3ee9efcab635b1f3e14b9198a58ae93c233'/>
<id>30ebc3ee9efcab635b1f3e14b9198a58ae93c233</id>
<content type='text'>
Added to:
- if (error)
- Lex
- sql_yacc.yy and sql_yacc_ora.yy
- In header files to alloc() calls
- Added thd argument to thd_net_is_killed()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added to:
- if (error)
- Lex
- sql_yacc.yy and sql_yacc_ora.yy
- In header files to alloc() calls
- Added thd argument to thd_net_is_killed()
</pre>
</div>
</content>
</entry>
</feed>
