-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mysql_history
385 lines (385 loc) · 10.5 KB
/
_mysql_history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
q
;
use user0
show tables
;
desc av_stack_element
;
select user_id, url from av_stack_element limit 10;
select user_id, type, url from av_stack_element limit 100;
select user_id, type, url from av_stack_element where type <> "L"
;
select user_id, type, url from av_stack_element INTO OUTFILE "tmp/urls"
;
select user_id, type, url from av_stack_element INTO OUTFILE "/home/alan/tmp/urls"
;
show databases;
use test;
show tables;
clear
show databases;
create database ispace;
create database ispace_dev;
create database ispace_test;
clear
show databases;
use mysql;
show tables;
show databases;
use ispace ;
show tables;
use ispace_dev;
show tables;
explain bays;
use ispace_dev;
show tables;
desc regions;
use ispace_dev;
show tables;
use
use test;
drop database ispace_dev;
create database ispace_dev;
show tables;
desc categories;
show tables;
desc schema_migrations;
select * from schema_migrations;
desc categories;
use ispace_dev;
show tables;
desc categories;
INSERT INTO `categories` (`created_at`, `desc`, `id`, `updated_at`) VALUES ('2013-06-19 08:31:50', '各类牙膏,...', '牙膏', '2013-06-19 08:31:50')
;
select * from categories;
delete from categories;
use test;
use
drop database ispace_dev;
create database ispace_dev default character set utf8 default collate utf8_general_cli;
create database ispace_dev default character set utf8 default collate utf8_general_ci;
use ispace_dev;
select * from categories;
select length(id) from categories;
show databases;
destroy database ispace_dev
;
destroy ispace_dev;
drop database ispace_dev;
create database ispace_dev default character set utf8 default collate utf8_general_ci;
show tables;
select * from open_shelves;
select id,bay_id,level,name from open_shelves;
select * from bays;
select * from bays \G;
select * from bays \g;
select * from bays \G
select * from bays \g;
select * from bays \g
clear
show tables;
drop table *;
drop table bays;
drop table categories;
drop table schema_migrations;
drop table rear_support_bars
;
drop table peg_boards;
drop table open_shelves;
show tables;
drop table freezer_chests;
show tables;
select id from bays;
select id,name from bays;
show tables;
show open_shelves;
desc peg_boards;
clear
show tables;
show id,name from bays;
select id,name from bays;
show tables;
drop table bays;
drop table rear_support_bars;
drop table schema_migrations
;
drop table categories;
drop table freezer_chests;
show tables;
drop table open_shelves;
drop table peg_boards;
show tables;
select id,name from open_shelves \g
select id,bay_id,name from open_shelves \g
select id, name from bays \g
select id,bay_id,name from open_shelves \g
update open_shelves set id=0 where bay_id=0;
select id,bay_id,name from open_shelves \g
show tables;
select id,name from bays \g
select id,name from open_shelves where bay_id = 27 \g
select id,name from bays;
select id,name from open_shelves where bay_id >= 35;
select id,name from open_shelves where bay_id >= 27;
select id,name from open_shelves where bay_id = 27;
select id,name from bays;
select id,name from open_shelves where bay_id = 27;
show tables;
show id,name from bays;
select id,name from bays;
select id,name,from_base,notch_num from open_shelves \g
select bay_id,name,from_base,notch_num from open_shelves \g
show tables;
select id,name from bays \g
select id,bay_id,name from open_shelves where bay_id = 27 \g
select id,bay_id,name from open_shelves where bay_id > 36 \g
select id,bay_id,name from open_shelves where bay_id > 35 \g
select id,bay_id,name from open_shelves where bay_id >= 35 \g
select id,name from bays \g
select id,bay_id,name from open_shelves where bay_id >= 35 \g
select id,name from bays \g
select id,bay_id,name from open_shelves where bay_id >= 35 \g
select id,bay_id,name from open_shelves where bay_id >= 41 \g
select id,bay_id,name from open_shelves where bay_id >= 43 \g
select id,bay_id,name from open_shelves where bay_id >= 35 \g
select id,bay_id,name from open_shelves where bay_id = 28 \g
select id,bay_id,name from open_shelves where bay_id = 27 \g
select id,bay_id,name from open_shelves where bay_id = 46 \g
select id,name from bays \g
select id,name from bays;
select id,bay_id,name from open_shelves where bay_id = 29 \g
select id,bay_id,name from open_shelves where bay_id = 47 \g
select id,bay_id,name from open_shelves where bay_id = 30 \g
select id,bay_id,name from open_shelves where bay_id = 30 or bay_id = 48 \g
select id,bay_id,name from open_shelves where bay_id = 30 or bay_id = 49 \g
select id,bay_id,name from open_shelves where bay_id = 30 or bay_id >= 49 \g
select id.name from bays;
select id,name from bays;
select id,bay_id,name from open_shelves where bay_id = 30 or bay_id = 53 \g
select id,bay_id,name from open_shelves where bay_id = 0
;
update open_shelves set id=0 where bay_id = 0;
select id,bay_id,name from open_shelves where bay_id = 0
;
select id,bay_id,name from open_shelves where bay_id <= 0
;
desc open_shelves;
desc open_shelves \G
select * from open_shelves where bay_id = -1;
select * from open_shelves where bay_id = -1 \G
show tables
;
desc regions;
drop table regions, stores
;
show tables;
select * from schema_migrations;
delete from schema_migrations where version in (20130706060222, 20130706060225)
;
select * from schema_migrations;
drop table regions, stores;
show tables;
desc regions \G
show tables;
select * from categories;
select id from stores;
select id,name from bays;
select id,name from fixtures;
select * from schema_migrations;
delete from schema_migrations where version > 20130706060225;
select * from schema_migrations;
drop table fixtures, fixture_items;
select id,name from fixture;
select id,name from fixtures;
select id,fixture_id,bay_id from fixture_items;
select id, name, base_height, base_width, base_depth from bays limit 1;
select id, name, back_height, back_width from bays limit 1;
desc fixture_items;
select id,bay_id,num_bays,item_index from fixture_items where fixture_id == 9
;
select id,bay_id,num_bays,item_index from fixture_items where fixture_id = 9;
select id,bay_id,num_bays,item_index from fixture_items where fixture_id = 5;
select id,bay_id,num_bays,item_index from fixture_items where fixture_id = 5 order by item_index;
desc bays;
desc bays \G;
show tables;
desc schema_migrations;
select * from schema_migrations;
delete from schema_migrations where version = 20130715031319;
drop table sheets;
desc sheets;
drop table sheets;
delete from schema_migrations where version >= 20130715031319;
drop table sheets;
delete from schema_migrations where version >= 20130715031319;
desc sheets
;
select * from sheets;
desc sheets;
select * from sheets;
delete * from sheets;
delete from sheets;
desc sheets;
select * from sheets;
drop sheets;
drop table sheets;
delete from schema_migrations where version >= 20130715031319;
desc sheets;
desc imports;
show tables;
drop table suppliers;
drop table brands;
show tables;
drop table manufacturers;
select * from schema_migrations;
show tables;
select * from schema_migrations;
delete from schema_migrations where version >= 20130717075531;
show tables;
drop table products;
drop table merchandises;
show tables;
desc Import
;
desc Imports;
desc imports;
desc import_sheets;
select * from import_sheets;
delete from import_sheets;
desc import_sheets;
select count(*) from import_sheets;
select * from import_sheets limit 1;
drop table import_sheets;
select * from schema_migrations;
delete from schema_migrations where version =
20130718125722;
delete from schema_migrations where version = 20130718125722;
show databases;
use ispace_test;
show tables;
show variables like "character_set_database";
show variables like "collation_database";
show databases;
show CHARACTER SET FOR ispace;
show variables like "character_set_database";
show variables like "collation"
;
show variables like "collation_database"
;
show variables like "collation_database";
show variables like "character_set_database";
create database utf8;
use utf8;
show variables like "character_set_database";
show variables like "collation_database";
drop database ispace;
drop database ispace_dev;
drop database ispace_test;
show database;
show databases;
use ispace_dev;
show tables;
show variables like "collation_database";
show variables like "character_set";
show variables like "character_set%";
show variables like "colla_set%";
show variables like "colla%";
use ispace_test;
show variables like "char%"
;
show variables like "colla%"
;
show tables;
select * from schema_migrations;
show variables like "char%"
;
show variables like "coll%";
delete from import_sheets;
select * from import_sheets;
select id from import_sheets;
delete from import_sheets;
select * from bays;
desc import_sheets;
select id,step from import_sheets;
select id,step,store_id from import_sheets;
update import_sheets set store_id = 1;
select id,step,store_id from import_sheets;
desc categories;
desc products;
desc regions;
select * from categories;
show tables;
drop database ispace_dev;
create database ispace_dev;
desc regions;
use ispace_dev;
desc regions;
drop database ispace_dev;
create database ispace_dev;
show tables;
use ispace_dev;
show tables;
drop database ispace_dev;
create database ispace_dev;
use ispace_dev;
desc regions;
desc categories;
desc products;
drop database ispace_dev;
create database ispace_dev;
drop database ispace_dev;
create database ispace_dev;
show databases;
drop database ispace_dev;
create database ispace_dev;
use ispace_dev;
desc regions;
desc categories;
desc products;
drop database ispace_dev;
create database ispace_dev;
use ispace_dev;
show tables;
desc categories;
show tables;
drop table bays;
drop table categories;
select * from schema_migrations
;
delete from schema_migrations;
desc categories;
delete from schema_migrations;
drop table bays, categories;
show tables;
desc categories;
drop table categories;
drop database ispace_dev;
create database ispace_dev;
drop database ispace_dev;
create database ispace_dev;
show tables;
use ispace_dev;
show tables;
desc import_sheets;
drop table import_sheets;
select * from schema
;
show tables;
select * from schema_migrations;
delete from schema_migrations where version >= 20130724092508;
desc import_sheets;
delete from schema_migrations where version >= 20130724092508;
drop table import_sheets;
desc import_sheets;
drop table import_sheets;
delete from schema_migrations where version >= 20130724092508;
desc import_sheets;
select * from categories;
select * from import_sheets;
select count(*) from import_sheets;
select id,step from import_sheets;
desc import_sheets;
select id,step from import_sheets;
drop table import_sheets;
delete from schema_migrations where version >= 20130724092508;
select id,step from import_sheets;