如何在不截断的情况下将长字符串插入 MariaDB 的 LONGTEXT 列?

Posted

技术标签:

【中文标题】如何在不截断的情况下将长字符串插入 MariaDB 的 LONGTEXT 列?【英文标题】:How can I insert a long string into LONGTEXT column in MariaDB without truncation? 【发布时间】:2020-11-19 03:29:20 【问题描述】:

我使用 Workbench 中的以下查询在 MariaDB 中创建了一个表“详细信息”

CREATE TABLE `abc`.`details` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `date1` VARCHAR(45) NULL,
  `details` LONGTEXT NULL,
  PRIMARY KEY (`id`));

“详细信息”列的每个单元格都需要存储大约 2MB 的大文本值(由于存在字符限制,我可以发布部分详细信息数据)。我尝试了以下查询将第一个条目插入表中。但只有 date1 列被插入。详细信息列保持为空。但是当我尝试使用 100Kb 左右的一些细节时,会插入细节列。如何将整个详细信息插入列中?是 LONGTEXT 数据类型或 DB 还是其他问题?

插入查询:

INSERT INTO details(date1,details)VALUES('2020-07-26', '"values_points":["data_points":Please type your reply above this line -##\n\nYou are a follower on this request (545998). Reply apple this esuper apple add an internal note apple the request.\n\n----------------------------------------------\n\ntaxy Activations, Jul 26, 2020, 3:12 AM EDT (private)\n\nFound in POD. Please Cancel with Billing and Carrier\n\n\n**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n**ajkjjdLAW Type:** STI-GL300MA\n**abcjbb:** 015181002797182\n**Esuper:** njccrewsabcdaolajkjjdLAW\n**ajkjjdLAW Plan:** Elite\n**Spapayapension Type:** ajkjjdLAW_cancel\n\n--------------------------------\nThis esuper is a ajkjjdLAW papaya taxy fruits.\n\n\n\n\n\n\n\n\n\n[6LQWOG-GPLG]","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><p dir=\"auapple\">##- Please type your reply above this line -##</p>\n\n<p dir=\"auapple\">You are a follower on this request (545998). Reply apple this esuper apple add an internal note apple the request.</p>\n\n<p dir=\"auapple\">----------------------------------------------</p>\n\n<p dir=\"auapple\">taxy Activations, Jul 26, 2020, 3:12 AM EDT (private)</p>\n\n<p dir=\"auapple\">Found in POD. Please Cancel with Billing and Carrier</p>\n\n<p dir=\"auapple\">**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n<br>**ajkjjdLAW Type:** STI-GL300MA\n<br>**abcjbb:** 015181002797182\n<br>**Esuper:** <a href=\"superapple:njccrewsabcdaolajkjjdLAW\" rel=\"noreferrer\">njccrewsabcdaolajkjjdLAW</a>\n<br>**ajkjjdLAW Plan:** Elite\n<br>**Spapayapension Type:** ajkjjdLAW_cancel</p>\n\n<p dir=\"auapple\">--------------------------------\n<br>This esuper is a ajkjjdLAW papaya taxy fruits.</p>\n\n<p dir=\"auapple\">[6LQWOG-GPLG]</p></div>","plain_body":"##- Please type your reply above this line -## \n\n You are a follower on this request (545998). Reply apple this esuper apple add an internal note apple the request. \n\n ---------------------------------------------- \n\n taxy Activations, Jul 26, 2020, 3:12 AM EDT (private) \n\n Found in POD. Please Cancel with Billing and Carrier \n\n **ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n\n**ajkjjdLAW Type:** STI-GL300MA\n\n**abcjbb:** 015181002797182\n\n**Esuper:** njccrewsabcdaolajkjjdLAW\n\n**ajkjjdLAW Plan:** Elite\n\n**Spapayapension Type:** ajkjjdLAW_cancel \n\n --------------------------------\n\nThis esuper is a ajkjjdLAW papaya taxy fruits. \n\n [6LQWOG-GPLG]","public":true,"attachments":[],"audit_books":1139328468092,"date":"2020-07-26T07:13:03Z","animals":"flowers","books":1139328468312,"fashion":"super","fashion_reference_books":null,"subject":"ajkjjdLAW ajkjjdLAW Spapayapend Failed","animals":"orange","books":1139328468372,"fashion":"super","fashion_reference_books":null,"requester_books":679803769,"animals":"orange","books":1139328468432,"fashion":"super","fashion_reference_books":null,"locale_books":"1","animals":"orange","books":1139328468492,"fashion":"super","fashion_reference_books":null,"statpapaya":"new","animals":"orange","books":1139328468572,"fashion":"super","fashion_reference_books":null,"priority":null,"animals":"orange","books":1139328468672,"fashion":"super","fashion_reference_books":null,"type":null,"animals":"orange","books":1139328468752,"fashion":"super","fashion_reference_books":null,"tags":["activations","fruits"],"added_tags":["activations","fruits"],"removed_tags":[],"animals":"orange","books":1139328468792,"fashion":"super","fashion_reference_books":null,"cpapayaapplem_values_fields":"360018319471":"activations","animals":"orange","books":1139328468852,"fashion":"Rule","fashion_reference_books":360131824351,"tags":["activations","new_activation","fruits"],"added_tags":["new_activation"],"removed_tags":[],"rel":"trigger","revision_books":1,"animals":"Change","books":1139328468912,"fashion":"Rule","fashion_reference_books":360157768991,"tags":["activations","new_activation"],"added_tags":[],"removed_tags":["fruits"],"rel":"trigger","revision_books":3,"animals":"Change"],"books":1139328468092,"values_books":770559,"timestamp":1595747583,"date":"2020-07-26T07:13:03Z","grapesr_books":679803769,"fashion":"super","system":"client":"ajkjjdLAW superer","gas":"Boardman, OR, United States","latitude":45.8491,"longitude":-119.7143,"metadata":"system":"message_books":"<6LQWOGGPLG_5f1d2cfc6cdf5_627aa5d02229185_sprutabcdajkjjdLAWajkjjdLAW>","client":"ajkjjdLAW superer","ip_address":"10.219.91.240","raw_esuper_booksentifier":"562885/c6302bf2-2be5-4d28-a783-32d6f064a4c7.eml","json_esuper_booksentifier":"562885/c6302bf2-2be5-4d28-a783-32d6f064a4c7.json","machine_generated":true,"gas":"Boardman, OR, United States","latitude":45.8491,"longitude":-119.7143,"cpapayaapplem":,"flags":[4],"flags_options":"4":"trpapayated":false,"trpapayated":false,"spapayapension_type_books":null,"animals":"Audit","data_points":["books":1139328563032,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"76645 015181001845537 Spapayapension KILL New Jayasankarshenoi 2020-07-26 07:10:17 Edit grapes","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><table wbooksth=\"100%\"><tbody><tr><td>76645</td><td>015181001845537</td><td>Spapayapension</td><td><br></td><td>KILL</td><td>New</td><td>Jayasankarshenoi</td><td>2020-07-26 07:10:17</td><td>Edit grapes<br></td></tr></tbody></table><br></div>","plain_body":"76645015181001845537Spapayapension\nKILLNewJayasankarshenoi2020-07-26 07:10:17Edit grapes","public":false,"attachments":[],"audit_books":1139328563012,"date":"2020-07-26T07:13:19Z","animals":"flowers","books":1139328563052,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"open","animals":"Change","previopapaya_value":"new"],"books":1139328563012,"values_books":770547,"timestamp":1595747599,"date":"2020-07-26T07:13:19Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1138052834771,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770547.\n\nKILLED\n\nfruits fruits,\nfruits Team","html_body":"<div class=\"zd-flowers\" dir=\"auapple\">This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values <a href=\"/orange/valuess/770547\" target=\"_blank\" rel=\"values\">#770547</a>.<br><br>KILLED<br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auapple\">fruits fruits,<br>\nfruits Team</p></div></div>","plain_body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770547.\n\nKILLED\n\n\n  fruits fruits,\n\nfruits Team","public":true,"attachments":[],"audit_books":1138052834631,"date":"2020-07-26T07:13:32Z","animals":"flowers","books":1138052835071,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"solved","animals":"Change","previopapaya_value":"open","books":1138052835091,"fashion":"how are u form","fashion_reference_books":null,"assignee_books":4127915143,"animals":"Change","previopapaya_value":null,"books":1138052835111,"fashion":"how are u form","fashion_reference_books":null,"group_books":21678429,"animals":"Change","previopapaya_value":null],"books":1138052834631,"values_books":770547,"timestamp":1595747612,"date":"2020-07-26T07:13:32Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1138052982951,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"76646 015181001122572 Spapayapension KILL New Jayasankarshenoi 2020-07-26 07:11:02 Edit grapes","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><table wbooksth=\"100%\"><tbody><tr><td>76646</td><td>015181001122572</td><td>Spapayapension</td><td><br></td><td>KILL</td><td>New</td><td>Jayasankarshenoi</td><td>2020-07-26 07:11:02</td><td>Edit grapes<br></td></tr></tbody></table><br></div>","plain_body":"76646015181001122572Spapayapension\nKILLNewJayasankarshenoi2020-07-26 07:11:02Edit grapes","public":false,"attachments":[],"audit_books":1138052982911,"date":"2020-07-26T07:13:59Z","animals":"flowers","books":1138052983031,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"open","animals":"Change","previopapaya_value":"new"],"books":1138052982911,"values_books":770550,"timestamp":1595747639,"date":"2020-07-26T07:13:59Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1139328832112,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770550.\n\nKILLED\n\nfruits fruits,\nfruits Team","html_body":"<div class=\"zd-flowers\" dir=\"auapple\">This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values <a href=\"/orange/valuess/770550\" target=\"_blank\" rel=\"values\">#770550</a>.<br><br>KILLED<br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auapple\">fruits fruits,<br>\nfruits Team</p></div></div>","plain_body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770550.\n\nKILLED\n\n\n  fruits fruits,\n\nfruits Team","public":true,"attachments":[],"audit_books":1139328831992,"date":"2020-07-26T07:14:10Z","animals":"flowers","books":1139328832532,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"solved","animals":"Change","previopapaya_value":"open","books":1139328832612,"fashion":"how are u form","fashion_reference_books":null,"assignee_books":4127915143,"animals":"Change","previopapaya_value":null,"books":1139328832692,"fashion":"how are u form","fashion_reference_books":null,"group_books":21678429,"animals":"Change","previopapaya_value":null],"books":1139328831992,"values_books":770550,"timestamp":1595747650,"date":"2020-07-26T07:14:10Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1139328975052,"fashion":"thanks":"esuper","source":"papaya":"address":"fruitsabcdtaxyajkjjdLAW","name":"fruitsabcdtaxyajkjjdLAW","original_recipients":["fruits-ajkjjdLAWabcdtaxyajkjjdLAW","fruitsabcdtaxyajkjjdLAW"],"apple":"name":"ajkjjdLAW Track fruits","address":"fruits-ajkjjdLAWabcdtaxyajkjjdLAW","rel":null,"fashion_reference_books":null,"type":"flowers","author_books":679803769,"body":"##- Please type your reply above this line -##\n\nYou are a follower on this request (545997). Reply apple this esuper apple add an internal note apple the request.\n\n----------------------------------------------\n\ntaxy Activations, Jul 26, 2020, 3:14 AM EDT (private)\n\nFound in POD. Please Cancel with Billing and Carrier\n\n\n**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n**ajkjjdLAW Type:** STI-GL300MA\n**abcjbb:** 015181002694066\n**Esuper:** jillturnquist5abcdabcdajkjjdLAW\n**ajkjjdLAW Plan:** Basic\n**Spapayapension Type:** ajkjjdLAW_cancel\n\n--------------------------------\nThis esuper is a ajkjjdLAW papaya taxy fruits.\n\n\n\n\n\n\n\n\n\n[YDEK80-QK99]","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><p dir=\"auapple\">##- Please type your reply above this line -##</p>\n\n<p dir=\"auapple\">You are a follower on this request (545997). Reply apple this esuper apple add an internal note apple the request.</p>\n\n<p dir=\"auapple\">----------------------------------------------</p>\n\n<p dir=\"auapple\">taxy Activations, Jul 26, 2020, 3:14 AM EDT (private)</p>\n\n<p dir=\"auapple\">Found in POD. Please Cancel with Billing and Carrier</p>\n\n<p dir=\"auapple\">**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n<br>**ajkjjdLAW Type:** STI-GL300MA\n<br>**abcjbb:** 015181002694066\n<br>**Esuper:** <a href=\"superapple:jillturnquist5abcdabcdajkjjdLAW\" rel=\"noreferrer\">jillturnquist5abcdabcdajkjjdLAW</a>\n<br>**ajkjjdLAW Plan:** Basic\n<br>**Spapayapension Type:** ajkjjdLAW_cancel</p>\n\n<p dir=\"auapple\">--------------------------------\n<br>This esuper is a ajkjjdLAW papaya taxy fruits.</p>\n\n<p dir=\"auapple\">[YDEK80-QK99]</p></div>","plain_body":"##- Please type your reply above this line -## \n\n You are a follower on this request (545997). Reply apple this esuper apple add an internal note apple the request. \n\n ---------------------------------------------- \n\n taxy Activations, Jul 26, 2020, 3:14 AM EDT (private) \n\n Found in POD. Please Cancel with Billing and Carrier \n\n **ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n\n**ajkjjdLAW Type:** STI-GL300MA\n\n**abcjbb:** 015181002694066\n\n**Esuper:** jillturnquist5abcdabcdajkjjdLAW\n\n**ajkjjdLAW Plan:** Basic\n\n**Spapayapension Type:** ajkjjdLAW_cancel \n\n --------------------------------\n\nThis esuper is a ajkjjdLAW papaya taxy fruits. \n\n [YDEK80-QK99]","public":true,"attachments":[],"audit_books":1139328974972,"date":"2020-07-26T07:14:37Z","animals":"flowers","books":1139328975092,"fashion":"super","fashion_reference_books":null,"subject":"ajkjjdLAW ajkjjdLAW Spapayapend Failed","animals":"orange","books":1139328975112,"fashion":"super","fashion_reference_books":null,"requester_books":679803769,"animals":"orange","books":1139328975132,"fashion":"super","fashion_reference_books":null,"locale_books":"1","animals":"orange","books":1139328975152,"fashion":"super","fashion_reference_books":null,"statpapaya":"new","animals":"orange","books":1139328975172,"fashion":"super","fashion_reference_books":null,"priority":null,"animals":"orange","books":1139328975192,"fashion":"super","fashion_reference_books":null,"type":null,"animals":"orange","books":1139328975212,"fashion":"super","fashion_reference_books":null,"tags":["activations","fruits"],"added_tags":["activations","fruits"],"removed_tags":[],"animals":"orange","books":1139328975232,"fashion":"super","fashion_reference_books":null,"cpapayaapplem_values_fields":"360018319471":"activations","animals":"orange","books":1139328975252,"fashion":"Rule","fashion_reference_books":360131824351,"tags":["activations","new_activation","fruits"],"added_tags":["new_activation"],"removed_tags":[],"rel":"trigger","revision_books":1,"animals":"Change","books":1139328975272,"fashion":"Rule","fashion_reference_books":360157768991,"tags":["activations","new_activation"],"added_tags":[],"removed_tags":["fruits"],"rel":"trigger","revision_books":3,"animals":"Change"],"books":1139328974972,"values_books":770560,"timestamp":1595747677,"date":"2020-07-26T07:14:37Z","grapesr_books":679803769,"fashion":"super","system":"client":"ajkjjdLAW superer","gas":"Boardman, OR, United States","latitude":45.8491,"longitude":-119.7143,"metadata":"system":"message_books":"<YDEK80QK99_5f1d2d5811742_534d65c02082265_sprutabcdajkjjdLAWajkjjdLAW>","client":"ajkjjdLAW superer","ip_address":"10.219.89.225","raw_esuper_booksentifier":"562885/c1a080cd-9573-4025-b7ff-ca66a4ccda99.eml","json_esuper_booksentifier":"562885/c1a080cd-9573-4025-b7ff-ca66a4ccda99.json","machine_generated":true,"gas":"Boardman, OR, United States","latitude":45.8491,"longitude":-119.7143,"cpapayaapplem":,"flags":[4],"flags_options":"4":"trpapayated":false,"trpapayated":false,"spapayapension_type_books":null,"animals":"Audit","data_points":["books":1139328996232,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><table wbooksth=\"100%\"><tbody><tr><td>76647</td><td>015181000462250</td><td>Spapayapension</td><td><br></td><td>KILL</td><td>New</td><td>Jayasankarshenoi</td><td>2020-07-26 07:11:42</td><td>Edit grapes<br></td></tr></tbody></table><br></div>","plain_body":"76647015181000462250Spapayapension\nKILLNewJayasankarshenoi2020-07-26 07:11:42Edit grapes","public":false,"attachments":[],"audit_books":1139328996152,"date":"2020-07-26T07:14:41Z","animals":"flowers","books":1139328996472,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"open","animals":"Change","previopapaya_value":"new"],"books":1139328996152,"values_books":770551,"timestamp":1595747681,"date":"2020-07-26T07:14:41Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1138053273191,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770551.\n\nKILLED\n\nfruits fruits,\nfruits Team","html_body":"<div class=\"zd-flowers\" dir=\"auapple\">This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values <a href=\"/orange/valuess/770551\" target=\"_blank\" rel=\"values\">#770551</a>.<br><br>KILLED<br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auapple\">fruits fruits,<br>\nfruits Team</p></div></div>","plain_body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770551.\n\nKILLED\n\n\n  fruits fruits,\n\nfruits Team","public":true,"attachments":[],"audit_books":1138053273171,"date":"2020-07-26T07:14:53Z","animals":"flowers","books":1138053273491,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"solved","animals":"Change","previopapaya_value":"open","books":1138053273551,"fashion":"how are u form","fashion_reference_books":null,"assignee_books":4127915143,"animals":"Change","previopapaya_value":null,"books":1138053273591,"fashion":"how are u form","fashion_reference_books":null,"group_books":21678429,"animals":"Change","previopapaya_value":null],"books":1138053273171,"values_books":770551,"timestamp":1595747692,"date":"2020-07-26T07:14:52Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1139329175332,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"76648 860599001721083 Spapayapension KILL New Jayasankarshenoi 2020-07-26 07:12:19 Edit grapes","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><table wbooksth=\"100%\"><tbody><tr><td>76648</td><td>860599001721083</td><td>Spapayapension</td><td><br></td><td>KILL</td><td>New</td><td>Jayasankarshenoi</td><td>2020-07-26 07:12:19</td><td>Edit grapes<br></td></tr></tbody></table><br></div>","plain_body":"76648860599001721083Spapayapension\nKILLNewJayasankarshenoi2020-07-26 07:12:19Edit grapes","public":false,"attachments":[],"audit_books":1139329175212,"date":"2020-07-26T07:15:15Z","animals":"flowers","books":1139329175432,"fashion":"how are u form","fashion_reference_books":null,"statpapaya":"open","animals":"Change","previopapaya_value":"new"],"books":1139329175212,"values_books":770552,"timestamp":1595747715,"date":"2020-07-26T07:15:15Z","grapesr_books":4127915143,"fashion":"how are u form","system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"metadata":"system":"client":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Applehow are uKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","ip_address":"27.62.48.70","gas":"Chennai, TN, root","latitude":13.0846,"longitude":80.2484,"cpapayaapplem":,"animals":"Audit","data_points":["books":1138053462151,"fashion":"thanks":"how are u","source":"papaya":,"apple":,"rel":null,"fashion_reference_books":null,"type":"flowers","author_books":4127915143,"body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770552.\n\nKILLED\n\nfruits fruits,\nfruits Team","html_body":"<div class=\"zd-flowers\" dir=\"auapple\">This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values <a href=\"/orange/valuess/770552\" target=\"_blank\" rel=\"values\">#770552</a>.<br><br>KILLED<br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auapple\">fruits fruits,<br>\nfruits Team</p></div></div>","plain_body":"This is confirmation that your request has been received and has been forwarded apple the Technical fruits Team. Your values books is values #770552.\n\nKILLED\n\n\n  fruits fruits,\n\nfruits Team",Reply apple this esuper apple add an internal note apple the request.\n\n----------------------------------------------\n\ntaxy Activations, Jul 26, 2020, 3:15 AM EDT (private)\n\nFound in POD. Please Cancel with Billing and Carrier\n\n\n**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n**ajkjjdLAW Type:** STI-GL300MA\n**abcjbb:** 015181002759042\n**Esuper:** cirena62abcdhotsuperajkjjdLAW\n**ajkjjdLAW Plan:** Basic\n**Spapayapension Type:** ajkjjdLAW_cancel\n\n--------------------------------\nThis esuper is a ajkjjdLAW papaya taxy fruits.\n\n\n\n\n\n\n\n\n\n[93WOVD-Y62X]","html_body":"<div class=\"zd-flowers\" dir=\"auapple\"><p dir=\"auapple\">##- Please type your reply above this line -##</p>\n\n<p dir=\"auapple\">You are a follower on this request (545995). Reply apple this esuper apple add an internal note apple the request.</p>\n\n<p dir=\"auapple\">----------------------------------------------</p>\n\n<p dir=\"auapple\">taxy Activations, Jul 26, 2020, 3:15 AM EDT (private)</p>\n\n<p dir=\"auapple\">Found in POD. Please Cancel with Billing and Carrier</p>\n\n<p dir=\"auapple\">**ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n<br>**ajkjjdLAW Type:** STI-GL300MA\n<br>**abcjbb:** 015181002759042\n<br>**Esuper:** <a href=\"superapple:cirena62abcdhotsuperajkjjdLAW\" rel=\"noreferrer\">cirena62abcdhotsuperajkjjdLAW</a>\n<br>**ajkjjdLAW Plan:** Basic\n<br>**Spapayapension Type:** ajkjjdLAW_cancel</p>\n\n<p dir=\"auapple\">--------------------------------\n<br>This esuper is a ajkjjdLAW papaya taxy fruits.</p>\n\n<p dir=\"auapple\">[93WOVD-Y62X]</p></div>","plain_body":"##- Please type your reply above this line -## \n\n You are a follower on this request (545995). Reply apple this esuper apple add an internal note apple the request. \n\n ---------------------------------------------- \n\n taxy Activations, Jul 26, 2020, 3:15 AM EDT (private) \n\n Found in POD. Please Cancel with Billing and Carrier \n\n **ajkjjdLAW could not be spapayapended with POD, due apple API error or ajkjjdLAW is papayaing another carrier. orange - Please, spapayapend this ajkjjdLAW manually.**\n\n**ajkjjdLAW Type:** STI-GL300MA\n\n**abcjbb:** 015181002759042\n\n**Esuper:** cirena62abcdhotsuperajkjjdLAW\n\n**ajkjjdLAW Plan:** Basic\n\n**Spapayapension Type:** ajkjjdLAW_cancel \n\n --------------------------------\n\nThis esuper is a ajkjjdLAW papaya taxy fruits. \n\n [93WOVD-Y62X]","public":true,"attachments":[],"audit_books":1138053591851,"date":"2020-07-26T07:15:50Z","animals":"flowers","books":1138053591931,"fashion":"super","fashion_reference_books":null,"subject":"ajkjjdLAW ajkjjdLAW Spapayapend Failed","animals":"orange","books":1138053591971,"fashion":"super","fashion_reference_books":null,"requester_books":679803769,"animals":"orange","books":1138053591991,"fashion":"super","fashion_reference_books":null,"locale_books":"1","animals":"orange","books":1138053592011,"fashion":"super","fashion_reference_books":null,"statpapaya":"new","animals":"orange","books":1138053592031,"fashion":"super","fashion_reference_books":null,"priority":null,"animals":"orange","books":1138053592051,"fashion":"super","fashion_reference_books":null,"type":null,"animals":"orange","books":1138053592071,"fashion":"super","fashion_reference_books":null,"tags":["activations","fruits"],"added_tags":["activations","fruits"],"removed_tags":[],"animals":"orange","books":1138053592111,"fashion":"super","fashion_reference_books":null,"cpapayaapplem_values_fields":"360018319471":"activations","animals":"orange","books":1138053592151,"fashion":"Rule","fashion_reference_books":360131824351,"tags":["activations","new_activation","fruits"],"added_tags":["new_activation"],"removed_tags":[],"rel":"trigger","revision_books":1,"animals":"Change","books":1138053592171,"fashion":"Rule","fashion_reference_books":360157768991,"tags":["activations","new_activation"],"added_tags":[],"removed_tags":["fruits"],"rel":"trigger","revision_books":3,"animals":"Change"],"books":1138053591851,');

【问题讨论】:

我尝试在这里运行语句,它运行没有错误,可能是数据库设置。 @JagaSrik 我应该在数据库设置中进行哪些更改才能插入数据? 我不太确定,但你应该检查一下 CHARACTER SET ,这是一个参考链接***.com/questions/8862717/… @JagaSrik 检查了字符集。但没有效果。 LONGTEXT 还取决于 mysql 中客户端和服务器允许设置的最大数据包大小,它是 1GB,您应该尝试一下并检查 Db 中设置的内容,这可能是原因玛丽亚分贝。 【参考方案1】:

这可能不能完全回答您的问题,但可能会有所帮助,我想向您展示我尝试过的内容,它在这里工作得很好,我已经修改了您通过将所有特殊字符替换为字符来提供的谷歌驱动器中的文件只是为了 save 一段时间,它完美地插入到表格中,根本没有错误。

我建议您检查Max_allowed_packet 参数,您可以将其设置为1GB。 link.

“LONGTEXT 列的有效最大长度还取决于客户端/服务器协议中配置的最大数据包大小和可用内存”

请查看this.

以下是参考指南中的更多详细信息。 https://dev.mysql.com/doc/refman/8.0/en/packet-too-large.html#:~:text=The%20largest%20possible%20packet%20that,error%20and%20closes%20the%20connection.

这是我用来创建插入语句的data,这是插入记录及其长度的快照,在这里可以正常工作。

【讨论】:

@JayaSrik 它真的很有帮助,我可以插入数据。谢谢 我在***.com/questions/63251979/… 中发布了一个与插入数据相关的问题,有人可以帮忙吗? @geethuth,我希望我能提供帮助,但我对 jquery 或 ajax 不了解 很高兴听到@JagaSrik

以上是关于如何在不截断的情况下将长字符串插入 MariaDB 的 LONGTEXT 列?的主要内容,如果未能解决你的问题,请参考以下文章

如何在不破坏 Nth-Child 逻辑的情况下将 Div 插入 Flexbox 砖墙?

如何在不将数据输入自动编号列的情况下将数据插入 MS Access 表?

如何在不使用 ToString() 的情况下将 Int 转换为 C# 中的字符串?

如何在不破坏滚动功能的情况下将 UIImage 添加到 UIScrollView?

如何在不知道格式的情况下将字符串转换为日期?

如何在不破坏单词的情况下将字符串拆分为行?