From ef076da2027c712ace6ca38f9ebca422bedcbeb5 Mon Sep 17 00:00:00 2001
From: Sergei Golubchik <serg@mariadb.org>
Date: Fri, 13 Feb 2026 15:22:57 +0100
Subject: [PATCH 1/1] MDEV-38811 crash in information_schema.table_constraints
 when --skip-grant-tables

acl_get_all3() wasn't expecting --skip-grant-tables

(cherry picked from commit 87309d3d4bb8f48910d05b0ca5ee989bcdd6b053)
---
 sql/sql_acl.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index a583c0b4487..b6abd27e870 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -3927,6 +3927,9 @@ privilege_t acl_get(const char *host, const char *ip,
 privilege_t acl_get_all3(Security_context *sctx, const char *db,
                          bool db_is_patern)
 {
+  if (!initialized)
+    return DB_ACLS;
+
   privilege_t access= acl_get(sctx->host, sctx->ip,
                               sctx->priv_user, db, db_is_patern);
   if (sctx->priv_role[0])
