mysql – 保存base64数据 – 行大小太大的问题
作者:互联网
我有22个类型为longtext的数据库字段.如果我尝试使用以下数据保存12个字段,则会出现以下错误:
#1118 - Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
如果我只保存11个字段,它可以节省很多.这是数据:
BYOkQoFxB5+S8VH8svilSI/hQCUDlh1wGhyHacxjNpShUKlGJJ5HZ1DQTKGexBaP65zeJksfOnvBloCSbVmNgYxQhaQHn7sJlKjwtC00X/me2K8Vs4I9cL9SZx58Q2iXXQBbJYaAhn0LaEJMUN0P7VWd0/MiKgXsJt0UiXBf7Rlo6JIooBlaf59zA+II1o3MJKmzyH4q7C1qm2bC0LIT79ZCWDDSdqQaKZ1k1gPMu+yDYQPjrNiQUW29K/AdJ/XpPHT50jaJUjoMv9fL2TK0bUMO0VGe+0Cf4j0BE3QHlFnHqdgnLCTWk8NVo5U4Y5XTObsZtWwd1wHFZNIatuvg0cQk6WHojx3H9HavxKs9JJWYp8eCywyLhjmF39jMoZRT4n8fSTGDGif2q3VJE7DQrmQTjyQkSl9yUWvcTTUHAyNRYKnthVbgbzOOhEvhOZPuD4h+dcGyiW/xk+Lvu2XqkMDBIBuLcKymrdhefi4DElpuwyKFH7DNt6Y3fllPN/0XuSF0YXPqnBDLUcZsMqdzWPZX4RoVza/0Do+mHejYUSYnhsFWtPUHlTnU6fojBqw0icoKqhwjcIVpZmATwgYwXclsSwqEBWm9q9DMNzXG73bq6bs29BKq3E9S/fxo9Bz3mThNaj33fhyD4mj8indAIQeLVWvW3dq4T8+0lao6Ll0=
我该如何解决这个问题?如何增加行大小的字节,使其大于8126?
解决方法:
问题是InnoDB表的行大小限制,在此链接中,您可以找到一些方法来解决此问题:
> http://www.mysqlperformanceblog.com/2011/04/07/innodb-row-size-limitation/
> https://dba.stackexchange.com/questions/6598/innodb-create-table-error-row-size-too-large
标签:mysql,longtext 来源: https://codeday.me/bug/20191007/1863497.html