Commit c00dd12c authored by unknown's avatar unknown

Merge mysql.com:/usr/home/ram/work/4.1.b9613

into  mysql.com:/usr/home/ram/work/mysql-5.0


sql/ha_blackhole.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  merging
mysql-test/t/variables.test:
  merging
parents 44327dc4 2599491a
...@@ -537,3 +537,6 @@ set @@max_heap_table_size= 4294967296; ...@@ -537,3 +537,6 @@ set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
@@max_heap_table_size > 0 @@max_heap_table_size > 0
1 1
select @@have_innodb;
@@have_innodb
#
...@@ -395,6 +395,7 @@ SET GLOBAL table_cache=DEFAULT; ...@@ -395,6 +395,7 @@ SET GLOBAL table_cache=DEFAULT;
# #
# Bug#6282 Packet error with SELECT INTO # Bug#6282 Packet error with SELECT INTO
# #
create table t1 (a int); create table t1 (a int);
select a into @x from t1; select a into @x from t1;
show warnings; show warnings;
...@@ -412,9 +413,17 @@ set @@global.error_count=1; ...@@ -412,9 +413,17 @@ set @@global.error_count=1;
# #
# Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform # Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform
# #
set @@max_heap_table_size= 4294967296; set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
set global max_heap_table_size= 4294967296; set global max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
set @@max_heap_table_size= 4294967296; set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
#
# Bug #9613: @@have_innodb
#
--replace_column 1 #
select @@have_innodb;
...@@ -79,6 +79,7 @@ NdbOut& operator<<(NdbOut& no, const CommitTransactionRecord& ctr) { ...@@ -79,6 +79,7 @@ NdbOut& operator<<(NdbOut& no, const CommitTransactionRecord& ctr) {
no << "----------COMMIT TRANSACTION RECORD------------" << endl << endl; no << "----------COMMIT TRANSACTION RECORD------------" << endl << endl;
printOut("Record type:", ctr.m_recordType); printOut("Record type:", ctr.m_recordType);
printOut("TableId", ctr.m_tableId); printOut("TableId", ctr.m_tableId);
printOut("SchemaVersion:", ctr.m_schemaVersion);
printOut("FfragmentId", ctr.m_fragmentId); printOut("FfragmentId", ctr.m_fragmentId);
printOut("File no. of Prep. Op.", ctr.m_fileNumberOfPrepareOperation); printOut("File no. of Prep. Op.", ctr.m_fileNumberOfPrepareOperation);
printOut("Start page no. of Prep. Op.", ctr.m_startPageNumberOfPrepareOperation); printOut("Start page no. of Prep. Op.", ctr.m_startPageNumberOfPrepareOperation);
...@@ -127,7 +128,7 @@ bool PrepareOperationRecord::check() { ...@@ -127,7 +128,7 @@ bool PrepareOperationRecord::check() {
if (m_operationType == 3 && m_attributeLength != 0) if (m_operationType == 3 && m_attributeLength != 0)
return false; return false;
if (m_logRecordSize != (m_attributeLength + m_keyLength + 7)) if (m_logRecordSize != (m_attributeLength + m_keyLength + 6))
return false; return false;
return true; return true;
...@@ -142,7 +143,6 @@ NdbOut& operator<<(NdbOut& no, const PrepareOperationRecord& por) { ...@@ -142,7 +143,6 @@ NdbOut& operator<<(NdbOut& no, const PrepareOperationRecord& por) {
printOut("Record type:", por.m_recordType); printOut("Record type:", por.m_recordType);
printOut("logRecordSize:", por.m_logRecordSize); printOut("logRecordSize:", por.m_logRecordSize);
printOut("hashValue:", por.m_hashValue); printOut("hashValue:", por.m_hashValue);
printOut("schemaVersion:", por.m_schemaVersion);
switch (por.m_operationType) { switch (por.m_operationType) {
case 0: case 0:
ndbout_c("%-30s%-12u%-6s", "operationType:", ndbout_c("%-30s%-12u%-6s", "operationType:",
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define NO_PAGES_IN_MBYTE 32 #define NO_PAGES_IN_MBYTE 32
#define NO_MBYTE_IN_FILE 16 #define NO_MBYTE_IN_FILE 16
#define COMMITTRANSACTIONRECORDSIZE 8 #define COMMITTRANSACTIONRECORDSIZE 9
#define COMPLETEDGCIRECORDSIZE 2 #define COMPLETEDGCIRECORDSIZE 2
#define PAGEHEADERSIZE 32 #define PAGEHEADERSIZE 32
#define FILEDESCRIPTORHEADERSIZE 3 #define FILEDESCRIPTORHEADERSIZE 3
...@@ -89,7 +89,6 @@ protected: ...@@ -89,7 +89,6 @@ protected:
Uint32 m_recordType; Uint32 m_recordType;
Uint32 m_logRecordSize; Uint32 m_logRecordSize;
Uint32 m_hashValue; Uint32 m_hashValue;
Uint32 m_schemaVersion;
Uint32 m_operationType; // 0 READ, 1 UPDATE, 2 INSERT, 3 DELETE Uint32 m_operationType; // 0 READ, 1 UPDATE, 2 INSERT, 3 DELETE
Uint32 m_attributeLength; Uint32 m_attributeLength;
Uint32 m_keyLength; Uint32 m_keyLength;
...@@ -190,6 +189,7 @@ public: ...@@ -190,6 +189,7 @@ public:
protected: protected:
Uint32 m_recordType; Uint32 m_recordType;
Uint32 m_tableId; Uint32 m_tableId;
Uint32 m_schemaVersion;
Uint32 m_fragmentId; Uint32 m_fragmentId;
Uint32 m_fileNumberOfPrepareOperation; Uint32 m_fileNumberOfPrepareOperation;
Uint32 m_startPageNumberOfPrepareOperation; Uint32 m_startPageNumberOfPrepareOperation;
......
...@@ -105,6 +105,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -105,6 +105,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*thePageHeader); if (thePrintFlag) ndbout << (*thePageHeader);
if (theCheckFlag) { if (theCheckFlag) {
if(!thePageHeader->check()) { if(!thePageHeader->check()) {
ndbout << "Error in thePageHeader->check()" << endl;
doExit(); doExit();
} }
...@@ -146,6 +147,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -146,6 +147,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*fdRecord); if (thePrintFlag) ndbout << (*fdRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!fdRecord->check()) { if(!fdRecord->check()) {
ndbout << "Error in fdRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -163,6 +165,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -163,6 +165,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*nlRecord); if (thePrintFlag) ndbout << (*nlRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!nlRecord->check()) { if(!nlRecord->check()) {
ndbout << "Error in nlRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -176,6 +179,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -176,6 +179,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*cGCIrecord); if (thePrintFlag) ndbout << (*cGCIrecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!cGCIrecord->check()) { if(!cGCIrecord->check()) {
ndbout << "Error in cGCIrecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -189,6 +193,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -189,6 +193,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*poRecord); if (thePrintFlag) ndbout << (*poRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!poRecord->check()) { if(!poRecord->check()) {
ndbout << "Error in poRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -205,6 +210,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -205,6 +210,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*ctRecord); if (thePrintFlag) ndbout << (*ctRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!ctRecord->check()) { if(!ctRecord->check()) {
ndbout << "Error in ctRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -221,6 +227,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -221,6 +227,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*ictRecord); if (thePrintFlag) ndbout << (*ictRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!ictRecord->check()) { if(!ictRecord->check()) {
ndbout << "Error in ictRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -243,6 +250,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read ...@@ -243,6 +250,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if (thePrintFlag) ndbout << (*atRecord); if (thePrintFlag) ndbout << (*atRecord);
if (theCheckFlag) { if (theCheckFlag) {
if(!atRecord->check()) { if(!atRecord->check()) {
ndbout << "Error in atRecord->check()" << endl;
doExit(); doExit();
} }
} }
...@@ -329,6 +337,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old ...@@ -329,6 +337,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old
if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) { if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) {
if (theCheckFlag) { if (theCheckFlag) {
if(!poRecord->check()) { if(!poRecord->check()) {
ndbout << "Error in poRecord->check() (readRecordOverPageBoundary)" << endl;
doExit(); doExit();
} }
} }
...@@ -344,6 +353,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old ...@@ -344,6 +353,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old
if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) { if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) {
if (theCheckFlag) { if (theCheckFlag) {
if(!ctRecord->check()) { if(!ctRecord->check()) {
ndbout << "Error in ctRecord->check() (readRecordOverPageBoundary)" << endl;
doExit(); doExit();
} }
} }
...@@ -359,6 +369,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old ...@@ -359,6 +369,7 @@ Uint32 readRecordOverPageBoundary(Uint32 *pagePtr, Uint32 pageIndex, Uint32 old
if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) { if (recordSize < (PAGESIZE - PAGEHEADERSIZE)) {
if (theCheckFlag) { if (theCheckFlag) {
if(!ictRecord->check()) { if(!ictRecord->check()) {
ndbout << "Error in ictRecord->check() (readRecordOverPageBoundary)" << endl;
doExit(); doExit();
} }
} }
......
...@@ -120,6 +120,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length); ...@@ -120,6 +120,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length);
void fix_sql_mode_var(THD *thd, enum_var_type type); void fix_sql_mode_var(THD *thd, enum_var_type type);
static byte *get_error_count(THD *thd); static byte *get_error_count(THD *thd);
static byte *get_warning_count(THD *thd); static byte *get_warning_count(THD *thd);
static byte *get_have_innodb(THD *thd);
/* /*
Variable definition list Variable definition list
...@@ -537,6 +538,8 @@ sys_var_thd_time_zone sys_time_zone("time_zone"); ...@@ -537,6 +538,8 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
/* Read only variables */ /* Read only variables */
sys_var_const_str sys_os("version_compile_os", SYSTEM_TYPE); sys_var_const_str sys_os("version_compile_os", SYSTEM_TYPE);
sys_var_readonly sys_have_innodb("have_innodb", OPT_GLOBAL,
SHOW_CHAR, get_have_innodb);
/* Global read-only variable describing server license */ /* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE)); sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
...@@ -587,6 +590,7 @@ sys_var *sys_variables[]= ...@@ -587,6 +590,7 @@ sys_var *sys_variables[]=
&sys_ft_boolean_syntax, &sys_ft_boolean_syntax,
&sys_foreign_key_checks, &sys_foreign_key_checks,
&sys_group_concat_max_len, &sys_group_concat_max_len,
&sys_have_innodb,
&sys_identity, &sys_identity,
&sys_init_connect, &sys_init_connect,
&sys_init_slave, &sys_init_slave,
...@@ -2776,6 +2780,12 @@ static byte *get_error_count(THD *thd) ...@@ -2776,6 +2780,12 @@ static byte *get_error_count(THD *thd)
} }
static byte *get_have_innodb(THD *thd)
{
return (byte*) show_comp_option_name[have_innodb];
}
/**************************************************************************** /****************************************************************************
Main handling of variables: Main handling of variables:
- Initialisation - Initialisation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment