Commit b9ce7600 authored by unknown's avatar unknown

Merge pmartin@work.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/pem/work/mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
parents 9bca9fb7 b36dbc4a
Administrador@light.
Administrator@co3064164-a. Administrator@co3064164-a.
Administrator@co3064164-a.rochd1.qld.optushome.com.au Administrator@co3064164-a.rochd1.qld.optushome.com.au
Administrator@fred. Administrator@fred.
...@@ -33,6 +34,7 @@ lenz@kallisto.mysql.com ...@@ -33,6 +34,7 @@ lenz@kallisto.mysql.com
lenz@mysql.com lenz@mysql.com
miguel@hegel.br miguel@hegel.br
miguel@hegel.local miguel@hegel.local
miguel@light.
miguel@light.local miguel@light.local
monty@bitch.mysql.fi monty@bitch.mysql.fi
monty@donna.mysql.fi monty@donna.mysql.fi
...@@ -47,10 +49,12 @@ monty@tramp.mysql.fi ...@@ -47,10 +49,12 @@ monty@tramp.mysql.fi
monty@work.mysql.com monty@work.mysql.com
mwagner@cash.mwagner.org mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org mwagner@evoq.mwagner.org
mwagner@work.mysql.com
nick@mysql.com nick@mysql.com
nick@nick.leippe.com nick@nick.leippe.com
paul@central.snake.net paul@central.snake.net
paul@teton.kitebird.com paul@teton.kitebird.com
pem@mysql.com
peter@linux.local peter@linux.local
peter@mysql.com peter@mysql.com
ram@ram.(none) ram@ram.(none)
...@@ -62,6 +66,7 @@ serg@build.mysql2.com ...@@ -62,6 +66,7 @@ serg@build.mysql2.com
serg@serg.mysql.com serg@serg.mysql.com
serg@sergbook.mysql.com serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi sinisa@rhols221.adsl.netsonic.fi
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee tfr@sarvik.tfr.cafe.ee
tim@bitch.mysql.fi tim@bitch.mysql.fi
...@@ -82,7 +87,3 @@ worm@altair.is.lan ...@@ -82,7 +87,3 @@ worm@altair.is.lan
zak@balfor.local zak@balfor.local
zak@linux.local zak@linux.local
zgreant@mysql.com zgreant@mysql.com
tfr@beta.frontier86.ee
Administrador@light.
mwagner@work.mysql.com
pem@mysql.com
...@@ -93,11 +93,11 @@ sub main ...@@ -93,11 +93,11 @@ sub main
$pec= $? >> 8; $pec= $? >> 8;
abort($dir, "Extracting from tar failed!\n") if ($pec); abort($dir, "Extracting from tar failed!\n") if ($pec);
# remove the 'PUBLIC' file from distribution and copy LICENSE # remove the 'PUBLIC' file from distribution and copy MySQLEULA.txt
# on the toplevel of the directory instead. file 'PUBLIC' shouldn't # on the toplevel of the directory instead. file 'PUBLIC' shouldn't
# exist in the new mysql distributions, but let's be sure.. # exist in the new mysql distributions, but let's be sure..
`rm -f $destdir/PUBLIC $destdir/README`; `rm -f $destdir/PUBLIC $destdir/README`;
`cp -p $WD/Docs/LICENSE $destdir/`; `cp -p $WD/Docs/MySQLEULA.txt $destdir/`;
# fix file copyrights # fix file copyrights
&fix_usage_copyright(); &fix_usage_copyright();
...@@ -129,7 +129,7 @@ sub fix_usage_copyright ...@@ -129,7 +129,7 @@ sub fix_usage_copyright
foreach my $Cfile (@Cfiles) foreach my $Cfile (@Cfiles)
{ {
chop $Cfile; chop $Cfile;
`replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file LICENSE for details" -- $Cfile`; `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- $Cfile`;
} }
} }
......
...@@ -15,10 +15,10 @@ Getopts("v") || die "Aborted"; ...@@ -15,10 +15,10 @@ Getopts("v") || die "Aborted";
"This software is distributed with NO WARRANTY OF ANY KIND. No author or", "This software is distributed with NO WARRANTY OF ANY KIND. No author or",
"distributor accepts any responsibility for the consequences of using it, or", "distributor accepts any responsibility for the consequences of using it, or",
"for whether it serves any particular purpose or works at all, unless he or", "for whether it serves any particular purpose or works at all, unless he or",
"she says so in writing. Refer to the LICENSE file for details.", "she says so in writing. Refer to the MySQLEULA.txt file for details.",
"", "",
"Every copy of this file must include a copy of the License, normally in a", "Every copy of this file must include a copy of the License, normally in a",
"plain ASCII text file named LICENSE. The License grants you the right to", "plain ASCII text file named MySQLEULA.txt. The License grants you the right to",
"copy, modify and redistribute this file, but only under certain conditions", "copy, modify and redistribute this file, but only under certain conditions",
"described in the License. Among other things, the License requires that", "described in the License. Among other things, the License requires that",
"the copyright notice and this notice be preserved on all copies" "the copyright notice and this notice be preserved on all copies"
......
End-User License Agreement for MySQL Commercial Server
(Version 6, July 13, 2000)
Copyright (C) 2000, MySQL AB & MySQL Finland AB
Stockholm SWEDEN, Helsingfors FINLAND and Uppsala SWEDEN
All rights reserved.
Definitions. This End-User License Agreement ("License") is a legal
agreement between you, either an individual or a single entity,
("Licensee") and MySQL AB, MySQL Finland AB and Detron HB ("Licensor")
for the software product identified above, which includes computer
software and may include associated media, printed materials, and
online or electronic documentation ("Software"). The Software also
includes any updates and supplements to the original Software product
provided to you by Licensor. Any software provided along with the
Software that is associated with a separate end-user license agreement
is licensed to you under the terms of that license agreement.
Agreement to the License. The Software is protected by copyright laws
and international copyright treaties, as well as other intellectual
property laws and treaties. The Software is licensed, not sold. If you
do not agree to the terms of this License, do not install or use the
Software. By installing, copying, modifying, downloading,
distributing, accessing or otherwise using the Software, you agree to
be bound by the following terms of this License:
1. Grant for Authorized Use of the Software
Licensor hereby grants to Licensee a non-exclusive, non-transferable
right to use the Software in: - Installing. You may install copies of
the Software for authorized use on your computers, including
workstations, terminals and other digital electronic devices
("Computer"). - Single Computer use. You may only use the Software on
one Computer at a time regardless the number of Computers with
installed copies. This right covers any number of concurrent users,
CPUs and MySQL-servers with any number of copies running on one
Computer.
2. Description of Other Rights
Licensor grants no other rights to the Software except as expressly
set forth herein:
- Copying. You may not copy the Software unless copies or adaptations
are meant for authorized use, archival purposes or when copying or
adaptation is a necessary step in the authorized use of the Software.
- Distribution. You may not distribute the Software.
- Modifying. You may modify the Software but you must reproduce all
copyright notices in the Software on all modified copies and
adaptations.
- License transfer. You may resell or rent this License. If any
modifications have been made to the Software, you must include a
proper notification that the Software is modified.
- Support services. Licensor may provide you with support services
related to the Software. Use and terms of support services are not
governed in this License.
3. Term
This license is effective until terminated. Licensor has the
right to terminate your License immediately if you fail to comply with
any term of this License.
4. No Warranty
The Software is provided "as is". Licensor makes no warranties,
express or implied, arising from course of dealing or usage of trade,
or statutory, as to any matter whatsoever. In particular, any and all
warranties or merchantability, fitness for a particular purpose or
non-infringement of third party rights are expressly excluded. The
entire risk as to the quality and performance of the Software is with
you. If the Software proves defective, you assume all the cost of
necessary service, repair or correction.
5. Limited Liability
In no event will Licensor be liable to you for any consequential or
incidental damages, including any lost profits or lost savings, or for
any claim by any party, even if a Licensor representative has been
advised of the possibility of such damages. Some states do not allow
the exclusion or limitation of liability. Therefore, in any case, the
entire liability of Licensor under any provision of this License is
limited to the amount actually paid by you for the Software.
6. Governing Law and Jurisdiction
This License will be governed by the laws in force in
Sweden. Jurisdiction is with Tingsrätten of Stockholm, Sweden.
Should you have any questions concerning the validity of this License,
please contact: mysql-licensing@mysql.com.
This diff is collapsed.
...@@ -50797,6 +50797,11 @@ each individual 4.0.x release. ...@@ -50797,6 +50797,11 @@ each individual 4.0.x release.
@appendixsubsec Changes in release 4.0.5 @appendixsubsec Changes in release 4.0.5
@itemize @itemize
@item @item
Fixed a bug in multi-table deletes when outer join is used on an empty
table, which get's first to be deleted
@item
Fixed a bug in multi-table updates when a single table is updated
@item
Updated source tree to be built using @code{automake 1.5} and Updated source tree to be built using @code{automake 1.5} and
@code{libtool 1.4}. @code{libtool 1.4}.
@item @item
# ---------------------------------------------------------------------------
!if !$d(BCB)
BCB = $(MAKEDIR)\..
!endif
# ---------------------------------------------------------------------------
# IDE SECTION
# ---------------------------------------------------------------------------
# The following section of the project makefile is managed by the BCB IDE.
# It is recommended to use the IDE to change any of the values in this
# section.
# ---------------------------------------------------------------------------
VERSION = BCB.04.04
# ---------------------------------------------------------------------------
PROJECT = emb_sample.exe
OBJFILES = emb_sample.obj emb_samples.obj
RESFILES = emb_sample.res
RESDEPEN = $(RESFILES) emb_samples.dfm
LIBFILES = libmysqld.lib
LIBRARIES =
SPARELIBS = Vcl40.lib
PACKAGES = Vcl40.bpi Vclx40.bpi vcljpg40.bpi bcbsmp40.bpi Qrpt40.bpi Vcldb40.bpi \
ibsmp40.bpi vcldbx40.bpi TeeUI40.bpi teedb40.bpi tee40.bpi nmfast40.bpi \
dclocx40.bpi
DEFFILE =
# ---------------------------------------------------------------------------
PATHCPP = .;
PATHASM = .;
PATHPAS = .;
PATHRC = .;
DEBUGLIBPATH = $(BCB)\lib\debug
RELEASELIBPATH = $(BCB)\lib\release
USERDEFINES =
SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES
# ---------------------------------------------------------------------------
CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;..\..\..\include -Od -Hc \
-H=$(BCB)\lib\vcl40.csm -w -Ve -r- -a8 -k -y -v -vi- -c -b- -w-par -w-inl -Vx \
-tW -tWM -D$(SYSDEFINES);$(USERDEFINES)
PFLAGS = -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \
-I$(BCB)\include;$(BCB)\include\vcl;..\..\..\include -$YD -$W -$O- -v -JPHNE -M
RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl;..\..\..\include
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\..\include /mx /w2 /zd
LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) -aa -Tpe -x -Gn -v
# ---------------------------------------------------------------------------
ALLOBJ = c0w32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES)
ALLRES = $(RESFILES)
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib
# ---------------------------------------------------------------------------
!ifdef IDEOPTIONS
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1046
CodePage=1252
[Version Info Keys]
CompanyName=MySQL AB
FileDescription=Embedded Server Sample
FileVersion=1.0.0.0
InternalName=Builder Embedded Server Sample
LegalCopyright=GNU
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[HistoryLists\hlIncludePath]
Count=2
Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\..\include
Item1=$(BCB)\include;$(BCB)\include\vcl;..\..\..\inluce
[HistoryLists\hlLibraryPath]
Count=1
Item0=$(BCB)\lib\obj;$(BCB)\lib
[HistoryLists\hlDebugSourcePath]
Count=1
Item0=$(BCB)\source\vcl
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
[Parameters]
RunParams=
HostApplication=
RemoteHost=
RemotePath=
RemoteDebug=0
[Compiler]
InMemoryExe=0
ShowInfoMsgs=0
!endif
# ---------------------------------------------------------------------------
# MAKE SECTION
# ---------------------------------------------------------------------------
# This section of the project file is not used by the BCB IDE. It is for
# the benefit of building from the command-line using the MAKE utility.
# ---------------------------------------------------------------------------
.autodepend
# ---------------------------------------------------------------------------
!if !$d(BCC32)
BCC32 = bcc32
!endif
!if !$d(CPP32)
CPP32 = cpp32
!endif
!if !$d(DCC32)
DCC32 = dcc32
!endif
!if !$d(TASM32)
TASM32 = tasm32
!endif
!if !$d(LINKER)
LINKER = ilink32
!endif
!if !$d(BRCC32)
BRCC32 = brcc32
!endif
# ---------------------------------------------------------------------------
!if $d(PATHCPP)
.PATH.CPP = $(PATHCPP)
.PATH.C = $(PATHCPP)
!endif
!if $d(PATHPAS)
.PATH.PAS = $(PATHPAS)
!endif
!if $d(PATHASM)
.PATH.ASM = $(PATHASM)
!endif
!if $d(PATHRC)
.PATH.RC = $(PATHRC)
!endif
# ---------------------------------------------------------------------------
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(BCB)\BIN\$(LINKER) @&&!
$(LFLAGS) +
$(ALLOBJ), +
$(PROJECT),, +
$(ALLLIB), +
$(DEFFILE), +
$(ALLRES)
!
# ---------------------------------------------------------------------------
.pas.hpp:
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
.pas.obj:
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
.cpp.obj:
$(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
.c.obj:
$(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
.c.i:
$(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
.cpp.i:
$(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
.asm.obj:
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
.rc.res:
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
# ---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
USERES("emb_sample.res");
USEFORM("emb_samples.cpp", Form1);
USELIB("libmysqld.lib");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->Title = "MySQL Embedded Server Sample";
Application->CreateForm(__classid(TForm1), &Form1);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "emb_samples.h"
#include <winsock.h>
#include <mysql.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <deque.h>
bool b_new_line = false;
const char *server_groups[] = {
"", "embedded", "server", NULL
};
MYSQL *MySQL;
deque<string> fill_rows(MYSQL_RES *res);
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
deque<string> fill_rows(MYSQL_RES *res)
{
MYSQL_ROW row;
deque<string> rows;
while ((row=mysql_fetch_row(res)) != 0)
{
mysql_field_seek(res,0);
for (unsigned int i=0 ; i < mysql_num_fields(res); i++)
rows.push_back(row[i]);
}
return rows;
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
if (is_server_started)
{
ToggleButton->Caption = "Quit";
Timer1->Enabled = false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
is_server_started = false;
computer_ip(); /* get the computer name and IP number */
/* init the tree database screen */
db_root = DBView->Items->Add(NULL, db_root_caption.UpperCase());
db_root->ImageIndex = 0;
}
//---------------------------------------------------------------------------
/* button which handle the init of mysql server or quit the app */
void __fastcall TForm1::ToggleButtonClick(TObject *Sender)
{
if (!is_server_started)
{
mysql_server_init(NULL, NULL, (char **)server_groups) ;
connect_server();
get_dbs();
}
else
{
mysql_server_end();
Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::computer_ip(void)
{
WORD wVersionRequested;
WSADATA WSAData;
wVersionRequested = MAKEWORD(1,1);
WSAStartup(wVersionRequested,&WSAData);
hostent *P;
char s[128];
in_addr in;
char *P2;
gethostname(s, 128);
P = gethostbyname(s);
db_root_caption = P->h_name;
in.S_un.S_un_b.s_b1 = P->h_addr_list[0][0];
in.S_un.S_un_b.s_b2 = P->h_addr_list[0][1];
in.S_un.S_un_b.s_b3 = P->h_addr_list[0][2];
in.S_un.S_un_b.s_b4 = P->h_addr_list[0][3];
P2 = inet_ntoa(in);
db_root_caption += " ( " + (AnsiString)P2 + " )";
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::connect_server()
{
bool ret_value = false;
MySQL = mysql_init(MySQL);
if (!MySQL)
return ret_value;
if (mysql_real_connect(MySQL, NULL, NULL, NULL, NULL, 0, NULL, 0))
{
ret_value = true;
is_server_started = true;
}
return ret_value;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
if (is_server_started)
mysql_server_end();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::DBViewClick(TObject *Sender)
{
if (DBView->Selected != db_root && DBView->Selected != NULL)
{
get_tables(DBView->Selected->Text);
clean_desc_grid();
}
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::get_tables(String db_name)
{
MYSQL_RES *res;
AnsiString s_cmd;
TableView->Items->Clear();
s_cmd = "use ";
s_cmd+= db_name.c_str();
if (mysql_query(MySQL, s_cmd.c_str()) ||
!(res=mysql_list_tables(MySQL,"%")))
return false;
tables_node = TableView->Items->Add(NULL, db_name.c_str());
tables_node->ImageIndex = 1;
tables_node->SelectedIndex = 1;
deque<string> rows = fill_rows(res);
mysql_free_result(res);
fill_tree(rows,tables_tree,tables_node,TableView,2);
return true;
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::get_dbs(void)
{
MYSQL_RES *res;
if (!is_server_started)
return false;
if (!(res=mysql_list_dbs(MySQL,"%")))
return false;
deque<string> rows = fill_rows(res);
mysql_free_result(res);
fill_tree(rows,MySQLDbs,db_root,DBView,1);
info_server->Text = mysql_get_server_info(MySQL);
return true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::fill_tree(deque<string> rows,
TTreeNode *root,
TTreeNode *child,
TTreeView *View,
int image_index)
{
deque<string>::iterator r;
for(r = rows.begin(); r != rows.end() ; r++)
{
root = View->Items->AddChild(child, (*r).c_str());
root->ImageIndex = image_index;
root->SelectedIndex = image_index;
}
child->Expanded = true;
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::get_desc_table(String table_name)
{
MYSQL_RES *res, *res1;
MYSQL_ROW row;
AnsiString use_db, show_cols, show_desc;
unsigned int num_fields;
int fields_control = 0, grid_row = 1, fields_number;
b_new_line= true;
clean_desc_grid();
use_db = "use ";
use_db+= DBView->Selected->Text.c_str();
show_desc = "desc ";
show_cols = "show full columns from ";
show_cols+= table_name.c_str();
show_desc+= table_name.c_str();
if (mysql_query(MySQL, use_db.c_str() ))
return false;
if (mysql_query(MySQL, show_cols.c_str() ) ||
!(res1=mysql_store_result(MySQL)))
{
if (mysql_query(MySQL, show_desc.c_str() ) ||
!(res1=mysql_store_result(MySQL)))
return false ;
}
mysql_fetch_row(res1);
mysql_field_seek(res1,0);
fields_number = (mysql_num_fields(res1) - 2);
mysql_free_result(res1);
if (mysql_query(MySQL, show_cols.c_str() ) ||
!(res=mysql_store_result(MySQL)))
{
if (mysql_query(MySQL, show_desc.c_str() ) ||
!(res=mysql_store_result(MySQL)))
return false ;
}
titles_grid();
while ((row=mysql_fetch_row(res)) != 0)
{
mysql_field_seek(res,0);
for (num_fields=0 ; num_fields < mysql_num_fields(res); num_fields++)
{
if (fields_control <= fields_number )
{
desc_table_grid->Cells[fields_control][grid_row] = row[num_fields];
fields_control++;
}
else
{
desc_table_grid->Cells[(fields_control)][grid_row] = row[num_fields];
fields_control = 0;
grid_row++ ;
desc_table_grid->RowCount++;
}
}
}
desc_table_grid->RowCount--;
mysql_free_result(res);
return true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::TableViewClick(TObject *Sender)
{
if (DBView->Selected != db_root && DBView->Selected != NULL)
if (DBView->Selected != tables_tree)
get_desc_table(TableView->Selected->Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::clean_desc_grid(void)
{
desc_table_grid->RowCount= 2;
desc_table_grid->Cells[0][1] = "";
desc_table_grid->Cells[1][1] = "";
desc_table_grid->Cells[2][1] = "";
desc_table_grid->Cells[3][1] = "";
desc_table_grid->Cells[4][1] = "";
desc_table_grid->Cells[5][1] = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::titles_grid(void)
{
desc_table_grid->Cells[0][0] = "Field";
desc_table_grid->Cells[1][0] = "Type";
desc_table_grid->Cells[2][0] = "Null";
desc_table_grid->Cells[3][0] = "Key";
desc_table_grid->Cells[4][0] = "Default";
desc_table_grid->Cells[5][0] = "Extra";
desc_table_grid->Cells[6][0] = "Privileges";
}
//---------------------------------------------------------------------------
#ifndef emb_samplesH
#define emb_samplesH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <Grids.hpp>
#include <ImgList.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Buttons.hpp>
#include <deque.h>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TGroupBox *GroupBox1;
TTreeView *DBView;
TTreeView *TableView;
TStringGrid *desc_table_grid;
TImageList *ImageList2;
TStatusBar *StatusBar1;
TImage *Image1;
TBitBtn *ToggleButton;
TTimer *Timer1;
TLabel *Label1;
TEdit *info_server;
TLabel *Label2;
void __fastcall Timer1Timer(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall ToggleButtonClick(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall DBViewClick(TObject *Sender);
void __fastcall TableViewClick(TObject *Sender);
private: // User declarations
public: // User declarations
bool is_server_started;
AnsiString db_root_caption;
TTreeNode *db_root, *MySQLDbs, *tables_node, *tables_tree;
void __fastcall computer_ip(void);
bool __fastcall get_dbs(void);
bool __fastcall get_tables(String db_name);
bool __fastcall get_desc_table(String table_name);
bool __fastcall connect_server();
void __fastcall clean_desc_grid(void);
void __fastcall titles_grid(void);
void __fastcall fill_tree(deque<string> rows,
TTreeNode *root,
TTreeNode *child,
TTreeView *View,
int image_index);
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
This diff was suppressed by a .gitattributes entry.
...@@ -135,3 +135,19 @@ ID ParId tst tst1 ...@@ -135,3 +135,19 @@ ID ParId tst tst1
2 2 MSSQL Microsoft 2 2 MSSQL Microsoft
3 3 ORACLE ORACLE 3 3 ORACLE ORACLE
drop table parent, child; drop table parent, child;
drop table if exists t1, t2 ;
create table t1 (n numeric(10));
create table t2 (n numeric(10));
insert into t2 values (1),(2),(4),(8),(16),(32);
select * from t2 left outer join t1 using (n);
n n
1 NULL
2 NULL
4 NULL
8 NULL
16 NULL
32 NULL
delete t1,t2 from t2 left outer join t1 using (n);
select * from t2 left outer join t1 using (n);
n n
drop table if exists t1,t2 ;
...@@ -139,4 +139,12 @@ WHERE child.ParId = parent.Id; ...@@ -139,4 +139,12 @@ WHERE child.ParId = parent.Id;
select * from child; select * from child;
drop table parent, child; drop table parent, child;
\ No newline at end of file drop table if exists t1, t2 ;
create table t1 (n numeric(10));
create table t2 (n numeric(10));
insert into t2 values (1),(2),(4),(8),(16),(32);
select * from t2 left outer join t1 using (n);
delete t1,t2 from t2 left outer join t1 using (n);
select * from t2 left outer join t1 using (n);
drop table if exists t1,t2 ;
...@@ -55,7 +55,7 @@ mkdir $BASE $BASE/bin $BASE/data $BASE/data/mysql $BASE/data/test \ ...@@ -55,7 +55,7 @@ mkdir $BASE $BASE/bin $BASE/data $BASE/data/mysql $BASE/data/test \
chmod o-rwx $BASE/data $BASE/data/* chmod o-rwx $BASE/data $BASE/data/*
for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \ for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \
LICENSE Docs/manual.html Docs/manual.txt Docs/manual_toc.html MySQLEULA.txt Docs/manual.html Docs/manual.txt Docs/manual_toc.html
do do
if [ -f $i ] if [ -f $i ]
then then
......
...@@ -329,7 +329,7 @@ bool multi_delete::send_data(List<Item> &values) ...@@ -329,7 +329,7 @@ bool multi_delete::send_data(List<Item> &values)
table->status|= STATUS_DELETED; table->status|= STATUS_DELETED;
if (!(error=table->file->delete_row(table->record[0]))) if (!(error=table->file->delete_row(table->record[0])))
deleted++; deleted++;
else else if (!table_being_deleted->next)
{ {
table->file->print_error(error,MYF(0)); table->file->print_error(error,MYF(0));
DBUG_RETURN(1); DBUG_RETURN(1);
......
...@@ -768,7 +768,7 @@ bool multi_update::send_eof() ...@@ -768,7 +768,7 @@ bool multi_update::send_eof()
thd->proc_info="updating the reference tables"; thd->proc_info="updating the reference tables";
/* Does updates for the last n - 1 tables, returns 0 if ok */ /* Does updates for the last n - 1 tables, returns 0 if ok */
int error = do_updates(false); /* do_updates returns 0 if success */ int error = (num_updated > 1) ? do_updates(false) : 0; /* do_updates returns 0 if success */
/* reset used flags */ /* reset used flags */
#ifndef NOT_USED #ifndef NOT_USED
......
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