Sergei Golubchik
c27d78beb5
MDEV-36870 Spurious unrelated permission error when selecting from table with default that uses nextval(sequence)
...
Lots of different cases, SELECT, SELECT DEFAULT(),
UPDATE t SET x=DEFAULT, prepares statements,
opening of a table for the I_S, prelocking (so TL_WRITE),
insert with subquery (so SQLCOM_SELECT), etc.
Don't check NEXTVAL privileges in fix_fields() anymore, it cannot
possibly handle all the cases correctly. Make a special method
Item_func_nextval::check_access() for that and invoke it from
* fix_fields on explicit SELECT NEXTVAL()
(but not if NEXTVAL() is used in a DEFAULT clause)
* when DEFAULT bareword in used in, say, UPDATE t SET x=DEFAULT
(but not if DEFAULT() itself is used in a DEFAULT clause)
* in CREATE TABLE
* in ALTER TABLE ALGORITHM=INPLACE (that doesn't go CREATE TABLE path)
* on INSERT
helpers
* Virtual_column_info::check_access() to walk the item tree and invoke
Item::check_access()
* TABLE::check_sequence_privileges() to iterate default expressions
and invoke Virtual_column_info::check_access()
also, single-table UPDATE in prepared statements now associates
value items with fields just as multi-update already did, fixes the
case of PREPARE s "UPDATE t SET x=?"; EXECUTE s USING DEFAULT.
2025-07-09 18:04:46 +02:00
..
2025-01-09 10:00:36 +01:00
2025-04-28 12:38:01 +03:00
2024-11-23 08:14:22 -07:00
2024-09-05 12:14:06 +10:00
2024-08-12 09:32:30 +01:00
2024-10-29 14:20:03 +01:00
2024-10-23 14:58:57 +02:00
2023-10-19 17:24:30 +03:00
2023-10-19 17:24:30 +03:00
2025-05-25 09:11:41 +05:30
2024-11-29 12:37:46 +02:00
2024-01-17 13:35:05 +02:00
2023-07-07 15:15:24 +07:00
2023-02-09 16:09:08 +02:00
2024-04-30 23:09:02 +10:00
2024-04-30 23:09:02 +10:00
2023-01-27 13:54:14 +01:00
2024-11-23 08:14:23 -07:00
2024-06-24 13:09:47 +03:00
2024-06-20 11:32:13 -04:00
2023-06-26 15:10:30 +05:30
2023-02-09 16:09:08 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-10-29 14:20:03 +01:00
2024-10-29 14:20:03 +01:00
2025-01-29 11:17:38 +01:00
2025-07-08 11:44:49 +03:00
2025-07-09 18:04:46 +02:00
2024-11-23 08:14:22 -07:00
2025-04-15 01:49:48 +02:00
2023-12-17 11:20:43 +01:00
2024-05-17 13:33:16 +01:00
2023-02-09 16:09:08 +02:00
2024-06-20 11:32:13 -04:00
2024-10-15 15:36:12 +11:00
2024-10-03 13:45:26 +03:00
2025-04-02 04:43:24 +02:00
2025-01-29 11:17:38 +01:00
2025-02-18 16:38:18 +01:00
2025-02-27 04:02:33 +01:00
2025-07-09 18:04:46 +02:00
2025-06-02 14:02:53 +03:00
2023-02-10 12:02:11 +02:00
2024-11-29 12:37:46 +02:00
2023-02-09 16:09:08 +02:00
2024-12-05 09:20:36 +01:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-12-02 11:04:38 +02:00
2025-07-09 18:04:46 +02:00
2025-07-09 18:04:46 +02:00
2025-02-27 04:02:33 +01:00
2024-10-08 11:58:46 +02:00
2024-10-08 11:58:46 +02:00
2024-10-08 11:58:46 +02:00
2024-07-16 15:54:22 +08:00
2024-07-16 15:54:22 +08:00
2025-01-29 11:17:38 +01:00
2025-01-29 11:17:38 +01:00
2025-04-26 10:41:52 +02:00
2025-04-26 10:41:52 +02:00
2025-01-09 10:15:53 +01:00
2025-01-09 10:15:53 +01:00
2024-11-29 12:37:46 +02:00
2024-10-08 11:58:46 +02:00
2024-10-08 11:58:46 +02:00
2024-10-08 11:58:46 +02:00
2024-07-16 15:54:22 +08:00
2024-10-08 11:58:46 +02:00
2024-07-16 15:54:22 +08:00
2025-07-09 18:04:46 +02:00
2025-07-09 18:04:46 +02:00
2024-10-01 13:45:46 +05:30
2024-09-27 13:52:17 +03:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:22 -07:00
2024-06-20 11:32:13 -04:00
2024-05-21 14:58:01 +04:00
2023-07-14 13:26:26 +04:00
2024-01-24 09:59:55 +04:00
2023-11-08 15:57:05 +01:00
2025-01-05 16:40:11 +02:00
2024-01-16 18:53:23 +04:00
2024-06-26 09:16:54 +08:00
2024-06-24 13:09:47 +03:00
2025-01-29 11:17:38 +01:00
2025-01-24 09:15:20 +00:00
2025-01-24 09:15:20 +00:00
2023-10-03 08:25:31 +03:00
2025-04-02 04:43:24 +02:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2024-09-13 14:34:08 +03:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:22 -07:00
2023-11-08 14:50:43 +01:00
2023-11-08 14:50:43 +01:00
2024-11-29 12:37:46 +02:00
2024-05-30 14:27:07 +03:00
2023-02-10 13:03:01 +02:00
2024-06-19 22:16:02 +02:00
2025-05-28 16:29:55 +10:00
2025-03-09 12:49:44 +02:00
2025-03-09 12:50:56 +02:00
2025-06-02 14:02:53 +03:00
2024-10-08 11:58:46 +02:00
2024-11-29 12:37:46 +02:00
2024-10-29 14:20:03 +01:00
2024-10-14 09:36:17 +02:00
2024-06-24 13:09:47 +03:00
2024-01-17 13:35:05 +02:00
2024-06-24 13:09:47 +03:00
2023-02-09 16:09:08 +02:00
2024-11-29 12:37:46 +02:00
2023-02-10 12:02:11 +02:00
2024-07-16 15:54:22 +08:00
2023-12-17 11:20:43 +01:00
2023-12-17 11:20:43 +01:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2024-11-23 08:14:22 -07:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-07-10 14:37:39 -06:00
2025-01-20 09:57:37 +02:00
2023-08-01 15:08:52 +02:00
2023-02-10 12:02:11 +02:00
2025-04-11 13:42:12 +02:00
2024-11-29 12:37:46 +02:00
2024-01-23 13:03:11 +02:00
2025-04-19 11:03:43 +03:00
2024-12-03 15:05:32 +01:00
2023-03-24 12:04:16 +11:00
2025-01-24 09:15:20 +00:00
2024-05-08 20:06:00 +02:00
2023-02-27 19:25:44 +02:00
2023-02-09 16:09:08 +02:00
2024-10-29 14:20:03 +01:00
2024-03-05 20:19:49 +02:00
2025-07-08 16:41:12 +02:00
2025-07-08 16:41:12 +02:00
2024-02-29 07:38:55 -07:00
2024-01-23 13:03:11 +02:00
2025-01-29 11:17:38 +01:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:22 -07:00
2024-11-29 12:37:46 +02:00
2024-12-04 18:22:31 +03:00
2024-12-13 01:45:35 +01:00
2025-04-19 11:03:43 +03:00
2023-05-02 10:09:27 +02:00
2024-01-23 13:03:11 +02:00
2024-01-23 13:03:11 +02:00
2024-11-23 08:14:22 -07:00
2025-03-19 16:50:23 +04:00
2025-01-20 09:57:37 +02:00
2023-11-08 15:57:05 +01:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00
2024-12-05 09:20:36 +01:00
2025-06-03 13:51:55 +02:00
2025-01-09 10:00:35 +01:00
2025-04-28 12:38:01 +03:00
2024-06-24 13:09:47 +03:00
2025-01-29 11:17:38 +01:00
2025-01-20 09:57:37 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2023-07-07 12:53:18 +03:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:23 -07:00
2025-05-20 20:59:10 +02:00
2025-04-26 10:41:52 +02:00
2024-01-17 13:35:05 +02:00
2023-02-10 12:02:11 +02:00
2024-04-23 14:12:31 +03:00
2025-04-26 10:41:52 +02:00
2024-11-23 08:14:22 -07:00
2025-06-02 14:02:53 +03:00
2025-04-29 15:05:20 +04:00
2025-02-01 16:53:39 +01:00
2024-11-29 12:37:46 +02:00
2024-09-23 16:16:51 +02:00
2025-01-05 16:40:11 +02:00
2023-02-09 16:09:08 +02:00
2024-01-11 12:59:22 +11:00
2024-01-10 18:01:46 +11:00
2024-06-24 13:09:47 +03:00
2024-11-29 12:37:46 +02:00
2023-02-10 13:03:01 +02:00
2025-01-29 10:43:29 +01:00
2024-08-03 09:04:24 +02:00
2024-10-17 21:37:37 +02:00
2025-01-09 10:15:53 +01:00
2024-08-20 09:11:34 +02:00
2024-07-16 15:54:22 +08:00
2024-07-16 15:54:22 +08:00
2024-02-12 11:38:13 +02:00
2024-06-20 11:32:13 -04:00
2024-06-20 11:32:13 -04:00
2024-12-17 11:06:09 +11:00
2024-10-14 09:36:17 +02:00
2024-11-29 12:37:46 +02:00
2025-07-09 18:04:46 +02:00
2025-04-25 15:10:36 +02:00
2024-10-14 09:36:17 +02:00
2024-06-24 13:09:47 +03:00
2025-04-26 10:41:52 +02:00
2025-04-26 10:41:52 +02:00
2024-11-23 08:14:22 -07:00
2023-05-23 12:25:39 +03:00
2024-11-29 12:37:46 +02:00
2025-01-20 09:57:37 +02:00
2024-06-05 14:06:16 +10:00
2024-04-15 18:54:30 +02:00
2025-04-21 10:43:17 +02:00
2025-01-20 09:57:37 +02:00
2024-07-03 12:45:30 +02:00
2025-01-20 09:57:37 +02:00
2023-08-04 07:52:54 +02:00
2025-01-29 11:17:38 +01:00
2025-01-20 09:57:37 +02:00
2024-11-23 08:14:23 -07:00
2025-07-09 18:04:46 +02:00
2023-11-05 23:35:31 +04:00
2024-10-16 16:46:38 +03:00
2023-12-17 11:20:43 +01:00
2023-12-17 11:20:43 +01:00
2025-04-21 10:43:17 +02:00
2025-02-02 04:54:42 +01:00
2025-01-24 09:15:20 +00:00
2024-01-23 13:03:11 +02:00
2024-06-20 11:32:13 -04:00
2023-12-02 01:02:50 +01:00
2025-07-08 11:44:49 +03:00
2024-12-17 11:06:09 +11:00
2024-10-16 17:24:46 +03:00
2023-09-27 08:54:26 +02:00
2025-01-13 11:56:19 +11:00
2025-06-02 14:02:53 +03:00
2024-06-20 11:32:13 -04:00
2024-06-20 11:32:13 -04:00
2024-11-29 12:37:46 +02:00
2025-05-20 17:27:05 +03:00
2024-08-25 16:05:00 +03:00
2024-03-27 15:00:56 +02:00
2025-04-15 01:49:48 +02:00
2025-07-09 18:04:46 +02:00
2024-10-29 14:20:03 +01:00
2024-06-13 19:58:11 +03:00
2024-05-27 13:19:13 +04:00
2025-02-02 12:55:16 +01:00
2025-01-20 09:57:37 +02:00
2025-03-26 17:09:57 +02:00
2024-06-20 11:32:13 -04:00
2024-07-10 17:23:43 -04:00
2023-09-25 13:06:57 +10:00
2023-02-10 13:03:01 +02:00
2024-11-29 12:37:46 +02:00
2023-10-03 08:25:31 +03:00
2024-01-17 13:35:05 +02:00
2023-08-01 15:08:52 +02:00
2023-07-04 16:37:29 +02:00
2023-02-09 16:09:08 +02:00
2024-11-29 12:37:46 +02:00
2024-11-29 12:37:46 +02:00
2024-11-23 08:14:22 -07:00
2024-11-23 08:14:23 -07:00
2025-05-29 12:34:06 +03:00
2025-04-26 10:41:52 +02:00
2025-04-21 10:43:17 +02:00
2025-01-07 16:46:43 +01:00
2024-06-20 11:32:13 -04:00
2025-07-09 17:32:37 +02:00
2025-03-26 17:09:57 +02:00
2024-06-20 11:32:13 -04:00
2025-05-28 16:29:55 +10:00
2024-11-29 12:37:46 +02:00
2025-04-29 15:05:20 +04:00
2024-01-10 18:01:46 +11:00
2025-07-09 18:04:46 +02:00
2025-07-09 18:04:46 +02:00
2024-05-21 14:58:01 +04:00
2023-12-02 01:02:50 +01:00
2024-11-05 21:32:48 +01:00
2025-05-20 17:27:05 +03:00
2024-06-20 11:32:13 -04:00
2024-03-19 11:57:38 +01:00
2024-06-24 13:09:47 +03:00
2025-01-09 10:00:35 +01:00
2025-05-20 17:27:05 +03:00
2023-02-10 12:02:11 +02:00
2025-05-21 09:47:55 +02:00
2024-11-23 08:14:23 -07:00
2024-11-23 08:14:23 -07:00
2024-02-13 20:42:59 +02:00
2023-02-10 12:02:11 +02:00
2024-11-15 12:18:06 +11:00
2024-02-19 15:35:06 +01:00
2025-04-02 04:50:30 +02:00
2024-09-01 02:58:27 +02:00
2023-10-03 08:25:30 +03:00
2025-04-02 04:43:24 +02:00
2024-06-20 11:32:13 -04:00
2024-06-20 11:32:13 -04:00
2024-01-02 17:37:58 +02:00
2025-04-02 04:29:34 +02:00
2024-06-20 11:32:13 -04:00
2024-06-20 11:32:13 -04:00
2025-06-30 00:52:34 +02:00
2025-05-20 20:59:10 +02:00
2024-05-06 03:16:59 +02:00
2023-09-29 12:54:04 +02:00
2024-01-03 08:52:50 +02:00
2023-08-08 03:25:56 +02:00
2025-01-20 09:57:37 +02:00
2025-01-13 19:14:26 +01:00
2025-04-02 04:43:24 +02:00
2024-09-01 02:48:19 +02:00
2024-09-26 00:04:56 +02:00
2024-09-01 02:48:19 +02:00
2025-04-02 04:43:24 +02:00
2024-06-20 11:32:13 -04:00
2025-01-29 11:17:38 +01:00
2025-04-02 04:50:11 +02:00
2025-02-18 19:30:04 +01:00
2024-10-29 14:20:03 +01:00
2023-09-11 23:06:15 +02:00
2025-06-30 00:52:34 +02:00
2025-02-02 12:55:16 +01:00
2025-02-18 19:30:04 +01:00
2025-02-18 19:30:04 +01:00
2024-11-29 12:37:46 +02:00
2024-10-16 13:23:47 +02:00