There is MariaDB-10.3.18 table as:
create table switching_log
(
item_name varchar(20) NOT NULL,
switched_off timestamp,
switched_on timestamp
);
select * from switching_log;
+-----------+---------------------+---------------------+
| item_name | switched_off | switched_on |
+-----------+---------------------+---------------------+
| 201197010 | 2019-10-01 08:36:08 | 2019-10-01 08:35:49 |
+-----------+---------------------+---------------------+
When i update 'switched_off' then 'switched_on' is not changed
UPDATE switching_log set switched_off = now() where item_name = '201197010';
select * from switching_log;
+-----------+---------------------+---------------------+
| item_name | switched_off | switched_on |
+-----------+---------------------+---------------------+
| 201197010 | 2019-10-01 08:40:28 | 2019-10-01 08:35:49 |
+-----------+---------------------+---------------------+
But when i update 'switched_on' then 'switched_off' updated too.
UPDATE switching_log set switched_on = now() where item_name = '201197010';
select * from switching_log;
+-----------+---------------------+---------------------+
| item_name | switched_off | switched_on |
+-----------+---------------------+---------------------+
| 201197010 | 2019-10-01 08:40:40 | 2019-10-01 08:40:40 |
+-----------+---------------------+---------------------+