Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
5.3.12, 5.5(EOL), 10.0(EOL), 10.1(EOL)
-
Installed via yum on Redhat
Description
MariaDB [testdb]> CREATE TABLE `cats` (
|
-> `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
-> `name` varchar(255),
|
-> `full_nm` varchar(255) AS (TRIM(CONCAT(name, ' - ', id))) PERSISTENT,
|
-> `display_nm` varchar(255) AS (TRIM(CONCAT(name, ' - ', id))) VIRTUAL,
|
-> PRIMARY KEY (`id`)
|
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
Query OK, 0 rows affected (0.06 sec)
|
|
MariaDB [testdb]> insert into cats (`name`) values ('freddy'), ('sammy'), ('spot'), ('boots');
|
Query OK, 4 rows affected (0.00 sec)
|
Records: 4 Duplicates: 0 Warnings: 0
|
|
MariaDB [testdb]> select * from cats;
|
+----+--------+------------+------------+
|
| id | name | full_nm | display_nm |
|
+----+--------+------------+------------+
|
| 1 | freddy | freddy - 0 | freddy - 1 |
|
| 2 | sammy | sammy - 0 | sammy - 2 |
|
| 3 | spot | spot - 0 | spot - 3 |
|
| 4 | boots | boots - 0 | boots - 4 |
|
+----+--------+------------+------------+
|
4 rows in set (0.00 sec)
|