CREATE DATABASE A;
USE A;
CREATE TABLE ucTable(ucCol int);
INSERT INTO ucTable VALUES(1);
delimiter //
CREATE PROCEDURE simpleproc()
    BEGIN
       SELECT * FROM ucTable;
    END//
delimiter ;
CREATE DATABASE a;
USE a;
CREATE TABLE lcTable(lcCol int);
INSERT INTO lcTable VALUES(2);
delimiter //
CREATE PROCEDURE simpleproc()
    BEGIN
       SELECT * FROM lcTable;
    END//
delimiter ;
use a;
CALL a.simpleproc; -- SHOWS lcCol 2
USE A;
CALL A.simpleproc; -- SHOWS lcCol 2
DROP DATABASE A;
DROP DATABASE a;

