This is an automated email from the ASF dual-hosted git repository.

liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 36d9fd2313 fix:MCP server plugin requestConfig too long (#6115)
36d9fd2313 is described below

commit 36d9fd2313cf1e44eb03a2ac6e88613d2f3e362c
Author: Wweiei <45253632+wwe...@users.noreply.github.com>
AuthorDate: Thu Aug 28 10:04:40 2025 +0800

    fix:MCP server plugin requestConfig too long (#6115)
    
    Co-authored-by: aias00 <liuhon...@apache.org>
---
 db/init/mysql/schema.sql                  | 2 +-
 db/init/ob/schema.sql                     | 2 +-
 db/init/og/create-table.sql               | 2 +-
 db/init/oracle/schema.sql                 | 2 +-
 db/init/pg/create-table.sql               | 2 +-
 db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql  | 2 ++
 db/upgrade/2.7.0-upgrade-2.7.1-ob.sql     | 2 ++
 db/upgrade/2.7.0-upgrade-2.7.1-og.sql     | 2 ++
 db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql | 9 ++++++++-
 db/upgrade/2.7.0-upgrade-2.7.1-pg.sql     | 4 +++-
 10 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/db/init/mysql/schema.sql b/db/init/mysql/schema.sql
index 3292f11f9b..9452eee712 100644
--- a/db/init/mysql/schema.sql
+++ b/db/init/mysql/schema.sql
@@ -2063,7 +2063,7 @@ CREATE TABLE `rule`  (
   `match_restful` tinyint(0) NOT NULL COMMENT 'whether to match restful(0 
cache, 1 not cache)',
   `namespace_id` varchar(50) NOT NULL COMMENT 'namespace id',
   `sort` int(0) NOT NULL COMMENT 'sort',
-  `handle` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL 
DEFAULT NULL COMMENT 'processing logic (here for different plug-ins, there will 
be different fields to identify different processes, all data in JSON format is 
stored)',
+  `handle` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 
NULL COMMENT 'processing logic (here for different plug-ins, there will be 
different fields to identify different processes, all data in JSON format is 
stored)',
   `date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 
'create time',
   `date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE 
CURRENT_TIMESTAMP(3) COMMENT 'update time',
   PRIMARY KEY (`id`) USING BTREE
diff --git a/db/init/ob/schema.sql b/db/init/ob/schema.sql
index c0414df2d4..f3ae75408e 100644
--- a/db/init/ob/schema.sql
+++ b/db/init/ob/schema.sql
@@ -1991,7 +1991,7 @@ CREATE TABLE `rule`  (
   `match_restful` tinyint(0) NOT NULL COMMENT 'whether to match restful(0 
cache, 1 not cache)',
   `namespace_id` varchar(50) NOT NULL COMMENT 'namespace id',
   `sort` int(0) NOT NULL COMMENT 'sort',
-  `handle` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL 
DEFAULT NULL COMMENT 'processing logic (here for different plug-ins, there will 
be different fields to identify different processes, all data in JSON format is 
stored)',
+  `handle` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 
NULL COMMENT 'processing logic (here for different plug-ins, there will be 
different fields to identify different processes, all data in JSON format is 
stored)',
   `date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 
'create time',
   `date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE 
CURRENT_TIMESTAMP(3) COMMENT 'update time',
   PRIMARY KEY (`id`) USING BTREE
diff --git a/db/init/og/create-table.sql b/db/init/og/create-table.sql
index e779a5e818..a752390255 100644
--- a/db/init/og/create-table.sql
+++ b/db/init/og/create-table.sql
@@ -1918,7 +1918,7 @@ CREATE TABLE "public"."rule" (
   "match_restful" int2 NOT NULL,
   "namespace_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
   "sort" int4 NOT NULL,
-  "handle" varchar(1024) COLLATE "pg_catalog"."default",
+  "handle" text COLLATE "pg_catalog"."default",
   "date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, 
(now())::timestamp(0) without time zone),
   "date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, 
(now())::timestamp(0) without time zone)
 )
diff --git a/db/init/oracle/schema.sql b/db/init/oracle/schema.sql
index 81779376ba..917ea5df56 100644
--- a/db/init/oracle/schema.sql
+++ b/db/init/oracle/schema.sql
@@ -200,7 +200,7 @@ create table rule
     match_restful NUMBER(3) not null,
     namespace_id VARCHAR2(50) not null,
     sort          NUMBER(10) not null,
-    handle        VARCHAR2(1024),
+    handle        CLOB,
     date_created  timestamp(3) default SYSDATE not null,
     date_updated  timestamp(3) default SYSDATE not null
 );
diff --git a/db/init/pg/create-table.sql b/db/init/pg/create-table.sql
index e386ab7c3e..f8f454730e 100644
--- a/db/init/pg/create-table.sql
+++ b/db/init/pg/create-table.sql
@@ -2046,7 +2046,7 @@ CREATE TABLE "public"."rule" (
   "match_restful" int2 NOT NULL,
   "namespace_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
   "sort" int4 NOT NULL,
-  "handle" varchar(1024) COLLATE "pg_catalog"."default",
+  "handle" text COLLATE "pg_catalog"."default",
   "date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, 
(now())::timestamp(0) without time zone),
   "date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, 
(now())::timestamp(0) without time zone)
 )
diff --git a/db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql 
b/db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql
index 87e56d6aa2..cb443e7257 100755
--- a/db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql
+++ b/db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql
@@ -265,3 +265,5 @@ INSERT INTO `permission` (`id`, `object_id`, `resource_id`, 
`date_created`, `dat
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303903', '1346358560427216896', 
'1953048313980116902', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303904', '1346358560427216896', 
'1953048313980116903', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303905', '1346358560427216896', 
'1953048313980116904', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
+
+ALTER TABLE `rule` MODIFY COLUMN `handle` text;
diff --git a/db/upgrade/2.7.0-upgrade-2.7.1-ob.sql 
b/db/upgrade/2.7.0-upgrade-2.7.1-ob.sql
index 4ee7f8dbc1..982383beb4 100755
--- a/db/upgrade/2.7.0-upgrade-2.7.1-ob.sql
+++ b/db/upgrade/2.7.0-upgrade-2.7.1-ob.sql
@@ -258,3 +258,5 @@ INSERT INTO `permission` (`id`, `object_id`, `resource_id`, 
`date_created`, `dat
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303903', '1346358560427216896', 
'1953048313980116902', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303904', '1346358560427216896', 
'1953048313980116903', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
 INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, 
`date_updated`) VALUES ('1953049887387303905', '1346358560427216896', 
'1953048313980116904', '2025-08-06 17:00:00.000', '2025-08-06 17:00:00.000');
+
+ALTER TABLE `rule` MODIFY COLUMN `handle` text;
\ No newline at end of file
diff --git a/db/upgrade/2.7.0-upgrade-2.7.1-og.sql 
b/db/upgrade/2.7.0-upgrade-2.7.1-og.sql
index be9366ac7b..33f7e0e19d 100644
--- a/db/upgrade/2.7.0-upgrade-2.7.1-og.sql
+++ b/db/upgrade/2.7.0-upgrade-2.7.1-og.sql
@@ -282,3 +282,5 @@ INSERT INTO "public"."permission" VALUES 
('1953049887387303902', '13463585604272
 INSERT INTO "public"."permission" VALUES ('1953049887387303903', 
'1346358560427216896', '1953048313980116902', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
 INSERT INTO "public"."permission" VALUES ('1953049887387303904', 
'1346358560427216896', '1953048313980116903', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
 INSERT INTO "public"."permission" VALUES ('1953049887387303905', 
'1346358560427216896', '1953048313980116904', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
+
+ALTER TABLE "public"."rule" ALTER COLUMN "handle" TYPE text;
\ No newline at end of file
diff --git a/db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql 
b/db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql
index fb5df4f0c2..d3f167223a 100755
--- a/db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql
+++ b/db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql
@@ -566,4 +566,11 @@ INSERT INTO permission (id, role_id, resource_id, 
date_created, date_updated) VA
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1953049887387303902', '1346358560427216896', '1953048313980116901', 
sysdate, sysdate);
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1953049887387303903', '1346358560427216896', '1953048313980116902', 
sysdate, sysdate);
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1953049887387303904', '1346358560427216896', '1953048313980116903', 
sysdate, sysdate);
-INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1953049887387303905', '1346358560427216896', '1953048313980116904', 
sysdate, sysdate);
\ No newline at end of file
+INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1953049887387303905', '1346358560427216896', '1953048313980116904', 
sysdate, sysdate);
+
+-- update rule.handle field type from varchar2 to clob
+ALTER TABLE rule ADD (handle_new CLOB);
+UPDATE rule SET handle_new = handle;
+COMMIT;
+ALTER TABLE rule DROP COLUMN handle;
+ALTER TABLE rule RENAME COLUMN handle_new TO handle;
\ No newline at end of file
diff --git a/db/upgrade/2.7.0-upgrade-2.7.1-pg.sql 
b/db/upgrade/2.7.0-upgrade-2.7.1-pg.sql
index ca5256a046..19b8c945fb 100755
--- a/db/upgrade/2.7.0-upgrade-2.7.1-pg.sql
+++ b/db/upgrade/2.7.0-upgrade-2.7.1-pg.sql
@@ -279,4 +279,6 @@ INSERT INTO "public"."permission" VALUES 
('1953049887387303901', '13463585604272
 INSERT INTO "public"."permission" VALUES ('1953049887387303902', 
'1346358560427216896', '1953048313980116901', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
 INSERT INTO "public"."permission" VALUES ('1953049887387303903', 
'1346358560427216896', '1953048313980116902', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
 INSERT INTO "public"."permission" VALUES ('1953049887387303904', 
'1346358560427216896', '1953048313980116903', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
-INSERT INTO "public"."permission" VALUES ('1953049887387303905', 
'1346358560427216896', '1953048313980116904', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
\ No newline at end of file
+INSERT INTO "public"."permission" VALUES ('1953049887387303905', 
'1346358560427216896', '1953048313980116904', '2025-08-06 17:00:00.000', 
'2025-08-06 17:00:00.000');
+
+ALTER TABLE "public"."rule" ALTER COLUMN "handle" TYPE text;
\ No newline at end of file

Reply via email to