diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 598aaaa80ae..64be7a34f95 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -48,7 +48,7 @@ AM_MAKEFLAGS="-j 4"
# The following warning flag will give too many warnings:
# -Wshadow -Wunused -Winline (The later isn't usable in C++ as
# __attribute()__ doesn't work with gnu C++)
-global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings"
+global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -ansi"
#debug_extra_warnings="-Wuninitialized"
c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
diff --git a/VC++Files/bdb/bdb.vcproj b/VC++Files/bdb/bdb.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysql.vcproj b/VC++Files/client/mysql.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqladmin.vcproj b/VC++Files/client/mysqladmin.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqlclient.vcproj b/VC++Files/client/mysqlclient.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqldump.vcproj b/VC++Files/client/mysqldump.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqlimport.vcproj b/VC++Files/client/mysqlimport.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqlshow.vcproj b/VC++Files/client/mysqlshow.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/client/mysqltest.vcproj b/VC++Files/client/mysqltest.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/comp_err/comp_err.vcproj b/VC++Files/comp_err/comp_err.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/dbug/dbug.vcproj b/VC++Files/dbug/dbug.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/heap/heap.vcproj b/VC++Files/heap/heap.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/innobase/innobase.vcproj b/VC++Files/innobase/innobase.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/libmysql/libmysql.vcproj b/VC++Files/libmysql/libmysql.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/libmysqld/examples/test_libmysqld.vcproj b/VC++Files/libmysqld/examples/test_libmysqld.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/libmysqld/libmysqld.vcproj b/VC++Files/libmysqld/libmysqld.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/libmysqltest/myTest.vcproj b/VC++Files/libmysqltest/myTest.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/my_print_defaults/my_print_defaults.vcproj b/VC++Files/my_print_defaults/my_print_defaults.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisam/myisam.vcproj b/VC++Files/myisam/myisam.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisam_ftdump/myisam_ftdump.vcproj b/VC++Files/myisam_ftdump/myisam_ftdump.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisamchk/myisamchk.vcproj b/VC++Files/myisamchk/myisamchk.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisamlog/myisamlog.vcproj b/VC++Files/myisamlog/myisamlog.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisammrg/myisammrg.vcproj b/VC++Files/myisammrg/myisammrg.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/myisampack/myisampack.vcproj b/VC++Files/myisampack/myisampack.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysql-test/mysql_test_run_new.vcproj b/VC++Files/mysql-test/mysql_test_run_new.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysql.sln b/VC++Files/mysql.sln
old mode 100755
new mode 100644
diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.vcproj b/VC++Files/mysqlbinlog/mysqlbinlog.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysqlcheck/mysqlcheck.vcproj b/VC++Files/mysqlcheck/mysqlcheck.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysqldemb/mysqldemb.vcproj b/VC++Files/mysqldemb/mysqldemb.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysqlserver/dummy.cpp b/VC++Files/mysqlserver/dummy.cpp
old mode 100755
new mode 100644
diff --git a/VC++Files/mysqlserver/mysqlserver.vcproj b/VC++Files/mysqlserver/mysqlserver.vcproj
old mode 100755
new mode 100644
diff --git a/VC++Files/mysys/mysys.vcproj b/VC++Files/mysys/mysys.vcproj
old mode 100755
new mode 100644
index 87e9338e811..6ec9ca6d564
--- a/VC++Files/mysys/mysys.vcproj
+++ b/VC++Files/mysys/mysys.vcproj
@@ -2200,6 +2200,49 @@
PreprocessorDefinitions=""/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
isolation_level != TRX_ISO_SERIALIZABLE
&& thd->lex->sql_command == SQLCOM_SELECT
- && thd->lex->lock_option == TL_READ) {
+ && lock_type == TL_READ) {
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT). */
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index d3c7af432a0..0c2b6d0f71a 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -150,7 +150,7 @@ class ha_innobase: public handler
int extra(enum ha_extra_function operation);
int external_lock(THD *thd, int lock_type);
int transactional_table_lock(THD *thd, int lock_type);
- int start_stmt(THD *thd);
+ int start_stmt(THD *thd, thr_lock_type lock_type);
void position(byte *record);
ha_rows records_in_range(uint inx, key_range *min_key, key_range
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 5018aa2990e..e801322b677 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -3401,7 +3401,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
startTransaction for each transaction/statement.
*/
-int ha_ndbcluster::start_stmt(THD *thd)
+int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
{
int error=0;
DBUG_ENTER("start_stmt");
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index 2a1d51724d4..4bda78cf234 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -501,7 +501,7 @@ class ha_ndbcluster: public handler
int extra(enum ha_extra_function operation);
int extra_opt(enum ha_extra_function operation, ulong cache_size);
int external_lock(THD *thd, int lock_type);
- int start_stmt(THD *thd);
+ int start_stmt(THD *thd, thr_lock_type lock_type);
const char * table_type() const;
const char ** bas_ext() const;
ulong table_flags(void) const;
diff --git a/sql/handler.h b/sql/handler.h
index 50f697bc980..9a9e0bb4f69 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -654,7 +654,7 @@ public:
virtual int reset() { return extra(HA_EXTRA_RESET); }
virtual int external_lock(THD *thd, int lock_type) { return 0; }
virtual void unlock_row() {}
- virtual int start_stmt(THD *thd) {return 0;}
+ virtual int start_stmt(THD *thd, thr_lock_type lock_type) {return 0;}
/*
This is called to delete all rows in a table
If the handler don't support this, then this function will
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 84574bf01b9..4e2d874718e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2148,7 +2148,7 @@ static bool check_lock_and_start_stmt(THD *thd, TABLE *table,
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0),table->alias);
DBUG_RETURN(1);
}
- if ((error=table->file->start_stmt(thd)))
+ if ((error=table->file->start_stmt(thd, lock_type)))
{
table->file->print_error(error,MYF(0));
DBUG_RETURN(1);