1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00

SQL: default NULL for sys fields + misc fixes

* sys fields are NULL by default (with exceptions, see comment about NOT_NULL_FLAG in #77);
* error codes renamed, messages cleared out;
* SHOW CREATE TABLE fixed;
* set_max() fix;
* redundant flag setters/getters removed;
* flags are set in sql_yacc.yy, redundant copy_info_about_generated_fields() eliminated.
This commit is contained in:
Aleksey Midenkov
2016-11-20 18:17:28 +00:00
parent b98f09fcbf
commit a1c36f2e15
17 changed files with 77 additions and 147 deletions

View File

@@ -17,50 +17,50 @@ a b b+0
1 NULL NULL
3 NULL NULL
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6);
a b
1 NULL
3 NULL
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select count(*) from t group by b for system_time as of timestamp now(6);
count(*)
2
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b asc;
a b
1 NULL
3 NULL
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b desc;
a b
1 NULL
3 NULL
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t group by a having a=2 for system_time as of timestamp now(6);
a b
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t group by b having b=2 for system_time as of timestamp now(6);
a b
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select a from t where b=2 for system_time as of timestamp now(6);
a
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select a from t where b=NULL for system_time as of timestamp now(6);
a
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select count(*), b from t group by b having b=NULL for system_time as of timestamp now(6);
count(*) b
Warnings:
Warning 4055 Attempt to read unversioned field 'b' in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select a, b from t;
a b
1 2