The above adjustments can basically solve most of these problems, but our stored procedures still cannot be executed. After some analysis, we found that a temporary table will be created during the stored procedure. The code is like this: INSERTINTOtmp (region, cell, relation) SELECTDISTINCTr. region, t. cell,-1FROMrr_tmprLEFTJOIN (
The above adjustments can basically solve most of these problems, but our stored procedures still cannot be executed. After some analysis, we found that a temporary table will be created during the stored procedure. The code is like this: insert into tmp (region, cell, relation) select distinct r. region, t. cell,-1 FROM rr_tmp r left join (
The above adjustments can basically solve most of these problems, but our stored procedures still cannot be executed. After some analysis, we found that a temporary table will be created during the stored procedure. The code is like this:
INSERT INTO tmp(region, cell, relation)SELECT DISTINCT r.region, t.cell, -1FROM rr_tmp r LEFT JOIN ( SELECT DISTINCT region, cell FROM ri_tmp ri, ce_tmp ct WHERE ri.region=ce.region) tON r.region=t.region WHERE r.region is null;
We suspect that the character encoding is inconsistent because the character encoding of the temporary table is inconsistent with that of the rr_tmp table. But how can we control the character encoding of the temporary table?
The character encoding of a temporary table is actually the default character encoding of the database.show create database test_dbWe can see that the character encoding of the database is changed to be the same as that of rr_tmp.
alter database test_db characeter set utf8
Date: 2015-02-04T15: 58 + 0800
Author: CobbLiu
Org version 7.9.3f with Emacs version 24