This repository has been archived by the owner on Jan 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
title #445
Open
liuruirui
wants to merge
227
commits into
top-think:2.1
Choose a base branch
from
liuruirui:master
base: 2.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
title #445
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89行加个\更规范点
Update Think.class.php 89行加个\更规范点
使用方式 add($data='',$options=array(),$replace=false) 其中add方法增加$replace参数(是否添加数据时允许覆盖),true表示REPLACE方式覆盖,array表示ON DUPLICATE KEY UPDATE方式更新,默认为false 快捷方式: add($data, array(), 'field1,field2') 或 add($data, array(), array('field1','field2')) 解析后 ON DUPLICATE KEY UPDATE field1=VALUES(field1), field2=VALUES(field2) 增强方式,支持传值及表达式 add($data, array(), array('field1'=>'value1','field2'=>array('value', 'value2'), 'field3'=>array('exp', 'field3+1'))) 解析后 ON DUPLICATE KEY UPDATE field1='value1', field2='value2', field3=(field3+1)
配置文件中定义如下即可保留实际的字段名大小写 'DB_PARAMS'=>array(\PDO::ATTR_CASE => \PDO::CASE_NATURAL),
Memcached 驱动过期时间设置问题
解决ON DUPLICATE KEY时值不能为NULL的问题
解决Json中文编码为unicode的问题(mod RestController.class.php) PHP>=5.4, 使用JSON_UNESCAPED_UNICODE 在PHP<=5.3中,先将中文字段urlencode,json_encode后,再用urldecode,也可以保证中文不会被转成unicode ref:http://www.thinkphp.cn/topic/7857.html
修改了IpLocation类的构造函数,允许传入的参数是一个文件的绝对路径,如果不是绝对路径,再考虑使用原来的方法在类库的当前文件夹下寻找文件。
这个Bug只有在并发量很大的时候才会产生。 我们在实际中遇到了这个Bug,通过Core dump跟踪系统调用定位到了这个Bug。 这里列举一个可能产生的情况: 线程A来访的时候,如果处于Debug开启或者找不到Runtime的状态,会进入编译Runtime的分支,但是编译分支的最开始首先就把老的Runtime删除了。然后进行后续操作。此时,如果刚好又出现了一个线程B,在线程A还在构建Runtime的过程中,访问到服务器,找不到Runtime文件,此时线程B正准备进入构建Runtime的分支,而此时如果恰巧线程A刚好已经执行完了构建Runtime的操作,保存Runtime到文件中,而此时线程B要恰巧开始执行删除文件指令了,这是刚创建好的文件就被删掉了,此时线程B又会会继续创建Runtime,假设此时来了一个线程C,又会进入这样的循环。 这个Bug需要来访特别密集,否则也不容易触发,修改方案就和我代码中呈现的一样,取消else后的第一个文件删除应该就可以了。
…k-in-thinkphp 修复高并发下Runtime的一个死锁Bug
解决Json中文编码为unicode的问题
修改了IpLocation类的构造函数
对DefineFC 的修改做一点小小的改进:布尔值或者对象不应该被应用到$function上
1. 使用事务时只选取一个数据库连接 2. 嵌套事务只在最外层提交
让数据库事务操作更准确
修改了RestController.class.php,检查_server数组,应对没有请求头的情况
多数据库,初始化Model时对数据表前缀内容的修复
修复getMongoNextId时,不切换Collection错误
修复getMongoNextId时,不切换Collection错误
Update Mongo.class.php
getMongoNextId使用参数
Update MongoModel.class.php
Update MongoModel.class.php
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
测试