对数据库中的已经写好数据的表进行了改变,结果出现下图错误

通过查阅发现导致1406的错误原因有很多, 而我的错误原因在于数据信息过长超过了原本分配数据库对应字段的空间最大值,通过增加分配的字段空间就解决了。 例如:我给varchar(5) 存入 “88888888” 这样是不可以的,应该分配字段更大的空间 如varchar(300)

如果还是不能解决问题,那么下面这个步骤,你值得一试( 来自博客 ):

1.检查数据库中该字段的长度是否太小(如果字段类型是字符串类型(varchar,char)),太小只要增大这个字段的长度即可,但是mysql一张表的varchar总长度不能超过65535,如果超过需要对表进行压缩。

2.如果字段类型是text,则检查数据库innodb_file_format 格式

mysql> show variables like ‘%format%’;
±-------------------------±------------------+
| Variable_name | Value |
±-------------------------±------------------+
| binlog_format | STATEMENT |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| innodb_file_format | Barracuda |
| innodb_file_format_check | ON |
| innodb_file_format_max | Antelope |
| time_format | %H:%i:%s |
±-------------------------±------------------+

需要将innodb_file_format 改为 Barracuda 这个模式应该和row压缩有关

步骤如下:

1.linux下打开 mysql配置文件(在 /etc/my.cnf),加入:

innodb_file_format=Barracuda

2:在数据库中执行:

SET GLOBAL innodb_file_format=Barracuda;

ALTER TABLE [tableName]
ENGINE=InnoDB //表的存储引擎
ROW_FORMAT=COMPRESSED //row的格式,有DEFAULT(默认)、FIXED(混合)、DYNAMIC(动态)、COMPRESSED(压缩)、REDUNDANT(冗长)、COMPACT(紧凑)
KEY_BLOCK_SIZE=8; //压缩InnoDB的缓冲池的索引页

1265错误

出现该错误的原因可能有很多,但我经过几次操作后发现自己总是遇到这个错误,通过字面上的意思是插入的错误的数据或者是说你的某个字段(错误中有提示)定义的长度不够,你存入的数据已经被截断

发现我的错误原因还是字段定义的长度不够,和1406错误原因相同

总是出现这样的问题,我们应该反思一下,从最初就杜绝问题的发生

解决办法:
(1)设计表的时候就要考虑全面各个字段的数据类型,以及是否允许为空Null
(2)删除数据表中的所有数据,再向表中添加字段,此时可以将该字段设置为不为空;如果不删除数据,则必须设置为允许为空Null,否则会因为已有数据并不存在这个新增的非空字段而报出该错误!

望能解决大家的问题,共同进步!

1406错误对数据库中的已经写好数据的表进行了改变,结果出现下图错误通过查阅发现导致1406的错误原因有很多,而我的错误原因在于数据信息过长超过了原本分配数据库对应字段的空间最大值,通过增加分配的字段空间就解决了。 例如:我给varchar(5) 存入 “88888888” 这样是不可以的,应该分配字段更大的空间 如varchar(300)如果还是不能解决问题,那么下面这个步骤,你值得...
mysql 新建表后,插入数据中文 报错 MySQL 中ERROR 1406 (22001): data too long for column 解决方法在创表的结尾加上 DEFAULT CHARSET=utf8 drop table if exists sys_user; create table sys_user ( user_id bigint(20) not n...
0.4 Applications 1 0.5 Publication and versions of this Specification 1 0.6 Profiles, tiers and levels 2 0.7 Overview of the design characteristics 2 0.8 How to read this Specification 2 1 Scope 3 2 Normative references 3 2.1 General 3 2.2 Identical Recommendations | International Standards 3 2.3 Paired Recommendations | International Standards equivalent in technical content 3 2.4 Additional references 3 3 Definitions 3 4 Abbreviations 12 5 Conventions 13 5.1 General 13 5.2 Arithmetic operators 13 5.3 Logical operators 13 5.4 Relational operators 14 5.5 Bit-wise operators 14 5.6 Assignment operators 14 5.7 Range notation 14 5.8 Mathematical functions 15 5.9 Order of operation precedence 15 5.10 Variables, syntax elements, and tables 16 5.11 Text description of logical operations 17 5.12 Processes 18 6 Bitstream and picture formats, partitionings, scanning processes, and neighbouring relationships 18 6.1 Bitstream formats 18 6.2 Source, decoded, and output picture formats 18 6.3 Partitioning of pictures, slices, slice segments, tiles, coding tree units, and coding tree blocks 21 6.3.1 Partitioning of pictures into slices, slice segments, and tiles 21 6.3.2 Block and quadtree structures 22 6.3.3 Spatial or component-wise partionings 23 6.4 Availability processes 23 6.4.1 Derivation process for z-scan order block availability 23 6.4.2 Derivation process for prediction block availability 24 6.5 Scanning processes 25 6.5.1 Coding tree block raster and tile scanning conversion process 25 6.5.2 Z-scan order array initialization process 26 6.5.3 Up-right diagonal scan order array initialization process 26 6.5.4 Horizontal scan order array initialization process 27 6.5.5 Vertical scan order array initialization process 27 7 Syntax and semantics 28 7.1 Method of specifying syntax in tabular form 28 7.2 Specification of syntax functions and descriptors 29 7.3 Syntax in tabular form 30 7.3.1 NAL unit syntax 30 7.3.1.1 General NAL unit syntax 30 7.3.1.2 NAL unit header syntax 30 7.3.2 Raw byte sequence payloads, trailing bits, and byte alignment syntax 31 7.3.2.1 Video parameter set RBSP syntax 31 7.3.2.2 Sequence parameter set RBSP syntax 32 7.3.2.3 Picture parameter set RBSP syntax 34 7.3.2.4 Supplemental enhancement information RBSP syntax 35 7.3.2.5 Access unit delimiter RBSP syntax 35 7.3.2.6 End of sequence RBSP syntax 35 7.3.2.7 End of bitstream RBSP syntax 35 7.3.2.8 Filler data RBSP syntax 36 7.3.2.9 Slice segment layer RBSP syntax 36 7.3.2.10 RBSP slice segment trailing bits syntax 36 7.3.2.11 RBSP trailing bits syntax 36 7.3.2.12 Byte alignment syntax 36 7.3.3 Profile, tier and level syntax 37 7.3.4 Scaling list data syntax 38 7.3.5 Supplemental enhancement information message syntax 38 7.3.6 Slice segment header syntax 39 7.3.6.1 General slice segment header syntax 39 7.3.6.2 Reference picture list modification syntax 41 7.3.6.3 Weighted prediction parameters syntax 42 7.3.7 Short-term reference picture set syntax 43 7.3.8 Slice segment data syntax 43 7.3.8.1 General slice segment data syntax 43 7.3.8.2 Coding tree unit syntax 44 7.3.8.3 Sample adaptive offset syntax 45 7.3.8.4 Coding quadtree syntax 46 7.3.8.5 Coding unit syntax 47 7.3.8.6 Prediction unit syntax 49 7.3.8.7 PCM sample syntax 49 7.3.8.8 Transform tree syntax 50 7.3.8.9 Motion vector difference syntax 50 7.3.8.10 Transform unit syntax 51 7.3.8.11 Residual coding syntax 52 7.4 Semantics 54 7.4.1 General 54 7.4.2 NAL unit semantics 54 7.4.2.1 General NAL unit semantics 54 7.4.2.2 NAL unit header semantics 55 7.4.2.3 Encapsulation of an SODB within an RBSP (informative) 58 7.4.2.4 Order of NAL units and association to coded pictures, access units, and coded video sequences 59 7.4.3 Raw byte sequence payloads, trailing bits, and byte alignment semantics 62 7.4.3.1 Video parameter set RBSP semantics 62 7.4.3.2 Sequence parameter set RBSP semantics 64 7.4.3.3 Picture parameter set RBSP semantics 69 7.4.3.4 Supplemental enhancement information RBSP semantics 72 7.4.3.5 Access unit delimiter RBSP semantics 72 7.4.3.6 End of sequence RBSP semantics 72 7.4.3.7 End of bitstream RBSP semantics 72 7.4.3.8 Filler data RBSP semantics 73 7.4.3.9 Slice segment layer RBSP semantics 73 7.4.3.10 RBSP slice segment trailing bits semantics 73 7.4.3.11 RBSP trailing bits semantics 73 7.4.3.12 Byte alignment semantics 73 7.4.4 Profile, tier and level semantics 73 7.4.5 Scaling list data semantics 75 7.4.6 Supplemental enhancement information message semantics 76 7.4.7 Slice segment header semantics 77 7.4.7.1 General slice segment header semantics 77 7.4.7.2 Reference picture list modification semantics 81 7.4.7.3 Weighted prediction parameters semantics 82 7.4.8 Short-term reference picture set semantics 83 7.4.9 Slice segment data semantics 85 7.4.9.1 General slice segment data semantics 85 7.4.9.2 Coding tree unit semantics 85 7.4.9.3 Sample adaptive offset semantics 85 7.4.9.4 Coding quadtree semantics 87 7.4.9.5 Coding unit semantics 87 7.4.9.6 Prediction unit semantics 89 7.4.9.7 PCM sample semantics 90 7.4.9.8 Transform tree semantics 90 7.4.9.9 Motion vector difference semantics 91 7.4.9.10 Transform unit semantics 91 7.4.9.11 Residual coding semantics 92 8 Decoding process 94 8.1 General decoding process 94 8.2 NAL unit decoding process 95 8.3 Slice decoding process 96 8.3.1 Decoding process for picture order count 96 8.3.2 Decoding process for reference picture set 96 8.3.3 Decoding process for generating unavailable reference pictures 100 8.3.3.1 General decoding process for generating unavailable reference pictures 100 8.3.3.2 Generation of one unavailable picture 101 8.3.4 Decoding process for reference picture lists construction 101 8.4 Decoding process for coding units coded in intra prediction mode 102 8.4.1 General decoding process for coding units coded in intra prediction mode 102 8.4.2 Derivation process for luma intra prediction mode 103 8.4.3 Derivation process for chroma intra prediction mode 105 8.4.4 Decoding process for intra blocks 105 8.4.4.1 General decoding process for intra blocks 105 8.4.4.2 Intra sample prediction 106 8.5 Decoding process for coding units coded in inter prediction mode 112 8.5.1 General decoding process for coding units coded in inter prediction mode 112 8.5.2 Inter prediction process 112 8.5.3 Decoding process for prediction units in inter prediction mode 115 8.5.3.1 General 115 8.5.3.2 Derivation process for motion vector components and reference indices 115 8.5.3.3 Decoding process for inter prediction samples 130 8.5.4 Decoding process for the residual signal of coding units coded in inter prediction mode 138 8.5.4.1 General 138 8.5.4.2 Decoding process for luma residual blocks 139 8.5.4.3 Decoding process for chroma residual blocks 140 8.6 Scaling, transformation and array construction process prior to deblocking filter process 141 8.6.1 Derivation process for quantization parameters 141 8.6.2 Scaling and transformation process 142 8.6.3 Scaling process for transform coefficients 143 8.6.4 Transformation process for scaled transform coefficients 144 8.6.4.1 General 144 8.6.4.2 Transformation process 144 8.6.5 Picture construction process prior to in-loop filter process 146 8.7 In-loop filter process 146 8.7.1 General 146 8.7.2 Deblocking filter process 147 8.7.2.1 General 147 8.7.2.2 Derivation process of transform block boundary 148 8.7.2.3 Derivation process of prediction block boundary 149 8.7.2.4 Derivation process of boundary filtering strength 150 8.7.2.5 Edge filtering process 151 8.7.3 Sample adaptive offset process 159 8.7.3.1 General 159 8.7.3.2 Coding tree block modification process 159 9 Parsing process 161 9.1 General 161 9.2 Parsing process for 0-th order Exp-Golomb codes 161 9.2.1 General 161 9.2.2 Mapping process for signed Exp-Golomb codes 163 9.3 CABAC parsing process for slice segment data 163 9.3.1 General 163 9.3.2 Initialization process 165 9.3.2.1 General 165 9.3.2.2 Initialization process for context variables 166 9.3.2.3 Storage process for context variables 174 9.3.2.4 Synchronization process for context variables 174 9.3.2.5 Initialization process for the arithmetic decoding engine 174 9.3.3 Binarization process 175 9.3.3.1 General 175 9.3.3.2 Truncate d Rice (TR) binarization process 176 9.3.3.3 k-th order Exp-Golomb (EGk) binarization process 177 9.3.3.4 Fixed-length (FL) binarization process 178 9.3.3.5 Binarization process for part_mode 178 9.3.3.6 Binarization process for intra_chroma_pred_mode 178 9.3.3.7 Binarization process for inter_pred_idc 179 9.3.3.8 Binarization process for cu_qp_delta_abs 179 9.3.3.9 Binarization process for coeff_abs_level_remaining 179 9.3.4 Decoding process flow 180 9.3.4.1 General 180 9.3.4.2 Derivation process for ctxTable, ctxIdx and bypassFlag 180 9.3.4.3 Arithmetic decoding process 186 9.3.5 Arithmetic encoding process (informative) 192 9.3.5.1 General 192 9.3.5.2 Initialization process for the arithmetic encoding engine (informative) 192 9.3.5.3 Encoding process for a binary decision (informative) 193 9.3.5.4 Renormalization process in the arithmetic encoding engine (informative) 194 9.3.5.5 Bypass encoding process for binary decisions (informative) 195 9.3.5.6 Encoding process for a binary decision before termination (informative) 196 9.3.5.7 Byte stuffing process (informative) 197 10 Sub-bitstream extraction process 198 Annex A Profiles, tiers and levels 199 A.1 Overview of profiles, tiers and levels 199 A.2 Requirements on video decoder capability 199 A.3 Profiles 199 A.3.1 General 199 A.3.2 Main profile 199 A.3.3 Main 10 profile 200 A.3.4 Main Still Picture profile 200 A.4 Tiers and levels 201 A.4.1 General tier and level limits 201 A.4.2 Profile-specific level limits for the Main and Main 10 profiles 202 A.4.3 Effect of level limits on picture rate for the Main and Main 10 profiles (informative) 204 Annex B Byte stream format 208 B.1 General 208 B.2 Byte stream NAL unit syntax and semantics 208 B.2.1 Byte stream NAL unit syntax 208 B.2.2 Byte stream NAL unit semantics 208 B.3 Byte stream NAL unit decoding process 209 B.4 Decoder byte-alignment recovery (informative) 209 Annex C Hypothetical reference decoder 210 C.1 General 210 C.2 Operation of coded picture buffer (CPB) 214 C.2.1 General 214 C.2.2 Timing of decoding unit arrival 214 C.2.3 Timing of decoding unit removal and decoding of decoding unit 216 C.3 Operation of the decoded picture buffer (DPB) 218 C.3.1 General 218 C.3.2 Removal of pictures from the DPB 218 C.3.3 Picture output 219 C.3.4 Current decoded picture marking and storage 220 C.4 Bitstream conformance 220 C.5 Decoder conformance 221 C.5.1 General 221 C.5.2 Operation of the output order DPB 222 C.5.2.1 General 222 C.5.2.2 Output and removal of pictures from the DPB 222 C.5.2.3 Picture decoding, marking, additional bumping, and storage 223 C.5.2.4 "Bumping" process 223 Annex D Supplemental enhancement information 225 D.1 General 225 D.2 SEI payload syntax 226 D.2.1 General SEI message syntax 226 D.2.2 Buffering period SEI message syntax 228 D.2.3 Picture timing SEI message syntax 229 D.2.4 Pan-scan rectangle SEI message syntax 229 D.2.5 Filler payload SEI message syntax 230 D.2.6 User data registered by Rec. ITU-T T.35 SEI message syntax 230 D.2.7 User data unregistered SEI message syntax 230 D.2.8 Recovery point SEI message syntax 230 D.2.9 Scene information SEI message syntax 231 D.2.10 Picture snapshot SEI message syntax 231 D.2.11 Progressive refinement segment start SEI message syntax 231 D.2.12 Progressive refinement segment end SEI message syntax 231 D.2.13 Film grain characteristics SEI message syntax 232 D.2.14 Post-filter hint SEI message syntax 232 D.2.15 Tone mapping information SEI message syntax 233 D.2.16 Frame packing arrangement SEI message syntax 234 D.2.17 Display orientation SEI message syntax 234 D.2.18 Structure of pictures information SEI message syntax 235 D.2.19 Decoded picture hash SEI message syntax 235 D.2.20 Active parameter sets SEI message syntax 235 D.2.21 Decoding unit information SEI message syntax 236 D.2.22 Temporal sub-layer zero index SEI message syntax 236 D.2.23 Scalable nesting SEI message syntax 236 D.2.24 Region refresh information SEI message syntax 237 D.2.25 Reserved SEI message syntax 237 D.3 SEI payload semantics 237 D.3.1 General SEI payload semantics 237 D.3.2 Buffering period SEI message semantics 240 D.3.3 Picture timing SEI message semantics 242 D.3.4 Pan-scan rectangle SEI message semantics 247 D.3.5 Filler payload SEI message semantics 248 D.3.6 User data registered by Rec. ITU-T T.35 SEI message semantics 248 D.3.7 User data unregistered SEI message semantics 248 D.3.8 Recovery point SEI message semantics 248 D.3.9 Scene information SEI message semantics 249 D.3.10 Picture snapshot SEI message semantics 252 D.3.11 Progressive refinement segment start SEI message semantics 252 D.3.12 Progressive refinement segment end SEI message semantics 253 D.3.13 Film grain characteristics SEI message semantics 253 D.3.14 Post-filter hint SEI message semantics 258 D.3.15 Tone mapping information SEI message semantics 259 D.3.16 Frame packing arrangement SEI message semantics 263 D.3.17 Display orientation SEI message semantics 270 D.3.18 Structure of pictures information SEI message semantics 271 D.3.19 Decoded picture hash SEI message semantics 272 D.3.20 Active parameter sets SEI message semantics 273 D.3.21 Decoding unit information SEI message semantics 273 D.3.22 Temporal sub-layer zero index SEI message semantics 275 D.3.23 Scalable nesting SEI message semantics 275 D.3.24 Region refresh information SEI message semantics 276 D.3.25 Reserved SEI message semantics 277 Annex E Video usability information 278 E.1 General 278 E.1 VUI syntax 279 E.1.1 VUI parameters syntax 279 E.1.2 HRD parameters syntax 281 E.1.3 Sub-layer HRD parameters syntax 282 E.2 VUI semantics 282 E.2.1 VUI parameters semantics 282 E.2.2 HRD parameters semantics 294 E.2.3 Sub-layer HRD parameters semantics 296 Bibliography 298
mysql 报错 1406 , " Data too long for column py mysql .err. Data Error: ( 1406 , “ Data too long for column ‘songlist_url’ at row 1”) 查看网上资料有说因为数据库中设置的字符长度不够,我加长了以后依然会 报错 。另一种说法是由于输入了中文,编码 出现 了问题。 查看 MySQL 的status;,发现...
使用命令行方式登陆到 MySQL 服务器, 建立一个数据库,数据库编码设为UTF-8。此时,如果直接在命令行窗口使用insert语句插入中文,就遇到类似 ERROR 1406 (22001): Data too long for column 'name' at row 1 错误 。乍一看,是字段长度引起的问题,但是实际是字符编码的问题。可是尝试以下解决方法: 1、在Linux中,使用终端...
文章目录1. sklearn.decomposition. Truncate dSVD2. sklearn.feature_extraction.text.TfidfVectorizer3. 代码实践4. 参考文献 《统计学习方法》潜在语义分析(Latent Semantic Analysis,LSA) 笔记 1. sklearn.decomposition. Truncate dSVD sklearn.decomposition. Truncate dSVD 官网介绍 class sklearn.decomposition. Truncate dSVD(n_components=2, algorithm='
This program provides an example for using the truncate d Newton algorithm within the SEISCOPE OPTIMIZATION TOOLBOX. ! The algorithm implemented is described in ! ! L.Metivier, R. Brossier, J. Virieux, S.Operto, ! ! Truncate d Newton and full waveform inversion, 2013 ! ! SIAM Journal on Scientific Computing, Vol. 35, ! ! No. 2, pp. B401–B437,
最近导入数据的时候,总是 报错 :java.sql.SQLException: Data truncation: Data too long for column '***' at row 1 Query,查询好久,才发现是数据库的字符集出错。整理了一下,解决方案为一下几种.。 第一种解决办法: 出自:http://www.blogjava.net/zoninge/archive/2...
(py mysql .err. Data Error) ( 1265 , " Data truncate d for column '订单应付金额' at row 1388")是什么意思