PL/SQL parser
(MDEV-10142)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.3 |
| Type: | Technical task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18 | ||||||||||||||||
| Description |
|
In order to emulate Oracle's behavior in handling empty strings as NULL, we'll add a new sql_mode flag EMPTY_STRING_IS_NULL.
Note, more NULL handling flags will be added later under terms of separate patch:
This task is only about literals and PS parameters. The new flag will be disabled by default. In order to activate this behavior, one will have to do:
|
| Comments |
| Comment by Alexander Barkov [ 2017-10-19 ] |
|
Reviewed a contributed patch from Jerome B. |
| Comment by Anil [ 2017-12-18 ] |
|
Hi team, getting below error for your reference : ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'EMPTY_STRING_IS_NULL' |
| Comment by Alexander Barkov [ 2017-12-18 ] |
|
Anil, this feature will be available in MariaDB-10.3.3. |
| Comment by Anil [ 2017-12-18 ] |
|
Please suggest how to fix if I want both the SQL_MODE active on MariaDB 10.3.2 server. SQL_MODE =STRICT_TRANS_TABLES, EMPTY_STRING_IS_NULL Thanks in advance |
| Comment by Anil [ 2017-12-18 ] |
|
Thanks a lot Alexander Barkov for quick update .... you have save my day .... Thanks again. |
| Comment by Mike Hawksfraert [ 2018-08-24 ] |
|
I am confused about this feature - is this supposed to work for LOAD DATA INFILE and mysqlimport loads as well? My version is 10.3.9-MariaDB-1:10.3.9+maria~xenial-log I have a MyISAM table with an int(11) column user_id which has DEFAULT NULL defined. When I insert records into this table using the INSERT INTO... command, using empty strings for user_id, I get the expected NULL for user_id. But when I try to load CSV data which is empty on the user_id field (as in "nothing between the commas"), the user_id for those rows is set to 0 (zero). This happens for both LOAD DATA INFILE and mysqlimport. Please advise. |