problema con stored procedure
hola,
tengo un stored procedure hecho en codigo C, lo quiero usar en mysql pero no se como, me da errores y no se como convertirlo. si alguien sabe como o donde puedo usar informacion le estaria agradecido.
PROCEDURE BENCH() /* Procedure to generate indexed field values */
INTEGER I, J; /* Looping Variables */
DOUBLE SEED INIT (1.); /* Seed For Random Number Generation */
INTEGER ARRAY COLVAL(1:12), /* Array to hold one row of values */
COLCARD(1:12) /* Array holding largest value in each field */
INIT (500000,250000,100000,40000,10000,1000,100,25,10,5 ,4,2);/* Initialize */
FOR I FROM 1 TO 1000000; /* One Million Rows */
FOR J FROM 1 TO 12; /* Twelve randomly generated column values */
SEED = MOD(16807.0D * SEED, 2147483647.0D);
/* I.E.: Si+1 = (7**5 * Si ) MOD (2**31-1), where Si is SEED, a random # */
COLVAL(J) = MOD(SEED, COLCARD(J) )+1; /* Generate next column value */
END FOR J /* Row complete */
PRINT COLVAL VALUES FOR THIS ROW TO OUTPUT; /* Output row's values */
END FOR I /* We have generated One Million Rows */
END
|