-- -----------------------------------------------------
-- Table `table1`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `table1` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `A1_TEXT` TEXT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;

INSERT INTO table1 (id, A1_TEXT) values(1,'quick brown fox');

DELIMITER $$
DROP PROCEDURE IF EXISTS `RunTest`;
CREATE PROCEDURE `RunTest`()
BEGIN
    DECLARE L_A1_TEXT TEXT DEFAULT NULL;
    DECLARE L_A1_VARC VARCHAR(45) DEFAULT NULL;

    SELECT table1.A1_TEXT INTO L_A1_TEXT FROM table1 where id=1;
    SELECT table1.A1_TEXT INTO L_A1_VARC FROM table1 where id=1;

    SELECT
        L_A1_TEXT as 'LOCAL TEXT',
        L_A1_VARC as 'LOCAL VARCHAR',
        table1.A1_TEXT
    FROM table1;
END
$$
DELIMITER ;
