`

mysql的临时表不支持自连接

阅读更多

TEMPORARY TABLE Problems
The following list indicates limitations on the use of TEMPORARY tables: 

A TEMPORARY table can only be of type MEMORY, ISAM, MyISAM, MERGE, or InnoDB. 

Temporary tables are not supported for MySQL Cluster. 

You cannot refer to a TEMPORARY table more than once in the same query. For example, the following does not work: 

mysql> SELECT * FROM temp_table, temp_table AS t2;
ERROR 1137: Can't reopen table: 'temp_table'

The SHOW TABLES statement does not list TEMPORARY tables. 

You cannot use RENAME to rename a TEMPORARY table. However, you can use ALTER TABLE instead: 

mysql> ALTER TABLE orig_name RENAME new_name;

There are known issues in using temporary tables with replication. See Section 6.7, “Replication Features and Known Problems”, for more information. 

Temporary tables are replicated except in the case where you shut down the slave server (not just the slave threads) and you have replicated temporary tables that are used in updates that have not yet been executed on the slave. If you shut down the slave server, the temporary tables needed by those updates are no longer available when the slave is restarted. To avoid this problem, do not shut down the slave while it has temporary tables open. Instead, use the following procedure: 

Issue a STOP SLAVE statement. 

Use SHOW STATUS to check the value of the Slave_open_temp_tables variable. 

If the value is 0, issue a mysqladmin shutdown command to stop the slave. 

If the value is not 0, restart the slave threads with START SLAVE. 

Repeat the procedure later until the Slave_open_temp_tables variable is 0 and you can stop the slave.

分享到:
评论

相关推荐

    MYSQL

    9.1.1 用于数据和排序的字符集 9.1.2 增加一个新的字符集 9.1.3 多字节字符支持 9.2 更新日志 9.3 MySQL数据库表可以有多大? 9.4 MySQL数据库表类型 10 从 MySQL 得到最大的性能 ...

    mysql数据库my.cnf配置文件

    建议调高此值,以增加并行连接数量,当然这建立在机器能支撑的情况下,因为如果连接数越多,介于MySQL会为每个连接提供连接缓冲区,就会开销越多的内存,所以要适当调整该值,不能盲目提高设值。可以过'conn%'通配符...

    MySQL中文参考手册.chm

    9.1.1 用于数据和排序的字符集 9.1.2 增加一个新的字符集 9.1.3 多字节字符支持 9.2 更新日志 9.3 MySQL数据库表可以有多大? 9.4 MySQL数据库表类型 10 从 MySQL 得到最大的...

    MySQL中文参考手册

    * 3 MySQL的许可证和技术支持 o 3.1 MySQL的许可证政策 o 3.2 MySQL 使用的版权 + 3.2.1 可能的未来版权改变 o 3.3 MySQL商业性分发 o 3.4 许可证实例 + 3.4.1 销售使用 MySQL的产品 + 3.4.2 销售MySQL相关...

    MySQL 5.1中文手冊

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. ...

    MySQL 5.1官方简体中文参考手册

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. ...

    MySQL 5.1参考手册

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. ...

    MySQL 5.1参考手册中文版

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 ...

    mysql5.1中文手册

    MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的...

    MySQL 5.1参考手册 (中文版)

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. ...

    MYSQL中文手册

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 ...

    mysql官方中文参考手册

    1.7.3. MySQL论坛上的MySQL社区支持 1.8. MySQL标准的兼容性 1.8.1. MySQL遵从的标准是什么 1.8.2. 选择SQL模式 1.8.3. 在ANSI模式下运行MySQL 1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. ...

    mysql数据库的基本操作语法

    MySQL不支持check约束,但可以使用check约束,而没有任何效果; 根据约束数据列限制,约束可分为: 单列约束:每个约束只约束一列 多列约束:每个约束约束多列数据 MySQL中约束保存在information_schema数据库的...

    MySQL5.1参考手册官方简体中文版

    5.4. mysql_fix_privilege_tables:升级MySQL系统表 5.5. MySQL服务器关机进程 5.6. 一般安全问题 5.6.1. 通用安全指南 5.6.2. 使MySQL在攻击者面前保持安全 5.6.3. Mysqld安全相关启动选项 5.6.4. LOAD DATA LOCAL...

    MySQL之递归小问题

    mysql本身不支持递归语法,但可通过自连接变相实现一些简单的递归 --递归小方法:临时表和普通表的不同方法 --这题使用的是2次临时表查询父节点的递归 drop table if exists test; create table test( id varchar...

    mysql中多表删除其中ID相同记录的方法

    问题源自一个5年前的百度知道回答,刚看到这个问题时我刚上班21天,遂根据自己的那一丁点经验和临时操作检验做出了当时认为正确的回答: ...MySql4.0以上支持delete多个表删除 delete t1,t2 from t1.refid

    技术栈:Mpvue Koa2 MySQ 线上图书商城系统微信小程序,基于mpvue框架.zip

    技术栈:Mpvue Koa2 MySQL 由于豆瓣api临时关闭,暂时采用模拟数据。 MySQL 是一款广受欢迎的开源关系型数据库管理系统(RDBMS),由瑞典MySQL AB公司开发,现隶属于美国甲骨文公司(Oracle)。自1998年首次发布...

    nServer-v2.1023[FTP + MYSQL + HTTP + PHP(FCGI)]

    - MySQL数据、生成配置文件、模块临时文件均放入mydata目录,方便设置安全权限 2012年05月25日 - 配置文件放到到anrip/config目录 - 控制台代码模块化 2012年05月20日 - 更新PHP版本为5.4.3 - 优化配置文件编译...

Global site tag (gtag.js) - Google Analytics