refs #4774 fix procedure
This commit is contained in:
parent
6ad6c88c2c
commit
d1d3657fba
|
@ -0,0 +1,27 @@
|
|||
DELIMITER //
|
||||
CREATE PROCEDURE seleccionar_tablas_18n()
|
||||
BEGIN
|
||||
DECLARE terminado INT DEFAULT 0;
|
||||
DECLARE _nombre_tabla CHAR(64);
|
||||
DECLARE _consulta CHAR(255);
|
||||
DECLARE cursor_tablas CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'vn' AND TABLE_NAME LIKE '%18n%';
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET terminado = 1;
|
||||
|
||||
OPEN cursor_tablas;
|
||||
|
||||
read_loop: LOOP
|
||||
FETCH cursor_tablas INTO _nombre_tabla;
|
||||
|
||||
IF terminado = 1 THEN
|
||||
LEAVE read_loop;
|
||||
END IF;
|
||||
|
||||
SET @s = CONCAT('SELECT * FROM ', _nombre_tabla);
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
END LOOP;
|
||||
|
||||
CLOSE cursor_tablas;
|
||||
END//
|
||||
DELIMITER ;
|
Loading…
Reference in New Issue