今天开发项目时遇到一个问题,并没有使用存储过程来批量执行SQL语句。而是在Java业务处理过程中将.sql文件中的批量SQL语句分条读取,读取后一条一条执行。原先的.sql文件是使用SQL Manager导出的,需要在项目部署的时候将导出的.sql文件重新部署到新的客户端电脑上,所以需要进行批量执行SQL语句的操作。好进入正题:
在批量执行的过程中遇到Variable 'character_set_client' can't be set to the value of Null的SQL,JDBC的异常。经过长时间排查,排除了数据库数据集的设置问题,排除了SQL语句的格式问题。最后发现是使用SQL Manager导出的.sql文件中有SQL语句的注释,原来是这些注释文件造成以上的报错。所以在执行类似的操作时,以后要记得删除注释语句后再执行批量SQL语句操作。
# SQL Manager 2007 Lite for MySQL 4.0.5.1
# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : image
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
#
# Structure for the `imagefeatures1` table :
#
这些都要删除掉,当然也可能是跟我使用的Java读取语句有关系。Mark下,以后不要犯同样的问题了。花了我大概一个小时时间找这个问题,伤不起啊!
分享到:
相关推荐
Environment variable ORACLE_UNQNAME not defined错误解决
一下为部分题目: 2. The String.Format(“Input = {0} and Output = {1}”, “1”,”2”) expression returns which of ...6. Which activity can be used to modify the value of an existing cell in a DataTable?
复旦大学_软件安全_SEED labs_3-Environment_Variable_and_SetUID实验 是从雪城大学SEED labs上找的实验 资源包括:实验报告详细版、实验指导书、参考链接
网络攻防课程seed-labs实验-Environment_Variable_and_SetUID.zip
Variable precision rough set (VPRS) is an extension of rough settheory (RST). By settingthreshold valueβ, VPRS looses the strict definition of approximate boundary in RST. Confident threshold value ...
主要介绍了解决Can't find variable: SockJS vue项目的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
ls -lt 是“-l”和“-t”的组合,按时间顺序显示列表。 ls -F 显示文件类型,目录“/ ”结尾;可执行文件“*”结尾;文本文件(none),没有结尾。 ls -R 递归显示目录结构。即该目录下的文件和各个副目录下的文件...
基于源码修改JDBC8驱动连接Mycat1.6报错 Unknown system variable 'query_cache_size' ,配置好mycat相应配置直接bin目录启动即可
The method used is a matter of preference, but *it will be very difficult to use this library without first understanding the JSON syntax for the API*, so it is recommended to look at the [APIs ...
Variable_Torque_DC_Machine
Can’t find variable: SockJS 这是为什么呢? 原来这是webpack(我的版本:3.6.0)的报错,webpack的热加载是采用websocket来通知浏览器实现的, SockJS是一个必须的库。 这个问题属于意外吧,googel的话有很多方式...
2、为了能支持旧版的上传方法。在thinkphp/library/think 增加image扩展 3.0数据库修改记录 1、user表 grades字段默认设置为1; 2、usergrade表 新增字段 ALTER TABLE `ls_usergrade` ADD COLUMN `type` TINYINT(1...
Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. doFilter(ServletRequest, ...
be protocol agnostic, you can't overcome the limitations of the underlying protocols. If a capability isn't supported by a chosen protocol, the JavaMail API doesn't magically add the capability on ...
cvx_variable_CVX_cvxmatlab_cvx.Variable_cvx优化_DEMO_源码.rar
Jira6不支持mysql5.7,需要此jar,具体就是报错 Unknown system variable 'storage_engine' 的解决
You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the ...
Each index row in node pages contains an index key (or set of keys for a composite index) and a pointer to a page at the next level for which the first key value is the same as the key value in the ...
cvx_variable_CVX_cvxmatlab_cvx.Variable_cvx优化_DEMO.zip
This package provides a set of functions to control the VariSpec filter, which may be called from C or C++ programs. It incorporates all aspects of the filter communication, including low-level serial...