Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
clmforever
oceanbase
提交
fae12fa6
O
oceanbase
项目概览
clmforever
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fae12fa6
编写于
3月 02, 2023
作者:
O
obdev
提交者:
ob-robot
3月 02, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[to #35027451] refresh mysqltest case
上级
76437a33
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
49 deletion
+48
-49
src/share/schema/ob_schema_printer.cpp
src/share/schema/ob_schema_printer.cpp
+3
-13
tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result
...s/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result
+45
-36
未找到文件。
src/share/schema/ob_schema_printer.cpp
浏览文件 @
fae12fa6
...
...
@@ -3902,19 +3902,6 @@ int ObSchemaPrinter::print_routine_definition(const ObRoutineInfo *routine_info,
OX
(
routine_param
=
static_cast
<
const
ObRoutineParam
*>
(
routine_info
->
get_ret_info
()));
OZ
(
print_routine_param_type
(
routine_param
,
return_type
,
buf
,
buf_len
,
pos
,
tz_info
));
}
if
(
OB_SUCC
(
ret
)
&&
lib
::
is_mysql_mode
())
{
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
"%s"
,
routine_info
->
is_deterministic
()
?
"
\n
DETERMINISTIC
\n
"
:
""
));
if
(
OB_SUCC
(
ret
)
&&
OB_NOT_NULL
(
routine_info
->
get_comment
()))
{
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
"%s%.*s%s
\n
"
,
"COMMENT `"
,
routine_info
->
get_comment
().
length
(),
routine_info
->
get_comment
().
ptr
(),
"`"
));
}
}
if
(
OB_SUCC
(
ret
)
&&
lib
::
is_oracle_mode
()
&&
!
clause
.
empty
())
{
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
" %.*s"
,
clause
.
length
(),
clause
.
ptr
()));
}
if
(
OB_SUCC
(
ret
)
&&
lib
::
is_mysql_mode
())
{
if
(
routine_info
->
is_no_sql
())
{
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
"
\n
NO SQL"
));
...
...
@@ -3934,6 +3921,9 @@ int ObSchemaPrinter::print_routine_definition(const ObRoutineInfo *routine_info,
"`"
));
}
}
if
(
OB_SUCC
(
ret
)
&&
lib
::
is_oracle_mode
()
&&
!
clause
.
empty
())
{
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
" %.*s
\n
"
,
clause
.
length
(),
clause
.
ptr
()));
}
OZ
(
databuff_printf
(
buf
,
buf_len
,
pos
,
lib
::
is_oracle_mode
()
?
(
routine_info
->
is_aggregate
()
?
"
\n
AGGREGATE USING %.*s"
:
" IS
\n
%.*s"
)
:
" %.*s"
,
body
.
length
(),
body
.
ptr
()));
...
...
tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result
浏览文件 @
fae12fa6
...
...
@@ -800,6 +800,7 @@ show create procedure chistics|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
chistics STRICT_ALL_TABLES CREATE DEFINER = admin@% PROCEDURE `test`.`chistics`
()
MODIFIES SQL DATA
COMMENT `Characteristics procedure test`
insert into t1 values ("chistics", 1) utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
call chistics()|
...
...
@@ -812,6 +813,8 @@ show create procedure chistics|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
chistics STRICT_ALL_TABLES CREATE DEFINER = admin@% PROCEDURE `test`.`chistics`
()
MODIFIES SQL DATA
INVOKER
COMMENT `Characteristics procedure test`
insert into t1 values ("chistics", 1) utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
drop procedure chistics|
...
...
@@ -825,9 +828,9 @@ comment 'Characteristics procedure test'
show create function chistics|
Function sql_mode Create Function character_set_client collation_connection Database Collation
chistics STRICT_ALL_TABLES CREATE DEFINER = admin@% FUNCTION `test`.`chistics`
()
RETURNS int(11)
() RETURNS int(11)
DETERMINISTIC
INVOKER
COMMENT `Characteristics procedure test`
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
select chistics()|
...
...
@@ -839,9 +842,9 @@ comment 'Characteristics function test'|
show create function chistics|
Function sql_mode Create Function character_set_client collation_connection Database Collation
chistics STRICT_ALL_TABLES CREATE DEFINER = admin@% FUNCTION `test`.`chistics`
()
RETURNS int(11)
() RETURNS int(11)
DETERMINISTIC
INVOKER
COMMENT `Characteristics procedure test`
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
drop function chistics|
...
...
@@ -1309,7 +1312,8 @@ Procedure sql_mode Create Procedure character_set_client collation_connection Da
opp CREATE DEFINER = admin@% PROCEDURE `test`.`opp`
(
IN `n` bigint(20) unsigned, OUT `pp` tinyint(1)
) begin
)
begin
declare r double;
declare b, s bigint unsigned default 0;
set r = sqrt(n);
...
...
@@ -1364,7 +1368,8 @@ Procedure sql_mode Create Procedure character_set_client collation_connection Da
bar CREATE DEFINER = admin@% PROCEDURE `test`.`bar`
(
IN `x` char(16), IN `y` int(11)
)COMMENT `111111111111`
)
COMMENT `111111111111`
insert into test.t1 values (x, y) utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
show procedure status like 'bar'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
...
...
@@ -1946,8 +1951,8 @@ end utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
call bug2267_4()|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug2267_4 CREATE DEFINER = admin@% FUNCTION `test`.`bug2267_4`
()
RETURNS int(11)
return 100 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS int(11)
return 100 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
drop procedure bug2267_1|
drop procedure bug2267_2|
drop procedure bug2267_3|
...
...
@@ -2241,13 +2246,15 @@ Function sql_mode Create Function character_set_client collation_connection Data
bug2564_3 CREATE DEFINER = admin@% FUNCTION `test`.`bug2564_3`
(
`x` int(11), `y` int(11)
) RETURNS int(11) return x || y utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
) RETURNS int(11)
return x || y utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
show create function bug2564_4|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug2564_4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI CREATE DEFINER = admin@% FUNCTION `test`.`bug2564_4`
(
`x` int(11), `y` int(11)
) RETURNS int(11) return x || y utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
) RETURNS int(11)
return x || y utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
drop procedure bug2564_1|
drop procedure bug2564_2|
ERROR 42000: PROCEDURE test.bug2564_2 does not exist
...
...
@@ -3682,17 +3689,17 @@ call bug12589_1()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(3,3) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
call bug12589_2()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
call bug12589_3()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
drop procedure bug12589_1|
drop procedure bug12589_2|
drop procedure bug12589_3|
...
...
@@ -4615,7 +4622,7 @@ show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
`j` int(11) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
select * from t3|
j
0
...
...
@@ -4795,23 +4802,23 @@ RETURN ""|
SHOW CREATE FUNCTION bug16211_f1|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f1 CREATE DEFINER = admin@% FUNCTION `mysqltest1`.`bug16211_f1`
()
RETURN
S char(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS char(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION bug16211_f2|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f2 CREATE DEFINER = admin@% FUNCTION `mysqltest1`.`bug16211_f2`
()
RETURN
S binary(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS binary(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION mysqltest2.bug16211_f3|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f3 CREATE DEFINER = admin@% FUNCTION `mysqltest2`.`bug16211_f3`
()
RETURN
S char(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS char(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION mysqltest2.bug16211_f4|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f4 CREATE DEFINER = admin@% FUNCTION `mysqltest2`.`bug16211_f4`
()
RETURN
S binary(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS binary(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SELECT dtd_identifier
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"|
...
...
@@ -4853,23 +4860,23 @@ ALTER DATABASE mysqltest2 CHARACTER SET utf8mb4|
SHOW CREATE FUNCTION bug16211_f1|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f1 CREATE DEFINER = admin@% FUNCTION `mysqltest1`.`bug16211_f1`
()
RETURN
S char(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS char(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION bug16211_f2|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f2 CREATE DEFINER = admin@% FUNCTION `mysqltest1`.`bug16211_f2`
()
RETURN
S binary(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS binary(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION mysqltest2.bug16211_f3|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f3 CREATE DEFINER = admin@% FUNCTION `mysqltest2`.`bug16211_f3`
()
RETURN
S char(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS char(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SHOW CREATE FUNCTION mysqltest2.bug16211_f4|
Function sql_mode Create Function character_set_client collation_connection Database Collation
bug16211_f4 CREATE DEFINER = admin@% FUNCTION `mysqltest2`.`bug16211_f4`
()
RETURN
S binary(10) RETURN
"" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
()
RETURNS binary(10)
RETURN "" utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
SELECT dtd_identifier
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"|
...
...
@@ -6131,7 +6138,8 @@ Procedure sql_mode Create Procedure character_set_client collation_connection Da
proc_25411_b CREATE DEFINER = admin@% PROCEDURE `test`.`proc_25411_b`
(
IN `p1` int(11), IN `p2` int(11), IN `p3` int(11)
) begin
)
begin
select p1, p2;
end utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
select name, param_list, body from mysql.proc where name like "%25411%";
...
...
@@ -6240,7 +6248,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` datetime DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
DROP TABLE t1;
...
...
@@ -6249,7 +6257,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` datetime DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
DROP TABLE t1;
...
...
@@ -6258,7 +6266,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` int(11) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
DROP TABLE t1;
...
...
@@ -6267,7 +6275,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` int(11) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
2
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM =
1
BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
DROP TABLE t1;
...
...
@@ -6682,7 +6690,8 @@ Function sql_mode Create Function character_set_client collation_connection Data
f1 CREATE DEFINER = admin@% FUNCTION `test`.`f1`
(
`p` int(11)
) RETURNS enum BEGIN
) RETURNS enum
BEGIN
CASE p
WHEN 1 THEN
RETURN 'Very_long_enum_element_identifier';
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录