summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-01-02 17:46:20 +0400
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-01-02 17:46:20 +0400
commit80ef179206bfbdaa00643bd6860404bb7095ccfd (patch)
tree2d7c5ed9b6302c1df095afafd490d9239cd4d68d
parentecf707e6e32d7e422087be75cfeeadcf9ecac62d (diff)
downloadmariadb-git-80ef179206bfbdaa00643bd6860404bb7095ccfd.tar.gz
embedded-server related fixes
libmysqld/lib_sql.cc: error message moved to 'stmt' mysql-test/t/distinct.test: temporary disabled in embedded server mysql-test/t/mysqladmin.test: disabled in embedded server sql/sql_prepare.cc: superfluous #ifndef removed
-rw-r--r--libmysqld/lib_sql.cc6
-rw-r--r--mysql-test/t/distinct.test2
-rw-r--r--mysql-test/t/mysqladmin.test2
-rw-r--r--sql/sql_prepare.cc2
4 files changed, 10 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 7f9e2cced9e..a6e81cee78c 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -249,7 +249,13 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
{
MYSQL_DATA *data;
if (!(data= emb_read_rows(stmt->mysql, 0, 0)))
+ {
+ strmake(stmt->sqlstate, stmt->mysql->net.sqlstate, sizeof(stmt->sqlstate));
+ strmake(stmt->last_error, stmt->mysql->net.last_error,
+ sizeof(stmt->last_error));
+ stmt->last_errno= stmt->mysql->net.last_errno;
return 1;
+ }
return 0;
}
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index a057eee8e37..bd46115231e 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -1,3 +1,5 @@
+# test script should specify proper directories for embedded
+--source include/not_embedded.inc
#
# Bug with distinct and INSERT INTO
# Bug with group by and not used fields
diff --git a/mysql-test/t/mysqladmin.test b/mysql-test/t/mysqladmin.test
index 7c016fd7416..cc75c5168e6 100644
--- a/mysql-test/t/mysqladmin.test
+++ b/mysql-test/t/mysqladmin.test
@@ -1,3 +1,5 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
#
# Test "mysqladmin ping"
#
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 2688841d96c..75c6dacc4a7 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1063,7 +1063,6 @@ static int mysql_test_select(Prepared_statement *stmt,
int result= 1;
DBUG_ENTER("mysql_test_select");
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong privilege= lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL;
if (tables)
{
@@ -1072,7 +1071,6 @@ static int mysql_test_select(Prepared_statement *stmt,
}
else if (check_access(thd, privilege, any_db,0,0,0))
DBUG_RETURN(1);
-#endif
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send))
{