Menu

[r8320]: / trunk / database / create_mysql_bugreport.sql  Maximize  Restore  History

Download this file

586 lines (486 with data), 18.2 kB

  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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
/*==============================================================*/
/* Database name: MySql */
/* DBMS name: MySQL 3.23 */
/* Created on: 04.02.2003 19:48:39 */
/*==============================================================*/
/*==============================================================*/
/* Tables for Bug#735226 */
/*==============================================================*/
CREATE TABLE table735226a
(
id INT NOT NULL,
referenceid INT NOT NULL
);
CREATE TABLE table735226b
(
id INT NOT NULL
);
/*==============================================================*/
/* Tables for Bug#726788 */
/*==============================================================*/
CREATE TABLE Table726788
(
FieldName INT NOT NULL
);
/*==============================================================*/
/* Tables for Bug#735299 */
/*==============================================================*/
CREATE TABLE table735299
(
id INT NOT NULL,
fld1 ENUM('Y','N'),
fld2 enum('n','y'),
PRIMARY KEY (id)
);
/*==============================================================*/
/* Tables for Bug#735299 */
/* used if MYSQL_FIELTYPE_BIT_1_ISBOOLEN is set */
/*==============================================================*/
CREATE TABLE table735299_bit
(
id INT NOT NULL,
fld1 bit(1),
fld2 bit(1),
PRIMARY KEY (id)
);
/*==============================================================*/
/* Tables for Bug#740899 */
/*==============================================================*/
CREATE TABLE table740899
(
id INT NOT NULL,
fld VARCHAR(35)
);
/*==============================================================*/
/* Tables for Bug #724542 */
/*==============================================================*/
CREATE TABLE table724542
(
fld1 int(11),
fld2 char(30),
fld3 char(10)
);
/*==============================================================*/
/* Tables for Bug #739448 */
/*==============================================================*/
CREATE TABLE table739448a
(
fld1 int(11),
fld2 char(30),
fld3 char(10)
);
insert into table739448a values (1, 'abcdefghi', '123456789');
CREATE TABLE table739448b
(
fld1 int(11),
fld2 char(30),
fld3 char(10)
);
insert into table739448b values(1, 'abcdefghi', '123456789');
/*==============================================================*/
/* Tables for Bug #733236 */
/*==============================================================*/
CREATE TABLE table733236
(
date DATE,
time TIME,
datetime DATETIME,
timestamp TIMESTAMP
);
INSERT INTO table733236 VALUES("1998-12-31", "23:59:59", "1998-12-31 23:59:59",19981231235959);
INSERT INTO table733236 VALUES("1999-01-01", "00:00:00", "1999-01-01 00:00:00",19990101000000);
INSERT INTO table733236 VALUES("2000-01-01", "00:00:00", "2000-01-01 00:00:00",20000101000000);
INSERT INTO table733236 VALUES("2001-01-01", "00:00:00", "2001-01-01 00:00:00",20010101000000);
INSERT INTO table733236 VALUES("2004-12-31", "23:59:59", "2004-12-31 23:59:59",20041231235959);
/*==============================================================*/
/* Tables for Bug #768163 */
/*==============================================================*/
create table table768163
(
fld1 int unsigned,
fld2 bigint
);
/*==============================================================*/
/* Tables for Bug #799863 */
/*==============================================================*/
create table table799863
(
fld1 year
);
/*insert into table799863 values (1024);*/
insert into table799863 values (1940);
insert into table799863 values (2003);
/*==============================================================*/
/* Tables for Bug #000001 */
/*==============================================================*/
create table table000001
(
fld1 longtext,
fld2 longblob
);
/*==============================================================*/
/* Tables for Bug #817607 */
/*==============================================================*/
create table table817607
(
id int,
`fruit name` varchar(10)
);
insert into table817607 values (1, 'apple');
insert into table817607 values (2, 'cherry');
insert into table817607 values (3, 'mango');
/*==============================================================*/
/* Tables for Bug #816925 */
/*==============================================================*/
create table table816925
(
fld1 decimal(5,0),
fld2 decimal(9,2),
fld3 numeric(11,0),
fld4 numeric(8,3)
);
/*==============================================================*/
/* Tables for Bug #828147 */
/*==============================================================*/
create table table828147
(
id int4,
txt text
);
insert into table828147 values (1, 'abc');
/*==============================================================*/
/* Tables for Bug #840608 */
/*==============================================================*/
CREATE TABLE table840608 (
`icode` varchar(7) default NULL,
`name` varchar(100) default NULL,
`strength` varchar(15) default NULL,
`units` varchar(50) default NULL,
`unitprice` double(15,3) default NULL,
`dosageform` varchar(100) default NULL,
`criticalpriority` int(11) default NULL,
`drugaccount` char(1) default NULL,
`drugcategory` varchar(150) default NULL,
`drugnote` varchar(150) default NULL,
`hintcode` char(2) default NULL,
`istatus` char(1) default NULL,
`lastupdatestdprice` datetime default NULL,
`lockprice` char(1) default NULL,
`lockprint` char(1) default NULL,
`maxlevel` int(11) default NULL,
`minlevel` int(11) default NULL,
`maxunitperdose` int(11) default NULL,
`packqty` int(11) default NULL,
`reorderqty` int(11) default NULL,
`stdprice` double(15,3) default NULL,
`stdtaken` varchar(30) default NULL,
`therapeutic` varchar(150) default NULL,
`therapeuticgroup` varchar(150) default NULL,
`default_qty` int(11) default NULL,
UNIQUE KEY `icode_unique` (`icode`),
UNIQUE KEY `units_icode_name_unique`
(`units`,`icode`,`name`,`packqty`,`strength`),
KEY `dosageform` (`dosageform`),
KEY `drugaccount` (`drugaccount`),
KEY `drugcategory` (`drugcategory`),
KEY `drugnote` (`drugnote`),
KEY `hintcode` (`hintcode`),
KEY `icode` (`icode`),
KEY `istatus` (`istatus`),
KEY `name` (`name`),
KEY `packqty` (`packqty`),
KEY `strength` (`strength`),
KEY `therapeutic` (`therapeutic`),
KEY `therapeuticgroup` (`therapeuticgroup`),
KEY `units` (`units`)
);
INSERT INTO table840608
(icode,name,strength,units,unitprice,dosageform,criticalpriority,
drugaccount,drugcategory,drugnote,hintcode,istatus,
lastupdatestdprice,lockprice,lockprint,maxlevel,minlevel,
maxunitperdose,packqty,reorderqty,stdprice,stdtaken,therapeutic,
therapeuticgroup,default_qty) VALUES
('1450012','PARACETAMOL (GPO)','500 mg.','TAB',0.5,'Tablets',0,'',
NULL,'p5','58','N',NULL,'N','N',1,1,0,1000,1,NULL,'0153',
'ANTI-PYRETIC','',NULL);
/*==============================================================*/
/* Tables for Bug #849723 */
/*==============================================================*/
CREATE TABLE table849723 (
fld1 time not null,
fld2 varchar(10),
primary key (fld1)
);
INSERT INTO table849723 values ('00:00:00', 'abc');
/*==============================================================*/
/* Tables for Bug #869609 */
/*==============================================================*/
CREATE TABLE table869609 (
id int8 not null auto_increment,
primary key (id)
);
/*==============================================================*/
/* Tables for Bug #865564 */
/*==============================================================*/
CREATE TABLE table865564 (
fld1 float(30,2),
fld2 decimal(10,4)
);
INSERT INTO table865564 VALUES (123.45, 123.4567);
/*==============================================================*/
/* Tables for Bug #881634 */
/*==============================================================*/
CREATE TABLE table881634a (
idt1 int4 not null,
ft1 varchar(20),
PRIMARY KEY (idt1)
);
CREATE TABLE table881634b (
idt2 int4 not null,
ft2 varchar(20),
ft1 integer,
PRIMARY KEY (idt2)
);
/*==============================================================*/
/* Tables for Bug #884135 */
/*==============================================================*/
CREATE TABLE table884135a (
id int4 unsigned auto_increment not null,
fld varchar(20),
PRIMARY KEY (id)
);
INSERT INTO table884135a VALUES (1, 'aaa');
INSERT INTO table884135a VALUES (2, 'bbb');
INSERT INTO table884135a VALUES (3, 'ccc');
CREATE TABLE table884135b (
id int4 unsigned auto_increment not null,
mid int4 unsigned,
fld varchar(20),
PRIMARY KEY (id)
);
INSERT INTO table884135b VALUES (1, 1, 'aaaa');
INSERT INTO table884135b VALUES (2, 1, 'aabb');
INSERT INTO table884135b VALUES (3, 1, 'aacc');
INSERT INTO table884135b VALUES (4, 2, 'bbaa');
INSERT INTO table884135b VALUES (5, 2, 'bbbb');
INSERT INTO table884135b VALUES (6, 2, 'bbcc');
INSERT INTO table884135b VALUES (7, 3, 'ccaa');
INSERT INTO table884135b VALUES (8, 3, 'ccbb');
INSERT INTO table884135b VALUES (9, 3, 'cccc');
/*==============================================================*/
/* Tables for Bug #886841 */
/*==============================================================*/
CREATE TABLE table886841 (
fld enum('y','n') default 'y'
);
/*==============================================================*/
/* Tables for Bug #894367 */
/*==============================================================*/
CREATE TABLE table894367a (
fld1 varchar(30),
fld2 enum('y','n')
);
CREATE TABLE table894367b (
fld1 int4,
fld2 float
);
CREATE TABLE table894367c (
fld1 tinyblob,
fld2 int8
);
/*==============================================================*/
/* Tables for Bug #886841 */
/*==============================================================*/
/*
CREATE TABLE table914436 (
fld1 CHAR(15) CHARACTER SET LATIN1,
fld2 VARCHAR(15) CHARACTER SET LATIN1,
fld3 TEXT(15) CHARACTER SET LATIN1
);
/**/
/*==============================================================*/
/* Tables for Bug #938705 */
/*==============================================================*/
CREATE TABLE `Table 938705` (
`Field First` int4 not null auto_increment,
`Field Second` varchar(10),
primary key (`Field First`)
);
/*==============================================================*/
/* Tables for Bug #957126 */
/*==============================================================*/
CREATE TABLE table957126 (
fld1 VARCHAR(15) DEFAULT '',
fld2 VARCHAR(15)
);
/*==============================================================*/
/* Tables for Bug #987022 */
/*==============================================================*/
CREATE TABLE table987022 (
fld1 BIGINT,
fld2 VARCHAR(15)
);
/*==============================================================*/
/* Tables for Bug #989474 */
/*==============================================================*/
CREATE TABLE table989474 (
CustID INT4,
CreateDate DATE,
PRIMARY KEY (CustID)
);
/*==============================================================*/
/* Tables for Bug #1045286 */
/*==============================================================*/
CREATE TABLE table1045286 (
fld text not null
);
INSERT INTO table1045286 VALUES ('');
/*==============================================================*/
/* Tables for Ticket#52 */
/*==============================================================*/
CREATE TABLE TableTicket52 (
id_test int(11) UNSIGNED NOT NULL,
filter_test varchar(255) DEFAULT NULL,
PRIMARY KEY (id_test)
);
INSERT INTO TableTicket52(id_test, filter_test) VALUES (1, 'String01');
INSERT INTO TableTicket52(id_test, filter_test) VALUES (2, '0');
INSERT INTO TableTicket52(id_test, filter_test) VALUES (3, '1');
INSERT INTO TableTicket52(id_test, filter_test) VALUES (4, '2');
INSERT INTO TableTicket52(id_test, filter_test) VALUES (5, 'Other');
INSERT INTO TableTicket52(id_test, filter_test) VALUES (6, 'String02');
/*==============================================================*/
/* Tables for TableMS56OBER9357 */
/*==============================================================*/
SET sql_mode = ''; -- To make possible assigning of '0000-00-00' value
CREATE TABLE `TableMS56OBER9357` (
`keyfield` int(11) NOT NULL default '0',
`dtfield` date NOT NULL default '0000-00-00',
`infofield` varchar(10) default NULL,
PRIMARY KEY (`keyfield`,`dtfield`)
);
/*==============================================================*/
/* Tables for Ticket#240 */
/*==============================================================*/
CREATE TABLE TableTicket240 (
id_test BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
field_1 varchar(255) DEFAULT NULL,
PRIMARY KEY (id_test)
);
/*==============================================================*/
/* Table for Ticket#304 */
/*==============================================================*/
CREATE TABLE IF NOT EXISTS TableTicket304 (
id_test BIGINT NOT NULL PRIMARY KEY,
LATITUDE double precision,
LONGITUDE double precision,
point_field point DEFAULT NULL,
geometry_field geometry DEFAULT NULL
);
delimiter //
/*==============================================================*/
/* trigger for Ticket#304 */
/*==============================================================*/
CREATE TRIGGER TR_UPD_TableTicket304 BEFORE UPDATE ON TableTicket304 FOR EACH ROW
BEGIN
DECLARE dummy INT;
if not NEW.point_field <=> old.point_field then
SELECT point_field_changed INTO dummy FROM TableTicket304 WHERE 1=0;
END IF;
if not NEW.geometry_field <=> old.geometry_field then
SELECT geometry_field_changed INTO dummy FROM TableTicket304 WHERE 1=0;
END IF;
if NEW.point_field IS NULL AND NEW.LATITUDE IS NOT NULL AND NEW.LONGITUDE IS NOT NULL then
SET NEW.point_field = POINT(NEW.LONGITUDE, NEW.LATITUDE);
END IF;
if NEW.geometry_field IS NULL AND NEW.LATITUDE IS NOT NULL AND NEW.LONGITUDE IS NOT NULL then
SET NEW.geometry_field = POINT(NEW.LONGITUDE, NEW.LATITUDE);
END IF;
END; //
delimiter ;
/*==============================================================*/
/* Tables for Ticket#389 */
/*==============================================================*/
CREATE TABLE TableTicked389 (
id_test BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
int_field BIGINT DEFAULT NULL,
PRIMARY KEY (id_test)
);
/*================================================================*/
/* A table for an error concerning bigints. See */
/* See https://zeoslib.sourceforge.io/viewtopic.php?f=50&t=118430 */
/*================================================================*/
CREATE TABLE biginterror (
f bigint(20) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf16;
CREATE TABLE table_ticket_442 (
`objectid` int(11) NOT NULL,
`label` varchar(255) NOT NULL,
PRIMARY KEY (`objectid`)
);
CREATE TABLE table_p156227 (
`id`int not null,
`SaleDateTime` date NOT NULL,
`VatLow` numeric(10,2) NOT NULL,
PRIMARY KEY (`id`)
);
delimiter //
create procedure forum199899(in somevalue varchar(50))
begin
select length(somevalue);
end; //
delimiter ;
create table TblForumT199899_1 (
id int auto_increment primary key,
appliname varchar(100) not null default '',
pc_name varchar(15) not null default '',
contents1 varchar(200) not null default '',
update_stamp datetime(3) not null default current_timestamp(3) on update current_timestamp(3)
);
/*
create table TblForumT199899_2 (
id int auto_increment primary key,
customercode varchar(6) not null default '',
orderflg varchar(1) not null default '0',
customername varchar(100) not null default '',
update_stamp datetime(3) not null default current_timestamp(3) on update current_timestamp(3)
);
*/
delimiter //
create function FncForumT199899_1 (
in_tablename varchar(100)
)
returns text deterministic
begin
return concat('select * from ', in_tablename);
end //
create function FncForumT199899_2 (
in_flg int,
in_table_headername varchar(100)
)
returns text deterministic
begin
declare val_sqltext_select text default "";
declare val_open_tablename varchar(100) default "";
set val_open_tablename = concat(in_table_headername, 'zeos');
if in_flg=0 then
set val_sqltext_select = concat('select * from ', val_open_tablename);
else
set val_sqltext_select = concat('select customercode, orderflg, customername, ',
'case when orderflg="0" then "not ordered" else "ordered" as orderflg_name ',
'from ', val_open_tablename);
end if;
return val_sqltext_select;
end //
create procedure ProcForumT199899_3 (
in in_tablename varchar(100),
out out_pcname varchar(100)
)
begin
set @s = concat('select pc_name into @pc_name from ', in_tablename, ' where appliname = "aaa.exe"');
prepare stmt1 from @s;
execute stmt1;
deallocate prepare stmt1;
set out_pcname=@pc_name;
end //
delimiter ;
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.