mariadb/mysys/my_netware.c
unknown 300b3fb642 Fixed multi-table-delete for InnoDB tables
Novell patches


Makefile.am:
  Novell patch
client/mysql.cc:
  Novell patch
configure.in:
  Novell patch
extra/mysql_waitpid.c:
  Novell patch
include/my_pthread.h:
  Novell patch
include/mysql.h:
  Novell patch
libmysql/libmysql.c:
  Novell patch
libmysqld/libmysqld.c:
  Novell patch
mysql-test/mysql-test-run.sh:
  Don't use running server with --valgrind
mysql-test/r/innodb.result:
  Updated results
mysql-test/r/rpl000001.result:
  Updated results
mysql-test/r/rpl000004.result:
  Updated results
mysql-test/r/rpl_log.result:
  Updated results
mysql-test/r/type_blob.result:
  Updated results
mysql-test/std_data/words.dat:
  Added more words to make type_blob test relevant
mysql-test/t/innodb.test:
  test of multi-table-delete
mysql-test/t/rpl000001.test:
  Update for new word file
mysql-test/t/type_blob.test:
  Test if BLOB IS NULL on NOT NULL column
mysys/my_init.c:
  Novell patch
mysys/my_netware.c:
  Novell patch
netware/Makefile.am:
  Novell patch
netware/init_db.sql:
  Novell patch
netware/isamchk.def:
  Novell patch
netware/isamlog.def:
  Novell patch
netware/libmysql.def:
  Novell patch
netware/my_print_defaults.def:
  Novell patch
netware/myisamchk.def:
  Novell patch
netware/myisamlog.def:
  Novell patch
netware/myisampack.def:
  Novell patch
netware/mysql.def:
  Novell patch
netware/mysql_install_db.c:
  Novell patch
netware/mysql_install_db.def:
  Novell patch
netware/mysql_test_run.def:
  Novell patch
netware/mysqladmin.def:
  Novell patch
netware/mysqlbinlog.def:
  Novell patch
netware/mysqlcheck.def:
  Novell patch
netware/mysqld_safe.c:
  Novell patch
netware/mysqldump.def:
  Novell patch
netware/mysqlimport.def:
  Novell patch
netware/mysqlshow.def:
  Novell patch
netware/mysqltest.def:
  Novell patch
netware/pack_isam.def:
  Novell patch
netware/perror.def:
  Novell patch
netware/replace.def:
  Novell patch
netware/resolveip.def:
  Novell patch
netware/test_db.sql:
  Novell patch
scripts/make_binary_distribution.sh:
  Novell patch
sql/item_cmpfunc.h:
  Optimization of 'IS NULL'
sql/mysql_priv.h:
  Code cleanup
sql/mysqld.cc:
  Novell patch
sql/net_pkg.cc:
  Code cleanup
sql/records.cc:
  Fixed multi-table-delete for InnoDB tables
sql/sql_delete.cc:
  Fixed multi-table-delete for InnoDB tables
sql/sql_handler.cc:
  Code cleanup
sql/sql_table.cc:
  Code cleanup
sql/structs.h:
  Fixed multi-table-delete for InnoDB tables
2003-02-17 02:14:37 +02:00

151 lines
4.6 KiB
C

/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Function specific to netware
*/
#include <mysys_priv.h>
#ifdef __NETWARE__
#include <string.h>
#include <library.h>
/*
PMUserLicenseRequest is an API exported by the polimgr.nlm
(loaded by the NetWare OS when it comes up) for use by other
NLM-based NetWare products/services.
PMUserLicenseRequest provides a couple of functions:
1) it will optionally request a User license or ensure that
one already exists for the specified User in userInfo
2) it utilizes the NetWare usage metering service to
record usage information about your product/service.
*/
long PMMeteredUsageRequest
(
/*
NDS distinguished name or IP address or ??. asciiz string, e.g.
".CN=Admin.O=this.T=MYTREE."
*/
char *userInfo,
long infoType, /* see defined values */
/*
string used to identify the calling service, used to index the
metered info e.g. "iPrint"
*/
char *serviceID,
char tranAddrType, /* type of address that follows */
char *tranAddr, /* ptr to a 10-byte array */
long flags, /* see defined values */
/* NLS error code, if any. NULL input is okay */
long *licRequestErrCode,
/* meter service error code, if any. NULL input is okay */
long *storeMeterInfoErrCode,
/*
error code from NLSMeter if
storeMeterInfoErrCode == PM_LICREQ_NLSMETERERROR.
NULL input is okay
*/
long *NLSMeterErrCode
);
typedef long(*PMUR)(const char*, long, const char*, char,
const char*, long, long*, long*, long*);
/* infoType */
/* indicates that the info in the userInfo param is an NDS user */
#define PM_USERINFO_TYPE_NDS 1
/* indicates that the info in the userInfo param is NOT an NDS user */
#define PM_USERINFO_TYPE_ADDRESS 2
/* Flags */
/*
Tells the service that it should not check to see if the NDS user
contained in the userInfo param has a NetWare User License - just
record metering information; this is ignored if infoType !=
PM_USERINFO_TYPE_NDS
*/
#define PM_FLAGS_METER_ONLY 0x0000001
/*
Indicates that the values in the userInfo and serviceID parameters
are unicode strings, so that the metering service bypasses
converting these to unicode (again)
*/
#define PM_LICREQ_ALREADY_UNICODE 0x0000002
/*
Useful only if infoType is PM_USERINFO_TYPE_NDS - indicates a "no
stop" policy of the calling service
*/
#define PM_LICREQ_ALWAYS_METER 0x0000004
/*
net Address Types - system-defined types of net addresses that can
be used in the tranAddrType field
*/
#define NLS_TRAN_TYPE_IPX 0x00000001 /* An IPX address */
#define NLS_TRAN_TYPE_IP 0x00000008 /* An IP address */
#define NLS_ADDR_TYPE_MAC 0x000000F1 /* a MAC address */
/*
Net Address Sizes - lengths that correspond to the tranAddrType
field (just fyi)
*/
#define NLS_IPX_ADDR_SIZE 10 /* the size of an IPX address */
#define NLS_IP_ADDR_SIZE 4 /* the size of an IP address */
#define NLS_MAC_ADDR_SIZE 6 /* the size of a MAC address */
void netware_reg_user(const char *ip, const char *user,
const char *application)
{
PMUR usage_request;
long licRequestErrCode = 0;
long storeMeterInfoErrCode = 0;
long nlsMeterErrCode = 0;
/* import the symbol */
usage_request= ((PMUR)ImportPublicObject(getnlmhandle(),
"PMMeteredUsageRequest"));
if (usage_request != NULL)
{
unsigned long iaddr;
char addr[NLS_IPX_ADDR_SIZE];
/* create address */
iaddr = htonl(inet_addr(ip));
bzero(addr, NLS_IPX_ADDR_SIZE);
memcpy(addr, &iaddr, NLS_IP_ADDR_SIZE);
/* call to NLS */
usage_request(user,
PM_USERINFO_TYPE_ADDRESS,
application,
NLS_TRAN_TYPE_IP,
addr,
PM_FLAGS_METER_ONLY,
&licRequestErrCode,
&storeMeterInfoErrCode,
&nlsMeterErrCode);
/* release symbol */
UnImportPublicObject(getnlmhandle(), "PMMeteredUsageRequest");
}
}
#endif /* __NETWARE__ */