teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

回答者の要望に応えた。

2017/07/05 03:19

投稿

thisprogrammer
thisprogrammer

スコア27

title CHANGED
File without changes
body CHANGED
@@ -14,10 +14,23 @@
14
14
  しかし、エラーメッセージは変わらなかった。
15
15
 
16
16
  # 回答者の要望
17
- ```ここに言語を入力
17
+ ## `SHOW GLOBAL VARIABLES LIKE 'innodb_file_%';` の結果
18
-
18
+ 古いサバー
19
- ```
19
+ |Variable_name|Value|
20
+ |-------------|-----|
21
+ |innodb_file_format|Antelope|
22
+ |innodb_file_format_check|ON|
23
+ |innodb_file_format_max|Antelope|
24
+ |innodb_file_per_table|ON|
20
25
 
26
+ 新しいサーバー(MYSQL5.7.18)
27
+ | Variable_name | Value |
28
+ |--------------------------|-----------|
29
+ | innodb_file_format | Barracuda |
30
+ | innodb_file_format_check | ON |
31
+ | innodb_file_format_max | Barracuda |
32
+ | innodb_file_per_table | ON |
33
+
21
34
  ## エラーの出るテーブル定義
22
35
  ```sql
23
36
  CREATE TABLE `bk_table` (

2

回答者の要望に応えた。

2017/07/05 03:19

投稿

thisprogrammer
thisprogrammer

スコア27

title CHANGED
File without changes
body CHANGED
@@ -1,14 +1,162 @@
1
- ###わからない事、知りたいこと
1
+ #わからない事、知りたいこと
2
2
  古いmysqldumpでダンプしたSQLファイルをMYSQL5.7.18でimportすると次のようなエラーになる。
3
3
 
4
4
  ERROR 1118 (42000) at line 52: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
5
5
 
6
6
  よって、インポートできない。このエラーを解決してSQLファイルを読み込み、データベースを復元したい。
7
7
 
8
- ###やってみたこと
8
+ # やってみたこと
9
9
 
10
- 古いmysqldumpでダンプしたSQLファイルの先頭に次のように記述した。
10
+ ###### 古いmysqldumpでダンプしたSQLファイルの先頭に次のように記述した。
11
11
 
12
12
  SET GLOBAL innodb_default_row_format=DYNAMIC;
13
13
 
14
- しかし、エラーメッセージは変わらなかった。
14
+ しかし、エラーメッセージは変わらなかった。
15
+
16
+ # 回答者の要望
17
+ ```ここに言語を入力
18
+ コード
19
+ ```
20
+
21
+ ## エラーの出るテーブル定義
22
+ ```sql
23
+ CREATE TABLE `bk_table` (
24
+ `a_bk_id` int(11) NOT NULL AUTO_INCREMENT,
25
+ `a_id` int(11) NOT NULL,
26
+ `a_id2` text COLLATE utf8_unicode_ci NOT NULL,
27
+ `a_id3` int(11) NOT NULL,
28
+ `a_id4` int(11) NOT NULL DEFAULT '1',
29
+ `a_id5` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
30
+ `a_id6` int(11) NOT NULL,
31
+ `a_id7` tinyint(4) NOT NULL DEFAULT '1',
32
+ `a_id8` tinyint(4) NOT NULL DEFAULT '0',
33
+ `a_id9` tinyint(4) NOT NULL DEFAULT '0',
34
+ `a_id10` int(11) NOT NULL DEFAULT '0',
35
+ `a_id11` text COLLATE utf8_unicode_ci NOT NULL,
36
+ `a_id12` text COLLATE utf8_unicode_ci NOT NULL,
37
+ `a_id13` tinyint(4) NOT NULL DEFAULT '0',
38
+ `a_id14` text COLLATE utf8_unicode_ci NOT NULL,
39
+ `a_id15` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
40
+ `a_id16` text COLLATE utf8_unicode_ci NOT NULL,
41
+ `a_id17` text COLLATE utf8_unicode_ci NOT NULL,
42
+ `a_id18` int(11) NOT NULL DEFAULT '0',
43
+ `a_id19` tinyint(4) NOT NULL,
44
+ `a_id20` text COLLATE utf8_unicode_ci NOT NULL,
45
+ `a_id21` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
46
+ `a_id22` int(11) NOT NULL DEFAULT '17',
47
+ `a_id23` text COLLATE utf8_unicode_ci NOT NULL,
48
+ `a_id24` text COLLATE utf8_unicode_ci NOT NULL,
49
+ `a_id25` int(11) NOT NULL,
50
+ `a_id26` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
51
+ `a_id27` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
52
+ `a_id28` text COLLATE utf8_unicode_ci NOT NULL,
53
+ `a_id29` text COLLATE utf8_unicode_ci NOT NULL,
54
+ `a_id30` int(11) NOT NULL DEFAULT '0',
55
+ `a_id31` int(11) NOT NULL,
56
+ `a_id32` int(11) NOT NULL,
57
+ `a_id33` int(11) NOT NULL,
58
+ `a_id34` datetime NOT NULL,
59
+ `a_id35` text COLLATE utf8_unicode_ci NOT NULL,
60
+ `a_id36` int(11) NOT NULL,
61
+ `a_id37` int(11) NOT NULL,
62
+ `a_id38` tinyint(4) NOT NULL DEFAULT '1',
63
+ `a_id39` text COLLATE utf8_unicode_ci NOT NULL,
64
+ `a_id40` text COLLATE utf8_unicode_ci NOT NULL,
65
+ `a_id41` text COLLATE utf8_unicode_ci NOT NULL,
66
+ `a_id42` int(11) NOT NULL DEFAULT '0',
67
+ `a_id43` int(11) NOT NULL DEFAULT '0',
68
+ `a_id44` int(11) NOT NULL DEFAULT '0',
69
+ `a_id45` int(11) NOT NULL DEFAULT '0',
70
+ `a_id46` int(11) NOT NULL DEFAULT '0',
71
+ `a_id47` text COLLATE utf8_unicode_ci NOT NULL,
72
+ `a_id48` text COLLATE utf8_unicode_ci NOT NULL,
73
+ `a_id49` text COLLATE utf8_unicode_ci NOT NULL,
74
+ `a_id50` text COLLATE utf8_unicode_ci NOT NULL,
75
+ `a_id51` text COLLATE utf8_unicode_ci NOT NULL,
76
+ `a_id52` text COLLATE utf8_unicode_ci NOT NULL,
77
+ `a_id53` text COLLATE utf8_unicode_ci NOT NULL,
78
+ `a_id54` text COLLATE utf8_unicode_ci NOT NULL,
79
+ `a_id55` text COLLATE utf8_unicode_ci NOT NULL,
80
+ `a_id56` text COLLATE utf8_unicode_ci NOT NULL,
81
+ `a_id57` text COLLATE utf8_unicode_ci NOT NULL,
82
+ `a_id58` text COLLATE utf8_unicode_ci NOT NULL,
83
+ `a_id59` text COLLATE utf8_unicode_ci NOT NULL,
84
+ `a_id60` text COLLATE utf8_unicode_ci NOT NULL,
85
+ `a_id61` text COLLATE utf8_unicode_ci NOT NULL,
86
+ `a_id62` text COLLATE utf8_unicode_ci NOT NULL,
87
+ `a_id63` text COLLATE utf8_unicode_ci NOT NULL,
88
+ `a_id64` text COLLATE utf8_unicode_ci NOT NULL,
89
+ `a_id65` text COLLATE utf8_unicode_ci NOT NULL,
90
+ `a_id66` text COLLATE utf8_unicode_ci NOT NULL,
91
+ `a_id67` text COLLATE utf8_unicode_ci NOT NULL,
92
+ `a_id68` text COLLATE utf8_unicode_ci NOT NULL,
93
+ `a_id69` text COLLATE utf8_unicode_ci NOT NULL,
94
+ `a_id70` text COLLATE utf8_unicode_ci NOT NULL,
95
+ `a_id71` text COLLATE utf8_unicode_ci NOT NULL,
96
+ `a_id72` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
97
+ `a_id73` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
98
+ `a_id74` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
99
+ `a_img_1` text COLLATE utf8_unicode_ci NOT NULL,
100
+ `a_img_2` text COLLATE utf8_unicode_ci NOT NULL,
101
+ `a_img_3` text COLLATE utf8_unicode_ci NOT NULL,
102
+ `a_img_4` text COLLATE utf8_unicode_ci NOT NULL,
103
+ `a_img_5` text COLLATE utf8_unicode_ci NOT NULL,
104
+ `a_img_6` text COLLATE utf8_unicode_ci NOT NULL,
105
+ `a_img_7` text COLLATE utf8_unicode_ci NOT NULL,
106
+ `a_img_8` text COLLATE utf8_unicode_ci NOT NULL,
107
+ `a_img_9` text COLLATE utf8_unicode_ci NOT NULL,
108
+ `a_img_10` text COLLATE utf8_unicode_ci NOT NULL,
109
+ `a_img_11` text COLLATE utf8_unicode_ci NOT NULL,
110
+ `a_img_12` text COLLATE utf8_unicode_ci NOT NULL,
111
+ `a_img_13` text COLLATE utf8_unicode_ci NOT NULL,
112
+ `a_img_14` text COLLATE utf8_unicode_ci NOT NULL,
113
+ `a_img_15` text COLLATE utf8_unicode_ci NOT NULL,
114
+ `a_img_16` text COLLATE utf8_unicode_ci NOT NULL,
115
+ `a_img_17` text COLLATE utf8_unicode_ci NOT NULL,
116
+ `a_img_18` text COLLATE utf8_unicode_ci NOT NULL,
117
+ `a_img_19` text COLLATE utf8_unicode_ci NOT NULL,
118
+ `a_img_20` text COLLATE utf8_unicode_ci NOT NULL,
119
+ `a_img_21` text COLLATE utf8_unicode_ci NOT NULL,
120
+ `a_img_22` text COLLATE utf8_unicode_ci NOT NULL,
121
+ `a_img_23` text COLLATE utf8_unicode_ci NOT NULL,
122
+ `a_img_24` text COLLATE utf8_unicode_ci NOT NULL,
123
+ `a_img_25` text COLLATE utf8_unicode_ci NOT NULL,
124
+ `a_img_26` text COLLATE utf8_unicode_ci NOT NULL,
125
+ `a_img_27` text COLLATE utf8_unicode_ci NOT NULL,
126
+ `a_img_28` text COLLATE utf8_unicode_ci NOT NULL,
127
+ `a_img_29` text COLLATE utf8_unicode_ci NOT NULL,
128
+ `a_img_30` text COLLATE utf8_unicode_ci NOT NULL,
129
+ `a_img_31` text COLLATE utf8_unicode_ci NOT NULL,
130
+ `a_img_32` text COLLATE utf8_unicode_ci NOT NULL,
131
+ `a_img_33` text COLLATE utf8_unicode_ci NOT NULL,
132
+ `a_img_34` text COLLATE utf8_unicode_ci NOT NULL,
133
+ `a_img_35` text COLLATE utf8_unicode_ci NOT NULL,
134
+ `a_img_36` text COLLATE utf8_unicode_ci NOT NULL,
135
+ `a_img_37` text COLLATE utf8_unicode_ci NOT NULL,
136
+ `a_img_38` text COLLATE utf8_unicode_ci NOT NULL,
137
+ `a_img_39` text COLLATE utf8_unicode_ci NOT NULL,
138
+ `a_img_40` text COLLATE utf8_unicode_ci NOT NULL,
139
+ -- もっともっと続く 文字数制限で全部掲載できない
140
+ `a_id94` datetime NOT NULL,
141
+ `a_id95` datetime NOT NULL,
142
+ `a_id96` datetime NOT NULL,
143
+ `a_id97` tinyint(4) NOT NULL,
144
+ `a_id98` text COLLATE utf8_unicode_ci NOT NULL,
145
+ `a_id99` text COLLATE utf8_unicode_ci NOT NULL,
146
+ `a_id100` int(11) NOT NULL,
147
+ `a_id101` text COLLATE utf8_unicode_ci,
148
+ `a_id102` text COLLATE utf8_unicode_ci,
149
+ `a_extra_option_1` text COLLATE utf8_unicode_ci NOT NULL,
150
+ `a_extra_option_2` text COLLATE utf8_unicode_ci NOT NULL,
151
+ `a_extra_option_3` text COLLATE utf8_unicode_ci NOT NULL,
152
+ `a_extra_option_4` text COLLATE utf8_unicode_ci NOT NULL,
153
+ `a_extra_option_5` text COLLATE utf8_unicode_ci NOT NULL,
154
+ `a_id103` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
155
+ `a_id104` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
156
+ `a_id105` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
157
+ `a_id106` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
158
+ `a_check_flag` int(11) NOT NULL DEFAULT '0',
159
+ PRIMARY KEY (`a_bk_id`),
160
+ KEY `a_id3` (`a_id3`)
161
+ ) ENGINE=InnoDB AUTO_INCREMENT=1852156 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
162
+ ```

1

やってみたこと 追記

2017/07/05 03:17

投稿

thisprogrammer
thisprogrammer

スコア27

title CHANGED
File without changes
body CHANGED
@@ -3,4 +3,12 @@
3
3
 
4
4
  ERROR 1118 (42000) at line 52: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
5
5
 
6
- よって、インポートできない。このエラーを解決してSQLファイルを読み込み、データベースを復元したい。
6
+ よって、インポートできない。このエラーを解決してSQLファイルを読み込み、データベースを復元したい。
7
+
8
+ ###やってみたこと
9
+
10
+ 古いmysqldumpでダンプしたSQLファイルの先頭に次のように記述した。
11
+
12
+ SET GLOBAL innodb_default_row_format=DYNAMIC;
13
+
14
+ しかし、エラーメッセージは変わらなかった。