During a fight I changed my weapon and equipped a staff of magus to use his fire element attack to set poison ground on fire.
But I could not to that, because I can't learn 'Staff of Magus' during a fight.
So I changed back to a crossbow to use a fire arrow. I then realized all mage skills got unmemorized, I kept only Warfare and Ranger Skill and those from items it seemed.
After the fight was over, my memorized skills went back to normal by themselves.