OceanBase 回收站功能(社区版4.2.1.0)

概述

回收站默认是关闭的。如果开启的话,回收站里包含 OB 被删除的对象(租户,表,索引,database等)。当删除OB某个对象后,该对象会进入回收站,删除对象的存储空间并不会被释放,仍然占用物理空间。

开启回收站

使用 sys租户 或者 用户租户的管理员 登录修改

[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524910
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>  SET GLOBAL recyclebin = on;
Query OK, 0 rows affected (0.052 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> exit
Bye
[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@mysqlbak#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524911
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SET GLOBAL recyclebin = on;
Query OK, 0 rows affected (0.030 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> exit
Bye
[root@rac1 ~]#

恢复租户

删除租户

只有 sys 租户 可以进行删除租户的操作,使用回收站查看 被删除的租户 需要 通过 sys 租户 登录 查看, 如果删除对象属于 数据库(database), 表 等对象。使用 sys租户 和 相关租户的管理员查看均可

使用 sys租户登录 删除 其它租户

[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524912
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SET GLOBAL recyclebin = 1;
Query OK, 0 rows affected (0.003 sec)obclient [oceanbase]>
obclient [oceanbase]> SET GLOBAL recyclebin = true;
Query OK, 0 rows affected (0.003 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
Empty set (0.005 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> drop TENANT mysqlbak;
Query OK, 0 rows affected (0.050 sec)obclient [oceanbase]>
obclient [oceanbase]>

查看回收站

可以发现 被删租户mysqlbak 已被放入回收站

obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+--------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE   | CREATETIME                 |
+-----------------------------------------+---------------+--------+----------------------------+
| __recycle_$_1715845727_1715862359970160 | mysqlbak      | TENANT | 2024-05-17 10:46:56.072550 |
+-----------------------------------------+---------------+--------+----------------------------+
1 row in set (0.005 sec)

通过租户名恢复
[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524949
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+--------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE   | CREATETIME                 |
+-----------------------------------------+---------------+--------+----------------------------+
| __recycle_$_1715845727_1715862359970160 | mysqlbak      | TENANT | 2024-05-17 10:46:56.072550 |
+-----------------------------------------+---------------+--------+----------------------------+
1 row in set (0.006 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK TENANT mysqlbak TO BEFORE DROP;
Query OK, 0 rows affected (0.032 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> exit
Bye
[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@mysqlbak#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524950
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>

通过回收站中的名称恢复

由于 被删租户 在 回收站 的名称是 全局唯一的 ,因此强烈建议 使用 回收站中的名称恢复

[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524951
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]> drop TENANT mysqlbak;
Query OK, 0 rows affected (0.025 sec)obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+--------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE   | CREATETIME                 |
+-----------------------------------------+---------------+--------+----------------------------+
| __recycle_$_1715845727_1715916550830336 | mysqlbak      | TENANT | 2024-05-17 11:33:18.441053 |
+-----------------------------------------+---------------+--------+----------------------------+
1 row in set (0.005 sec)obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK TENANT __recycle_$_1715845727_1715916550830336 TO BEFORE DROP;
Query OK, 0 rows affected (0.026 sec)

恢复被删租户之后重命名

使用租户名还原之后重命名

[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524955
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]> drop TENANT mysqlbak;
Query OK, 0 rows affected (0.028 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+--------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE   | CREATETIME                 |
+-----------------------------------------+---------------+--------+----------------------------+
| __recycle_$_1715845727_1715916858016656 | mysqlbak      | TENANT | 2024-05-17 11:38:45.554886 |
+-----------------------------------------+---------------+--------+----------------------------+
1 row in set (0.007 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK TENANT mysqlbak  TO BEFORE DROP RENAME TO obmysql;
Query OK, 0 rows affected (0.021 sec)obclient [oceanbase]>
obclient [oceanbase]>

使用回收站名称还原租户重命名
[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@sys#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524961
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> drop TENANT obmysql;
Query OK, 0 rows affected (0.027 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+--------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE   | CREATETIME                 |
+-----------------------------------------+---------------+--------+----------------------------+
| __recycle_$_1715845727_1715917204567576 | obmysql       | TENANT | 2024-05-17 11:42:52.154001 |
+-----------------------------------------+---------------+--------+----------------------------+
1 row in set (0.004 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK TENANT __recycle_$_1715845727_1715917204567576  TO BEFORE DROP RENAME TO mysqlbak;
Query OK, 0 rows affected (0.024 sec)obclient [oceanbase]>

恢复数据库(database)

恢复数据时 不允许使用 数据库原始名称,只能使用 回收站名称 来恢复, 并且恢复后的数据库名称不能与已有数据库名称重复

恢复数据库

使用 sys租户 或者 MySQL租户的管理员 登录进行恢复

[root@rac1 ~]# obclient -h10.0.0.197 -P2883 -uroot@mysqlbak#myoceanbase -p'aaAA11__' -Doceanbase -A -c;
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 524962
Server version: OceanBase_CE 4.2.1.0 (r100000102023092807-7b0f43693565654bb1d7343f728bc2013dfff959) (Built Sep 28 2023 07:25:28)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]>
obclient [oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| oceanbase          |
| test               |
+--------------------+
4 rows in set (0.007 sec)obclient [oceanbase]>
obclient [oceanbase]> drop database test;
Query OK, 0 rows affected (0.031 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+----------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE     | CREATETIME                 |
+-----------------------------------------+---------------+----------+----------------------------+
| __recycle_$_1715845727_1715917792242600 | test          | DATABASE | 2024-05-17 11:49:52.243462 |
+-----------------------------------------+---------------+----------+----------------------------+
1 row in set (0.007 sec)obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK DATABASE __recycle_$_1715845727_1715917792242600 TO BEFORE DROP;
Query OK, 0 rows affected (0.034 sec)obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| oceanbase          |
| test               |
+--------------------+
4 rows in set (0.006 sec)

恢复数据库并重命名
obclient [oceanbase]> drop database test;
Query OK, 0 rows affected (0.030 sec)obclient [oceanbase]>
obclient [oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| oceanbase          |
+--------------------+
3 rows in set (0.006 sec)obclient [oceanbase]>
obclient [oceanbase]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+----------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE     | CREATETIME                 |
+-----------------------------------------+---------------+----------+----------------------------+
| __recycle_$_1715845727_1715918146268704 | test          | DATABASE | 2024-05-17 11:55:46.268177 |
+-----------------------------------------+---------------+----------+----------------------------+
1 row in set (0.006 sec)obclient [oceanbase]>
obclient [oceanbase]> FLASHBACK DATABASE __recycle_$_1715845727_1715918146268704 TO BEFORE DROP RENAME TO ceshi;
Query OK, 0 rows affected (0.029 sec)obclient [oceanbase]>
obclient [oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| ceshi              |
| information_schema |
| mysql              |
| oceanbase          |
+--------------------+
4 rows in set (0.006 sec)obclient [oceanbase]>

恢复表

使用 sys租户,MySQL 用户租户 和 Oracle 用户租户 均可以从回收站中 恢复表。恢复时可修改表的名称,但是不能与已有表重名

删除表

当删除某个表时,表中的 索引 会随着表 一起进入回收站。

obclient [tpcc]> drop table bmsql_item;
Query OK, 0 rows affected (0.040 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> SHOW RECYCLEBIN;
+-----------------------------------------+-----------------------+-------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME         | TYPE  | CREATETIME                 |
+-----------------------------------------+-----------------------+-------+----------------------------+
| __recycle_$_1715845727_1715925641147936 | __idx_500011_index_id | INDEX | 2024-05-17 14:00:41.147178 |
| __recycle_$_1715845727_1715925641155432 | bmsql_item            | TABLE | 2024-05-17 14:00:41.154715 |
+-----------------------------------------+-----------------------+-------+----------------------------+
2 rows in set (0.006 sec)obclient [tpcc]>

恢复表

还原表时可以使用 表名 和 回收站中的名称 还原,与 还原租户 一样,建议使用 回收站中的名称还原。可以发现,还原表时,原表自带的索引也会随着表一起被还原。

obclient [tpcc]> SHOW RECYCLEBIN;
+-----------------------------------------+-----------------------+-------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME         | TYPE  | CREATETIME                 |
+-----------------------------------------+-----------------------+-------+----------------------------+
| __recycle_$_1715845727_1715925641147936 | __idx_500011_index_id | INDEX | 2024-05-17 14:00:41.147178 |
| __recycle_$_1715845727_1715925641155432 | bmsql_item            | TABLE | 2024-05-17 14:00:41.154715 |
+-----------------------------------------+-----------------------+-------+----------------------------+
2 rows in set (0.006 sec)obclient [tpcc]>
obclient [tpcc]> FLASHBACK TABLE __recycle_$_1715845727_1715925641155432 TO BEFORE DROP;
Query OK, 0 rows affected (0.032 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> show create table bmsql_item;
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table      | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                           |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| bmsql_item | CREATE TABLE `bmsql_item` (`i_id` int(11) NOT NULL,`i_name` varchar(24) DEFAULT NULL,`i_price` decimal(5,2) DEFAULT NULL,`i_data` varchar(50) DEFAULT NULL,`i_im_id` int(11) DEFAULT NULL,KEY `index_id` (`i_id`) BLOCK_SIZE 16384 LOCAL
) 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 |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.020 sec)

注意

单独删除表中索引时 ,索引不会进入回收站

obclient [ceshi]> drop index index_id on bmsql_item;
Query OK, 0 rows affected (0.243 sec)obclient [ceshi]>
obclient [ceshi]>
obclient [ceshi]>
obclient [ceshi]> SHOW RECYCLEBIN;
Empty set (0.006 sec)obclient [ceshi]>

恢复表并重命名
obclient [tpcc]> drop table bmsql_item;
Query OK, 0 rows affected (0.046 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> SHOW RECYCLEBIN;
+-----------------------------------------+-----------------------+-------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME         | TYPE  | CREATETIME                 |
+-----------------------------------------+-----------------------+-------+----------------------------+
| __recycle_$_1715845727_1715926394294472 | __idx_500011_index_id | INDEX | 2024-05-17 14:13:14.294342 |
| __recycle_$_1715845727_1715926394302672 | bmsql_item            | TABLE | 2024-05-17 14:13:14.301867 |
+-----------------------------------------+-----------------------+-------+----------------------------+
2 rows in set (0.006 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> FLASHBACK TABLE __recycle_$_1715845727_1715926394302672 TO BEFORE DROP RENAME To bmsql_test;
Query OK, 0 rows affected (0.040 sec)obclient [tpcc]>
obclient [tpcc]> show create table bmsql_test;
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table      | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                           |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| bmsql_test | CREATE TABLE `bmsql_test` (`i_id` int(11) NOT NULL,`i_name` varchar(24) DEFAULT NULL,`i_price` decimal(5,2) DEFAULT NULL,`i_data` varchar(50) DEFAULT NULL,`i_im_id` int(11) DEFAULT NULL,KEY `index_id` (`i_id`) BLOCK_SIZE 16384 LOCAL
) 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 |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.028 sec)

恢复表到指定的数据库并重命名

还原表时,默认将表 还原至 删除之前所在的 database 或者 schema

obclient [tpcc]> drop table bmsql_test;
Query OK, 0 rows affected (0.039 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> SHOW RECYCLEBIN;
+-----------------------------------------+-----------------------+-------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME         | TYPE  | CREATETIME                 |
+-----------------------------------------+-----------------------+-------+----------------------------+
| __recycle_$_1715845727_1715926738118152 | __idx_500011_index_id | INDEX | 2024-05-17 14:18:58.117600 |
| __recycle_$_1715845727_1715926738124128 | bmsql_test            | TABLE | 2024-05-17 14:18:58.123400 |
+-----------------------------------------+-----------------------+-------+----------------------------+
2 rows in set (0.006 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> show databases;
+--------------------+
| Database           |
+--------------------+
| ceshi              |
| information_schema |
| mysql              |
| oceanbase          |
| tpcc               |
+--------------------+
5 rows in set (0.006 sec)obclient [tpcc]>
obclient [tpcc]> FLASHBACK TABLE __recycle_$_1715845727_1715926738124128 TO BEFORE DROP RENAME To ceshi.bmsql_item;
Query OK, 0 rows affected (0.036 sec)obclient [tpcc]> use ceshi;
Database changed
obclient [ceshi]>
obclient [ceshi]> show tables;
+-----------------+
| Tables_in_ceshi |
+-----------------+
| bmsql_item      |
+-----------------+
1 row in set (0.004 sec)

总结

1.还原任何对象时,都建议使用 回收站中的名称 还原

2.单独删除索引,索引不会进入回收站。删除表时,表中的索引会随着表 一起进入回收站,而且还原时,索引也会随着表一起还原

3.truncate 表是 OB 4.X.X.X 版本不支持通过回收站还原

obclient [tpcc]> truncate table bmsql_config;
Query OK, 0 rows affected (0.096 sec)obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]>
obclient [tpcc]> show tables;
+------------------+
| Tables_in_tpcc   |
+------------------+
| bmsql_config     |
| bmsql_customer   |
| bmsql_district   |
| bmsql_history    |
| bmsql_new_order  |
| bmsql_oorder     |
| bmsql_order_line |
| bmsql_stock      |
| bmsql_warehouse  |
+------------------+
9 rows in set (0.004 sec)obclient [tpcc]> SHOW RECYCLEBIN;
+-----------------------------------------+---------------+-------+----------------------------+
| OBJECT_NAME                             | ORIGINAL_NAME | TYPE  | CREATETIME                 |
+-----------------------------------------+---------------+-------+----------------------------+
| __recycle_$_1715845727_1716174434474744 | bmsql_item    | TABLE | 2024-05-20 11:07:14.476023 |
+-----------------------------------------+---------------+-------+----------------------------+
1 row in set (0.005 sec)obclient [tpcc]>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/18368.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

李廉洋:5.29黄金震荡,原油持续走高,今日美盘行情走势分析及策略。

黄金消息面分析:当前美国存在一个令人担忧且未被充分关注的问题:房地产行业低迷、高利率和抵押贷款利率、租金高涨以及美联储的紧缩政策构成了一个恶性循环。由于高房价和高抵押贷款利率,美国住房经济活动远低于两年前的水平。为了让该行业好…

Apache、Nginx、IIS文件解析漏洞

目录 1、文件解析漏洞介绍 2、Apache相关的解析漏洞 (1)多后缀解析漏洞 (2)Apache配置问题 (3)换行符解析漏洞 (4)罕见后缀解析 3、Nginx相关的解析漏洞 (1&…

记录帖 ES的RestApi使用

索引库操作 import org.apache.http.HttpHost; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.indices.CreateIndexRequest; import …

AcWing 1047.糖果

这里介绍一种可行的方案,但是对于本题来说,数据范围是不能达到要求的: 也就是设置一个状态,表示j这个数能不能满足最大糖果个数。j这个数需要满足是k的倍数。 这样其实就简单,我们只需要对于状态是否进行转移就行了&…

《java数据结构》--栈的详解

一.栈的认识 栈是一种不同于链表和顺序表的储存数据结构,它对存储数据和取出数据有着特殊的要求🤔。 首先栈只能从一端存储数据,也就是从一端进,还从这一端出这也是栈最大的特点,这也导致在栈中存取数据都必须遵循先…

C++线程任务队列模型

功能描述 实现一个任务队列,用于任务的执行 任务队列 任务队列可以添加、删除任务,实现对任务的管理添加任务后,任务队列可以开始执行任务队列执行任务方式为串行执行 任务 任务执行需要持续一段10s内随机的时间,执行过程通过…

将C++ cv:mat 通过JNI 转换为jbtyearray,传到android端

cv::Mat result ; //此处为C获取到的cv::mat结果对象// 编码为JPEG格式std::vector<uchar> buf;cv::imencode(".jpg", result, buf);// 创建一个新的jbyteArray并设置其大小jbyteArray array env->NewByteArray(buf.size());if (array NULL) {// 处理内存…

打造爆款活动:确定目标受众与吸引策略的实战指南

身为一名文案策划经理&#xff0c;我深知在活动策划的海洋中&#xff0c;确定目标受众并设计出能触动他们心弦的策略是何等重要。 通过以下步骤&#xff0c;你可以更准确地确定目标受众&#xff0c;并制定出有效的吸引策略&#xff0c;确保活动的成功&#xff1a; 明确活动目…

【跨平台的UI自动化测试框架】

下面是基于Airtest和Poco自动化测试框架的模板&#xff0c;并包含使用测试套件执行的方法说明。Airtest是一个跨平台的UI自动化测试框架&#xff0c;而Poco是一个用于UI元素定位的辅助库。 项目结构 your_project/ ├── test_suite/ │ ├── __init__.py │ ├── t…

【Oracle篇】rman标准化全库备份策略:完整备份or增量备份(第三篇,总共八篇)

&#x1f4ab;《博主介绍》&#xff1a;✨又是一天没白过&#xff0c;我是奈斯&#xff0c;DBA一名✨ &#x1f4ab;《擅长领域》&#xff1a;✌️擅长Oracle、MySQL、SQLserver、阿里云AnalyticDB for MySQL(分布式数据仓库)、Linux&#xff0c;也在扩展大数据方向的知识面✌️…

单元测试框架Pytest的基本操作

Pytest基本操作 1. 详解1.1 命名规则:1.2 自定义查找规则:1.3 3种运行方式1.4 执行顺序2. 断言2.1 定义2.2 断言的规则3. mark3.1 mark的作用3.2 mark的标记方式3.3 注册标签名3.4 skip跳过标记4. pytest的参数化5. pytest的夹具(fixture测试夹具)5.1. 作用5.2. 夹具应用场…

web前端框架设计第十一课-常用插件

web前端框架设计第十一课-常用插件 一.预习笔记 1.路由的基础使用 2.动态路由 3.嵌套路由 二.课堂笔记 三.课后回顾 –行动是治愈恐惧的良药&#xff0c;犹豫拖延将不断滋养恐惧

Web渗透-MySql-Sql注入:联合查询注入

SQL注入&#xff08;SQL Injection&#xff09;是一种网络攻击技术&#xff0c;攻击者通过将恶意的SQL代码插入到应用程序的输入字段&#xff0c;从而欺骗应用程序执行未经授权的操作。这种攻击方式可以导致严重的安全问题&#xff0c;包括&#xff1a; 数据泄露&#xff1a;攻…

windows和linux下的库文件比较

在Windows和Linux操作系统中&#xff0c;库文件&#xff08;lib、dll、.a、.so&#xff09;都扮演着重要的角色&#xff0c;但它们之间存在一些关键的区别。以下是这些库文件之间的主要差异&#xff1a; Windows lib 静态链接库&#xff08;Static Link Library&#xff09;…

UE5 UE4 快速定位节点位置

在材质面板中&#xff0c;找到之前写的一个节点&#xff0c;想要修改&#xff0c;但是当时写的比较多&#xff0c;想要快速定位到节点位置. 在面板下方的 Find Results面板中&#xff0c;输入所需节点&#xff0c;找结果后双击&#xff0c;就定位到该节点处。 同理&#xff0c;…

CGAL 获取网格相交面片

文章目录 一、简介二、实现代码三、实现效果参考资料一、简介 这里使用CGAL中的方法获取两个网格相交的面片,原理其实很简单,就是单纯的对每个面片进行相交测试,不过为了加快计算效率,CGAL中采用了AABB树这一结构来实现了这一过程。 二、实现代码 #include <iostream&g…

【CUDA】Nsight profile驱动的CUDA优化

前置准备 安装NVIDIA Nsight Compute。 安装好后选择使用管理员权限启动下载官方 Demo 代码官方博客Shuffle warp 1. 任务介绍及CPU版本 1.1 任务介绍 任务理解&#xff1a; 有一个 L x M 的矩阵 M 1 M_1 M1​ 对其每行取平均值 得到 V 1 ∈ R L 1 V_1 \in \mathbb{R}^{…

pikachu—exec“eval“

这是原画面 然后呢&#xff1f; 我们知道会传入到后台rce_eval.php来处理然后通过 eval()是啥? 在eval括号里面可以执行外来机器的命令 然后我们通过php的一个内置的命令 我们通过phpinfo()&#xff1b; 这是输入后的结果

C++实现生产者消费者模型

生产者-消费者模型是一种典型的多线程并发模式&#xff0c;常用于在一个共享缓冲区中协调生产者和消费者之间的数据传递。在C中&#xff0c;我们可以使用标准库中的线程、互斥量和条件变量来实现该模型。以下是一个简单的生产者-消费者模型的实现示例&#xff1a; #include &l…

(四十八)第 7 章 图(图的数组(邻接矩阵)存储)

1. 背景说明 2. 示例代码 1) errorRecord.h // 记录错误宏定义头文件#ifndef ERROR_RECORD_H #define ERROR_RECORD_H#include <stdio.h> #include <string.h> #include <stdint.h>// 从文件路径中提取文件名 #define FILE_NAME(X) strrchr(X, \\) ? strrch…