MySQL connection close 后, mysql server上的行為是什么

本文著重講述的是通過 msql client 連接到 mysql server ,發起 update 、 select 操作(由于數據量非常大,所以 update、select 操作都很耗時,即在結果返回前我們有足夠的時間執行一些操作) 。
在客戶端分別嘗試執行

  • ctrl C 結束
  • 關閉 mysql client 窗口
  • kill -9 mysql client 進程,當然這需要在另一個窗口進行

然后登陸 mysql server 執行 show processlist 和 select * from INNODB_TRX 看現象

用戶發起update:

用戶 ctrl C 或關閉 mysql client 窗口,mysql server 上的行為是一樣的,就是update 事務會立刻會滾,唯一的小區別是 show processlist 的結果:ctrl C 結束的話,show proceslist 中連接還在;關閉 mysql client 窗口的話,連接不存在了

mysql client

mysql> use robertdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> 
mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> update bigtable set name = concat(name, "a") ;
^C^C -- query aborted
ERROR 1317 (70100): Query execution was interrupted
mysql>

mysql server

  1. 用戶發起 update 操作后, 登錄 server 執行 show processlist 和 INNODB_TRX
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
| Id  | User   | Host                  | db                 | Command | Time | State    | Info                                         |
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
| 172 | root   | localhost             | information_schema | Query   |    0 | starting | show processlist                             |
| 175 | robert | 111.202.148.190:20580 | robertdb           | Query   |   20 | updating | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48631trx_state: RUNNINGtrx_started: 2025-05-27 13:48:30trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 1698104trx_mysql_thread_id: 175trx_query: update bigtable set name = concat(name, "a")trx_operation_state: fetching rowstrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 13326trx_lock_memory_bytes: 1499344trx_rows_locked: 1696898trx_rows_modified: 1684778trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.00 sec)
mysql>

2.用戶執行 ctrl C 后,登錄server 執行show processlist 和 INNODB_TRX: state 從 updating 變為了 query end

mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| Id  | User   | Host                  | db                 | Command | Time | State     | Info                                         |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| 172 | root   | localhost             | information_schema | Query   |    0 | starting  | show processlist                             |
| 175 | robert | 111.202.148.190:20580 | robertdb           | Query   |   36 | query end | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql> 
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48631trx_state: ROLLING BACKtrx_started: 2025-05-27 13:48:30trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 684362trx_mysql_thread_id: 175trx_query: update bigtable set name = concat(name, "a")trx_operation_state: rollbacktrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 20191trx_lock_memory_bytes: 2269392trx_rows_locked: 2337715trx_rows_modified: 664171trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.00 sec)mysql>

3.等回滾完后, 執行 show processlist 和 INNODB_TRX, Command 從 Query 變為了 Sleep , Time 繼續累加

mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| Id  | User   | Host                  | db                 | Command | Time | State     | Info                                         |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| 172 | root   | localhost             | information_schema | Query   |    0 | starting  | show processlist                             |
| 175 | robert | 111.202.148.190:20580 | robertdb           | Query   |   41 | query end | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
| Id  | User   | Host                  | db                 | Command | Time | State    | Info             |
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
| 172 | root   | localhost             | information_schema | Query   |    0 | starting | show processlist |
| 175 | robert | 111.202.148.190:20580 | robertdb           | Sleep   |   45 |          | NULL             |
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
2 rows in set (0.00 sec)
mysql>
mysql> select * from INNODB_TRX;
Empty set (0.00 sec)
mysql>
mysql>

用戶在shell控制臺執行 kill -9 mysqlclient 進程號, 登陸server 查看:發現最終事物會被執行完并提交

mysql client

mysql> use robertdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> 
mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> update bigtable set name=concat(name, "a") ;
[1]    3029 killed     mysql -h116.196.83.235 -p3306 -urobert -pxxx
?  ~

mysql server:

mysql> select * from bigtable limit 5;
+----+----------------------+------+--------------------+
| id | name                 | age  | email              |
+----+----------------------+------+--------------------+
|  1 | Jone1829488e9aaa     |   38 | test1@baomidou.com |
|  2 | Jackb6d920e9d2       |   39 | test2@baomidou.com |
|  3 | Tomc9e5955e81        |   40 | test3@baomidou.com |
|  4 | Sandy8220152054      |   41 | test4@baomidou.com |
|  5 | Billie4de56f25ac     |   40 | test5@baomidou.com |
+----+----------------------+------+--------------------+
10 rows in set (0.00 sec)
mysql>
mysql>
mysql>  show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
| Id  | User   | Host                  | db                 | Command | Time | State    | Info                                       |
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
| 180 | root   | localhost             | information_schema | Query   |    0 | starting | show processlist                           |
| 194 | robert | 111.202.148.190:21030 | robertdb           | Query   |   83 | updating | update bigtable set name=concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql>
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48643trx_state: RUNNINGtrx_started: 2025-05-27 14:30:13trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 7711233trx_mysql_thread_id: 194trx_query: update bigtable set name=concat(name, "a")trx_operation_state: updating or deletingtrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 94482trx_lock_memory_bytes: 10395856trx_rows_locked: 7671547trx_rows_modified: 7616751trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.01 sec)
mysql>
mysql>			
mysql>  隨著時間推移發現 update 執行完畢了,事務也提交了
mysql>
mysql>
mysql>  show processlist;
+-----+------+-----------+----------+---------+------+----------+------------------+
| Id  | User | Host      | db       | Command | Time | State    | Info             |
+-----+------+-----------+----------+---------+------+----------+------------------+
| 180 | root | localhost | robertdb | Query   |    0 | starting | show processlist |
+-----+------+-----------+----------+---------+------+----------+------------------+
1 row in set (0.00 sec)
mysql> 
mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.00 sec)
mysql> 
mysql> select * from bigtable limit 5;
+----+-----------------------+------+--------------------+
| id | name                  | age  | email              |
+----+-----------------------+------+--------------------+
|  1 | Jone1829488e9aaaa     |   38 | test1@baomidou.com |
|  2 | Jackb6d920e9d2a       |   39 | test2@baomidou.com |
|  3 | Tomc9e5955e81a        |   40 | test3@baomidou.com |
|  4 | Sandy8220152054a      |   41 | test4@baomidou.com |
|  5 | Billie4de56f25aca     |   40 | test5@baomidou.com |
+----+-----------------------+------+--------------------+
5 rows in set (0.00 sec)
mysql>

用戶發起 select:

用戶 ctrl C 或關閉 mysql client 窗口,mysql server 上的行為是一樣的,就是update 事務會立刻會滾,唯一的小區別是 show processlist 的結果:ctrl C 結束的話,show proceslist 中連接還在;關閉 mysql client 窗口的話,連接不存在了

mysql client:

mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> select count(*) from  (select distinct(name) from bigtable) as a;
^C^C -- query aborted
ERROR 1317 (70100): Query execution was interrupted
mysql>
mysql>

mysql server:

1.用戶發起 select 操作后, 登錄 server 執行 show processlist 和 INNODB_TRX

mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id  | User   | Host                  | db       | Command | Time | State        | Info                                                             |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root   | localhost             | NULL     | Query   |    0 | starting     | show processlist                                                 |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query   |    7 | Sending data | select count(*) from  (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:07:36trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from  (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)mysql>

2.用戶執行 ctrl C 后,登錄server 執行show processlist 和 INNODB_TRX: Command 從 Query 變成了 Sleep,也就是說 select 立刻不執行了

mysql>
mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
| Id  | User   | Host                  | db       | Command | Time | State    | Info             |
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
| 215 | root   | localhost             | NULL     | Query   |    0 | starting | show processlist |
| 218 | robert | 111.202.148.190:21049 | robertdb | Sleep   |   13 |          | NULL             |
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.00 sec)mysql>

用戶在shell控制臺執行 kill -9 mysqlclient 進程號, 登陸server 查看:發現select SQL 語句還會繼續執行,直到執行完畢

mysqlclient

mysql> select count(*) from bigtable;+----------+| count(*) |+----------+| 10485760 |+----------+1 row in set (2.45 sec)mysql>
mysql> select count(*) from  (select distinct(name) from bigtable) as a;
[1]    15935 killed     mysql -h116.196.83.235 -p3306 -urobert -pxxx
?  ~

mysql server

1.用戶發起 select 操作后, 登錄 server 執行 show processlist 和 INNODB_TRX

mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id  | User   | Host                  | db       | Command | Time | State        | Info                                                             |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root   | localhost             | NULL     | Query   |    0 | starting     | show processlist                                                 |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query   |   17 | Sending data | select count(*) from  (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:18:15trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from  (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)mysql>

2.用戶在shell控制臺執行 kill -9 mysqlclient 進程號, 登陸server 查看: 發現 SQL 還在繼續執行

mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id  | User   | Host                  | db       | Command | Time | State        | Info                                                             |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root   | localhost             | NULL     | Query   |    0 | starting     | show processlist                                                 |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query   |   89 | Sending data | select count(*) from  (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:18:15trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from  (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)
mysql>
mysql>
mysql>  隨著時間推移,直到 select SQL 執行完畢
mysql>
mysql>
mysql> show processlist;
+-----+------+-----------+------+---------+------+----------+------------------+
| Id  | User | Host      | db   | Command | Time | State    | Info             |
+-----+------+-----------+------+---------+------+----------+------------------+
| 215 | root | localhost | NULL | Query   |    0 | starting | show processlist |
+-----+------+-----------+------+---------+------+----------+------------------+
1 row in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.01 sec)mysql>

結論:

對于mysql client 的 ctrl C 結束 或 關閉 mysql client 窗口, mysql server 會立刻感知到這個行為,從而對 update SQL進行回滾、對 select SQL立刻就不執行了;
但是對于 kill -9 mysqclient 進程,mysql server會繼續執行正在執行的SQL,對 update SQL 會繼續執行直到提交 、對 select SQL會繼續執行直到結束。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/pingmian/83073.shtml
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/83073.shtml
英文地址,請注明出處:http://en.pswp.cn/pingmian/83073.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

dvwa3——CSRF

LOW: 先嘗試change一組密碼:123456 修改成功,我們觀察上面的url代碼 http://localhost/DVWA/vulnerabilities/csrf/?password_new123456&password_conf123456&ChangeChange# 將password_new部分與password_conf部分改成我們想要的…

Linux 中常見的安全與權限機制

Linux 中常見的安全與權限機制主要包括以下幾類,從文件系統權限到系統級訪問控制,構建了多層次的安全保障體系。 🔐 一、文件權限與用戶管理 1. 基本權限(rwx) r(read):讀取文件內…

CSS篇-3

1. CSS 中哪些樣式可以繼承?哪些不可以繼承? 可繼承的樣式: 與字體相關的樣式,如:font-size、font-family、color 列表樣式:list-style(如 UL、OL 的 list-style-type) 不可繼承…

計算機網絡物理層基礎練習

第二章 物理層 填空題 從通信雙方信息交互的方式來看,通信的三種基本方式為單工、半雙工和全雙工。其中,單工數據傳輸只支持數據在一個方向上傳輸,全雙工數據傳輸則允許數據同時在兩個方向上傳輸。最基本的帶通調制方法包括三種&#xff1a…

Redis7底層數據結構解析

redisObject 在 Redis 的源碼中,Redis 會將底層數據結構(如 SDS、hash table、skiplist 等)統一封裝成一個對象,這個對象叫做 redisObject,也簡稱 robj。 typedef struct redisObject {unsigned type : 4; // 數…

華為OD機試_2025 B卷_靜態掃描(Python,100分)(附詳細解題思路)

題目描述 靜態掃描可以快速識別源代碼的缺陷,靜態掃描的結果以掃描報告作為輸出: 1、文件掃描的成本和文件大小相關,如果文件大小為N,則掃描成本為N個金幣 2、掃描報告的緩存成本和文件大小無關,每緩存一個報告需要…

【Java】在 Spring Boot 中連接 MySQL 數據庫

在 Spring Boot 中連接 MySQL 數據庫是一個常見的任務。Spring Boot 提供了自動配置功能,使得連接 MySQL 數據庫變得非常簡單。以下是詳細的步驟: 一、添加依賴 首先,確保你的pom.xml文件中包含了 Spring Boot 的 Starter Data JPA 和 MySQ…

基于51單片機的音樂盒鍵盤演奏proteus仿真

地址: https://pan.baidu.com/s/1tZCAxQQ7cvyzBfztQpk0UA 提取碼:1234 仿真圖: 芯片/模塊的特點: AT89C52/AT89C51簡介: AT89C51 是一款常用的 8 位單片機,由 Atmel 公司(現已被 Microchip 收…

Android Native 之 adbd進程分析

目錄 1、adbd守護進程 2、adbd權限降級 3、adbd命令解析 1)adb shell 2)adb root 3)adb reboot 4、案例 1)案例之實現不需要執行adb root命令自動具有root權限 2)案例之實現不需要RSA認證直接能夠使用adb she…

C語言進階--動態內存管理

學習數據結構重要的三個部分:指針、結構體、動態內存管理(malloc、calloc、realloc、free)。 1.為什么存在動態內存分配? 1.空間開辟大小是固定的; 2.數組在聲明時,必須指定數組的長度,它所需…

C# 密封類和密封方法

密封(sealed)是C#中用于限制繼承和多態行為的關鍵字,它可以應用于類和方法,提供了一種控制繼承層次的方式。 密封類 特點 使用 sealed 關鍵字修飾的類密封類不能被其他類繼承,但可以繼承其他類或接口主要用于防止派生所有結構(struct)都是…

thinkpad T-440p 2025.05.31

thinkpad T-440p 2025.05.31 老了退休了,說起來真的可惡現在筆記本的設計師,只有固態硬盤了

WPS自動換行

換行前 換行后 快捷鍵 第一步:啟用「自動換行」功能 選中目標單元格/區域:點擊需要設置的單元格(或拖動選中多個單元格)。開啟自動換行(3種方式任選): 快捷按鈕:在頂部菜單欄點擊「…

cuda_fp8.h錯誤

現象: cuda_fp8.h錯誤 原因: CUDA Toolkit 小于11.8,會報fp8錯誤,因此是cuda工具版本太低。通過nvcc --version查看 CUDA Toolkit 是 NVIDIA 提供的一套 用于開發、優化和運行基于 CUDA 的 GPU 加速應用程序的工具集合。它的核心作用是讓開發…

【TTS】基于GRPO的流匹配文本到語音改進:F5R-TTS

論文地址:https://arxiv.org/abs/2504.02407v3 摘要 我們提出了F5R-TTS,這是一種新穎的文本到語音(TTS)系統,它將群體相對策略優化(GRPO)集成到基于流匹配的架構中。 通過將流匹配TTS的確定性輸出重新表述為概率高斯分布,我們的方…

頭歌java課程實驗(Java面向對象 - 包裝類)

第1關:基本數據類型和包裝類之間的轉換 任務描述 本關任務:實現基本數據類型與包裝類之間的互相轉換。 相關知識 為了完成本關任務,你需要掌握: 1.什么是包裝類; 2.怎么使用包裝類。 什么是包裝類 在JAVA中&#x…

實現一個免費可用的文生圖的MCP Server

概述 文生圖模型為使用 Cloudflare Worker AI 部署 Flux 模型,是參照視頻https://www.bilibili.com/video/BV1UbkcYcE24/?spm_id_from333.337.search-card.all.click&vd_source9ca2da6b1848bc903db417c336f9cb6b的復現Cursor MCP Server實現是參照文章https:/…

ES6 深克隆與淺克隆詳解:原理、實現與應用場景

ES6 深克隆與淺克隆詳解:原理、實現與應用場景 一、克隆的本質與必要性 在 JavaScript 中,數據分為兩大類型: 基本類型:Number、String、Boolean、null、undefined、Symbol、BigInt引用類型:Object、Array、Functio…

新聞數據加載(鴻蒙App開發實戰)

本案例基于ArkTS的聲明式開發范式,介紹了數據請求和onTouch事件的使用。包含以下功能: 數據請求。列表下拉刷新。列表上拉加載。 網絡數據請求需要權限:ohos.permission.INTERNET 一、案例效果截圖 操作說明: 點擊應用進入主頁…

辦公效率王Word批量轉PDF 50 +文檔一鍵轉換保留原格式零錯亂

各位辦公小能手們,我跟你們說啊!在辦公的時候,咱經常會碰到要把一堆Word文檔轉成PDF格式的情況,比如說要統一文件格式、保護文檔內容或者方便分享啥的。這時候,就需要用到Word批量轉換成PDF的軟件啦。下面我就給你們好…