Revision history [back]

The way it works for me ( only update ) :-

MariaDB [neutron]> select * from  ipavailabilityranges ;
+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| b6d23b61-e116-4900-973d-3d136786a3bd | 192.168.1.195 | 192.168.1.254 |
| c06e19cf-f66e-4dd5-9c01-ae59f1822be9 | 15.0.0.14     | 15.0.0.254    |
| d8505913-306a-447e-bd03-4bc3d45ce057 | 10.0.0.12     | 10.0.0.254    |
+--------------------------------------+---------------+---------------+
3 rows in set (0.00 sec)

MariaDB [neutron]> update ipavailabilityranges set first_ip='192.168.1.150' where allocation_pool_id='b6d23b61-e116-4900-973d-3d136786a3bd' ;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [neutron]> select * from  ipavailabilityranges ;+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| b6d23b61-e116-4900-973d-3d136786a3bd | 192.168.1.150 | 192.168.1.254 |
| c06e19cf-f66e-4dd5-9c01-ae59f1822be9 | 15.0.0.14     | 15.0.0.254    |
| d8505913-306a-447e-bd03-4bc3d45ce057 | 10.0.0.12     | 10.0.0.254    |
+--------------------------------------+---------------+---------------+
3 rows in set (0.00 sec)

The way it works for me ( only update ) :-

MariaDB [neutron]> select * from  ipavailabilityranges ;
+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| b6d23b61-e116-4900-973d-3d136786a3bd | 192.168.1.195 | 192.168.1.254 |
| c06e19cf-f66e-4dd5-9c01-ae59f1822be9 | 15.0.0.14     | 15.0.0.254    |
| d8505913-306a-447e-bd03-4bc3d45ce057 | 10.0.0.12     | 10.0.0.254    |
+--------------------------------------+---------------+---------------+
3 rows in set (0.00 sec)
 
MariaDB [neutron]> update ipavailabilityranges set first_ip='192.168.1.150' where allocation_pool_id='b6d23b61-e116-4900-973d-3d136786a3bd' ;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

 MariaDB [neutron]> select * from  ipavailabilityranges  ;+--------------------------------------+---------------+---------------+
 | allocation_pool_id                   | first_ip      | last_ip       |
 +--------------------------------------+---------------+---------------+
 | b6d23b61-e116-4900-973d-3d136786a3bd | 192.168.1.150 | 192.168.1.254 |
 | c06e19cf-f66e-4dd5-9c01-ae59f1822be9 | 15.0.0.14     | 15.0.0.254    |
 | d8505913-306a-447e-bd03-4bc3d45ce057 | 10.0.0.12     | 10.0.0.254    |
 +--------------------------------------+---------------+---------------+
 3 rows in set (0.00 sec)

Verification of PK for allocation_pool_id

MariaDB [neutron]> desc ipavailabilityranges ;
+--------------------+-------------+------+-----+---------+-------+
| Field              | Type        | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| allocation_pool_id | varchar(36) | NO   | PRI | NULL    |       |
| first_ip           | varchar(64) | NO   | PRI | NULL    |       |
| last_ip            | varchar(64) | NO   | PRI | NULL    |       |
+--------------------+-------------+------+-----+---------+-------+
3 rows in set (0.02 sec)