1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-16 11:21:15 +03:00
Commit Graph

86 Commits

Author SHA1 Message Date
36eba98817 MDEV-19123 Change default charset from latin1 to utf8mb4
Changing the default server character set from latin1 to utf8mb4.
2024-07-11 10:21:07 +04:00
4246c0fa01 MDEV-22597 Add views for periods in information_schema
Two new information_schema views are added:
* PERIOD table -- columns TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME,
  PERIOD_NAME, START_COLUMN_NAME, END_COLUMN_NAME.
* KEY_PERIOD_USAGE -- works similar to KEY_COLUMN_USAGE, but for periods.
  Columns CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME,
  TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PERIOD_NAME

Two new columns are added to the COLUMNS view:
 IS_SYSTEM_TIME_PERIOD_START, IS_SYSTEM_TIME_PERIOD_END - contain YES/NO.
2024-02-12 22:26:06 +01:00
1f4a9f086a Removed "<select expression> INTO <destination>" deprication.
This was done after discussions with Igor, Sanja and Bar.

The main reason for removing the deprication was to ensure that MariaDB
is always backward compatible whenever possible.

Other things:
- Added statistics counters, mainly for the feedback plugin.
  - INTO OUTFILE
  - INTO variable
  - If INTO is using the old syntax (end of query)
2023-02-03 11:57:50 +03:00
1f7840088f MDEV-29833 CREATE ... SELECT system_versioned_table causes invalid defaults
ROW START/END fields shold have no default value
2022-10-26 15:30:38 +02:00
44fd2c4b24 Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
fe844c16b6 Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
18795f5512 Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
f1544424de MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
f5c5f8e41e Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
cf63eecef4 Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
a576a1cea5 Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
585cb18ed1 MDEV-27452 TIMESTAMP(0) system field is allowed for certain creation of system-versioned table
First, we do not add VERS_UPDATE_UNVERSIONED_FLAG for system field and
that fixes SHOW CREATE result.

Second, we have to call check_sys_fields() for any CREATE TABLE and
there correct type is checked for system fields.

Third, we update system_time like as_row structures for ALTER TABLE
and that makes check_sys_fields() happy for ALTER TABLE when we make
system fields hidden.
2022-01-13 23:35:17 +03:00
25ac047baf Merge 10.5 into 10.6 2021-11-09 09:11:50 +02:00
9c18b96603 Merge 10.4 into 10.5 2021-11-09 08:50:33 +02:00
47ab793d71 Merge 10.3 into 10.4 2021-11-09 08:40:14 +02:00
c8cece9144 MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields
versioning_fields flag indicates that any columns were specified WITH
SYSTEM VERSIONING. In that case we imply WITH SYSTEM VERSIONING for
the whole table and WITHOUT SYSTEM VERSIONING for the other columns.
2021-11-02 11:49:47 +03:00
6efb5e9f5e Merge branch '10.5' into 10.6 2021-08-02 10:11:41 +02:00
ae6bdc6769 Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
7841a7eb09 Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
e09e304b78 MDEV-16857 system-invisible row_end is displayed in SHOW INDEX
Skip system-invisible keypart in get_schema_stat_record().
2021-07-06 01:02:09 +03:00
1657b7a583 Merge 10.4 to 10.5 2020-10-22 17:08:49 +03:00
46957a6a77 Merge 10.3 into 10.4 2020-10-22 13:27:18 +03:00
9b46d8e5c4 MDEV-23968 CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table
- Remove row_start/row_end from keys in fix_create_like();

- Disable manual adding of implicit row_start/row_end to indexes on
  CREATE TABLE. INVISIBLE_SYSTEM fields are unoperable by user;

- Fix memory leak on allocation of Key_part_spec.
2020-10-20 10:49:54 +03:00
d04f2de80a Merge 10.4 into 10.5 2019-10-11 08:41:36 +03:00
09afd3da1a Merge 10.3 into 10.4 2019-10-10 21:30:40 +03:00
6684989801 versioning test suite fixes
Preparation for MDEV-16210:

replace.test:
key_type combinations: PK and UNIQUE.

foreign.test:
Preparation for key_type combinations.

Other fixes:

* Merged versioning.update2 into versioning.update;
* Removed test2 database and done individual drop instead.
2019-10-10 00:20:34 +03:00
58fdf5b2fa MDEV-16144 Default TIMESTAMP clause for SELECT from versioned
1. Removed TIMESTAMP/TRANSACTION unit auto-detection in favor of default TIMESTAMP.

Reasons:

1.1. rare practical use and doubtful advantage of such auto-detection;
1.2. it conflicts with MDEV-16226 (TRX_ID-based versioned tables performance improvement).

Needless check_unit membership removed.

2. SQL: versioning type handling refactoring

Vers_type_handler hierarchy stores versioning properties of type.

virtual Type_handler::vers() accesses specialization of
Vers_type_handler for specific type.

virtual Vers_type_handler::kind() returns versioning kind
(timestamp/trx_id).

Removed Type_handler::Vers_history_point_check_unit() in favor of
Type_handler::vers().

Renames:

require_timestamp() -> require_timestamp_error()
require_trx_id() -> require_trx_id_error()

EDIT by Alexander Barkov (@abarkov):

check_sys_fields() moved to Vers_type_handler::check_sys_fields()
2019-09-30 14:05:09 +03:00
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +03:00
f6a7730c45 MDEV-16490: It's possible to make a system versioned table without any versioning field
* do not allow versioned table to be without versioned (non-system) fields
* prohibit changing field versioning, when removing table versioning
* handle CREATE...SELECT as well
2019-09-09 20:14:47 +03:00
244f0e6dd8 Merge branch '10.3' into 10.4 2019-09-06 11:53:10 +02:00
a071e0e029 Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
f66d1850ac Merge branch '10.3' into 10.4 2019-06-14 22:10:50 +02:00
2e73561c6c MDEV-16804 SYSTEM VERSIONING columns not showing as GENERATED
Closes #830
2019-06-14 11:12:18 +02:00
cf77951fb6 Merge 10.3 into 10.4 2019-05-22 08:42:31 +03:00
6473641b9a MDEV-18512 using DATETIME(6) as row_start/row_end crashes server
Disallow DATETIME for SYSTEM VERSIONING tables.
2019-05-20 15:19:01 +04:00
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
d199591cf2 generalize the error message 2019-05-18 20:34:03 +02:00
e506bef430 MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONING
* Versioning tests support

Closes #1043
2019-05-17 13:53:22 +02:00
3d649c6e37 MDEV-15408 Confusing error message upon ER_VERS_FIELD_WRONG_TYPE while omitting UNSIGNED in BIGINT
Improve diagnostics. Try to guess what type user tried to type.
2019-05-17 13:53:22 +02:00
de745ecf29 MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operations 2018-07-04 19:13:55 +02:00
9bd3af97df MDEV-15413 Unexpected errors upon CREATE TABLE .. WITH SYSTEM VERSIONING AS SELECT ...
numerous fixes for CREATE ... SELECT with system versioning:
In CREATE ... SELECT the table is created based on the result set,
field properties do not count. That is
* field invisibility is *not* copied over
* AS ROW START/END is *not* copied over
* the history is *not* copied over
* system row_start/row_end fields can *not* be created from the SELECT part
2018-04-10 13:12:36 +02:00
041e9de6f8 wording: don't prohibit 2018-04-10 13:12:36 +02:00
052668f500 simplify versioning tests 2018-02-24 00:50:57 +01:00
558ee2ee84 fix --embedded tests 2018-01-13 02:01:35 +01:00
26971c9aea SQL: versioning info in INFORMATION_SCHEMA
* show SYSTEM VERSIONED in INFORMATION_SCHEMA.TABLES
* show ROW START/ROW END columns in INFORMATION_SCHEMA.COLUMNS
2018-01-10 11:54:21 +03:00
b85efdc3af rename system_time columns
sys_trx_start -> row_start
sys_trx_end -> row_end
2018-01-09 15:49:07 +03:00
ca4dbcff69 Tests: system columns *not* being auto-renamed (create, alter)
it's correct, they preserve their documented names
2018-01-09 14:18:39 +03:00
1a0b986e78 MDEV-14764 Confusing error message: Table t1 must have at least one temporal column
compiler warning (mix of bool and enum in ?:)
2018-01-09 13:56:31 +03:00
b8b5d8d87d MDEV-14828 Server crashes in JOIN::prepare / setup_fields on 2nd execution of PS [fixes #437] 2018-01-02 15:28:50 +03:00
8efca72f4a MDEV-14792 INSERT without column list into table with explicit versioning columns produces bad data 2018-01-01 23:37:02 +03:00