[MDEV-29562] Spider table with charset utf32/utf16/ucs2 tries to set client charset to unsupported value Created: 2022-09-17 Updated: 2022-12-22 Resolved: 2022-12-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Yuchen Pei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
At this point Spider tries to run SET NAMES utf32 (hopelessly of course). Note that the test case sets an explicit character set for the Spider table for simplicity; in reality, it would rather be either a database charset, or a system-wide character-set-server. The result is the same anyway. |
| Comments |
| Comment by Elena Stepanova [ 2022-11-06 ] | ||||||||||||||||||
|
A similar problem affects Federated.
However, for Federated it can be worked around by using --skip-character-set-client-handshake, which doesn't work for Spider (probably because Spider runs SET NAMES explicitly, while Federated apparently sets it as a connection attribute). | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-02 ] | ||||||||||||||||||
|
After discussing with Nayuta, we are going to prohibit creating spider tables with charset utf32, utf16 etc, that is, we are going to make a change so that creation of a spider table with banned charset explicitly (with CHARSET) or implicitly (inheriting from database charset) will be rejected with an error.
The issue with federated engine with be splitted out into a new ticket. I will update this ticket when that is done. | ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-02 ] | ||||||||||||||||||
|
I think that prohibiting to create Spider table with ucs2/utf16/utf16le/utf32 is acceptable mainly by the following reasons:
| ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-02 ] | ||||||||||||||||||
|
> Currently, Spider doesn't work with ucs2/utf16/utf16le/utf32. So, even if we prohibit creating Spider tables with the charsets, it doesn't affect users. Oh, I overlooked that the affect version is 10.4+. I'm checking why 10.3 is not affected. | ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-02 ] | ||||||||||||||||||
|
I've confirmed that the bug is reproducible on 10.3 too. | ||||||||||||||||||
| Comment by Elena Stepanova [ 2022-12-02 ] | ||||||||||||||||||
Sorry about that, I didn't know you are still fixing non-blockers in 10.3 Spider. On a general note, 10.3 goes EOL fairly soon, we start being more selective about what to fix in 10.3 and what not. With only two more planned releases, Q1 and Q2 2023, there will be very little time to correct regressions. Given that it is a cosmetic problem and a cosmetic fix, you can apply your own discretion to whether to fix it in 10.3 or not. And in 10.4 even. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-05 ] | ||||||||||||||||||
|
Splitted issue with federated engine to https://jira.mariadb.org/browse/MDEV-30160. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-07 ] | ||||||||||||||||||
|
A couple of things worth noting / I am not sure about:
| ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-13 ] | ||||||||||||||||||
|
Commented on GitHub. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-13 ] | ||||||||||||||||||
|
Thanks for the comments - I've addressed all of them. Please can you review the updated commit at https://github.com/MariaDB/server/commit/9f7a96864f4d346acc08b49ad85434622d090692 thank you. | ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-19 ] | ||||||||||||||||||
|
I agree with the patch with some comments. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-19 ] | ||||||||||||||||||
|
nayuta-yanagisawa Thanks for the comments. I have addressed them and updated my commit at | ||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-12-20 ] | ||||||||||||||||||
|
The last patch is OK to push. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-20 ] | ||||||||||||||||||
|
Looks like a bit more work is needed so that the commit builds for 10.6+. | ||||||||||||||||||
| Comment by Yuchen Pei [ 2022-12-21 ] | ||||||||||||||||||
|
Pushed a commit[1] for 10.3-5 and a commit[2] for 10.6+ due to [3]. [1] 3f63aa18a7f81540049c8414308c6c04fdc4a5ad |