<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql, branch 10.56-MDEV-30986</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>Merge remote-tracking branch 'origin/10.4' into 10.5</title>
<updated>2023-04-05T12:16:19+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.com</email>
</author>
<published>2023-04-05T11:42:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=62e137d4d739fcba6810a66242175230e8170727'/>
<id>62e137d4d739fcba6810a66242175230e8170727</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-28641 : Query cache entries not invalidated on slave of a Galera cluster</title>
<updated>2023-04-04T10:12:16+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@galeracluster.com</email>
</author>
<published>2023-04-04T01:11:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=afdf19cf3303bf3797fe47e5cef398227134cc32'/>
<id>afdf19cf3303bf3797fe47e5cef398227134cc32</id>
<content type='text'>
Query cache should be invalidated if we are not in applier. For some
reason this condition was incorrect starting from 10.5 but it is
correct in 10.4.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Query cache should be invalidated if we are not in applier. For some
reason this condition was incorrect starting from 10.5 but it is
correct in 10.4.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-30034 UNIQUE USING HASH accepts duplicate entries for tricky collations</title>
<updated>2023-04-04T08:30:50+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.com</email>
</author>
<published>2023-03-31T13:20:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=8020b1bd735c686818f1563e2c2317e263d5bd3a'/>
<id>8020b1bd735c686818f1563e2c2317e263d5bd3a</id>
<content type='text'>
- Adding a new argument "flag" to MY_COLLATION_HANDLER::strnncollsp_nchars()
  and a flag MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES.
  The flag defines if strnncollsp_nchars() should emulate trailing spaces
  which were possibly trimmed earlier (e.g. in InnoDB CHAR compression).
  This is important for NOPAD collations.

  For example, with this input:
   - str1= 'a '    (Latin letter a followed by one space)
   - str2= 'a  '   (Latin letter a followed by two spaces)
   - nchars= 3
  if the flag is given, strnncollsp_nchars() will virtually restore
  one trailing space to str1 up to nchars (3) characters and compare two
  strings as equal:
  - str1= 'a  '  (one extra trailing space emulated)
  - str2= 'a  '  (as is)

  If the flag is not given, strnncollsp_nchars() does not add trailing
  virtual spaces, so in case of a NOPAD collation, str1 will be compared
  as less than str2 because it is shorter.

- Field_string::cmp_prefix() now passes the new flag.
  Field_varstring::cmp_prefix() and Field_blob::cmp_prefix() do
  not pass the new flag.

- The branch in cmp_whole_field() in storage/innobase/rem/rem0cmp.cc
  (which handles the CHAR data type) now also passed the new flag.

- Fixing UCA collations to respect the new flag.
  Other collations are possibly also affected, however
  I had no success in making an SQL script demonstrating the problem.
  Other collations will be extended to respect this flags in a separate
  patch later.

- Changing the meaning of the last parameter of Field::cmp_prefix()
  from "number of bytes" (internal length)
  to "number of characters" (user visible length).

  The code calling cmp_prefix() from handler.cc was wrong.
  After this change, the call in handler.cc became correct.

  The code calling cmp_prefix() from key_rec_cmp() in key.cc
  was adjusted according to this change.

- Old strnncollsp_nchar() related tests in unittest/strings/strings-t.c
  now pass the new flag.
  A few new tests also were added, without the flag.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Adding a new argument "flag" to MY_COLLATION_HANDLER::strnncollsp_nchars()
  and a flag MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES.
  The flag defines if strnncollsp_nchars() should emulate trailing spaces
  which were possibly trimmed earlier (e.g. in InnoDB CHAR compression).
  This is important for NOPAD collations.

  For example, with this input:
   - str1= 'a '    (Latin letter a followed by one space)
   - str2= 'a  '   (Latin letter a followed by two spaces)
   - nchars= 3
  if the flag is given, strnncollsp_nchars() will virtually restore
  one trailing space to str1 up to nchars (3) characters and compare two
  strings as equal:
  - str1= 'a  '  (one extra trailing space emulated)
  - str2= 'a  '  (as is)

  If the flag is not given, strnncollsp_nchars() does not add trailing
  virtual spaces, so in case of a NOPAD collation, str1 will be compared
  as less than str2 because it is shorter.

- Field_string::cmp_prefix() now passes the new flag.
  Field_varstring::cmp_prefix() and Field_blob::cmp_prefix() do
  not pass the new flag.

- The branch in cmp_whole_field() in storage/innobase/rem/rem0cmp.cc
  (which handles the CHAR data type) now also passed the new flag.

- Fixing UCA collations to respect the new flag.
  Other collations are possibly also affected, however
  I had no success in making an SQL script demonstrating the problem.
  Other collations will be extended to respect this flags in a separate
  patch later.

- Changing the meaning of the last parameter of Field::cmp_prefix()
  from "number of bytes" (internal length)
  to "number of characters" (user visible length).

  The code calling cmp_prefix() from handler.cc was wrong.
  After this change, the call in handler.cc became correct.

  The code calling cmp_prefix() from key_rec_cmp() in key.cc
  was adjusted according to this change.

- Old strnncollsp_nchar() related tests in unittest/strings/strings-t.c
  now pass the new flag.
  A few new tests also were added, without the flag.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '10.4' into 10.5</title>
<updated>2023-04-03T07:34:26+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2023-04-03T07:34:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=3261a78ea172a77fec113107ef35f218b9228b66'/>
<id>3261a78ea172a77fec113107ef35f218b9228b66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ensure that STRING_WITH_LEN is only used with string literals</title>
<updated>2023-04-01T20:31:30+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2023-04-01T13:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=0a6343909fcf8b193a1b517b3a16eabd4ae89a83'/>
<id>0a6343909fcf8b193a1b517b3a16eabd4ae89a83</id>
<content type='text'>
This is allowed:

  STRING_WITH_LEN("string literal")

This is not:

  char *str = "pointer to string";
  ... STRING_WITH_LEN(str) ..

In C++ this is also allowed:

  const char str[] = "string literal";
  ... STRING_WITH_LEN(str) ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is allowed:

  STRING_WITH_LEN("string literal")

This is not:

  char *str = "pointer to string";
  ... STRING_WITH_LEN(str) ..

In C++ this is also allowed:

  const char str[] = "string literal";
  ... STRING_WITH_LEN(str) ...
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix passing correct length of string in command print.</title>
<updated>2023-04-01T15:29:54+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2023-04-01T12:42:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=1767390be4239c031ecbe999fa09bbc6c99c1c65'/>
<id>1767390be4239c031ecbe999fa09bbc6c99c1c65</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch '10.4' into 10.5</title>
<updated>2023-03-31T19:32:41+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2023-03-31T19:32:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=ac5a534a4caa6c86762e721dfe7183be2fee29ca'/>
<id>ac5a534a4caa6c86762e721dfe7183be2fee29ca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-25045 : Assertion `client_state_.mode() != wsrep::client_state::m_toi' failed in int wsrep::transaction::before_commit()</title>
<updated>2023-03-31T10:48:13+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@galeracluster.com</email>
</author>
<published>2023-03-31T10:48:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=eaebe8b5600b144c51a9405de42a70bd4b710987'/>
<id>eaebe8b5600b144c51a9405de42a70bd4b710987</id>
<content type='text'>
CREATE [TEMPORARY] SEQUENCE is internally CREATE+INSERT (initial value)
and it is replicated using statement based replication. In Galera
we use either TOI or RSU so we should skip commit time hooks
for it.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CREATE [TEMPORARY] SEQUENCE is internally CREATE+INSERT (initial value)
and it is replicated using statement based replication. In Galera
we use either TOI or RSU so we should skip commit time hooks
for it.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-27317 wsrep_checkpoint order violation due to certification failure</title>
<updated>2023-03-31T10:41:24+00:00</updated>
<author>
<name>Teemu Ollakka</name>
<email>teemu.ollakka@galeracluster.com</email>
</author>
<published>2023-02-13T16:14:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=cadc3efcddb078fe8fe19a6121cc2a95be9a97de'/>
<id>cadc3efcddb078fe8fe19a6121cc2a95be9a97de</id>
<content type='text'>
With binlogs enabled, debug assertion ut_ad(xid_seqno &gt; wsrep_seqno)
fired in trx_rseg_update_wsrep_checkpoint() when an applier thread
synced the seqno out of order for write set which had failed
certification. This was caused by releasing commit
order too early when binlogs were on, allowing group
commit to run in parallel and commit following transactions
too early.

Fixed by extending the commit order critical section to cover
call to wsrep_set_SE_checkpoint() also when binlogs are on.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With binlogs enabled, debug assertion ut_ad(xid_seqno &gt; wsrep_seqno)
fired in trx_rseg_update_wsrep_checkpoint() when an applier thread
synced the seqno out of order for write set which had failed
certification. This was caused by releasing commit
order too early when binlogs were on, allowing group
commit to run in parallel and commit following transactions
too early.

Fixed by extending the commit order critical section to cover
call to wsrep_set_SE_checkpoint() also when binlogs are on.

Signed-off-by: Julius Goryavsky &lt;julius.goryavsky@mariadb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-30351 crash in Item_func_left::val_str</title>
<updated>2023-03-31T03:53:50+00:00</updated>
<author>
<name>Weijun Huang</name>
<email>huangweijun1001@gmail.com</email>
</author>
<published>2023-03-11T10:06:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f70de1451ba24e0459edcdbe2e67e3df5f348050'/>
<id>f70de1451ba24e0459edcdbe2e67e3df5f348050</id>
<content type='text'>
When using LEFT() function with a string that is without a charset,
the function crashes. This is because the function assumes that
the string has a charset, and tries to use it to calculate the
length of the string.

Two functions, UNHEX and WEIGHT_STRING, returned a string without
the charset being set to a not null value.

The fix is to set charset when calling val_str on these two functions.

Reviewed-by: Alexander Barkov &lt;bar@mariadb.com&gt;
Reviewed-by: Daniel Black &lt;daniel@mariadb.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using LEFT() function with a string that is without a charset,
the function crashes. This is because the function assumes that
the string has a charset, and tries to use it to calculate the
length of the string.

Two functions, UNHEX and WEIGHT_STRING, returned a string without
the charset being set to a not null value.

The fix is to set charset when calling val_str on these two functions.

Reviewed-by: Alexander Barkov &lt;bar@mariadb.com&gt;
Reviewed-by: Daniel Black &lt;daniel@mariadb.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
