Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2146 06/02/20 12:36:10 tomas@stripped +4 -0
Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
sql/ha_ndbcluster_binlog.h
1.7 06/02/20 12:36:03 tomas@stripped +2 -1
Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
sql/ha_ndbcluster_binlog.cc
1.19 06/02/20 12:36:03 tomas@stripped +28 -13
Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
sql/ha_ndbcluster.cc
1.273 06/02/20 12:36:03 tomas@stripped +27 -39
Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
mysql-test/r/ndb_gis.result
1.6 06/02/20 12:36:03 tomas@stripped +48 -0
Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-new
--- 1.5/mysql-test/r/ndb_gis.result 2006-01-17 08:37:19 +01:00
+++ 1.6/mysql-test/r/ndb_gis.result 2006-02-20 12:36:03 +01:00
@@ -1,13 +1,29 @@
SET storage_engine=ndbcluster;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point,
gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
CREATE TABLE gis_point (fid INTEGER, g POINT);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_line (fid INTEGER, g LINESTRING);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_polygon (fid INTEGER, g POLYGON);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
@@ -416,6 +432,8 @@
gc geometrycollection,
gm geometry
);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
gp point YES NULL
@@ -427,6 +445,8 @@
gc geometrycollection YES NULL
gm geometry YES NULL
ALTER TABLE t1 ADD fid INT;
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
gp point YES NULL
@@ -440,6 +460,8 @@
fid int(11) YES NULL
DROP TABLE t1;
create table t1 (a geometry not null);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
insert into t1 values (GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
@@ -447,6 +469,8 @@
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (fl geometry);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
insert into t1 values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (1.11);
@@ -459,13 +483,29 @@
set engine_condition_pushdown = on;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point,
gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
CREATE TABLE gis_point (fid INTEGER, g POINT);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_line (fid INTEGER, g LINESTRING);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_polygon (fid INTEGER, g POLYGON);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
@@ -874,6 +914,8 @@
gc geometrycollection,
gm geometry
);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
gp point YES NULL
@@ -885,6 +927,8 @@
gc geometrycollection YES NULL
gm geometry YES NULL
ALTER TABLE t1 ADD fid INT;
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
gp point YES NULL
@@ -898,6 +942,8 @@
fid int(11) YES NULL
DROP TABLE t1;
create table t1 (a geometry not null);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
insert into t1 values (GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
@@ -905,6 +951,8 @@
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (fl geometry);
+Warnings:
+Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog
of table with BLOB attribute and no PK'
insert into t1 values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (1.11);
--- 1.272/sql/ha_ndbcluster.cc 2006-02-17 17:12:18 +01:00
+++ 1.273/sql/ha_ndbcluster.cc 2006-02-20 12:36:03 +01:00
@@ -4430,29 +4430,24 @@
Always create an event for the table, as other mysql servers
expect it to be there.
*/
- if (ndbcluster_create_event(ndb, t, event_name.c_ptr(), share) < 0)
+ if (!ndbcluster_create_event(ndb, t, event_name.c_ptr(), share,
+ share && do_event_op /* push warning */))
{
- /* this is only a serious error if the binlog is on */
- if (share && do_event_op)
- {
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
- ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
- "Creating event for logging table failed. "
- "See error log for details.");
- }
- break;
- }
- if (ndb_extra_logging)
- sql_print_information("NDB Binlog: CREATE TABLE Event: %s",
- event_name.c_ptr());
-
- if (share && do_event_op &&
- ndbcluster_create_event_ops(share, t, event_name.c_ptr()) < 0)
- {
- sql_print_error("NDB Binlog: FAILED CREATE TABLE event operations."
- " Event: %s", name);
- /* a warning has been issued to the client */
+ if (ndb_extra_logging)
+ sql_print_information("NDB Binlog: CREATE TABLE Event: %s",
+ event_name.c_ptr());
+ if (share && do_event_op &&
+ ndbcluster_create_event_ops(share, t, event_name.c_ptr()))
+ {
+ sql_print_error("NDB Binlog: FAILED CREATE TABLE event operations."
+ " Event: %s", name);
+ /* a warning has been issued to the client */
+ }
}
+ /*
+ warning has been issued if ndbcluster_create_event failed
+ and (share && do_event_op)
+ */
if (share && !do_event_op)
share->flags|= NSF_NO_BINLOG;
ndbcluster_log_schema_op(current_thd, share,
@@ -4793,31 +4788,24 @@
ndb_rep_event_name(&event_name, to + sizeof(share_prefix) - 1, 0);
const NDBTAB *ndbtab= dict->getTable(new_tabname);
- if (ndbcluster_create_event(ndb, ndbtab, event_name.c_ptr(), share) >= 0)
+ if (!ndbcluster_create_event(ndb, ndbtab, event_name.c_ptr(), share,
+ share && ndb_binlog_running /* push warning */))
{
if (ndb_extra_logging)
sql_print_information("NDB Binlog: RENAME Event: %s",
event_name.c_ptr());
- if (share && ndb_binlog_running)
+ if (share && ndb_binlog_running &&
+ ndbcluster_create_event_ops(share, ndbtab, event_name.c_ptr()))
{
- if (ndbcluster_create_event_ops(share, ndbtab,
- event_name.c_ptr()) < 0)
- {
- sql_print_error("NDB Binlog: FAILED create event operations "
- "during RENAME. Event %s", event_name.c_ptr());
- /* a warning has been issued to the client */
- }
+ sql_print_error("NDB Binlog: FAILED create event operations "
+ "during RENAME. Event %s", event_name.c_ptr());
+ /* a warning has been issued to the client */
}
}
- else
- {
- sql_print_error("NDB Binlog: FAILED create event during RENAME. "
- "Event: %s", event_name.c_ptr());
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
- ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
- "Creating event for logging table failed. "
- "See error log for details.");
- }
+ /*
+ warning has been issued if ndbcluster_create_event failed
+ and (share && ndb_binlog_running)
+ */
if (!is_old_table_tmpfile)
ndbcluster_log_schema_op(current_thd, share,
current_thd->query, current_thd->query_length,
--- 1.18/sql/ha_ndbcluster_binlog.cc 2006-02-16 14:49:44 +01:00
+++ 1.19/sql/ha_ndbcluster_binlog.cc 2006-02-20 12:36:03 +01:00
@@ -1858,8 +1858,7 @@
/*
create the event operations for receiving logging events
*/
- if (ndbcluster_create_event_ops(share, ndbtab,
- event_name.c_ptr()) < 0)
+ if (ndbcluster_create_event_ops(share, ndbtab, event_name.c_ptr()))
{
sql_print_error("NDB Binlog:"
"FAILED CREATE (DISCOVER) EVENT OPERATIONS Event: %s",
@@ -1874,7 +1873,8 @@
int
ndbcluster_create_event(Ndb *ndb, const NDBTAB *ndbtab,
- const char *event_name, NDB_SHARE *share)
+ const char *event_name, NDB_SHARE *share,
+ int push_warning)
{
DBUG_ENTER("ndbcluster_create_event");
DBUG_PRINT("info", ("table=%s version=%d event=%s share=%s",
@@ -1901,8 +1901,14 @@
if (share->flags & NSF_BLOB_FLAG)
{
sql_print_error("NDB Binlog: logging of table %s "
- "with no PK and blob attributes is not supported",
+ "with BLOB attribute and no PK is not supported",
share->key);
+ if (push_warning)
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_ILLEGAL_HA_CREATE_OPTION, ER(ER_ILLEGAL_HA_CREATE_OPTION),
+ ndbcluster_hton.name,
+ "Binlog of table with BLOB attribute and no PK");
+
share->flags|= NSF_NO_BINLOG;
DBUG_RETURN(-1);
}
@@ -1935,17 +1941,16 @@
if (dict->createEvent(my_event)) // Add event to database
{
-#ifdef NDB_BINLOG_EXTRA_WARNINGS
- /*
- failed, print a warning
- */
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
- ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
- dict->getNdbError().code,
- dict->getNdbError().message, "NDB");
-#endif
if (dict->getNdbError().classification != NdbError::SchemaObjectExists)
{
+ /*
+ failed, print a warning
+ */
+ if (push_warning)
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
+ dict->getNdbError().code,
+ dict->getNdbError().message, "NDB");
sql_print_error("NDB Binlog: Unable to create event in database. "
"Event: %s Error Code: %d Message: %s", event_name,
dict->getNdbError().code, dict->getNdbError().message);
@@ -1957,6 +1962,11 @@
*/
if (dict->dropEvent(my_event.getName()))
{
+ if (push_warning)
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
+ dict->getNdbError().code,
+ dict->getNdbError().message, "NDB");
sql_print_error("NDB Binlog: Unable to create event in database. "
" Attempt to correct with drop failed. "
"Event: %s Error Code: %d Message: %s",
@@ -1971,6 +1981,11 @@
*/
if (dict->createEvent(my_event))
{
+ if (push_warning)
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
+ dict->getNdbError().code,
+ dict->getNdbError().message, "NDB");
sql_print_error("NDB Binlog: Unable to create event in database. "
" Attempt to correct with drop ok, but create failed. "
"Event: %s Error Code: %d Message: %s",
--- 1.6/sql/ha_ndbcluster_binlog.h 2006-02-06 11:47:05 +01:00
+++ 1.7/sql/ha_ndbcluster_binlog.h 2006-02-20 12:36:03 +01:00
@@ -85,7 +85,8 @@
const char *table_name,
my_bool share_may_exist);
int ndbcluster_create_event(Ndb *ndb, const NDBTAB *table,
- const char *event_name, NDB_SHARE *share);
+ const char *event_name, NDB_SHARE *share,
+ int push_warning= 0);
int ndbcluster_create_event_ops(NDB_SHARE *share,
const NDBTAB *ndbtab,
const char *event_name);
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2146) BUG#17559 | tomas | 20 Feb |